var curPage = (document.location) ? document.location : window.location;
// change to true when deploying it, change this back to false when taking it down.
var deploySurvey = new Boolean(false);
// If they want a change of frequency, change the number after the *.  Currently 1/5.
var number = Math.floor(Math.random() * 5) + 1;
var csurvey = document.cookie;
var today = new Date();
// set to be two months from launch date
var expiry = new Date("March 24, 2008");
function deploy() {
	if (deploySurvey == true){
		// see line 4 comment.  That same number will have to be changed here.
  if (getCookie2("pgc_equitysurvey2") != "viewed"  && number == 5) { 
			setCookie2('pgc_equitysurvey2','viewed');
			//var NewWindow = window.open("/survey/survey_pgc.shtml?referer=" + encodeURIComponent(curPage),"NewWindow","width=640,height=700,scrollbars,resizeable");
		}
	}
}

function getCookie2(name) { 
	var bikky2 = document.cookie;
 var index = bikky2.indexOf(name + "=");

 if (index == -1) return null;
 index = bikky2.indexOf("=", index) + 1;
 var endstr = bikky2.indexOf(";", index);
 if (endstr == -1) endstr = bikky2.length;
 return unescape(bikky2.substring(index, endstr));
}

function setCookie2(name, value) {
	if (value != null && value != "")
  document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString() + "; path=/";
 csurvey = document.cookie;
}