    // pop up survey for first time users only 

	//JK Popup Window Script (version 3.0)- By JavaScript Kit (http://www.javascriptkit.com)
	//Visit JavaScriptKit.com for free JavaScripts
	//This notice must stay intact for legal use
	//Win Type: Pop Up | 256 days period
		
	//Specify URLs to randomly select from and popup/popunder:
	//To display a single URL, just remove all but the first entry below:

	///////////////////////////////////////////////////////////
	/////////birth DAILY ADDED - 27th NOV 2007///////////////
	///////////////////////////////////////////////////////////
	var popurls=new Array()
	//popurls[0]="http://www.feedback.kidspot.com.au/se.ashx?s=1427C7335FB31BD7"
	//popurls[0] = "http://www.kidspot.com.au/popup_birth.htm"
	//popurls[0] = "http://www.kidspot.com.au/popup_birth_motherhood_survey.asp"

	function openpopup(popurl){
		var winpops=window.open(popurl,"BirthPopup","width=477,height=340,status,scrollbars,resizable")
	}

	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;
	}

	popfrequency="256 days"

	function resetcookie()
	{
		var expireDate = new Date()
		expireDate.setDate(expireDate.getDate()-10)
		document.cookie = "MotherhoodSurvey2010=;path=/;expires=" + expireDate.toGMTString()	
	}

	function loadornot()
	{
	    if (get_cookie('MotherhoodSurvey2010') == '')
		{
			//setTimeout("openpopup(popurls[Math.floor(Math.random()*(popurls.length))])",5000)
			setTimeout("openpopup(popurls[0])",1000)
			var expireDate = new Date()
			expireDate.setDate(expireDate.getDate()+parseInt(popfrequency))
	    	document.cookie = "MotherhoodSurvey2010=" + parseInt(popfrequency) + ";path=/;expires=" + expireDate.toGMTString()
		}
	}

	//if (get_cookie('MotherhoodSurvey2010') != parseInt(popfrequency))
	//resetcookie()	

	//loadornot()
