var popped=document.cookie;
// test: // 
//alert(popped);

num_days = 365;
var today = new Date();
var expr = new Date(today.getTime() + num_days*24*60*60*1000);
//alert(today + "--" + expr );


if (popped.match("dt_survey:yes") != "dt_survey:yes")	{

var survey=new Array()
survey[0]='http://surveys.dealtime.com/cgi-bin/survey_dt_view.cgi?mid=7&survey_type_id=11'
survey[1]='http://surveys.dealtime.com/cgi-bin/survey_dt_view.cgi?mid=7&survey_type_id=12'
survey[2]='http://surveys.dealtime.com/cgi-bin/survey_dt_view.cgi?mid=7&survey_type_id=13'

var i=0
//variable used to contain controlled random number 
var random

//randomizer to produce for 10% of traffic
var nth = 10;
var rndpop = Math.floor(Math.random() * nth) + 1;
//alert('rndpop=' + rndpop + 'and nth=' + nth);
if (rndpop == nth) {

	//while all of array elements haven't been cycled thru
	while (i<1){

				random=Math.floor(Math.random()*survey.length)

				if (survey[random]!="selected") {
				//testers:
				//		alert(survey[random]);
				//		alert(random);
				//		alert(i);
				//end testers

				window.open( survey[random],[random],'width=655,height=500,toolbar=0,directories=0,status=0,scrollbars=1,resizable=0,copyhistory=0,screenX=0,screenY=0,top=0,left=0');

				survey[random]="selected"

				i++

				var curCookie = "dt_survey:yes; expires=" + expr; + ""
				document.cookie = curCookie
				}	

		}

}

}