/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ */

x = 300;
y = 0;
function setVisible(obj,filetype,fileid)
{
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	setTimeout("placeIt('layer1')",500);
	chk_me(fileid,filetype);
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	//setTimeout("placeIt('layer1')",500);
}
//window.onscroll = setTimeout("placeIt('layer1')",500,x,y);
function chk_me(filetype,fileid) {
	//Create Temporary message
	var notationS = document.getElementById("layer1")
	notationS.innerHTML = '<img src="images/please_wait.gif">Please Wait While We Fetch File Information.....';
	
	//Check domain here	
	http.open("GET", 'info.php?t='+fileid+'&f='+filetype, true);

http.onreadystatechange = handleHttpResponse;
	http.send(null);
}

function handleHttpResponse() {
	if (http.readyState == 4) {
		var notationS = document.getElementById("layer1")
		notationS.innerHTML = http.responseText;
	}
}

function getHTTPObject() { 
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp = false;
				}
		}
	@else xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}
	return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object 

