

function chkClient(effdt_1,effdt_2) {

    chkAdditionalPopup(effdt_2)
    
    if (isNaN (new Date (effdt_1).getYear () ) ){
       // alert("bad date");
        return
    }    
//	return; // comment this line to activate popup; uncomment to deactivate popup
	var dtparts = effdt_1.split("/");
	var curdate = new Date;
	var effdt = new Date;
	effdt.setDate(dtparts[1]);
	effdt.setMonth(dtparts[0]-1);
	effdt.setFullYear(dtparts[2]);
	if (curdate >= effdt) {  
	    return;
	}
	var trng1 = 0;
	var trng2 = 0;
	trng1 = getCookies("trng11071");
	trng2 = getCookies("trng11072");
	if (trng1 == null) {
		trng1 = 0
	}
	if (trng2 == null) {
		trng2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "trng11071=1" +";path=/";
	
	
	if ((trng1 != 1)&& (trng2 != 1)){	
		
		viewit="message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=400,width=650,resizeable=1,scrollbars=1,left=125,top=10");
	}
}
function chkAdditionalPopup(effdt_2) {
    if (isNaN (new Date (effdt_2).getYear () ) ){
       // alert("bad date");
        return
    }
	//return; // comment this line to activate popup; uncomment to deactivate popup
	var dtparts = effdt_2.split("/");
	var curdate = new Date;
	var effdt = new Date;
	effdt.setDate(dtparts[1]);
	effdt.setMonth(dtparts[0]-1);
	effdt.setFullYear(dtparts[2]);
	if (curdate >= effdt) {  
	    return;
	}
	var trng1 = 0;
	var trng2 = 0;
	trng1 = getCookies("opu04091");
	trng2 = getCookies("opu04092");
	if (trng1 == null) {
		trng1 = 0
	}
	if (trng2 == null) {
		trng2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "opu04091=1" +";path=/";
	
	
	if ((trng1 != 1)&& (trng2 != 1)){	
		
		viewit="message_other_popup.asp";
		win = window.open(viewit,"ViewOtherWindow","toolbar=0,menubar=0,height=400,width=650,resizeable=1,scrollbars=1,left=225,top=70");
	}
}



function loadTeMessage() {
	return; // comment this line to activate popup; uncomment to deactivate popup
	var cookie1 = 0;
	var cookie2 = 0;
	cookie1 = getCookies("te07011");
	cookie2 = getCookies("te07012");
	if (cookie1 == null) {
		cookie1 = 0
	}
	if (cookie2 == null) {
		cookie2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "te07011=1" +";path=/";
	
	
	if ((cookie1 != 1)&& (cookie2 != 1)){	
		
		viewit="te_message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=320,width=500,resizeable=1,scrollbars=0,left=225,top=250");
	}
}

function loadEgMessage() {
	return; // comment this line to activate popup; uncomment to deactivate popup
	var cookie1 = 0;
	var cookie2 = 0;
	cookie1 = getCookies("eg07011");
	cookie2 = getCookies("eg07012");
	if (cookie1 == null) {
		cookie1 = 0
	}
	if (cookie2 == null) {
		cookie2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "eg07011=1" +";path=/";
	
	
	if ((cookie1 != 1)&& (cookie2 != 1)){	
		
		viewit="eg_message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=320,width=500,resizeable=1,scrollbars=0,left=225,top=250");
	}
}

function loadMbMessage() {
	return; // comment this line to activate popup; uncomment to deactivate popup
	var cookie1 = 0;
	var cookie2 = 0;
	cookie1 = getCookies("mb07011");
	cookie2 = getCookies("mb07012");
	if (cookie1 == null) {
		cookie1 = 0
	}
	if (cookie2 == null) {
		cookie2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "mb07011=1" +";path=/";
	
	
	if ((cookie1 != 1)&& (cookie2 != 1)){	
		
		viewit="mb_message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=320,width=500,resizeable=1,scrollbars=0,left=225,top=250");
	}
}

function loadAgMessage() {
	return; // comment this line to activate popup; uncomment to deactivate popup
	var cookie1 = 0;
	var cookie2 = 0;
	cookie1 = getCookies("ag07011");
	cookie2 = getCookies("ag07012");
	if (cookie1 == null) {
		cookie1 = 0
	}
	if (cookie2 == null) {
		cookie2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "ag07011=1" +";path=/";
	
	
	if ((cookie1 != 1)&& (cookie2 != 1)){	
		
		viewit="ag_message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=320,width=500,resizeable=1,scrollbars=0,left=225,top=250");
	}
}

function loadEtMessage() {
	return; // comment this line to activate popup; uncomment to deactivate popup
	var cookie1 = 0;
	var cookie2 = 0;
	cookie1 = getCookies("et07011");
	cookie2 = getCookies("et07012");
	if (cookie1 == null) {
		cookie1 = 0
	}
	if (cookie2 == null) {
		cookie2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "et07011=1" +";path=/";
	
	
	if ((cookie1 != 1)&& (cookie2 != 1)){	
		
		viewit="et_message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=320,width=500,resizeable=1,scrollbars=0,left=225,top=250");
	}
}

function loadMnMessage() {
	return; // comment this line to activate popup; uncomment to deactivate popup
	var cookie1 = 0;
	var cookie2 = 0;
	cookie1 = getCookies("mn07011");
	cookie2 = getCookies("mn07012");
	if (cookie1 == null) {
		cookie1 = 0
	}
	if (cookie2 == null) {
		cookie2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "mn07011=1" +";path=/";
	
	
	if ((cookie1 != 1)&& (cookie2 != 1)){	
		
		viewit="mnus_message_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=320,width=500,resizeable=1,scrollbars=0,left=225,top=250");
	}
}

function loadPopup() {
	return; // comment this line to activate popup; uncomment to deactivate popup
			  // dont put special characters in cookie name such as _
	var trng1 = 0;
	var trng2 = 0;
	trng1 = getCookies("popup09131");
	trng2 = getCookies("popup09132");
	if (trng1 == null) {
		trng1 = 0
	}
	if (trng2 == null) {
		trng2 = 0
	}	
	//alert("trng1 = " + trng1 + " trng2 = " + trng2);
	document.cookie = "popup09131=1" +";path=/";
	
	
	if ((trng1 != 1)&& (trng2 != 1)){	
		
		viewit="link_popup.asp";
		win = window.open(viewit,"ViewWindow","toolbar=0,menubar=0,height=400,width=650,resizeable=1,scrollbars=0,left=225,top=250");
	}		
	

}
function getCookies(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf(prefix);
	if (begin == -1)
		return null;
	var end = document.cookie.indexOf(";", begin);
	if (end == -1)
		end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end));
}







