function change_div(div_id,content)
{
     document.getElementById(div_id).innerHTML = document.getElementById(content).innerHTML;
}

function login0(whichSelect){
document.getElementById('login1').setAttribute("class","default1");document.getElementById('right_return').style.display="none";
document.getElementById('login2').setAttribute("class","default2");document.getElementById('right_member').style.display="none";
document.getElementById('login3').setAttribute("class","default3");document.getElementById('right_employer').style.display="none";
document.getElementById('login4').setAttribute("class","default4");document.getElementById('right_producer').style.display="none";
}

function logincolor(whichSelect){
document.getElementById('login1').setAttribute("class","select1");
document.getElementById('login2').setAttribute("class","select2");
document.getElementById('login3').setAttribute("class","select3");
document.getElementById('login4').setAttribute("class","select4");
}

function login1(whichSelect){
document.getElementById('login1').setAttribute("class","select1");document.getElementById('right_return').style.display="block";
document.getElementById('login2').setAttribute("class","default2");document.getElementById('right_member').style.display="none";
document.getElementById('login3').setAttribute("class","default3");document.getElementById('right_employer').style.display="none";
document.getElementById('login4').setAttribute("class","default4");document.getElementById('right_producer').style.display="none";
}
function login2(whichSelect){
document.getElementById('login1').setAttribute("class","default1");document.getElementById('right_return').style.display="none";
document.getElementById('login2').setAttribute("class","select2");document.getElementById('right_member').style.display="block";
document.getElementById('login3').setAttribute("class","default3");document.getElementById('right_employer').style.display="none";
document.getElementById('login4').setAttribute("class","default4");document.getElementById('right_producer').style.display="none";
}
function login3(whichSelect){
document.getElementById('login1').setAttribute("class","default1");document.getElementById('right_return').style.display="none";
document.getElementById('login2').setAttribute("class","default2");document.getElementById('right_member').style.display="none";
document.getElementById('login3').setAttribute("class","select3");document.getElementById('right_employer').style.display="block";
document.getElementById('login4').setAttribute("class","default4");document.getElementById('right_producer').style.display="none";
}
function login4(whichSelect){
document.getElementById('login1').setAttribute("class","default1");document.getElementById('right_return').style.display="none";
document.getElementById('login2').setAttribute("class","default2");document.getElementById('right_member').style.display="none";
document.getElementById('login3').setAttribute("class","default3");document.getElementById('right_employer').style.display="none";
document.getElementById('login4').setAttribute("class","select4");document.getElementById('right_producer').style.display="block";
}

// alternate function set below to account for IE issues with setAttribute functions

function loginalt0(whichSelect){
document.getElementById('login1').setAttribute("className","default1");
document.getElementById('login2').setAttribute("className","default2");
document.getElementById('login3').setAttribute("className","default3");
document.getElementById('login4').setAttribute("className","default4");
}

function loginaltcolor(whichSelect){
document.getElementById('login1').setAttribute("className","select1");
document.getElementById('login2').setAttribute("className","select2");
document.getElementById('login3').setAttribute("className","select3");
document.getElementById('login4').setAttribute("className","select4");
}

function loginalt1(whichSelect){
document.getElementById('login1').setAttribute("className","select1");
document.getElementById('login2').setAttribute("className","default2");
document.getElementById('login3').setAttribute("className","default3");
document.getElementById('login4').setAttribute("className","default4");
}
function loginalt2(whichSelect){
document.getElementById('login1').setAttribute("className","default1");
document.getElementById('login2').setAttribute("className","select2");
document.getElementById('login3').setAttribute("className","default3");
document.getElementById('login4').setAttribute("className","default4");
}
function loginalt3(whichSelect){
document.getElementById('login1').setAttribute("className","default1");
document.getElementById('login2').setAttribute("className","default2");
document.getElementById('login3').setAttribute("className","select3");
document.getElementById('login4').setAttribute("className","default4");
}
function loginalt4(whichSelect){
document.getElementById('login1').setAttribute("className","default1");
document.getElementById('login2').setAttribute("className","default2");
document.getElementById('login3').setAttribute("className","default3");
document.getElementById('login4').setAttribute("className","select4");
}

function submitBam()
{
  document.getElementById('BamLogin').submit();
}
function submitBamEnter(e)
        {
                // look for window.event in case event isn't passed in
                if (window.event) { e = window.event; }
                if (e.keyCode == 13)
                {
                        document.getElementById('BamLogin').submit();
                }
        }
function submitBAE()
{
  document.getElementById('BAELogin').submit();
}
function submitBAEEnter(e)
        {
                // look for window.event in case event isn't passed in
                if (window.event) { e = window.event; }
                if (e.keyCode == 13)
                {
                        document.getElementById('BAELogin').submit();
                }
        }
function submitBAP()
{
  document.getElementById('BAPLogin').submit();
}
function submitBAPEnter(e)
        {
                // look for window.event in case event isn't passed in
                if (window.event) { e = window.event; }
                if (e.keyCode == 13)
                {
                        document.getElementById('BAPLogin').submit();
                }
        }
		
		
var isNav = (navigator.appName.indexOf("Netscape") != -1);
      function Start(corpEntCode) {
        document.loginForm.dsUserId.focus();
 
        // Write a cookie with an expiration date of one month
        expirationDate = new Date();
        expirationDate.setMonth(expirationDate.getMonth() + 1);
 
        document.cookie = "corpEntCd=" + corpEntCode + "; expires=" + expirationDate.toGMTString() + "; path=/;";
		document.loginForm.CorpEntCd.value = corpEntCode;
        if (isNav) {
          document.loginForm.dsPassword.onkeypress=checkSubmitNav;
        }
      }
 
 
      function checkSubmitNav(e) {
        if (e.which == 13) {
          document.loginForm.submit();
          return false;
        }
        return true;
 	  }
 	  
 
 	  function isEmpty (field) {
 	  	 strfield = field.value;
 	  	 if (strfield == "" || strfield == null)
 	  	 	return true;
 	  	 else
 	  	 	return false;
 	  }
 	  	
 
 	  function checkEmptyFields(form) {
 	  	if (isEmpty (document.loginForm.dsUserId)) {
 	  		alert("Please enter the User Id");
 	  		document.loginForm.dsUserId.focus();
 	  		return false;
 	  	}
 	  	if (isEmpty (document.loginForm.dsPassword)) {
 	  		alert("Please enter the Password");
 	  		document.loginForm.dsPassword.focus();
 	  		return false;
 	  	}
 	  	return true;
 	  }
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
