var ro_capable = false;
var ro_selected = 0;

function ro_getRef (which) {
	return eval('document.images[\'top' + (which-1) + '\']');
}

function ro_getTitleRef() {
	return eval('document.images[\'title\']');
}

function ro_switch (which, state) {
	if (!ro_capable) return;
	if (which == ro_selected) return;

	if(imgArray[which]==false) return;

	imgRef = ro_getRef(which);
	imgRef.src = imgArray[which][state].src;
}

function ro_reset () {
	ro_selected=0;
	for(i=0;i<imgArray.length;i++)
		ro_switch(i,0);
}

function ro_set (which) {

	if (!ro_capable) return;

	ro_reset();
	imgRef = ro_getRef(which);
	imgRef.src = imgArray[which][1].src;
	ro_selected = which;
}

function ro_set_title(which){

	titleRef = ro_getTitleRef();
	titleRef.src = titleArray[1][which].src;
	//ro_selected = titleRef.src;
	
}

function ro_set_section(which){

	imgRef = ro_getRef(which);
	imgRef.src = imgArray[which][1].src;

}

function set_lock(which){

	imgRef = ro_getRef(which);
	imgRef.src = imgArray[which][1].src;

}

function openURL()
{ 

// grab index number of the selected option
selInd = document.LGOG.moreListings.selectedIndex; 

// get value of the selected option
goURL = document.LGOG.moreListings.options[selInd].value;

// redirect browser to the grabbed value (hopefully a URL)
top.location.href = goURL; 

}

function showTerms() {

		var menuURL = '/legal/terms.html';
		var menuWin = window.open(menuURL,"Menu",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=400,height=500');
		if(navigator.appName.substring(0,8)=="Netscape") {
			menuWin.location = menuURL;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
			menuWin.focus();

	}
	
function showDisclaimer() {

		var menuURL = '/legal/disclaimer.html';
		var menuWin = window.open(menuURL,"Menu",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=400,height=300');
		if(navigator.appName.substring(0,8)=="Netscape") {
			menuWin.location = menuURL;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
			menuWin.focus();

	}
	
function showInformationForm() {

		var menuURL = '/competitions/information/';
		var menuWin = window.open(menuURL,"Menu",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=440,height=500');
		if(navigator.appName.substring(0,8)=="Netscape") {
			menuWin.location = menuURL;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
			menuWin.focus();

	}
	
function showCompetitionTerms() {

		var menuURL = '/legal/competitionterms.html';
		var menuWin = window.open(menuURL,"Menu",'toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=440,height=500');
		if(navigator.appName.substring(0,8)=="Netscape") {
			menuWin.location = menuURL;
		}
		if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
			menuWin.focus();

	}

