// JavaScript Document
function forgotshow(addcomments)
{
document.getElementById(addcomments).style.display = "block";
}
function forgothide(addcomments)
{
document.getElementById(addcomments).style.display = "none";
}

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}

//forgetpassword

function showforAvailabilityhome(str)
{
xmlHttp2=GetXmlHttpObject()
document.getElementById("txtHintfor").innerHTML = "<img src='images/load.gif'>";
if (xmlHttp2==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="forgotresult.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp2.onreadystatechange=stateChangedforhome
xmlHttp2.open("GET",url,true)
xmlHttp2.send(null)
}

function stateChangedforhome() 
{ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
{ 
document.getElementById("txtHintfor").innerHTML=xmlHttp2.responseText 
} 
}

function emailval()
{
var email=document.forget.email_f.value;
if(email=="")
{
alert("Please Enter Your Email Address");
document.forget.email_f.value;
return false;
}
}	


function refresh()
{
var x = document.getElementById('simg');
var rand_no = Math.random();
rand_no = rand_no * 1000;
x.src = "CaptchaSecurityImages.php?width=100&amp;height=40&amp;characters=5&amp;no=" + rand_no;
}


//Subscriber supplied variables for snare// Snare operation to perform
   var io_operation = 'ioBegin';

  // io_bbout_element_id should refer to the hidden field in your form that contains the blackbox
  var io_bbout_element_id          = 'ioBB';

  // io_install_stm indicates whether the ActiveX object should be downloaded. The io_stm_cab_url
  // should reference your signed local copy of the ActiveX object
  //var io_install_stm               = true;
  var io_install_stm               = false;
  // make sure you change the cab URL to the location of your signed copy before releasing
  

  // sample javascript functions to display errors if ActiveX or Flash are not installed
  // change as necessary
  function redirectActiveX(){ document.location.href="explainActiveX.html"; }
  function redirectFlash(){ document.location.href = "http://www.macromedia.com/flash"; }

  // uncomment any of the below to signal an error when ActiveX or Flash is not present
  //var io_install_stm_error_handler = "redirectActiveX();";
  var io_flash_needs_update_handler = "";
  var io_install_flash_error_handler = "";
  var io_max_wait = 5000;
  var io_submit_form_id = 'user_login';
  var io_submit_element_id = 'Submit';
  
  
  
  function validlog(frmObject)
{
	if(frmObject.login_username.value=='')
	{
		document.getElementById('loginerr').innerHTML='Enter your Username';
		return false;
	}
	else if(frmObject.login_password.value=='')
	{
		document.getElementById('loginerr').innerHTML='Enter your Password';
		return false;
	}
	else
	{
		document.getElementById('loginerr').innerHTML='';
		return true;
	}
}