function GetXmlHttpObject(handler)
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
		 {
			objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
	return objXMLHttp
}


function sendPassword(str)
{
	if (str.length==0)
	{ 
		
		document.getElementById("UserName").focus();
		document.getElementById("sendEmail").innerHTML="Please enter your UserName."
		return
	}
	else
	{
		
	}
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
		var url="/forgotpassword.html"
		url=url+"?q="+str
		url=url+"&sid="+Math.random()
		xmlHttp.onreadystatechange=stateChangedForPassword 
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
}

function stateChangedForPassword() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		
		document.getElementById("sendEmail").innerHTML=xmlHttp.responseText 
	} 
	else
	{
		document.getElementById("sendEmail").innerHTML="<img src=\"/images/wait.gif\" height='16' style='vertical-align:middle;'>"
	}
} 

var mouseX , mouseY;
var IE = document.all?true:false;

if (IE)
{

}
else
{
	document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = getMouseXY;
}


function opencontent(id , left , top , width , height)
{
	if (IE) { getMouseXY();	}
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
		var url="/popup/sponsors.html"
		url=url+"?id="+id
		url=url+"&sid="+Math.random()
		xmlHttp.onreadystatechange= function () {
				document.getElementById("opencontentcontainer").style.width  	  = width;
				document.getElementById("opencontentcontainer").style.height 	  = height;
				document.getElementById("opencontentcontainer").style.left  = window.mouseX + left;
				document.getElementById("opencontentcontainer").style.top   = window.mouseY + top;
				document.getElementById("opencontentcontainer").style.display 	  = '';
				
				var paddingTop = parseInt(height/2) - 50;
				
				if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
				{ 
					document.getElementById("opencontentcontent").innerHTML=xmlHttp.responseText 
				} 
				else
				{
					document.getElementById("opencontentcontent").innerHTML="<center><img src=\"/images/wait.gif\" height='16' style='vertical-align:middle; margin-top="+paddingTop+"px;'></center>"
				}
				
			
		}
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
}



function getMouseXY(e) {

var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body
var dsocleft=document.all? iebody.scrollLeft : pageXOffset
var dsoctop=document.all? iebody.scrollTop : pageYOffset

if (IE) { // grab the x-y pos.s if browser is IE

tempX = event.clientX + dsocleft;
tempY = event.clientY + dsoctop;
}
else {  // grab the x-y pos.s if browser is NS
tempX = e.pageX;
tempY = e.pageY;
}  


if (tempX < 0){tempX = 0;}
if (tempY < 0){tempY = 0;}  
//document.getElementById('coords').innerHTML = window.mouseY + ' ' + window.mouseX + ' ' + dsoctop;
if (IE) 
{
window.mouseX = tempX ; //- 135;
window.mouseY = tempY ; //- 113
}
else
{
window.mouseX = tempX;
window.mouseY = tempY;	
}
return true;
}