var y1 =280;   // change the # on the left to adjuct the Y co-ordinate
(document.getElementById) ? dom = true : dom = false;

function hideIt() {
  if (dom) {document.getElementById("passwordlayer").style.display='none';}
  if (document.layers) {document.layers["passwordlayer"].visibility='none';} }

function showIt(id) {
  if (dom) {
  	document.getElementById("passwordlayer").style.display='';
  	//document.getElementById("txtHint").innerHTML="";
//  	var emailname=id;
//  	document.getElementById("ctl00_txtemail1").value=emailname;
  	}
  if (document.layers) {
  	document.layers["passwordlayer"].display='';
  	document.layers["txtHint"].innerHTML="";
  	
  	} 
  
  }
  






<!--
floatX=10;
floatY=10;
layerwidth=250;
layerheight=100;
halign="center";
valign="center";
delayspeed=3;


NS6=false;
IE4=(document.all);
if (!IE4) {NS6=(document.getElementById);}
NS4=(document.layers);

function adjust() {

// START NN SPECIFIC CODE
 if ((NS4) || (NS6)) {
  if (lastX==-1 || delayspeed==0)
  {
   lastX=window.pageXOffset + floatX;
   lastY=window.pageYOffset + floatY;
  }
  else
  {
   var dx=Math.abs(window.pageXOffset+floatX-lastX);
   var dy=Math.abs(window.pageYOffset+floatY-lastY);
   var d=Math.sqrt(dx*dx+dy*dy);
   var c=Math.round(d/10);
   if (window.pageXOffset+floatX>lastX) {lastX=lastX+delayspeed+c;}
   if (window.pageXOffset+floatX<lastX) {lastX=lastX-delayspeed-c;}
   if (window.pageYOffset+floatY>lastY) {lastY=lastY+delayspeed+c;}
   if (window.pageYOffset+floatY<lastY) {lastY=lastY-delayspeed-c;}
  }
  if (NS4){
   document.layers['passwordlayer'].pageX = lastX;
   document.layers['passwordlayer'].pageY = lastY;
  }
  if (NS6){
   document.getElementById('passwordlayer').style.left=lastX+'px';
   document.getElementById('passwordlayer').style.top=lastY+'px';
  }
 }
// END NN SPECIFIC CODE


// START IE SPECIFIC CODE
 else if (IE4)
 {
  if (document.documentElement && document.documentElement.scrollTop){
   posNowX = document.documentElement.scrollLeft;
   posNowY = document.documentElement.scrollTop;
  } 
  else if (document.body){
   posNowX = document.body.scrollLeft;
   posNowY = document.body.scrollTop;
  }
  if (lastX==-1 || delayspeed==0)
  {
   lastX=posNowX + floatX;
   lastY=posNowY + floatY;
  }
  else
  {
   var dx=Math.abs(posNowX+floatX-lastX);
   var dy=Math.abs(posNowY+floatY-lastY);
   var d=Math.sqrt(dx*dx+dy*dy);
   var c=Math.round(d/10);
   if (posNowX+floatX>lastX) {lastX=lastX+delayspeed+c;}
   if (posNowX+floatX<lastX) {lastX=lastX-delayspeed-c;}
   if (posNowY+floatY>lastY) {lastY=lastY+delayspeed+c;}
   if (posNowY+floatY<lastY) {lastY=lastY-delayspeed-c;}
  }
  document.all['passwordlayer'].style.posLeft = lastX;
  document.all['passwordlayer'].style.posTop = lastY;
//alert(document.body.scrollTop+':'+document.scrollTop);
//  alert(document.all['passwordlayer'].style.posTop+':'+lastY);
 } 
// END IE SPECIFIC CODE

 setTimeout('adjust()',10);

}

function define()
{
if ((NS4) || (NS6)) 
{ 
if (halign=="left") {floatX=ifloatX};
if (halign=="right") {floatX=window.innerWidth-ifloatX-layerwidth-20};
if (halign=="center") {floatX=Math.round((window.innerWidth-170)/2)-Math.round(layerwidth/2)};
if (valign=="top") {floatY=ifloatY};
if (valign=="bottom") {floatY=window.innerHeight-ifloatY-layerheight};
if (valign=="center") {floatY=Math.round((window.innerHeight-150)/2)-Math.round(layerheight/2)};
}
if (IE4) 
{
		
 if (window.offsetWidth){
  theWidth = window.offsetWidth;
  theHeight = window.offsetHeight;
 }
 else if (document.documentElement && document.documentElement.offsetWidth)
 {
  theWidth = document.documentElement.offsetWidth;
  theHeight = document.documentElement.offsetHeight;
 }
 else if (document.body)
 {
  theWidth = document.body.offsetWidth;
  theHeight = document.body.offsetHeight;
 }


if (halign=="left") {floatX=ifloatX};
if (halign=="right") {floatX=theWidth-ifloatX-layerwidth-20}
if (halign=="center") {floatX=Math.round((theWidth-170)/2)-Math.round(layerwidth/2)}
if (valign=="top") {floatY=ifloatY};
if (valign=="bottom") {floatY=theHeight-ifloatY-layerheight}
if (valign=="center") {floatY=Math.round((theHeight-150)/2)-Math.round(layerheight/2)}
}
}
//-->


function chkAlertLogin(){
	strRemail=/^[\x09\]+[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@*.[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/ ;
	strEvalue=document.frmPassword.txtEmail.value;
   	strIndex=strEvalue.indexOf("@");
   	
	if (document.frmPassword.txtEmail.value=="") {
		alert("Please enter in your email address.");
		document.frmPassword.txtEmail.focus();
			
	}
	else if(document.frmPassword.txtEmail.value.charAt(0)==' ')	
	{	
		alert("You have not entered this field properly.\nPlease remove the leading spaces");
		document.frmPassword.txtEmail.focus();
		
	}
	else if((!strRemail.test(strEvalue)) || strIndex==-1)
   	{
      	alert ("Please enter in a valid email address.");
      	document.frmPassword.txtEmail.focus();
      		
	}
	
	else
	{
		
		alertPassword(document.frmPassword.txtEmail.value);
	}
}



var xmlHttp

function alertPassword(str)
{ 
	
var url="forgotpassword.aspx?emailaddress=" + str + "&r=" + new Date().getTime();


xmlHttp=GetXmlHttpObject(stateChanged)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChanged() 
{ 
	
if(xmlHttp.readyState == 1){
document.getElementById('txtHint').innerHTML = 'Please Wait.. processing ...';
}
	
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
} 
} 

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
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
}
} 

