<!--- START added by david jung on Oct.12/2005 to display annoying popup when people leave site for user Ankit--->


function openpopup(){
	<!--
	var myhostname = location.hostname;
	// alert(myhostname)

	var isStillInsideCP = myhostname.indexOf("192.168.2.30");
	// alert(isStillInsideCP)
	if (isStillInsideCP !=0) {
		// display popup
		var winl = (screen.width - 350) / 2;
		var wint = (screen.height - 150) / 2;
		window.open("/index.cfm?fuseaction=referral_popup","Referral","width=350,height=150, ,top=" + wint + ",left=" + winl +",resizable=no,scrollbars=no,menubar=no,toolbar=no,status=no,location=no");
	}
	
	// -->

}

function get_cookie(Name) {
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		if (offset != -1) { // if cookie exists
			offset += search.length
			// set index of beginning of value
			end = document.cookie.indexOf(";", offset);
			// set index of end of cookie value
			if (end == -1)
				end = document.cookie.length;
			returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}

function checkpopup(){
	if (get_cookie('popped')==''){
		openpopup()
		document.cookie="popped=yes"
	}
}

<!--- END added by david jung on Oct.12/2005 to display annoying popup when people leave site for user Ankit--->
