//top.js

var Count=null;
var Counter_name="mamefu";  // myCountsを必ず半角英数文字で別の適当な名前に変えてください。

function setCookie(key,key_value,key_expires){
	document.cookie=key+"="+escape(key_value)
	+((key_expires==null)?'':('; expires='+key_expires.toGMTString()));
}
function getCookie(key){
	if(document.cookie){
		chs=document.cookie+";";
		kchs=document.cookie.indexOf(key,0);
		if(kchs!=-1){
			chs=chs.substring(kchs,chs.length);
			key_start=chs.indexOf("=",0)+1;
			key_end=chs.indexOf(";",key_start);
			if(key_end==-1){ key_end=chs.length; }
			return unescape(chs.substring(key_start,key_end));
		}
	}
	return null;
}
function setCounter(){
    Count=getCookie(Counter_name);
    if(!Count) Count=0;
    Count++;
    var Counter_value  =Count;
    var Counter_expires=new Date();
    Counter_expires.setTime(Counter_expires.getTime()+(1*60*60*1000)); // 保存期間
    setCookie(Counter_name,Counter_value,Counter_expires);
    return Count;
}	

function TopImg(){
    var count=setCounter();
      if(count<2){ // 初めてのアクセス
      	document.write('<div id="topmov"><embed src="./mov/mamefu_topimg.swf" width="760" height="400"  quality="high" type="application/x-shockwave-flash"></embed></div>');
	          }else{
	          document.writeln('<div id="topimg"><h1>'+'おこしやす'+'</h1>');
	          document.writeln('<h2>'+'京のみやび&#160;花街&#183;祇園から生まれた'+'</h2>');
	          document.writeln('<h2>'+'マメフブランド&#160;無添加化粧品'+'</h2>');
	         	document.writeln('<h4>'+'O&#160;T&#160;A&#160;N&#160;O&#160;M&#160;O&#160;S&#160;H&#160;I&#160;M&#160;A&#160;S&#160;U'+'</h4></div>');
	          }

}
//
//
function gotoURL(srcURL){
  document.getElementById("contentArea").src=srcURL;
  	          }

//
//
