<!--

//Move to another page with correct parameters
function GoTo(where,id,title){
	var path
	//These two cases for plain text are exceptions to usual functioning
	if (where!='HT' && where!='Tsections')	{
		//var period = document.info.period[document.info.period.selectedIndex].value;
		/*if (where!='sections') {
			var period = document.info.period[document.info.period.selectedIndex].value;
		}else{
			var period = 0;
		}
		*/
		if(setperiod='all'){
			var period = 0;
		}else{
			var period = document.info.period[document.info.period.selectedIndex].value;
		}
		var main= document.info.main.value;
	}
	//Select the place to go to	
	switch (where){
		case 'H':
			var selection = document.info.selection.value;
			var period = document.info.periods.value;
			var back = escape('wrldhis_results.asp?HWType=HISTORY&main='+ main +'&period='+ period +'&selection='+ selection);
			path = 'histories.asp?nid='+ id + '&period=' + period +'&from=selection&back='+back;
			newLocation(path);
		break;
		case 'HT':
			//override normal - selected - values for period and main
			period = 0;
			main= false;
			var selection = document.info.selection.value;
			var back
			if (document.info.HWtype[0].checked)	{
				var back = escape('wrldhis_results.asp?HWType=HISTORY&main='+ main +'&period='+ period +'&selection='+ selection);
				path = 'histories.asp?nid='+ id + '&period=' + period +'&from=selection&back='+back;
			}
			else	{
				var back = escape('wrldhis_results.asp?HWType=TOUR&main='+ main +'&period='+ period +'&selection='+ selection);
				path = 'tours.asp?nid='+ id + '&period=' + period + '&main=False&from=selection&back='+ back;	
			}
			newLocation(path);
		break;
		case 'T':
			var selection = document.info.selection.value;
			var period = document.info.periods.value;
			var back = escape('wrldhis_results.asp?HWType=TOUR&period='+ period +'&selection='+ selection);
			path = 'tours.asp?nid='+ id + '&period=' + period + '&main=False&from=selection&back='+ back;
			newLocation(path);
		break;
		case 'sections':
			var selection = document.info.selection.value;
			var period = document.info.periods.value;
			var back = escape('wrldhis_results.asp?HWType=HISTORY&main='+ main +'&period='+ period +'&selection='+ selection);
			openWindow('sections','wrldhis_sections.asp?title='+title+'&nid='+ id +'&from=selection&back='+ back);
		break;
		case 'Tsections':
			var back;
			//Sections for plain text
			period = 0;
			main= false;
			var selection = document.info.selection.value;
			if (document.info.HWtype[0].checked)	{
				back = escape('wrldhis_results.asp?HWType=HISTORY&main='+ main +'&period='+ period +'&selection='+ selection);
				openWindow('sections','wrldhis_sections.asp?title='+title+'&nid='+ id +'&from=selection&back='+ back);
			}
			else	{
				back = escape('wrldhis_results.asp?HWType=TOUR&main='+ main +'&period='+ period +'&selection='+ selection);
				path = 'tours.asp?nid='+ id + '&period=' + period + '&main=False&from=selection&back='+ back;				
				newLocation(path);
			}
		break;
		case 'submit':
			var Theme = document.info.Theme.value;
			var button;
			if (Theme != "0"){
				for (var i = 0; i < document.info.HWtype.length; i++){
					if (document.info.HWtype[i].checked){
						break
					}
				}
				button = document.info.HWtype[i].value;
				path = "wrldhis_results.asp?selection=SELECTION SUBJECT='"+ button +"' THEME='"+ Theme +"'&";
				path = path + 'period='+ period +'&main='+ main +'&HWType='+ button;
				newLocation(replace(path));
			}
		break;
	}
}

//Bring up the text about tours or histories when results are not present
function switchLayers(show,hide){
	//if(document.info.selection.value==''){
		if(isIE){
			document.all[hide +'Layer'].style.visibility='hidden';
			document.all[show +'Layer'].style.visibility='visible';
		}else{
		if(parseInt(navigator.appVersion)>=5){
			document.getElementById(hide +'Layer').style.visibility='hidden';
			document.getElementById(show +'Layer').style.visibility='visible';
		}else{
			document.layers[hide +'Layer'].visibility='hidden';
			document.layers[show +'Layer'].visibility='visible';
		}}
	//}
}

//Change between showing main stories and all stories
function toggleMain(resultType){
if (resultType=='main')
	document.info.main.value = 'True';
else if (resultType=='all')
	document.info.main.value = 'False';
GoTo('submit','');
}

//Declare image names for page
if(document.images){
	alltypes2 = new Image
	alltypes2.src = "/CImg/btn_alltypes2.gif"
	alltypes1 = new Image
	alltypes1.src = "/CImg/btn_alltypes1.gif"
	maintypes2 = new Image
	maintypes2.src = "/CImg/btn_maintypes2.gif"
	maintypes1 = new Image
	maintypes1.src = "/CImg/btn_maintypes1.gif"
	showresults2 = new Image
	showresults2.src = "img/btn_showresults2.gif"
	showresults1 = new Image
	showresults1.src = "img/btn_showresults1.gif"
	sections2 = new Image
	sections2.src = "/CImg/btn_dissections2.gif"
	sections1 = new Image
	sections1.src = "/CImg/btn_dissections1.gif"
	gohis2 = new Image
	gohis2.src = "/CImg/btn_gohis2.gif"
	gohis1 = new Image
	gohis1.src = "/CImg/btn_gohis1.gif"
	gotour2 = new Image
	gotour2.src = "/CImg/btn_gotour2.gif"
	gotour1 = new Image
	gotour1.src = "/CImg/btn_gotour1.gif"
	historieslist1 = new Image
	historieslist1.src = "/wrldhis/img/historieslist1.gif"
	historieslist2 = new Image
	historieslist2.src = "/wrldhis/img/historieslist2.gif"
	ht2 = new Image
	ht2.src = "/CImg/btn_dissections2.gif"
	ht1 = new Image
	ht1.src = "/CImg/btn_dissections1.gif"
}
//-->
