
 function callAjax() {
      
	   if(navigator.appName=="Microsoft Internet Explorer")
	  {
	 
	  completePath="/mfgeemp_pricenperf/publicjsp/leftmenu_ie.jsp";
	 
	  }
	  else
	  {
        completePath="/mfgeemp_pricenperf/publicjsp/leftmenu_mozilla.jsp";
	  }
	  http_request_daily = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
       
		http_request_daily = new XMLHttpRequest();
         if (http_request_daily.overrideMimeType) {
            http_request_daily.overrideMimeType('text/xml');
         }
      } else if (window.ActiveXObject) { // IE
         try {
           
			http_request_daily = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
			
               http_request_daily = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!http_request_daily) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      http_request_daily.onreadystatechange = alertContentDaily;
     http_request_daily.open('GET',completePath, true);
     http_request_daily.send(null);
   }

   function alertContentDaily() {
      
	  
	  if (http_request_daily.readyState == 4) {
         
		 if (http_request_daily.status == 200) {
          
            var val = http_request_daily.responseText;
			
            		
            document.getElementById("check").innerHTML=val;
             if(!(navigator.appName=="Microsoft Internet Explorer"))
             {
              
			   if(document.getElementById("gefundlf"))
				 { 
				   fnShowMFGEEmp('3');
				   fnShowPriceNPerf('1','O'); } 
             if(document.getElementById("ssfund"))
				 { 
				   fnShowMFGEEmp('3');
				   fnShowPriceNPerf('2','O');}
			 if(document.getElementById("elfun"))
				 {
				   fnShowMFGEEmp('3');
				   fnShowPriceNPerf('3','O');}
			
			 }

             loads();
            } 

			
      }
   }


function loads()
{

	if(document.getElementById("dailyPrices"))
		
	{
	
	var newdate = new Date();
	var mon = newdate.getMonth() + 1;
	//if ((mon.toString).length == 1)
	//	mon = "0" + mon;
	var dy = newdate.getDate();
	if (dy <= 9)
		dy = "0" + dy;
	var yr = newdate.getFullYear();
	document.form1.PriceDate.value = mon + "/" + dy + "/" + yr;


	}


	  if(navigator.appName=="Microsoft Internet Explorer")
             {
              
			   if(document.getElementById("gefundlf"))
				 { 
				   fnShowMFGEEmp('3');
				   fnShowPriceNPerf('1','O'); } 
             if(document.getElementById("ssfund"))
				 { 
				   fnShowMFGEEmp('3');
				   fnShowPriceNPerf('2','O');}
			 if(document.getElementById("elfun"))
				 {
				   fnShowMFGEEmp('3');
				   fnShowPriceNPerf('3','O');}
			
			 }

	
 }

function dates(strprices)
{
	var lstrPriceDate = document.form1.PriceDate.value;
	
	if(lstrPriceDate == '' || lstrPriceDate == null){
		alert('Please Enter Date');
		return;
	}
	if(lstrPriceDate != '' && !validateDate(lstrPriceDate)){
		alert('Wrong Date');
		return;
	}
	document.form1.submit();
}

function doSubmit()
{
	document.form1.method = "post";
    document.form1.action = "/mfgeemp_pricenperf/gedailypricesservlet";
    document.form1.submit();
}


 function checkBrowser() {
  this.ver=navigator.appVersion
  this.dom=document.getElementById?1:0
  this.ie5=( (this.ver.indexOf("MSIE 5")>-1) && this.dom)?1:0;
  this.ie4=(document.all && !this.dom)?1:0;
  this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
  return this
 }

 var bw=new checkBrowser()

 function openPositonWin(url, width, height, top, left) {
  var winCount = Math.round(Math.random() * 50);
  windowName = "newWin" + winCount;

  params = "toolbar=1,";
  params += "location=1,";
  params += "directories=1,";
  params += "status=1,";
  params += "menubar=1,";
  params += "scrollbars=1,";
  params += "resizable=1,";
  params += (bw.ns4||bw.ns5) ? "screenx="+left+"," : "left="+left+",";
  params += (bw.ns4||bw.ns5) ? "screeny="+top+"," : "top="+top+",";
  params += "width="+width+",";
  params += "height="+height;

  win = window.open(url, windowName, params);
  win.opener.name = "opener";
 }

function fnLoad(lftNavinput)
{
	fnShowMFGEEmp('3');
	fnShowPriceNPerf(lftNavinput, 'O');
}











function factsheet(strURL)
{
	newwin = window.open(strURL,"","toolbar=Yes,location=Yes,directories=Yes,status=Yes,menubar=Yes,scrollbars=Yes,resizable=Yes,height=500,width=700,left=60,top=60");
}

 




















//error

function fun()
{
	document.form_error.action="/mfretail_pricenperf/gedailypricesservlet";
	document.form_error.submit();
}


//top nav
	

	
	function fnOpenMFDoc(strURL)
	{
		newwin = window.open(strURL,"","toolbar=Yes,location=Yes,directories=Yes,status=Yes,menubar=Yes,scrollbars=Yes,resizable=Yes,height=500,width=700,left=60,top=60")
	}

	function fnOpenMFFile(strURL)
	{
		var winOpts;
		winOpts = '';
		if (window.screen.width <= 800)
			winOpts = 'left=13,top=107,width=740,height=300,';
		if ((window.screen.width >= 800)&&(window.screen.width == 1024))
			winOpts = 'left=90,top=135,width=798,height=400,';
		else if (window.screen.width > 1024)
			winOpts = 'left=120,top=135,width=950,height=500,';

		winOpts = winOpts + 'status=yes,menubar=yes,resizable=yes,scrollbars=yes';
		newwin = window.open(strURL,"popWin",winOpts);
	}

	function findHost() 
	{ 
		var URLhost;
		var URLRedirect;
		URLhost = window.location.host;

		switch(URLhost){
			case "www.gefunds.com":
				 URLRedirect = "www.geam.com";
				 break;
			case "dr.gefunds.com":
				 URLRedirect = "dr.geam.com";
				 break;
			case "stage.gefunds.com":
				 URLRedirect = "stage.geam.com";
				 break;
			case "geamstlxkant01d.geam.corporate.ge.com:9080":
				 URLRedirect = "geamext.geam.corporate.ge.com:9080";
				 break;
			case "localdev.gefunds.com":
				 URLRedirect = "localdev.geam.com";
				 break;
			default :
				 URLRedirect = "www.geam.com";
				 break;
		}
		return URLRedirect;
	} 

	function fnOpenInstDoc(path)
	{
		var AbsolutePath;
		AbsolutePath = "http://" + findHost() + path;
		var winOpts;
		winOpts = '';

		if ((window.screen.width >= 800) && (window.screen.width == 1024))
			winOpts = 'left=90,top=135,width=798,height=400,';
		else if (window.screen.width > 1024)
			winOpts = 'left=120,top=135,width=950,height=500,';

		winOpts = winOpts + 'status=yes,menubar=yes,resizable=yes,scrollbars=yes';
		newwin = window.open(AbsolutePath,"popWin",winOpts);
	}

//left menu



	function fnMenuOpen()
	{
		var strSiteURL = window.location.href;
		var arrSiteURL = new Array();
		var strMenuOption = "";
		arrSiteURL = strSiteURL.split('/');
		if(arrSiteURL.length >= 5){
			strMenuOption = arrSiteURL[3];
			if(strMenuOption == 'mfgeemp_pricenperf')
				fnShowMFGEEmp('3');
		}
	}

	function fnShowMFGEEmp(x,y)

	{

		if(navigator.appName=="Microsoft Internet Explorer")
		{
		if (document.getElementById('MFGEEmp'+x).style.position == "relative"){
			document.getElementById('MFGEEmp'+x).style.position="absolute";
			document.getElementById('MFGEEmp'+x).style.visibility="hidden";
			document.getElementById('MFGEEmp'+x+'_img').src="/common/img/navBul1_1.gif";
			document.getElementById('MFGEEmp'+x+'_hdr').style.color="#3b73b9";

			
			for(var x=1;x<4;x++)
			{
			if(document.getElementById('MFPriceNPerf'+x).style.position=="relative")
			{
             document.getElementById('MFPriceNPerf'+x).style.position="absolute";
			document.getElementById('MFPriceNPerf'+x).style.visibility="hidden";
			
			}
			}	
				
			
			
			for(var a=1;a<6;a++){
				
					document.getElementById('MFGEEmp'+a+'_hdr').style.fontWeight= 'normal';
			}
		}
		else{
			document.getElementById('MFGEEmp'+x).style.position="relative";
			document.getElementById('MFGEEmp'+x).style.visibility="visible";
			document.getElementById('MFGEEmp'+x+'_img').src="/common/img/navBul_sel_1.gif";
			document.getElementById('MFGEEmp'+x+'_hdr').style.fontWeight= 'bold';
			document.getElementById('MFGEEmp'+x+'_hdr').style.color= '#6A6A6A';

			for(var i=1;i<6;i++){
				if(i != x){
					document.getElementById('MFGEEmp'+i).style.visibility='hidden';
					document.getElementById('MFGEEmp'+i).style.position='absolute';
					document.getElementById('MFGEEmp'+i+'_img').src="/common/img/navBul1_1.gif";
					document.getElementById('MFGEEmp'+i+'_hdr').style.color= '#3b73b9';
					document.getElementById('MFGEEmp'+i+'_hdr').style.fontWeight= 'normal';
				}
			}
		}
		
		if(x != 3){
			for(var i=1;i<=3;i++){
				document.getElementById('MFPriceNPerf'+i).style.visibility='hidden';
				document.getElementById('MFPriceNPerf'+i).style.position='absolute';
				document.getElementById('MFPriceNPerf'+i+'_img').src="/common/img/navBul1_1.gif";
				document.getElementById('MFPriceNPerf'+i+'_hdr').style.color= '#3b73b9';
				document.getElementById('MFPriceNPerf'+i+'_hdr').style.fontWeight= 'normal';
			}
		}
	
		}//end of if
		else
		{

         if (document.getElementById('MFGEEmp'+x).style.position == "relative"){
			document.getElementById('MFGEEmp'+x).style.position="fixed";
			document.getElementById('MFGEEmp'+x).style.visibility="hidden";
			document.getElementById('MFGEEmp'+x+'_img').src="/common/img/navBul1_1.gif";
			document.getElementById('MFGEEmp'+x+'_hdr').style.color="#3b73b9";

			for(var x=1;x<4;x++)
			{
			if(document.getElementById('MFPriceNPerf'+x).style.position=="relative")
			{
             document.getElementById('MFPriceNPerf'+x).style.position="fixed";
			document.getElementById('MFPriceNPerf'+x).style.visibility="hidden";
			}
			}	
			
			
			
			for(var a=1;a<6;a++){
				if(a == x)
					document.getElementById('MFGEEmp'+a+'_hdr').style.fontWeight= 'normal';
			}
		}
		else{
			document.getElementById('MFGEEmp'+x).style.position="relative";
			document.getElementById('MFGEEmp'+x).style.visibility="visible";
			document.getElementById('MFGEEmp'+x+'_img').src="/common/img/navBul_sel_1.gif";
			document.getElementById('MFGEEmp'+x+'_hdr').style.fontWeight= 'bold';
			document.getElementById('MFGEEmp'+x+'_hdr').style.color= '#6A6A6A';

			for(var i=1;i<6;i++){
				if(i != x){
					document.getElementById('MFGEEmp'+i).style.visibility='hidden';
					document.getElementById('MFGEEmp'+i).style.position='fixed';
					document.getElementById('MFGEEmp'+i+'_img').src="/common/img/navBul1_1.gif";
					document.getElementById('MFGEEmp'+i+'_hdr').style.color= '#3b73b9';
					document.getElementById('MFGEEmp'+i+'_hdr').style.fontWeight= 'normal';
				}
			}
		}
		
		if(x != 3){
			for(var i=1;i<=3;i++){
				document.getElementById('MFPriceNPerf'+i).style.visibility='hidden';
				document.getElementById('MFPriceNPerf'+i).style.position='fixed';
				document.getElementById('MFPriceNPerf'+i+'_img').src="/common/img/navBul1_1.gif";
				document.getElementById('MFPriceNPerf'+i+'_hdr').style.color= '#3b73b9';
				document.getElementById('MFPriceNPerf'+i+'_hdr').style.fontWeight= 'normal';
			}
		}



		}
	
	}

	function fnShowPriceNPerf(x, y)
	{
		if(navigator.appName=="Microsoft Internet Explorer"){
		if(y != 'O'){
			if (document.getElementById('MFGEEmp3').style.position == "relative"){
				document.getElementById('MFGEEmp3').style.position="absolute";
				document.getElementById('MFGEEmp3').style.visibility="hidden";
				document.getElementById('MFGEEmp3_img').src="/common/img/navBul1_1.gif";
				document.getElementById('MFGEEmp3_hdr').style.color="#3b73b9";
				document.getElementById('MFGEEmp3_hdr').style.fontWeight= 'normal';
			}
			else{
				document.getElementById('MFGEEmp3').style.position="relative";
				document.getElementById('MFGEEmp3').style.visibility="visible";
				document.getElementById('MFGEEmp3_img').src="/common/img/navBul_sel_1.gif";
				document.getElementById('MFGEEmp3_hdr').style.fontWeight= 'bold';
				document.getElementById('MFGEEmp3_hdr').style.color= '#6A6A6A';
			}
		}

		if (document.getElementById('MFPriceNPerf'+x).style.position == "relative"){
			document.getElementById('MFPriceNPerf'+x).style.position="absolute";
			document.getElementById('MFPriceNPerf'+x).style.visibility="hidden";
			document.getElementById('MFPriceNPerf'+x+'_img').src="/common/img/navBul1_1.gif";
			document.getElementById('MFPriceNPerf'+x+'_hdr').style.color="#3b73b9";

			for(var a=1;a<=3;a++){
				if(a == x){
					document.getElementById('MFPriceNPerf'+a+'_hdr').style.fontWeight= 'normal';
				}
			}
		}
		else{
			document.getElementById('MFPriceNPerf'+x).style.position="relative";
			document.getElementById('MFPriceNPerf'+x).style.visibility="visible";
			document.getElementById('MFPriceNPerf'+x+'_img').src="/common/img/navBul_sel_1.gif";
			document.getElementById('MFPriceNPerf'+x+'_hdr').style.fontWeight= 'bold';
			document.getElementById('MFPriceNPerf'+x+'_hdr').style.color= '#6A6A6A';

			for(var i=1;i<=3;i++){
				if(i != x){
					document.getElementById('MFPriceNPerf'+i).style.visibility='hidden';
					document.getElementById('MFPriceNPerf'+i).style.position='absolute';
					document.getElementById('MFPriceNPerf'+i+'_img').src="/common/img/navBul1_1.gif";
					document.getElementById('MFPriceNPerf'+i+'_hdr').style.color= '#3b73b9';
					document.getElementById('MFPriceNPerf'+i+'_hdr').style.fontWeight= 'normal';
				}
			}
		}
	
		}//end of if
		else
		{
         if(y != 'O'){
			if (document.getElementById('MFGEEmp3').style.position == "relative"){
				document.getElementById('MFGEEmp3').style.position="fixed";
				document.getElementById('MFGEEmp3').style.visibility="hidden";
				document.getElementById('MFGEEmp3_img').src="/common/img/navBul1_1.gif";
				document.getElementById('MFGEEmp3_hdr').style.color="#3b73b9";
				document.getElementById('MFGEEmp3_hdr').style.fontWeight= 'normal';
			}
			else{
				document.getElementById('MFGEEmp3').style.position="relative";
				document.getElementById('MFGEEmp3').style.visibility="visible";
				document.getElementById('MFGEEmp3_img').src="/common/img/navBul_sel_1.gif";
				document.getElementById('MFGEEmp3_hdr').style.fontWeight= 'bold';
				document.getElementById('MFGEEmp3_hdr').style.color= '#6A6A6A';
			}
		}

		if (document.getElementById('MFPriceNPerf'+x).style.position == "relative"){
			document.getElementById('MFPriceNPerf'+x).style.position="fixed";
			document.getElementById('MFPriceNPerf'+x).style.visibility="hidden";
			document.getElementById('MFPriceNPerf'+x+'_img').src="/common/img/navBul1_1.gif";
			document.getElementById('MFPriceNPerf'+x+'_hdr').style.color="#3b73b9";

			for(var a=1;a<=3;a++){
				if(a == x){
					document.getElementById('MFPriceNPerf'+a+'_hdr').style.fontWeight= 'normal';
				}
			}
		}
		else{
			document.getElementById('MFPriceNPerf'+x).style.position="relative";
			document.getElementById('MFPriceNPerf'+x).style.visibility="visible";
			document.getElementById('MFPriceNPerf'+x+'_img').src="/common/img/navBul_sel_1.gif";
			document.getElementById('MFPriceNPerf'+x+'_hdr').style.fontWeight= 'bold';
			document.getElementById('MFPriceNPerf'+x+'_hdr').style.color= '#6A6A6A';

			for(var i=1;i<=3;i++){
				if(i != x){
					document.getElementById('MFPriceNPerf'+i).style.visibility='hidden';
					document.getElementById('MFPriceNPerf'+i).style.position='fixed';
					document.getElementById('MFPriceNPerf'+i+'_img').src="/common/img/navBul1_1.gif";
					document.getElementById('MFPriceNPerf'+i+'_hdr').style.color= '#3b73b9';
					document.getElementById('MFPriceNPerf'+i+'_hdr').style.fontWeight= 'normal';
				}
			}
		}
	


		}
	}







  















