
var req=null;
var console=null;
var READY_STATE_UNINITIALIZED=0;
var READY_STATE_LOADING=1;
var READY_STATE_LOADED=2;
var READY_STATE_INTERACTIVE=3;
var READY_STATE_COMPLETE=4;

function initXMLHTTPRequest() {
	var xRequest=null;
	if (window.XMLHttpRequest) {
		xRequest=new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try { 
		xRequest = new ActiveXObject("Msxml2.XMLHTTP"); 
		} 
		catch(e1) { 
		try { 
		xRequest = new ActiveXObject("Microsoft.XMLHTTP"); 
		}
		catch(e2) { 
		xRequest = null; 
		} 
		}
		//xRequest=new ActiveXObject("Microsoft.XMLHTTP");
	}
	return xRequest;
}

function sendRequest(url,params,HttpMethod) {
	if (!HttpMethod) {
		HttpMethod="GET";
	}
	req=initXMLHTTPRequest();
	if (req) {
		req.onreadystatechange=onReadyState;
		req.open("GET" , url , true);
		req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		req.send(params);
		
	}
}

function onReadyState() {
	var ready=req.readyState;
	var data=null;
	if (ready==READY_STATE_COMPLETE) {
		data=req.responseText;
		var ss="<div onmouseover=\"document.getElementById('menu').style.visibility='visible';m_obj.style.backgroundColor='white';\" onmouseout=\"document.getElementById('menu').style.visibility='hidden';m_obj.style.backgroundColor='#809F6C';\" style='position:relative;left:-3;top:-3;border: thin solid gray;border-width: 1px 1px 1px 1px;background-color:white;padding:5px 15px 15px 15px;'>"+data+"</div>";
//		alert(ss);
		document.getElementById('menu').innerHTML=ss;
	}
}
var m_obj;
function showwindow(obj,p) //(ev,p)
{
	m_obj=obj;
	var tmpObj = obj;   
	var obj_left = tmpObj.offsetLeft;   
	var obj_top = tmpObj.offsetTop;   
	if (tmpObj.offsetParent) {   
		while (tmpObj = tmpObj.offsetParent) {   
			obj_left += tmpObj.offsetLeft;   
			obj_top += tmpObj.offsetTop;   
		}   
	}   
	var winobj=document.getElementById('menu')
	winobj.style.left=(obj_left+3)+"px";  //x+"px";
	winobj.style.top=(obj_top+obj.offsetHeight+3)+"px";  //y+"px";
	winobj.innerHTML='';
	winobj.style.visibility='visible';
	sendRequest(p);
	
}
function gohome() {
	window.location='./';
}
function donate() {
	window.location='./donate.htm';
}
