/************************
　ps再発行のウィンドウ開く
*************************/
function opw(theURL,winName,features) {
  sw = window.open(theURL,winName,features);
  setTimeout("sw.focus()", 500);
}

function set_head(){

ii=document.URL.indexOf("index.php?mp=");
im=document.URL.indexOf("main.cgi");

if (ii==-1 && im==-1) {
	mp="top";
} else { 
	if (ii==-1) {
		mp="main";
	} else {
		iie=document.URL.indexOf("&",ii);
		if (iie==-1) {
			iie=document.URL.indexOf("#",ii);
		}	
		if (iie==-1) {
			iie=document.URL.length;
		} else {
			iie=iie;
		}	
		mp=document.URL.substring(ii+13,iie);
	}
}

head ="<TABLE border=0 width=900 height=195 cellspacing=0 cellpadding=0> ";
head+="  <TBODY> ";
head+="    <TR> ";
head+="      <TD align=left valign=top colspan=10 height=159><a href=/><IMG src=img/head.jpg width=900 border=0></a></TD>      ";
head+="    </TR>";
head+="    <TR>";
head+="      <TD align=left valign=top width=90>";

if(mp=="top"){
head+="         <IMG src=img/head-top2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=top target=_top><IMG src=img/head-top.jpg  onmouseout=this.src='img/head-top.jpg' onmouseover=this.src='img/head-top2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="shohin"){
head+="         <IMG src=img/head-shohin2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=shohin target=_top><IMG src=img/head-shohin.jpg onmouseout=this.src='img/head-shohin.jpg' onmouseover=this.src='img/head-shohin2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="enjoy"){
head+="         <IMG src=img/head-enjoy2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=enjoy target=_top><IMG src=img/head-enjoy.jpg onmouseout=this.src='img/head-enjoy.jpg' onmouseover=this.src='img/head-enjoy2.jpg' width=90 height=25 border=0></A>";
}
head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="planter"){
head+="         <IMG src=img/head-planter2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=planter target=_top><IMG src=img/head-planter.jpg onmouseout=this.src='img/head-planter.jpg' onmouseover=this.src='img/head-planter2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="1week"){
head+="         <IMG src=img/head-1week2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=1week target=_top><IMG src=img/head-1week.jpg onmouseout=this.src='img/head-1week.jpg' onmouseover=this.src='img/head-1week2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="guide"){
head+="         <IMG src=img/head-guide2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=guide target=_top><IMG src=img/head-guide.jpg onmouseout=this.src='img/head-guide.jpg' onmouseover=this.src='img/head-guide2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="qa"){
head+="         <IMG src=img/head-qa2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=qa target=_top><IMG src=img/head-qa.jpg onmouseout=this.src='img/head-qa.jpg' onmouseover=this.src='img/head-qa2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>";
head+="      <TD align=left valign=top width=90>";

if(mp=="info"){
head+="         <IMG src=img/head-info2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=info target=_top><IMG src=img/head-info.jpg onmouseout=this.src='img/head-info.jpg' onmouseover=this.src='img/head-info2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>      ";

head+="      <TD align=left valign=top width=90>";

if(mp=="main"){
head+="         <IMG src=img/head-cart2.jpg width=90 height=25 border=0>";
}else{
head+="         <!--<A href=main.cgi?mode=dispbasket&sid=1 target=_top>--><IMG src=img/head-cart.jpg onmouseout=this.src='img/head-cart.jpg' onmouseover=this.src='img/head-cart2.jpg' width=90 height=25 border=0><!--</A>-->";
}

head+="      </TD>";
head+="      <TD align=right valign=top width=90>";

if(mp=="contact"){
head+="         <IMG src=img/head-contact2.jpg width=90 height=25 border=0>";
}else{
head+="         <A href=index.php?mp=contact target=_top><IMG src=img/head-contact.jpg onmouseout=this.src='img/head-contact.jpg' onmouseover=this.src='img/head-contact2.jpg' width=90 height=25 border=0></A>";
}

head+="      </TD>      ";

head+="    </TR>    ";
head+="  </TBODY>";
head+="</TABLE>";

document.write(head);
}

