// JavaScript Document
var xmlHttp

function checkemail(str,str1)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
if (str==""){
	document.getElementById("emailcheck").innerHTML="Enter value for Email"
//	f1.email.focus();
	return false;
}
n=str.indexOf('.');
n1=str.indexOf('@');
if(!((n>0) && (n1>0)))
{
	document.getElementById("emailcheck").innerHTML="Email is not ok"
	login.lemail.focus();
	return false;
}
var url="checkemail.php"
url=url+"?q="+str
url=url+"&q1="+str1
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("emailcheck").innerHTML=xmlHttp.responseText 
if (xmlHttp.responseText!=""){
document.login.lemail.value=""
document.login.lemail.focus()
} 
} 
} 
function emailcheck(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
if (str==""){
	document.getElementById("checkemail").innerHTML="Enter Email ID"
//	document.reg.email.focus()
	return false;
}
n=str.indexOf('.');
n1=str.indexOf('@');
if(!((n>0) && (n1>0)))
{
	document.getElementById("checkemail").innerHTML="Email is not ok"
	document.registration.email.focus()
	return false;
}
var url="emailcheck.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("checkemail").innerHTML=xmlHttp.responseText 

if (xmlHttp.responseText!=""){
document.registration.email.value=""
document.registration.email.focus()
} 
} 
} 

function displayphoto(str)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	if (str=="all"){
		document.getElementById("displayphoto").innerHTML=""; 
		return false;
	}
	else{
		var url="displayphoto.php"
		url=url+"?q="+str
		url=url+"&sid="+Math.random()
		xmlHttp.onreadystatechange=stateChanged3
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
}
function stateChanged3() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("displayphoto").innerHTML=xmlHttp.responseText 
	} 
} 
 

function displaytruefalse(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="displaytrue.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged5
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged5() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("tcontent1").innerHTML=xmlHttp.responseText 
} 
}


function displayyesno(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="displayyesno.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged6
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged6() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("tcontent1").innerHTML=xmlHttp.responseText 
} 
}


function displayoption(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="displayoption.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged7
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged7() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("tcontent1").innerHTML=xmlHttp.responseText 
} 
}

function displayopen(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="displayopen.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged8
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function stateChanged8() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("tcontent1").innerHTML=xmlHttp.responseText 
} 
}

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}