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


// You may change the positioning of the overlay by hand in the following line
var Ypos7997="267px"; var Xpos7997="32.7689243027888%";

// Link identifier
var theLin=11;		


var daURL = "http://www.eu-survey.com/webprod/cgi-bin/askiaext.dll?Action=StartSurvey&T1=AOPw3&lin="+theLin;
var expDays = 45;
var daPatH = "/";
var daDom = null;
ModE=2;

if(typeof(window['srcCnC']) != "undefined")
 {
  var ChancE=srcCnC;
 }
else
 {
ChancE=32;
 }

var exp = new Date();
if (Roulette() == 1){
	exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
	if (!GetCookie('AOPsurvey3')) { //CHECKS IF COOKIES ARE ON
		SetCookie('AOPsurvey3','1',exp,daPatH,daDom);
		if (GetCookie('AOPsurvey3') != null) {
			if (GetCookie('AOPsurvey3') == 2) {
				SetCookie('AOPsurvey3',ModE,exp,daPatH,daDom);
			} else {
				WriteLayer();
				PopuP();
				SetCookie('AOPsurvey3',ModE,exp,daPatH,daDom);
			}
		}
	} else if (GetCookie('AOPsurvey3') != "2") {
		WriteLayer();
		PopuP();

		SetCookie('AOPsurvey3',ModE,exp,daPatH,daDom);
	} else {
		SetCookie('AOPsurvey3',ModE,exp,daPatH,daDom);
	}
}


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()
 {
document.write('<div id="surveyOverlay7997" style="background-color:#ffffff; position:absolute; visibility:hidden;');
document.write('left:'+Xpos7997+'; top:'+Ypos7997+';');
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=1px;" 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:endclick()"><img src="http://iad.anm.co.uk/house2/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>');
document.write('			<img src="http://iad.anm.co.uk/house2/logo7997.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: Please help us!</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 are conducting a short survey about online editorial content and would very much appreciate you giving us your views and opinions. The survey will take about 8 minutes of your time.');
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 help us?</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:startclick()"><img src="http://iad.anm.co.uk/house2/nowbutton2.jpg" border="0" alt="now" /></a>');
document.write('		</td>');
document.write('		<td align="center">');
document.write('			<a href="javascript:endclick()"><img src="http://iad.anm.co.uk/house2/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 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 startclick(){
	pview=open(daURL,"survey1","toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=700");
	HideLayer('surveyOverlay7997');
}

function endclick(){
	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© 2006 By Survey.com. All Rights Reserved.--