<!--
//Handle Check Username Availability Using Ajax
 var http = createRequestObject();
 function createRequestObject() 
     {           
           var xmlhttp;
	 try 
                 { 
                    xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
                 }
	  catch(e) 
                 {
	    try { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
	    catch(f) { xmlhttp=null; }
	    }
	        if(!xmlhttp&&typeof XMLHttpRequest!="undefined") 
                        {
	  	   xmlhttp=new XMLHttpRequest();
	           }
		   return  xmlhttp;
 }
function sendRequestTextPost() 
  {  
    var rnd = Math.random();
    var email = escape(document.getElementById("email").value);
       if ((email =="") || (!(email.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)))
          {        
             document.getElementById('email').style.backgroundColor='#FFF4F4';
             document.getElementById('email').style.border = '1px solid #CC0000';
             document.getElementById('empass').innerHTML = 'Invalid:';
             document.getElementById('empass').style.color = '#cc0000';
             document.getElementById('email').focus();
             alert("Invalid email address\nPlease try again");
             return false;
          }
     else
         {
            try
              {
                 http.open('POST',  'getpassword.asp');
                 http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
                 http.onreadystatechange = handleResponseText;
	    http.send('email='+email+'&rnd='+rnd);
	 }
	    catch(e){}
	    finally{}
        }
  }
function handleResponseText() 
  {  
     document.getElementById('prog').innerHTML="<br><img src='loadingemail.gif'> Loading..."; 
     try
         {
             if((http.readyState == 4)&& (http.status == 200))
                 {                
    	        var response = http.responseText;
                     document.getElementById("idforresults").innerHTML = response;                                    
                     document.getElementById("resultcont").style.display='block';
                     document.getElementById('showemail').style.display='none';
                     document.getElementById('prog').innerHTML="";
	    }
        }
	catch(e){alert("an error occured");}
	finally{}
}
function showFeature()
   {
      document.getElementById('feat').style.display='block';
      document.getElementById('mncont').style.display='none';
}
function UNameFocus()
   {
      document.getElementById('Name').style.backgroundColor = '#FFF9EC';
      document.getElementById('showemail').style.display='none';
}
function EmailKeyDown()
   {
      document.getElementById('email').style.backgroundColor='#FFF9EC';
      document.getElementById('email').style.border = '1px solid #B9CFE1';
      document.getElementById('empass').innerHTML = 'Email:';
      document.getElementById('empass').style.color = '#000000';
}
function UnameonBlur()
  {
     document.getElementById('Name').style.backgroundColor = '#FFF9EC';
     document.getElementById('Name').style.backgroundColor = '#FFFFFF';  
     document.getElementById('Name').style.border = '1px solid #B9CFE1';
     document.getElementById('lblname').style.color = '#005EBB';
     document.getElementById('lblname').innerHTML = 'Username:';
 }
function PasswordonBlur()
  {
     document.getElementById('Password').style.backgroundColor = '#FFF9EC';
     document.getElementById('Password').style.backgroundColor = '#FFFFFF';  
     document.getElementById('Password').style.border = '1px solid #B9CFE1';
     document.getElementById('lblpass').style.color = '#005EBB';
     document.getElementById('lblpass').innerHTML = 'Password:';
 }
function LoginValidate()
   {    
         var Uname = document.getElementById('Name').value;
         var Upass = document.getElementById('Password').value;
        if (Uname =="" || Upass =="")
           {
             document.getElementById('showemail').style.display='block';
             document.getElementById('Name').style.backgroundColor='#FFF4F4';
             document.getElementById('Name').style.border = '1px solid #CC0000';
             document.getElementById('lblname').innerHTML = 'Empty:';
             document.getElementById('lblname').style.color = '#cc0000';
             document.getElementById('Password').style.backgroundColor='#FFF4F4';
             document.getElementById('Password').style.border = '1px solid #CC0000';
             document.getElementById('lblpass').innerHTML = 'Empty:';
             document.getElementById('lblpass').style.color = '#cc0000';
             return false;
           }
        if (document.getElementById('Name').value =="")
            {
              document.getElementById('Name').style.backgroundColor='#FFF4F4';
              document.getElementById('Name').style.border = '1px solid #CC0000';
              document.getElementById('lblname').innerHTML = 'Empty:';
              document.getElementById('lblname').style.color = '#cc0000';
              return false;
            }
        if (document.getElementById('Password').value =="")
            {
              document.getElementById('Password').style.backgroundColor='#FFF4F4';
              document.getElementById('Password').style.border = '1px solid #CC0000';
              document.getElementById('lblpass').innerHTML = 'Empty:';
              document.getElementById('lblpass').style.color = '#cc0000';
              return false;
            }
  return true;        
 }
// Handle the form email password hide and unhide
window.onload = function()
 {
  if(document.getElementById)
   {
     document.getElementById('showemail').style.display='none';
     var linkContainer = document.getElementById('pshow');
     var linebreak = linkContainer.appendChild(document.createElement('br'));
     var toggle = linkContainer.appendChild(document.createElement('a'));
     toggle.href = '#';
     toggle.appendChild(document.createTextNode(' Forgot password?'));

   toggle.onclick = function()
    {
      var linkText = this.firstChild.nodeValue;
      this.firstChild.nodeValue = (linkText == ' Forgot password?') ? ' Forgot password?' : ' Forgot password?';

      var tmp = document.getElementsByTagName('div');
      document.getElementById('email').style.backgroundColor='#FFF9EC';
      document.getElementById('email').style.border = '1px solid #B9CFE1';
      document.getElementById('empass').innerHTML = 'Email:';
      document.getElementById('empass').style.color = '#000000';
      document.getElementById('showemail').style.display='block';
      document.getElementById('resultcont').style.display='none';
      document.getElementById('email').value="";
     return false;
    }
  }
}
 // -->