

function DoTheLogin(email,password,asppage,resp,lang)
{ 
	//document.form1.Submit.value='Looking...';
	
	//alert("oooo");
	var sPath = window.location.href;
	//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
	//alert(sPage);
	
	if(password == "" || email == ""){
			alert("Please enter your EMAIL - PASSWORD to continue.");
			return false;}
	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
		{
		alert ("Browser does not support HTTP Request")
		return
		} 
	
	var url=asppage;
	var resp2=resp;
	
	url=url+"?email="+email
	url=url+"&password="+password
	
	if (lang == "F"){
		url=url+"&lang=F"
		errtxt = "<br>Veuillez essayer de nouveau"
		document.getElementById(resp).innerHTML= "Recherche...";
		}
	else{
		url=url+"&lang=E"
		errtxt = "<br>Please try again"
		document.getElementById(resp).innerHTML= "Searching...";
		}	
	url=url+"&sid="+Math.random()	
	//alert(url);
	//alert(lang);
	
	
	xmlHttp.open("POST",url,true)
	xmlHttp.onreadystatechange=function() {
  		//alert(resp);	
		
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {   			
				//alert(xmlHttp.status);
				if(xmlHttp.status == 200) {
                	temp = xmlHttp.responseText;
					//alert(temp);		
					if (temp == "OK"){
						//alert("REDIRECT >>");
						//document.location.href = "8logged.asp";
						document.location.href = sPage;
					}
					else {
						document.getElementById(resp).innerHTML=xmlHttp.responseText ;		
					}
                }
                else {
                	document.getElementById(resp).innerHTML=  "Err: " + xmlHttp.status + errtxt ;
                }					
			
  		}
 	}
 	
	//xmlHttp.send(null)	
	xmlHttp.send('');
} 



function ShowText(nnn,resp,checker,category)

{ 
	//document.form1.Submit.value='Looking...';
	var nstr = "ss" + nnn
	//alert(nstr +" ch: "+checker);	
	if (checker==0)
		{
				
		//document.getElementById(resp).innerHTML= "Searching...";
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
			{
			alert ("Browser does not support HTTP Request")
			return
			} 
	
		var url= "../generic/3login.asp";
		var resp2=resp;
	
		url=url+"?id="+nnn	
		url=url+"&cat="+category
		url=url+"&sid="+Math.random()
		
		xmlHttp.open("POST",url,true)
		xmlHttp.onreadystatechange=function() {
  		//alert(resp);	
		
			if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") {   			
				//alert(xmlHttp.status);
				if(xmlHttp.status == 200) {
                	temp = xmlHttp.responseText;
					//alert(temp);		
					document.getElementById(resp).innerHTML=xmlHttp.responseText ;		
					
                }
                else {
                	document.getElementById(resp).innerHTML=  "Err: " + xmlHttp.status + "<br>Please try again" ;
                }
					
  			}
 		}
 		//xmlHttp.send(null)	
		xmlHttp.send('');

	
	
		document.formX[nstr].value=1;
		}
	else
		{
		document.formX[nstr].value=0;
		document.getElementById(resp).innerHTML=  '';
		}
	
	
} 




function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}







//-->