
//image rollover functions

  var names = '';
   function rollOver() {
	for (i = 0; i < arguments.length; i++) {
	names = arguments[i];
	document.images[names].src = eval(names + "_on.src");
		}

	}

	 function rollOff() {
	 for (i = 0; i < arguments.length; i++) {
	 names = arguments[i];
	 document.images[names].src = eval(names + "_off.src");
		 }

	}


function findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//end image rollover functions
	


//window opener functions
function openDKVWin(url) {
	var leftWin = (screen.availWidth - 480) / 2;
	var topWin = (screen.availHeight - 780) / 2;
	var props = "width=780,height=480,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1";
	var win = window.open(url,'theName',props);
	win.focus();
}


var pluginWin = "";

function openPlugins(url) {
	if(typeof(pluginWin) == "object" && pluginWin.closed != true){pluginWin.focus();} 
	else{
	var leftWin = (screen.availWidth - 440) / 2;
	var topWin = (screen.availHeight - 400) / 2;
	var props = "width=440,height=400,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=yes,resizable=yes,status=yes";
	pluginWin = window.open(url,"plugIns",props);
	pluginWin.focus(); }
}
//end  window opener functions

function openPrivacy(url) { 
	var leftWin = (screen.availWidth - 480) / 2;
	var topWin = (screen.availHeight - 700) / 2;
	var props = "width=700,height=480,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=yes,resizable=yes"; 
	myWin = window.open(url,"PrivacyPolicy",props);
	myWin.focus();
	firstTime = 1;
}

function openExtra(url, winName) { 
	var leftWin = (screen.availWidth - 600) / 2;
	var topWin = (screen.availHeight - 480) / 2;
	var props = "width=600,height=480,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=yes,resizable=yes,status=yes"; 
	extraWin = window.open(url,winName,props);
	extraWin.focus();
}

function openMaps(url) { 
	var leftWin = (screen.availWidth - 700) / 2;
	var topWin = (screen.availHeight - 480) / 2;
	var props = "width=700,height=480,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=no,resizable=no,status=no"; 
	mapsWin = window.open(url,"Maps",props);
	mapsWin.focus();
}

function openFixWin(winUrl,winName,features) {
	window.open(winUrl,winName,features);
}

function openTr(url) { 
	var leftWin = (screen.availWidth - 530) / 2;
	var topWin = (screen.availHeight - 600) / 2;
	var props = "width=530,height=600,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=yes,resizable=yes"; 
	trans = window.open(url,"Transcript",props);
	trans.focus();
}

function openImage(url) { 
	var leftWin = (screen.availWidth - 650) / 2;
	var topWin = (screen.availHeight - 460) / 2;
	var props = "width=650,height=460,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=yes,resizable=yes"; 
	imgWin = window.open(url,"LargeImage",props);
	imgWin.focus();
}

function openImageExt(url,w,h) { 
	
	var leftWin = (screen.availWidth - w) / 2;
	var topWin = (screen.availHeight - h) / 2;
	var props = "width="+w+",height="+h+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",scrollbars=yes,resizable=yes"; 
	imgWinE = window.open(url,"LargeImage",props);
	imgWinE.focus();
}

//FUNCTION TO PRINT PAGE	
function printPage() {
if (
	window.print)
	window.print();
else {
if (navigator.platform.indexOf('Mac') != -1)
	alert('This function does not work on your browser! \n Please select the Print option from the File menu.');
	else if (navigator.platform.indexOf('Win') != -1)
	alert('This function does not work on your browser! \n Please right click on your mouse and select the Print option.');
	else alert('This function does not work on your browser!');
 }
}

//image cache
	if (document.images) {
	
	top1_off = new Image();
	top1_off.src = baseDir + "images/global/0240_home.gif";
	
	top1_on = new Image();
	top1_on.src = baseDir + "images/global/0240_home_over.gif";
	
	top2_off = new Image();
	top2_off.src = baseDir + "images/global/0240_about.gif";	
	
	top2_on = new Image();
	top2_on.src = baseDir + "images/global/0240_about_over.gif";	
	
	top3_off = new Image();
	top3_off.src = baseDir + "images/global/0240_media_index.gif";	

	top3_on = new Image();
	top3_on.src = baseDir + "images/global/0240_media_index_over.gif";	

	top4_off = new Image();
	top4_off.src = baseDir + "images/global/0240_reading_list.gif";	

	top4_on = new Image();
	top4_on.src = baseDir + "images/global/0240_reading_list_over.gif";	
	
	top5_off = new Image();
	top5_off.src = baseDir + "images/global/0240_credits.gif";	
	
	top5_on = new Image();
	top5_on.src = baseDir + "images/global/0240_credits_over.gif";	

	top6_off = new Image();
	top6_off.src = baseDir + "images/global/0240_feedback.gif";	

	top6_on = new Image();
	top6_on.src = baseDir + "images/global/0240_feedback_over.gif";	

	top7_off = new Image();
	top7_off.src = baseDir + "images/global/0240_help.gif";	

	top7_on = new Image();
	top7_on.src = baseDir + "images/global/0240_help_over.gif";	


	
	key1_off = new Image();
	key1_off.src = baseDir + "images/global/0240_timeline.gif";	
	
	key1_on = new Image();
	key1_on.src = baseDir + "images/global/0240_timeline_over.gif";	
	
	key2_off = new Image();
	key2_off.src = baseDir + "images/global/0240_key_figures.gif";	
	
	key2_on = new Image();
	key2_on.src = baseDir + "images/global/0240_key_figures_over.gif";	
	
	key3_off = new Image();
	key3_off.src = baseDir + "images/global/0240_glossary.gif";	

	key3_on = new Image();
	key3_on.src = baseDir + "images/global/0240_glossary_over.gif";	

	key4_off = new Image();
	key4_off.src = baseDir + "images/global/0240_maps_buildings.gif";
	
	key4_on = new Image();
	key4_on.src = baseDir + "images/global/0240_maps_buildings_over.gif";

	
	title1_1_off = new Image();
	title1_1_off.src = baseDir + "images/global/0240_0241_1_title.gif";	
	title1_1_on = new Image();
	title1_1_on.src = baseDir + "images/global/0240_0241_1_title_over.gif";
	
	title1_2_off = new Image();
	title1_2_off.src = baseDir + "images/global/0240_0241_2_title.gif";
	title1_2_on = new Image();
	title1_2_on.src = baseDir + "images/global/0240_0241_2_title_over.gif";

	title2_2_off = new Image();
	title2_2_off.src = baseDir + "images/global/0240_0242_2_title.gif";
	title2_2_on = new Image();
	title2_2_on.src = baseDir + "images/global/0240_0242_2_title_over.gif";
	
	title2_3_off = new Image();
	title2_3_off.src = baseDir + "images/global/0240_0242_3_title.gif";
	title2_3_on = new Image();
	title2_3_on.src = baseDir + "images/global/0240_0242_3_title_over.gif";
	
	title3_2_off = new Image();
	title3_2_off.src = baseDir + "images/global/0240_0243_2_title.gif";
	title3_2_on = new Image();
	title3_2_on.src = baseDir + "images/global/0240_0243_2_title_over.gif";

	title4_3_off = new Image();
	title4_3_off.src = baseDir + "images/global/0240_0244_3_title.gif";
	title4_3_on = new Image();
	title4_3_on.src = baseDir + "images/global/0240_0244_3_title_over.gif";

	transcript_off = new Image();
	transcript_off.src = baseDir + "images/global/0240_btn_transcript.gif";

	transcript_on = new Image();
	transcript_on.src = baseDir + "images/global/0240_btn_transcript_over.gif";


	print_off = new Image();
	print_off.src = baseDir + "images/global/0240_btn_print.gif";

	print_on = new Image();
	print_on.src = baseDir + "images/global/0240_btn_print_over.gif";
	
	printer_off = new Image();
	printer_off.src = baseDir + "images/global/0240_btn_printer.gif";

	printer_on = new Image();
	printer_on.src = baseDir + "images/global/0240_btn_printer_over.gif";

	

	back_off = new Image();
	back_off.src = baseDir + "images/global/0240_btn_back.gif";

	back_on = new Image();
	back_on.src = baseDir + "images/global/0240_btn_back_over.gif";

	prev_off = new Image();
	prev_off.src = baseDir + "images/global/0240_btn_previous.gif";

	prev_on = new Image();
	prev_on.src = baseDir + "images/global/0240_btn_previous_over.gif";

	next_off = new Image();
	next_off.src = baseDir + "images/global/0240_btn_next.gif";

	next_on = new Image();
	next_on.src = baseDir + "images/global/0240_btn_next_over.gif";

	prev2_off = new Image();
	prev2_off.src = baseDir + "images/global/0240_btn_previous2.gif";

	prev2_on = new Image();
	prev2_on.src = baseDir + "images/global/0240_btn_previous2_over.gif";

	next2_off = new Image();
	next2_off.src = baseDir + "images/global/0240_btn_next2.gif";

	next2_on = new Image();
	next2_on.src = baseDir + "images/global/0240_btn_next2_over.gif";



	close_off = new Image();
	close_off.src = baseDir + "images/global/0240_btn_close.gif";

	close_on = new Image();
	close_on.src = baseDir + "images/global/0240_btn_close_over.gif";
	
	close_red_off = new Image();
	close_red_off.src = baseDir + "images/global/0240_btn_close_red.gif";

	close_red_on = new Image();
	close_red_on.src = baseDir + "images/global/0240_btn_close_red_over.gif";
	}

//end image cache

