/* Country section change script */

var agt=navigator.userAgent.toLowerCase();
// *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1)); var is_nav3up = (is_nav && (is_major >= 3));
var is_ie = (agt.indexOf("msie") != -1); var is_ie3up = (is_ie && (is_major >= 3));
var is_aol = (agt.indexOf("aol") != -1); var is_aol3 = (is_aol && is_ie3); var is_aol4 = (is_aol && is_ie4);
var is_opera = (agt.indexOf("opera") != -1); var is_webtv = (agt.indexOf("webtv") != -1);
function errorTrap() {
	return true;
}

function ConfirmFormGoOnline(url,country)
{
	if ('[DOWNLOADER_URL]' == url)
	{  
		var place = country.options[country.selectedIndex].value;
		self.location = "http://" + place ;
		return true;    
	}   //Ignore this script for online versions

	
	var msg = 'You are currently using an OFFLINE version of the site.\n';
	msg += 'The offline version does not support forms being posted\n';
	alert(msg);
	return false;
	/*
	msg += 'However, if you are connected to the internet, you can post to the ONLINE site\n\n';
	msg += 'Do you want to post the form to the ONLINE version of the site?'
	
	if (! confirm(msg))
	{   
		country.selectedIndex = -1;
		return false;   
	}
	
	var place = country.options[country.selectedIndex].value;	 
	place = "http://" + place ;	
	window.open(place,"Acnielsen");
 
	return true;
	*/
}


document.write('<FORM METHOD="GET">\n')
document.write('<font face="Arial, Helvetica" color="white" size="2"><b>Nielsen Media Research<br>in your Region</b></font><br>');

document.write('<SELECT NAME="country"  onChange="return ConfirmFormGoOnline(\'[DOWNLOADER_URL]\',country);" SIZE=3 MULTIPLE><OPTION VALUE=\"www.nielsenmedia.com.au\">Australia\n');
document.write('<OPTION VALUE=\"asiapacific.nielsenmedia.com.au\">Asia Pacific\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.cn\">China\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.hk\">Hong Kong\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.au/indonesia\">Indonesia\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.my\">Malaysia\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.co.nz\">New Zealand\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.au/philippines\">Philippines\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.au/singapore\">Singapore\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.au/korea\">South Korea\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.au/taiwan\">Taiwan\n');
document.write('<OPTION VALUE=\"www.nielsenmedia.com.au/thailand">Thailand\n');

document.write('<\/SELECT>');
document.write('<\/FORM>');

window.onerror = errorTrap;
