//var headerImgDir = "img/";
var headerImgDir = "/img/share/";
var headerTopLink = "/";

//古いブラウザのエラー回避
if(!document.getElementById){
	document.getElementById = function(){
		return null;
	}
}

function putHeader(bMenu){
	var s ="";
	if(bMenu){
		s ='<div id="text">ポケモン絵本プロジェクトは、参加者同士で絵本を作成して公開しているサイトです。</div>';
		s+='<div id="headerMenu"><a href="'+headerTopLink+'" class="toplink1" name="ポケモン絵本プロジェクト" title="トップページへ">ポケモン絵本プロジェクト</a><div id="menuArea"></div></div>\n';
		s+='<style type="text/css">\n';
		s+='/* <![CDATA[ */\n';
		s+='#headerMenu{text-align:left;margin:0px;padding:0px;width:782px;height:75px;background-image:url("'+headerImgDir+'logo_small.gif");background-repeat:no-repeat;position:relative;}\n';
		s+='#headerMenu .toplink1{margin:0px;padding:0px;width:230px;height:30px;top:0px;left:0px;display:block;background-image:none;text-indent:-9999px;border:0px solid;position:absolute;}\n';
		s+='#menuArea{position:absolute;top:35px;left:16px;}\n';
		s+='#text{text-align:left;margin:0px;padding:5px 0px 0px 3px;width:782px;height:0px;font-size:12px;}\n';
		s+='/* ]]> */\n';
		s+='</style>\n'
		document.write(s);
		var gMenu = getGlobalMenu();
		gMenu.rayout("menuArea");
	}else{
		s = '<table border="0" cellpadding="0" cellspacing="0" width="782"><tr><td>\n';
		s+= '<img src="'+headerImgDir+'header_nomenu_bg.gif" border="0" alt="ヘッダー" usemap="#header"><map name="header"><area shape="rect" coords="659,28,757,49" href="'+headerTopLink+'" alt="トップページへ"><area shape="rect" coords="19,7,251,56" href="'+headerTopLink+'" alt="ポケモン絵本プロジェクト"></map>\n';
		s+= '</td></tr></table>\n';
		document.write(s);
	}
}

function isMenuOk(){
	var res = false;
	if(navigator.userAgent.indexOf("Mac") != -1){
		if(navigator.appName.charAt(0) == "M"){
			//Mac IE 
		} else {
			//Mac moz safari etc
	  	}
	} else {
		if(navigator.appName.charAt(0) == "M"){
			//Win IE 
			res = true;
		} else {
			//firefox
			res = true;
		}
	}
	return res;
}


