// copyright survey.com 2007. all rights reserved


/////////////////////////////////////////////////
///
///	START OVERLAY POSITION CONTROL
///	
///	The X position may be changed by editing the value of the Xpos7997 variable in line 18
///	The Y position may be changed by editing the value of the Ypos7997 variable in line 19
///
///	Three things to note:
///		1. The value needs to be a string, encapsulated in quotes
///		2. The value of Ypos7997 needs to be a number, followed by 'px'
///		3. The value of Xpos7997 needs to be a number, followed by 'px' or '%'
///
/////////////////////////////////////////////////

var Xpos7997="35%";
var Ypos7997="300px";

/////////////////////////////////////////////////
///
///	END OVERLAY POSITION CONTROL
///	DO NOT EDIT BELOW THIS LINE
///
/////////////////////////////////////////////////


var daURL = "http://www.eu-survey.com/webprod/cgi-bin/askiaext.dll?Action=StartSurvey&T1=BlueShoots_CP&lin=1";
var expDays = 180;
var daPatH = "/";
var daDom = null;
var ModE = 2;
var ChancE=1;



// ---INITIALIZATION---------------------------------------
var exp = new Date();
if (Roulette() == 1){
	exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
	if (!GetCookie('bssurvey')) { //CHECKS IF COOKIES ARE ON
		SetCookie('bssurvey','1',exp,daPatH,daDom);
		if (GetCookie('bssurvey') != null) {
			if (GetCookie('bssurvey') == 2) {
				SetCookie('bssurvey',ModE,exp,daPatH,daDom);
			} else {
				WriteLayer();
				PopuP();
				SetCookie('bssurvey',ModE,exp,daPatH,daDom);
			}
		}
	} else if (GetCookie('bssurvey') != "2") {
		WriteLayer();
		PopuP();
		PopdowN();
		SetCookie('bssurvey',ModE,exp,daPatH,daDom);
	} else {
		SetCookie('bssurvey',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 WriteLayer()
 {
//LAYER CONTENT/////////////////////
document.write('<div id="surveyOverlay7997" style="background-color:#ffffff; position:absolute; visibility:hidden;');
document.write('top:'+Ypos7997+'; left:'+Xpos7997+';');
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; border-color:#000000;" bgcolor="#ffffff" cellspacing="0" cellpadding="0" width="251">');
document.write('<tr>');
document.write('<td>');
document.write('	<table border=0 cellspacing="0" cellpadding="0" width="251">');
document.write('	<tr>');
document.write('		<td align="right">');
document.write('			<a href="javascript:endclick7997()"><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="251" border=0>');
document.write('	<tr>');
document.write('		<td colspan=2>');
document.write('			<img src="http://reporting.eu-survey.com/overlays/img/blueshoots.gif">');
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('				Tell us what you think about Blue Shoots and you will have three chances to win a &pound;50 Amazon voucher. Your feedback enables us to create the best website for you - it will only take 10 minutes to complete.');
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:startclick7997()"><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:endclick7997()"><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 PopuP() {

	setTimeout("ShowLayer('surveyOverlay7997')",2000);
}

function PopdowN() {

	setTimeout("HideLayer('surveyOverlay7997')",200000);
}


function ShowLayer(layerName) {

	if (daBrowseR == "IE") {

		eval(doc_ref + '["' + layerName + '"]' + style_ref + '.visibility="visible"');
	} else {

		eval(doc_ref + '("' + layerName + '")' + style_ref + '.visibility="visible"');
	}
}

function HideLayer(layerName){

	if (daBrowseR == "IE") {

		eval(doc_ref + '["' + layerName + '"]' + style_ref + '.display="none"');
	} else {

		eval(doc_ref + '("' + layerName + '")' + style_ref + '.display="none"');
	}
}

function startclick7997(){
	pview=open(daURL,"survey1","toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=850,height=750");
	HideLayer('surveyOverlay7997');
}

function endclick7997(){
	HideLayer('surveyOverlay7997');
}



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 Roulette() {
	return Math.floor( 1 + Math.random() * ChancE);
}

// ---Copyright© 2005 By Survey.com. All Rights Reserved.--	


