﻿
function disableButtons(f)
{
    for (i=1; i<f.elements.length; i++)
    {
        if (f.elements[i].type == 'submit')
            f.elements[i].disabled = true;
    }
}

	function showDiv(e)
		{		
		    document.getElementById(e).style.display = 'block';   
		}
		
	function openCloseDiv(e)
	{		
	    //var control = document.getElementById(e);
	    
	    if (document.getElementById(e).style.display == 'block')
	    {
	        document.getElementById(e).style.display = 'none'; 
	    }
	    else
	    {
	        document.getElementById(e).style.display = 'block';
	    }	    
	}
		
	function checkIfIE()
	    {
	        var browserName=navigator.appName; 

	        if (browserName=="Microsoft Internet Explorer")
                 {
                  document.getElementById('LoginTextboxLiner').style.backgroundPosition="left 1px";
                  document.getElementById('PasswordTextboxLiner').style.backgroundPosition="left 1px";
                 }
	    }
		
	function toogleLogInOption(e)
	    {
	        if (e == 'switchToPersonal')
	        {
	            document.getElementById('logIntoPersonal').style.display = 'block';
	            document.getElementById('logIntoBusiness').style.display = 'none';
	        }
	        
	        if (e == 'switchToBusiness')
	        {
	            document.getElementById('logIntoPersonal').style.display = 'none';
	            document.getElementById('logIntoBusiness').style.display = 'block';
	        }
	    }
		
	function collapseTierThreeMenu()
	    {
	        document.getElementById('tier3Subs').style.overflow = 'hidden';	  
	        document.getElementById('tier3Subs').style.height = '30px'; 
	        document.getElementById('OpenButtonTD').style.display = 'block';   
	         
	        
	        var allHTMLTags=document.getElementsByTagName('*');
	        
                 for (i=0; i<allHTMLTags.length; i++) 
                 {
                     if (allHTMLTags[i].className == 'subListHeader') 
                     {
                        allHTMLTags[i].style.border = 'none';
                     }
                 }	        
	    }
	    
	 function openTierThreeMenu()
	    {
	        document.getElementById('tier3Subs').style.overflow = 'auto';	  
	        document.getElementById('tier3Subs').style.height = 'auto';  
	        
	        var allHTMLTags=document.getElementsByTagName('*');
	        
                 for (i=0; i<allHTMLTags.length; i++) 
                 {
                     if (allHTMLTags[i].className == 'subListHeader') 
                     {
                        allHTMLTags[i].style.borderBottom = 'solid 1px #000';
                     }
                 }	        
	    }
	    
	 
	 function imageOver(id, filepath)
	 {
	    document.getElementById(id).src=filepath;	 
	 }
	 
	 function imageOut(id, filepath)
	 {
	    document.getElementById(id).src=filepath;	 
	 }

	 function checkRegistrationSubmit(form) {
	     if (typeof (Page_ClientValidate) == 'function') {
	         Page_ClientValidate();
	     }
	     return Page_IsValid;
	 }

	 function checkRegistrationSubmit(form, group) {
	     if (typeof (Page_ClientValidate) == 'function') {
	         Page_ClientValidate(group);
	     }
	     return Page_IsValid;
	 }