
	var ans= false;
	function nameDefined(ckie,nme){
   		var splitValues;
   		var i;
   		for (i=0;i<ckie.length;++i){
      			splitValues=ckie[i].split("=");
      			if (splitValues[0]==nme) return true;
   		}
   		return false;
	}

	function delBlanks(strng){
		var result="";
		var i;
		var chrn;
   		for (i=0;i<strng.length;++i) {
      			chrn=strng.charAt(i);
      			if (chrn!=" ") result += chrn;
   		}
   		return result;
	}

	function getCookieValue(ckie,nme){
   		var splitValues;
   		var i;
   		for(i=0;i<ckie.length;++i) {
      			splitValues=ckie[i].split("=");
      			if(splitValues[0]==nme) return splitValues[1];
   		}
   		return "";
	}

	function insertCounter() {
 		readCookie();
	}

	function readCookie() {
 		var cookie=document.cookie;
 		counter=0;
 		var chkdCookie=delBlanks(cookie);  //are on the client computer
 		var nvpair=chkdCookie.split(";");
 		if(nameDefined(nvpair,"pageCount"))
 		counter=parseInt(getCookieValue(nvpair,"pageCount"));
 		++counter;
 		var futdate = new Date();
 		var expdate = futdate.getTime();
 		expdate += 3600000 * 24 *30  //expires in 1 hour;
 		futdate.setTime(expdate);

 		var newCookie="pageCount="+counter;
 		newCookie += "; expires=" + futdate.toGMTString();
 		window.document.cookie=newCookie;
		if (cookie % 10 == 0 && ans==true) disp_sconfirm();
	}
			
	function maketrue(){
		ans=true;
	}			
			
	function disp_confirm() {
  		var r=confirm("Would you like to leave feedback?")
  		if (r){
    			myWindow=window.open("../pecap/newform.html",toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,height=400,width=250);
    			myWindow.focus();
    			return false;
    		}
 	}
		
