var HomePage = "N"
// ------------- Show Hide Layers ---------------------------------------- //

if (document.layers) 	{	layerRef="document.layers",	layerStyle=""	}
else 					{	layerRef="document.all",	layerStyle=".style"	}

// --------------   OLD showLayer  and hideLayer NOT NS6 compatabile --------//

function showLayerOLD (layerName){	eval(layerRef+'["'+layerName+'"]'+layerStyle+'.visibility="visible"')	}
function hideLayerOLD (layerName){	eval(layerRef+'["'+layerName+'"]'+layerStyle+'.visibility="hidden"')	}


// --------------------   NEW showLayer  for NS6 compatability---------------//

function showLayer(object) {

    if (document.getElementById && document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='visible';
         document.getElementById(object).style.display='block';
    }
    else if (document.layers && document.layers[object]) {
        document.layers[object].visibility = 'visible';
    }
    else if (document.all) {
        document.all[object].style.visibility = 'visible';
    }
}

// --------------------   NEW hideLayer  for NS6 compatability---------------//

function hideLayer(object) {

    if (document.getElementById && document.getElementById(object) != null) {
         document.getElementById(object).style.visibility='hidden';
         document.getElementById(object).style.display='none';
    }
    else if (document.layers && document.layers[object] != null) {
        document.layers[object].visibility = 'hidden';
    }    
    else if (document.all) {
         document.all[object].style.visibility = 'hidden';
    }     
}




	
//----------------------------------------------------------------------------------------
//  ***   Browser Detection
//----------------------------------------------------------------------------------------
	var browserVersion = "";
	
	if (document.layers){
      //Netscape 4 specific code
	  browserVersion = "NS4";
      pre = 'document.';
      post = '';
   }
   if (document.getElementById){
      //Netscape 6 specific code
	  browserVersion = "NS6";
      pre = 'document.getElementById("';
      post = '").style';
   }
   if (document.all){
      //IE4+ specific code
	  browserVersion = "IE"
      pre = 'document.all.';
      post = '.style';
   }
	//alert ("browser = " + browser)	;
	


//--------------------------------------------------------------------------------------
//-----------------------         POP UP WINDOWS               -------------------------
//--------------------------------------------------------------------------------------

// --------------------   pop-Tip function  for About, What-If     ----------//
function popTip(goURL){	
	var NewWin = window.open(goURL,"NewWindow","left=152,top=150,scrollbars=yes,width=430,height=500,menubar=yes,toolbar=no,resizable=no,directories=no,location=no,copyhistory=no,status=no");
	NewWin.focus()
}


// --------------------   pop-up box for Info definitions   ---------------//
function popInfo(goURL){	
	var NewWin = window.open(goURL,"NewWindow","left=152,top=130,scrollbars=yes,width=400,height=230,menubar=no,toolbar=no,resizable=no,directories=no,location=no,copyhistory=no,status=no");
	NewWin.focus()
}


// --------------------   pop-up box for right side tips   ---------------//
function popConfirmation(goURL){	
	var ConfWin = window.open(goURL,"ConfWindow","left=152,top=150,scrollbars=auto,width=430,height=280,menubar=yes,toolbar=no,resizable=no,directories=no,location=no,copyhistory=no,status=no");
	ConfWin.focus()
}


// --------------------   pop-up box for links outside the site   ---------------//
// --------------------   added 7-12-01           -------------------------------//
function popLinkOut(goURL){	
	var NewWin = window.open(goURL,"NewWindow","left=40,top=60,scrollbars=yes,width=740,height=520,menubar=no,toolbar=no,resizable=yes,directories=no,location=no,copyhistory=no,status=no");
	NewWin.focus()
}




// --------------------   pop-up box for glossary links   ---------------//
function popGlossary(goURL){	
	var GlossWin = window.open(goURL,"GlossWindow","left=40,top=60,scrollbars=yes,width=320,height=250,menubar=no,toolbar=no,resizable=yes,directories=no,location=no,copyhistory=no,status=no");
	GlossWin.focus()
}



// ------------------   pop-up box for StartPension 15th of month warning   -------------//
function popWarning(goURL){	
	var NewWin = window.open(goURL,"NewWindow","left=152,top=130,scrollbars=no,width=400,height=205,menubar=no,toolbar=no,resizable=no,directories=no,location=no,copyhistory=no,status=no");
	NewWin.focus()
}



//--------------------------------------------------------------------------------------------------
function setDocumentObject(formName) {	// *** Set Document Object variable for Form element referencing
//--------------------------------------------------------------------------------------------------

    var userBrowser		= navigator.appName;
    var browserVersion  = parseInt(navigator.appVersion);
    var evalString      = "";
	
	if (( userBrowser == 'Microsoft Internet Explorer' ) ||
       (  userBrowser == 'Netscape' && browserVersion >= 5 ) ) {
          evalString = "document." + formName;
	} else {			// *** div FormContent defined in incDataFormDivOpen.jsp
          evalString = "document.FormContent.document." + formName;
	}
	return eval( evalString );
}

