// JavaScript Document

/* ヘッダー */
function topSwf(){

	//Flash OK
	var header_swf_list = new Array("swf/top.swf");

	var swfSelect = Math.floor(Math.random() * header_swf_list.length);

	var mime = "application/x-shockwave-flash";
	var n = navigator;
	var d = document;
	
	//flash NGipadで表示させる画像
	var header_image_list = new Array("iapri.jpg");
	var imageSelect = Math.floor(Math.random() * header_image_list.length);	

	if (n.userAgent.indexOf('Mobile') == -1){
		var hash = new Date();
		var time = hash.getTime();
		path = header_swf_list[swfSelect] + "?timer=" + time;
		d.write('<div class=\"header2\">');
		d.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="820" height="550">');
		d.write('<param name="movie" value="'+path+'"></param>');
		d.write('<param name="quality" value="high"></param>');
		d.write('<param name="wmode" value="transparent"></param>');
		d.write('<embed src="'+path+'" wmode="transparent" quality="high" pluginspage="https://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="820" height="550">');
		d.write('</embed>');
		d.write('</object></div>');}
	else if(n.userAgent.indexOf('iPad') > -1){d.write('<div class=\"header\"><!-- \"header\" --><div class=\"header\" style=\"\"><ul class=\"hdr_ul_lst\"><li class=\"hdr_li_lst\"><img src=\"img/hdr_10.jpg\" width=\"50\" height=\"160\" /></li><li class=\"hdr_li_lst\"><a href=\"../\" target=\"_self\"><img src=\"img/hdr_20.jpg\" name=\"hdr_20\" width=\"160\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_20\',\'\',\'img/hdr_21.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../qa/\" target=\"_self\"><img src=\"img/hdr_30.jpg\" name=\"hdr_30\"  width=\"150\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_30\',\'\',\'img/hdr_31.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../link/\" target=\"_self\"><img src=\"img/hdr_40.jpg\" name=\"hdr_40\"  width=\"120\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_40\',\'\',\'img/hdr_41.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../form/\" target=\"_self\"><img src=\"img/hdr_50.jpg\" name=\"hdr_50\"  width=\"120\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_50\',\'\',\'img/hdr_51.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><img src=\"img/hdr_60.jpg\" width=\"70\" height=\"160\" /></li><li onclick=\"fontChange(\'small\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_70.jpg\" name=\"hdr_70\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_70\',\'\',\'img/hdr_71.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li onclick=\"fontChange(\'medium\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_80.jpg\" name=\"hdr_80\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_80\',\'\',\'img/hdr_81.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li onclick=\"fontChange(\'large\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_90.jpg\" name=\"hdr_90\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_90\',\'\',\'img/hdr_91.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li class=\"hdr_li_lst\"><img src=\"img/hdr_100.jpg\" width=\"100\" height=\"160\" /></li></ul></div><!-- END OF \"header\" --></div>');			
	}
	else if(n.userAgent.indexOf('iPod') > -1){d.write('<div class=\"header\"><!-- \"header\" --><div class=\"header\" style=\"\"><ul class=\"hdr_ul_lst\"><li class=\"hdr_li_lst\"><img src=\"img/hdr_10.jpg\" width=\"50\" height=\"160\" /></li><li class=\"hdr_li_lst\"><a href=\"../\" target=\"_self\"><img src=\"img/hdr_20.jpg\" name=\"hdr_20\" width=\"160\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_20\',\'\',\'img/hdr_21.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../qa/\" target=\"_self\"><img src=\"img/hdr_30.jpg\" name=\"hdr_30\"  width=\"150\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_30\',\'\',\'img/hdr_31.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../link/\" target=\"_self\"><img src=\"img/hdr_40.jpg\" name=\"hdr_40\"  width=\"120\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_40\',\'\',\'img/hdr_41.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../form/\" target=\"_self\"><img src=\"img/hdr_50.jpg\" name=\"hdr_50\"  width=\"120\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_50\',\'\',\'img/hdr_51.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><img src=\"img/hdr_60.jpg\" width=\"70\" height=\"160\" /></li><li onclick=\"fontChange(\'small\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_70.jpg\" name=\"hdr_70\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_70\',\'\',\'img/hdr_71.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li onclick=\"fontChange(\'medium\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_80.jpg\" name=\"hdr_80\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_80\',\'\',\'img/hdr_81.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li onclick=\"fontChange(\'large\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_90.jpg\" name=\"hdr_90\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_90\',\'\',\'img/hdr_91.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li class=\"hdr_li_lst\"><img src=\"img/hdr_100.jpg\" width=\"100\" height=\"160\" /></li></ul></div><!-- END OF \"header\" --></div>');			
	}
	else if(n.userAgent.indexOf('iPhone') > -1){d.write('<div class=\"header\"><!-- \"header\" --><div class=\"header\" style=\"\"><ul class=\"hdr_ul_lst\"><li class=\"hdr_li_lst\"><img src=\"img/hdr_10.jpg\" width=\"50\" height=\"160\" /></li><li class=\"hdr_li_lst\"><a href=\"../\" target=\"_self\"><img src=\"img/hdr_20.jpg\" name=\"hdr_20\" width=\"160\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_20\',\'\',\'img/hdr_21.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../qa/\" target=\"_self\"><img src=\"img/hdr_30.jpg\" name=\"hdr_30\"  width=\"150\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_30\',\'\',\'img/hdr_31.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../link/\" target=\"_self\"><img src=\"img/hdr_40.jpg\" name=\"hdr_40\"  width=\"120\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_40\',\'\',\'img/hdr_41.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><a href=\"../form/\" target=\"_self\"><img src=\"img/hdr_50.jpg\" name=\"hdr_50\"  width=\"120\" height=\"160\" border=\"0\" onmouseover=\"MM_swapImage(\'hdr_50\',\'\',\'img/hdr_51.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></a></li><li class=\"hdr_li_lst\"><img src=\"img/hdr_60.jpg\" width=\"70\" height=\"160\" /></li><li onclick=\"fontChange(\'small\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_70.jpg\" name=\"hdr_70\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_70\',\'\',\'img/hdr_71.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li onclick=\"fontChange(\'medium\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_80.jpg\" name=\"hdr_80\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_80\',\'\',\'img/hdr_81.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li onclick=\"fontChange(\'large\')\" class=\"hdr_li_lst\"><img src=\"img/hdr_90.jpg\" name=\"hdr_90\"  width=\"50\" height=\"160\" onmouseover=\"MM_swapImage(\'hdr_90\',\'\',\'img/hdr_91.jpg\',1)\" onmouseout=\"MM_swapImgRestore()\" /></li><li class=\"hdr_li_lst\"><img src=\"img/hdr_100.jpg\" width=\"100\" height=\"160\" /></li></ul></div><!-- END OF \"header\" --></div>');			
	}
	else if(n.userAgent.indexOf('Mobile') > -1){d.write('<!-- \"header\" --><div class=\"header\" style=\"height: 80px;\"><div><a href=\"http://www.morino-ohisama.jp/\"><img src=\"mobile_title1.gif\" alt=\"森のおひさま教室\"></a></div><ul style=\"position:relative;left:-15px;\"><li><a href=\"http://www.morino-ohisama.jp/qa/\">おひさま教室Q&A</a></li><li><a href="http://www.morino-ohisama.jp/link/\">リンク集</a></li><li><a href=\"http://www.morino-ohisama.jp/form/\">ご意見箱</a></li></ul><!-- END OF \"header\" --></div>');		
	}
	
}


