/*

*	Library OPAC window

*/



function openLibraryWin(){

	var turl = "/OPAC/index_j.html";

	var w = 617;

	var h = 402;

	

	var sw=screen.width;

	var sh=screen.height;

	var xd = Math.round((sw - w) / 2);

	var yd = Math.round((sh - h) / 2);



	var wset = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',left='+xd+',top='+yd;

	swin = window.open(turl,"LibraryOPAC",wset);

	swin.focus();

}





/*

*	Library OPAC window (English)

*/



function openLibraryWinE(){

	var turl = "/OPAC/index.html";

	var w = 617;

	var h = 402;

	

	var sw=screen.width;

	var sh=screen.height;

	var xd = Math.round((sw - w) / 2);

	var yd = Math.round((sh - h) / 2);



	var wset = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',left='+xd+',top='+yd;

	swin = window.open(turl,"LibraryOPAC",wset);

	swin.focus();

}





/*

*	Biography window

*/

function openBiographyWin(url){

	var turl = "/Library/OPAC/index_j.html";

	var w = 310;

	var h = 408;

	

	var sw=screen.width;

	var sh=screen.height;

	var xd = Math.round((sw - w) / 2);

	var yd = Math.round((sh - h) / 2);



	var wset = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+w+',height='+h+',left='+xd+',top='+yd;

	swin = window.open(url,"Biography",wset);

	swin.focus();



}



/*

*	Renewal Functions May 2006

*/



function MM_openBrWindow(theURL,winName,features) { //v2.0

	window.open(theURL,winName,features);

}





function onload_functions() {



	//detect the language from the file name and give appropriate link

	

	iccUrl = new String(this.location.href);



	if (iccUrl.indexOf(".jp/index_j.html") != -1) {

		iccUrl = iccUrl.replace(".jp/index_j.html",".jp/index_e.html");

		document.getElementById("iccLanguage").innerHTML = '<a href="'+iccUrl+'" title="English Page"><img src="/Shared/Images/icc-language-en.gif" alt="English Page" /></a>';

	} else if (iccUrl.indexOf(".jp/index_e.html") != -1) {

		iccUrl = iccUrl.replace(".jp/index_e.html",".jp/index_j.html");

		document.getElementById("iccLanguage").innerHTML = '<a href="'+iccUrl+'" title="Japanese Page"><img src="/Shared/Images/icc-language-ja.gif" alt="Japanese Page" /></a>';

	} else if (iccUrl.indexOf("_j.html") != -1) {

		iccUrl = iccUrl.replace("_j.html",".html");

		document.getElementById("iccLanguage").innerHTML = '<a href="'+iccUrl+'" title="English Page"><img src="/Shared/Images/icc-language-en.gif" alt="English Page" /></a>';

	} else {

		iccUrl = iccUrl.replace(".html","_j.html");

		document.getElementById("iccLanguage").innerHTML = '<a href="'+iccUrl+'" title="Japanese Page"><img src="/Shared/Images/icc-language-ja.gif" alt="Japanese Page" /></a>';

	}

	

	//detect IE and make pseudo class for hovers



	if (document.all&&document.getElementById) {

		navRoot = document.getElementById("iccNavigation");

		for (i=0; i<navRoot.childNodes.length; i++) {

			node = navRoot.childNodes[i];

	

			if (node.nodeName=="LI") {

				node.onmouseover=function() {

				this.className+=" over";

			}

			node.onmouseout=function() {

			this.className=this.className.replace(" over", "");

			}

	   	}

	 }

	 }





}



window.onload = onload_functions;