function blank(url) {
	winId = "d2w" + Math.floor((100*(Math.random())));
	leftPos = window.screenLeft + 10;
	topPos = window.screenTop + 10;
	properties = 'left=' + leftPos + ',top=' + topPos + ', location=yes, status=yes, toolbar=yes, menubar=yes, directories=yes, resizable=yes, scrollbars=yes';
	window.open(url,winId,properties);
}

function flash() {
	winId = "d2w_flash" + Math.floor((100*(Math.random())));
	leftPos = window.screenLeft + 10;
	topPos = window.screenTop + 10;
	properties = 'width=470,height=310,left=' + leftPos + ',top=' + topPos + ', location=no, status=no, toolbar=no, menubar=no, directories=no, resizable=no, scrollbars=no';
	window.open('flash.htm',winId,properties);
}

function getRandom(max) {
    var ranNum = Math.round(Math.random()*max);
    return ranNum+1;
}

function writeQuestion(imgloc,questionMax) {
		var o = ""; 
		var num = getRandom(questionMax);
		o = "<img src=\"" + imgloc + "question" + num + ".gif\" alt=\"\" />";
		document.write(o);	
}

function jump(obj){
	if(obj.value != ""){
		if(obj.value.indexOf('http') != -1){
			blank(obj.value);
		} else {
			document.location = obj.value;
		}
	}
	return false;
}

function resetCountry(){
	if(document.getElementById('regionList')){
		document.getElementById('regionList').selectedIndex = 0;
	}
	return;	
}

window.onload = resetCountry;
