function setOpacity( value, div_name ) {
	document.getElementById(div_name).style.opacity = value / 10;
	document.getElementById(div_name).style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup(div_name) {
	for( var i = 0 ; i <= 100 ; i++ )		
		setTimeout("setOpacity(" + (i / 10) + ",'" + div_name + "')",8 * i);

}

function fadeOutMyPopup(div_name) {
	if (div_name == "txtHint3")
	  {
		  document.getElementById("hide2").style.display = "none";
		  document.getElementById("show2").style.display = "block";
	  }
	for( var i = 0 ; i <= 100 ; i++ ) {
		setTimeout( "setOpacity(" + (10 - i / 10) + ",'" + div_name + "')" , 8 * i );
	}
	

	setTimeout("closeMyPopup('"+div_name+"')", 800 );
}

function closeMyPopup(div_name) {
	document.getElementById(div_name).style.display = "none";
}

function fireMyPopup(div_name) {
	setOpacity( 0 );
	document.getElementById(div_name).style.display = "block";
	fadeInMyPopup(div_name);
}

function showCont(id, page, div_name, archive)
{
var url=archive;
url=url+"?id="+id+"&page="+page;
url=url+"&tid="+Math.random();


if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById(div_name).innerHTML=xmlhttp.responseText;
	setOpacity( 0, div_name);
	document.getElementById(div_name).style.display = "block";
	fadeInMyPopup(div_name);
	if (div_name == "txtHint3")
	  {
		  document.getElementById("hide2").style.display = "block";
		  document.getElementById("show2").style.display = "none";
	  }
		
    }
  }


	
xmlhttp.open("GET",url,true);
xmlhttp.send();

	
}
