// JavaScript Document

	function querySt() {
		hu = window.location.search.substring(1);
		/*
		gy = hu.split("&");
		for (i=0;i<gy.length;i++) {
			ft = gy[i].split("=");
			if (ft[0] == ji) {
				return ft[1];
			}
		}*/
		//alert(hu.lastIndexOf("?"));
	
		hu = window.location.search.substr(hu.lastIndexOf("?") + 2);
		return hu;
	}
	
	
	function getCookie(c_name)
	{
	if (document.cookie.length>0)
	  {
	  c_start=document.cookie.indexOf(c_name + "=");
	  if (c_start!=-1)
	    {
	    	c_start=c_start + c_name.length+1;
	    	c_end=document.cookie.indexOf(";",c_start);
	    if (c_end==-1) c_end=document.cookie.length;
	    	return unescape(document.cookie.substring(c_start,c_end));
	    }
	  }
	return "";
	}
	
	
	function setCookie(c_name,value,expiredays)
	{
		var exdate=new Date();
		exdate.setDate(exdate.getDate()+expiredays);
		document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
	}
	
	function getQueryValue() {
		var res = querySt();
	
		// Set Cookie
		if (res != "") {
			setCookie('CampaignID',res,90);
			// Get Cookie
			// alert("Cookie Value: " + getCookie('CampaignID'));
		} else {
			// alert('Cookie not set');
		}
	
		res = getCookie('CampaignID');
		// Set Hidden Value
		document.getElementById("dummyCode").value=res;
	
	
		// Get Hidden Value
		// alert("Hidden Value: " + document.getElementById("dummyCode").value);
	
 }


function EffectAccount()
{

if(document.getElementById('acctSelect').value=="CertificateDeposit") 
{
showDiv('/_1153_252156.html');
}
else if (document.getElementById('acctSelect').value=="MoneyMarket") 
{
showDiv('/_1153_252156.html');
}

else if (document.getElementById('acctSelect').value=="Mortgage") 
{
window.open("https://carenet.fnfismd.com/loanadmin/dmi_aig.htm")
}
else if (document.getElementById('acctSelect').value=="HomeEquityLoan") 
{
window.open("https://carenet.fnfismd.com/loanadmin/dmi_aig.htm")
}
else if (document.getElementById('acctSelect').value=="HomeEquityLineCredit") 
{
window.open("https://carenet.fnfismd.com/loanadmin/dmi_aig.htm")
}
else if (document.getElementById('acctSelect').value=="OtherAccounts")
{
showDiv('/_1153_252156.html');
}
else
{
alert ('select the option')
}



}


function popupWindow(o,d)
      {
        var obj = document.getElementById(o);
        if(d)
          obj.style.display = 'block';
        else
          obj.style.display = 'none';
      }


