//alert();

function DoTheLogin(email,password,asppage,resp,cook)
{ 
	//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
	url=url+"&cook="+cook
	
		
	document.getElementById(resp).innerHTML= "Searching... <a href=index.asp>Slow? Click here </a>";	
	url=url+"&sid="+Math.random()	
	//alert(url);
	//alert(cook);
	
	
	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 = "MemberUpdate.asp";
						document.location.href = sPage;
						
						//show('aaa','../generic/_bannerLogged.asp','theLOG','bb','','','')
						
					}
					else {
						document.getElementById(resp).innerHTML=xmlHttp.responseText ;		
					}
                }
                else {
                	document.getElementById(resp).innerHTML=  "Err: " + xmlHttp.status + errtxt ;
                }					
			
  		}
 	}
 	
	//xmlHttp.send(null)	
	xmlHttp.send('');
} 



function show(AjaxValue,AjaxPage,AjaxDiv,Ajax1,Ajax2,Ajax3,Ajax4,Ajax5)

{ 
	
	//document.form1.Submit.value='Looking...';
	
	//alert (AjaxValue +" - "+ AjaxPage +" - "+ AjaxDiv +" - "+ Ajax1 +" - "+ Ajax2 +" - "+ Ajax3)
	document.getElementById(AjaxDiv).innerHTML= "<p align=center><img src=../images/wait.gif /></p>";
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
		{
		alert ("Browser does not support HTTP Request")
		return
		} 
	
	var url=AjaxPage;
	
	
	url=url+"?AjaxValue="+AjaxValue
	url=url+"&AjaxDiv="+AjaxDiv
	url=url+"&Ajax1="+Ajax1
	url=url+"&Ajax2="+Ajax2
	url=url+"&Ajax3="+Ajax3
	url=url+"&Ajax4="+Ajax4
	url=url+"&Ajax5="+Ajax5
	
	//if (currid || ""){
		//url=url+"&currid="+currid
	//}	
	url=url+"&sid="+Math.random()
	
	//alert(url);
	//window.open(url,"XXX","width=900,height=400,toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=0,resizable=1,copyhistory=0,left=30,top=50")
	
	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(AjaxDiv).innerHTML=xmlHttp.responseText ;					
                }
                else {
                	document.getElementById(AjaxDiv).innerHTML=  "Err: " + xmlHttp.status + ": Please try again" ;
                }				
			
  		}
 	}
 	
	//xmlHttp.send(null)	
	xmlHttp.send('');
} 




function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}










//-->