﻿function popa()
{
 var d = document.getElementById('LogonPopup');
 d.style.visibility = "visible";
}
function userIdFocus()
{
 var d = document.getElementById('PartnerId');
 if (d.value == "User ID or Email") d.value = "";
}
function userIdBlur()
{
 var d = document.getElementById('PartnerId');
 if (d.value == "") d.value = "User ID or Email";
}
function userPwdFocus()
{
 var d = document.getElementById('PartnerPasswordShow');
        document.getElementById('PartnerPasswordShow').style.display="none"; 
        document.getElementById('PartnerPassword').style.display=  "inline"; 
        document.getElementById('PartnerPassword').focus(); 
}
function userPwdBlur()
{
 var d = document.getElementById('PartnerPasswordShow');

}


function PWuserPwdFocus()
{
 var d = document.getElementById('PartnerPassword');





}
function PWuserPwdBlur()
{
 var d = document.getElementById('PartnerPassword');
   document.getElementById('PartnerPassword').style.display=  "none"; 
         document.getElementById('PartnerPasswordShow').style.display="inline"; 
      
       // document.getElementById('PartnerPasswordShow').focus(); 

}





function submitLogon()
{
 var d = document.getElementById('PartnerPassword');
 var e = document.getElementById('UserLogonPWD');
 e.value = d.value;
 d = document.getElementById('PartnerId');
 e = document.getElementById('UserLogonUID');
 e.value = d.value;
 document.UserLogon.action = "wrg.aspx";
 document.UserLogon.submit();
}
function sendMyPassword()
{
var d = document.getElementById('UserLogonUID'); 
var e = document.getElementById('PartnerId'); 
d.value=e.value; 
document.UserLogon.action = 'WRG.aspx?page=EmailPwd'; 
document.UserLogon.submit();
}
function howToBecomeWrgPartner()
{
}
function popb()
{
 var d = document.getElementById('LogonPopup');
 d.style.visibility = "hidden";
}
var logonActive = false;
var logonHideTimer = 0;
var timeBeforeLogonAutoHide = 1000;
function timerLogonAutoHide() 
{ 
 if(logonActive)
 { 
  logonHideTimer = 0; 
  return; 
 } 
 if(logonHideTimer<timeBeforeLogonAutoHide)
 { 
  logonHideTimer+=100; 
  setTimeout('timerLogonAutoHide()',99); 
 }
 else
 { 
  LogonHideTimer = 0; 
  var d = document.getElementById('LogonPopup');
  d.style.visibility = "hidden";
 } 
}

function doClick(e)
{
 var key;
 if(window.event)
  key = window.event.keyCode;     //IE
 else
  key = e.which;     //firefox
 if (key == 13) submitLogon();
}

 