function preloadNavImages() {
  var navImages = ["~/Images/HeaderLogo2.gif"]
  
  //preload images...
  for (var i=0;i<navImages.length;i++) {
    var image = new Image();
    image.src = navImages[i];
  }
}

/* Allows only numbers */
function ValidNumOnKeyPress()
{
  if ((window.event.keyCode < 48) || (window.event.keyCode > 57))
     {window.event.returnValue = false;}
}
/* Moves focus to next control once specified length is reached */ 
function MoveFocusOnMaxLength(nLength,cId) 
{ 
    if (event.srcElement.value.length == nLength) 
        document.all(cId).focus(); 
}
function ValidPhone(nLength,cId) 
{ 
    //call valid number function
    ValidNumOnKeyPress();
    
    if (event.srcElement.value.length == nLength) 
        document.all(cId).focus(); 
}
function setFocusTo(sName) {
    var oDiv;
    if (document.getElementById) {
        oDiv = document.getElementById(sName);
    } else if (document.all) {     oDiv = document.all[sName];
    }

    if (oDiv && oDiv.focus) oDiv.focus();
}
function show_popup(url)
{
 window.open(url,"new",'width=780,height=380,scrollbars=yes,resizable,toolbar,menubar');
}

function ShowPopUpNoParams(url)
{
 
   var wOpen;
   var sOptions;
  

   sOptions = 'status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes';
   sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
   sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
   sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';
   window.open( url, 'sdfsdfsd', sOptions );
   
}
