<!--

	function MM_preloadImages() { //v3.0
		var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_swapImgRestore() { //v3.0
		var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_findObj(n, d) { //v4.01
		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=MM_findObj(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_swapImage() { //v3.0
		var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	}
	
	
	// argument "str" is number stands which stratum the page is on, 
	// specify 0 if page is on root stratum, specify 1 if in directory "english", "reports" and so on
	function transformPageForPrintingIfNeeded(lang, str) {
		if(window.name == "WindowForPrinting"){
			document.getElementById("container").style.width   = "591px";
			document.getElementById("header")   .style.width   = "591px";
			
			var path = "";
			for(var index = 0; index < str; index++){
				path += "../";
			}
			if     (lang == "ja"){
				document.getElementById("header_image").src = path + "image/header_j_printable.gif";
			}
			else if(lang == "en"){
				document.getElementById("header_image").src = path + "image/header_e_printable.gif";
			}
			
			document.getElementById("header_image").style.width   = "591px";
			document.getElementById("main")        .style.width   = "591px";
			document.getElementById("menu")        .style.display = "none";
			document.getElementById("footer")      .style.width   = "591px";
			
			document.getElementById("printablepageopener").style.display = "none";
			
// 			var contacts_photo_captions = document.getElementsByName("contacts_photo_caption");
// 			for(var index = 0; index < contacts_photo_captions.length; index++){
// 				contacts_photo_captions[index].style.display = "none";
// 			}
			var business_dept_photo_caption       = document.getElementById("business_dept_photo_caption");
			if (business_dept_photo_caption       != null) business_dept_photo_caption      .style.display = "none";
			var marine_dept_photo_caption         = document.getElementById("marine_dept_photo_caption");
			if (marine_dept_photo_caption         != null) marine_dept_photo_caption        .style.display = "none";
			var administration_dept_photo_caption = document.getElementById("administration_dept_photo_caption");
			if (administration_dept_photo_caption != null) administration_dept_photo_caption.style.display = "none";
			
			
			// link の .style の .color を設定したいが、IE だと .color にアクセスできない。
			// 仕方がないので .cssText で color を設定するが、IE だと inherit がきかない。
			var link_style_cssText;
			if(navigator.appName.toLowerCase().indexOf("microsoft") >= 0)
				link_style_cssText = "color: #333333;";  // body の color の値
			else
				link_style_cssText = "color: inherit;";
			
			var links_array = document.links;
			var index;
			for(index = 0; index < links_array.length; index++){
				var link = links_array[index];
				link.href = "javascript:void(0);";
				link.target = "_self";
				link.style.cssText = link_style_cssText;
				link.style.textDecoration = "none";
			}
		}
	}
	
	
// 	function openSelectedReport() {
// 		var list = document.reportslistform.reportslist;
// 		
// 		MM_openBrWindow(
// 			list.options[list.selectedIndex].value, 
// 			'', 
// 			'scrollbars = yes, menubar = yes, resizable = yes, width = 800, height = 600'
// 		);
// 	}
	
	
	var element;
	var color_before_change;
	
	function changeFontColor(elementid) {
		if(window.name == "WindowForPrinting") return;
		
		element = document.getElementById(elementid);
		color_before_change = element.style.color;
		element.style.color = "#ff3300";
		element.style.fontWeight = "bold";
	}
	
	function restoreFontColor() {
		if(window.name == "WindowForPrinting") return;
		
		element.style.color = color_before_change;
		element.style.fontWeight = "normal";
	}
	
//-->
