// ---VERSION: 20050215------------------------------------
// ---SETUP VARIABLES--------------------------------------

var daURLNWDA = "http://www.eu-survey.com/webprod/cgi-bin/askiaext.dll?Action=StartSurvey&T1=ANDnwda&lin=1&wave=2";
var expDays = 180;
var daPatH = "/";
var daDom = null;
var ModE = 2;
var ChancE = 99999999999;
var ChancENWDA=5;
var srcCnC=999999999;


// ---INITIALIZATION---------------------------------------
var exp = new Date();
if (RouletteNWDA() == 1){
	exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
	if (!GetCookie('dmnwdasurv')) { //CHECKS IF COOKIES ARE ON
		SetCookie('dmnwdasurv','1',exp,daPatH,daDom);
		if (GetCookie('dmnwdasurv') != null) {
			if (GetCookie('dmnwdasurv') == 2) {
				SetCookie('dmnwdasurv',ModE,exp,daPatH,daDom);
			} else {
				WriteLayerNWDA();
				PopuPNWDA();
				SetCookie('dmnwdasurv',ModE,exp,daPatH,daDom);
			}
		}
	} else if (GetCookie('dmnwdasurv') != "2") {
		WriteLayerNWDA();
		PopuPNWDA();
		PopdowNNWDA();
		SetCookie('dmnwdasurv',ModE,exp,daPatH,daDom);
	} else {
		SetCookie('dmnwdasurv',ModE,exp,daPatH,daDom);
	}
}

//BROSWER COMPATABILITY/////////////
var daBrowseR = "IE";
if (navigator.appName=="Netscape") {
	daBrowseR="NS";
}
if (daBrowseR=="NS") {
	doc_ref="document.getElementById";
	style_ref=".style";
} else {
	doc_ref="document.all";
	style_ref=".style";
}


function WriteLayerNWDA()
 {
//LAYER CONTENT/////////////////////
document.write('<div id="surveyOverlay7997NWDA" style="background-color:#ffffff; position:absolute; visibility:hidden;');
document.write('top:300px; left:250px;');
document.write(' width:1; height:1; background-color:#ffffff; layer-background-color:#ffffff; z-index:1000;">');
document.write('<table style="border-style:ridge; border-width=2px;" bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="250">');
document.write('<tr>');
document.write('<td>');
document.write('	<table border=0 cellspacing="0" cellpadding="0" width="250">');
document.write('	<tr>');
document.write('		<td align="right">');
document.write('			<a href="javascript:endclick7997NWDA()"><img src="http://reporting.eu-survey.com/overlays/img/closebutton.jpg" alt="close" border="0"></a>');
document.write('		</td>');
document.write('	</tr>');
document.write('	</table>');
document.write('</td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td>');
document.write('	<table cellpadding="5" cellspacing="5" width="250" border=0>');
document.write('	<tr>');
document.write('		<td colspan=2 bgcolor="#f2f2f2">');
document.write('			<img src="http://reporting.eu-survey.com/overlays/img/dm.jpg">');
document.write('		</td>');
document.write('	</tr>');
document.write('	<tr>');
document.write('		<td colspan=2>');
document.write('			<font color="#000000" face="Verdana" size="2">');
document.write('				<B>Visitor Survey and Prize Draw</B>');
document.write('			</font color="#000000">');
document.write('		</td>');
document.write('	</tr>');
document.write('	<tr>');
document.write('		<td colspan=2>');
document.write('			<p><font color="#000000" face="Verdana" size="1">');
document.write('				We would be grateful if you could help us by taking part in a short visitor survey. The survey should take no more than 7 minutes of your time, and in return you will be entered into a draw to win one of 3 <b>&pound;50 Amazon vouchers</b>.');
document.write('			</font color="#000000">');
document.write('		</td>');
document.write('	</tr>');
document.write('	<tr>');
document.write('		<td colspan=2>');
document.write('			<font color="#000000" face="Verdana" size="1">');
document.write('				<b>Would you like to take part?</b>');
document.write('			</font color="#000000">');
document.write('		</td>');
document.write('	</tr>');
document.write('	<tr >');
document.write('		<td align="center">');
document.write('			<a href="javascript:startclick7997NWDA()"><img src="http://reporting.eu-survey.com/overlays/img/nowbutton2.jpg" border="0" alt="now" /></a>');
document.write('		</td>');
document.write('		<td align="center">');
document.write('			<a href="javascript:endclick7997NWDA()"><img src="http://reporting.eu-survey.com/overlays/img/nobutton2.jpg" alt="nothanks" border="0" /></a>');
document.write('		</td>');
document.write('	</tr>');
document.write('	</table>');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');
 }

// ---FUNCTIONS--------------------------------------------

function PopuPNWDA() {

	setTimeout("ShowLayerNWDA('surveyOverlay7997NWDA')",2000);
}

function PopdowNNWDA() {

	setTimeout("HideLayerNWDA('surveyOverlay7997NWDA')",200000);
}


function ShowLayerNWDA(layerName) {

	if (daBrowseR == "IE") {

		eval(doc_ref + '["' + layerName + '"]' + style_ref + '.visibility="visible"');
	} else {

		eval(doc_ref + '("' + layerName + '")' + style_ref + '.visibility="visible"');
	}
}

function HideLayerNWDA(layerName){

	if (daBrowseR == "IE") {

		eval(doc_ref + '["' + layerName + '"]' + style_ref + '.display="none"');
	} else {

		eval(doc_ref + '("' + layerName + '")' + style_ref + '.display="none"');
	}
}

function startclick7997NWDA(){
	pview=open(daURLNWDA,"survey1","toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=850,height=750");
	HideLayerNWDA('surveyOverlay7997NWDA');
}

function endclick7997NWDA(){
	HideLayerNWDA('surveyOverlay7997NWDA');
}



function GetCookie(name) { //GETS THE COOKIE VALUE FROM THE BROWSER
	var StartpoinT = document.cookie.indexOf(name+"=");
	var NameLenghT = StartpoinT+name.length+1;
	if ((!StartpoinT) && (name != document.cookie.substring(0,name.length))) return null;
	if (StartpoinT == -1) return null;
	var EnD = document.cookie.indexOf(";",NameLenghT);
	if (EnD == -1) EnD = document.cookie.length;
	return unescape(document.cookie.substring(NameLenghT,EnD));
}

function SetCookie (name, value) { //THIS FORMATS AND SETS THE COOKIE IN THE BROWSER
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (argc > 2) ? argv[2] : null;
	var path = (argc > 3) ? argv[3] : null;
	var domain = (argc > 4) ? argv[4] : null;
	var secure = (argc > 5) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : "");
}



function RouletteNWDA() {
	return Math.floor( 1 + Math.random() * ChancENWDA);
}

// ---Copyright© 2005 By Survey.com. All Rights Reserved.--
