	var ua = navigator.userAgent;
	var isFirefox = ( ua != null && ua.indexOf( "Firefox/" ) != -1 );
	var isMSIE = ( ua != null && ua.indexOf( "MSIE" ) != -1 );

/**prevent background flickering and improve rendering speed**/
if(isMSIE)
{
	try
	{
   		document.execCommand("BackgroundImageCache", false, true);
   	}
   	catch(e)
   	{   	   
   	}
}

  function getScrollPos() 
  {
      var scrolled; //Declaring a local variable
      if (document.documentElement && document.documentElement.scrollTop) 
      { 
        scrolled = document.documentElement.scrollTop; 
      } //Sniffing for IE5      
      else if (document.body) 
      { 
        scrolled = document.body.scrollTop; 
      } //Sniffing for IE6
      else 
      { 
        scrolled = window.pageYOffset; 
      } //Sniffing for Netscape
      return scrolled; 
  }  
  
 function onNavigateScroll(lnk)
 {
     window.location.href=lnk.href + '&vscroll=' + getScrollPos();
     return false;                
 }  

  function placeFocus() 
  {
    if (document.forms.length > 0) 
    {
      var field = document.forms[0];
      for (i = 0; i < field.length; i++) 
      {
        if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) 
        {
          document.forms[0].elements[i].focus();
          break;  
        }
      }
    }
  }

  function onPageLoad()
  {
      placeFocus();
  }  
    
