//init
tier_cnt=0;
root_path="";
root_path_str = new Array("www.passmemory.com");

pathCheck = String(document.location);
urls = pathCheck.split("://");
str  = urls[1].split("/");

for (i in str){ tier_cnt ++;}

for (i in str){
	for (jj in root_path_str){
		if(str[i] == root_path_str[jj]){
			offset = (i-0)+2;
			break;
		}
	}
}

path_cnt = tier_cnt-offset;

for (i=0 ;i<path_cnt ;i++){
	root_path +="../";
}

//set path
//img_path = root_path +"english/images/";
img_path = "/english/images/";
//css_path = root_path +"english/css/";
css_path = "/english/css/";
//js_path  = root_path +"english/js/";
js_path  = "/english/js/";

dir_1 = offset-1;

//--------------------------------------------------------------------

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var opera=window.opera?1:0

var folder=''
var image=''


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 Menu(){
	with (document) {

writeln("<td background='",img_path,"top_barback.jpg'>&nbsp;</td>");
writeln("<td width='736' height='20'><img src='",img_path,"top_bar.jpg' width='736' height='20'></td>");
writeln("<td background='",img_path,"top_barback.jpg'>&nbsp;</td>");
writeln("</tr>");
writeln("<tr>");
writeln("<td background='",img_path,"main_imgback.jpg'>&nbsp;</td>");
writeln("<td width='736' height='97'><img src='",img_path,"main_img.jpg' width='736' height='97' border='0' usemap='#Map'></td>");
writeln("<td background='",img_path,"main_imgback.jpg'>&nbsp;</td>");
writeln("</tr>");
writeln("<tr bgcolor='#6a6e77'>");
writeln("<td height='3' colspan='3'></td>");
writeln("</tr>");
writeln("<tr>");
writeln("<td background='",img_path,"menu_back.jpg'></td>");
writeln("<td width='736' height='34'><img src='",img_path,"main_menu.jpg' name='Image1' width='736' height='34' border='0' usemap='#mainmenu' id='Image1'></td>");
writeln("<td background='",img_path,"menu_back.jpg'></td>");
writeln("</tr>");
writeln("<tr>");
writeln("<td background='",img_path,"menudown_back.gif'></td>");
writeln("<td width='736' height='11'><img src='",img_path,"menu_down.jpg' width='736' height='11'></td>");
writeln("<td background='",img_path,"menudown_back.gif'></td>");



writeln("<map name='mainmenu'>");
writeln("<area shape='rect' coords='15,6,149,28' href='/english/about/index.html' alt='What is PASSMEMORY\uFF1F' onMouseOver=\"MM_swapImage('Image1','','",img_path,"menuover01.jpg',1)\" onMouseOut=\"MM_swapImgRestore()\">");
writeln("<area shape='rect' coords='164,6,235,28' href='/english/products/index.html' alt='Products' onMouseOver=\"MM_swapImage('Image1','','",img_path,"menuover02.jpg',1)\" onMouseOut=\"MM_swapImgRestore()\">");
writeln("<area shape='rect' coords='247,6,329,28' href='/english/demo/index.html' alt='Online Demo' onMouseOver=\"MM_swapImage('Image1','','",img_path,"menuover03.jpg',1)\" onMouseOut=\"MM_swapImgRestore()\">");
writeln("<area shape='rect' coords='341,6,425,28' href='/english/contact/index.html' alt='Contact Us' onMouseOver=\"MM_swapImage('Image1','','",img_path,"menuover04.jpg',1)\" onMouseOut=\"MM_swapImgRestore()\">");
writeln("<area shape='rect' coords='665,5,724,28' href='/index.html' alt='Japanese' onMouseOver=\"MM_swapImage('Image1','','",img_path,"menuover08.jpg',1)\" onMouseOut=\"MM_swapImgRestore()\">");
writeln("</map>");



writeln("<map name='Map'>");
writeln("<area shape='rect' coords='20,19,206,78' href='"+root_path+"index.html'>");
writeln("</map>");



	}
}


//--------------------------------------------------------------------
function Footer(){
	with (document) {

writeln("<td bgcolor='#d4d5d9'>&nbsp;</td>");
writeln("<td width='736'><img src='",img_path,"shitamenu.jpg' width='736' height='34' border='0' usemap='#submenu'></td>");
writeln("<td bgcolor='#d4d5d9'>&nbsp;</td>");
writeln("</tr>");
writeln("<tr>");
writeln("<td height='100%' bgcolor='#d4d5d9'>&nbsp;</td>");
writeln("<td width='736' height='100%' valign='top' background='",img_path,"maincon_back.gif'><div align='center'>");
writeln("<table width='100%' border='0' cellspacing='0' cellpadding='7'>");
writeln("<tr>");
writeln("<td>");
writeln("<p align='center' class='copy'>Copyright (c) 2007, <a href='http://www.thebrains.jp/'>The Brains Inc.</a> All rights reserved.</p></td>");
writeln("</tr>");
writeln("</table>");
writeln("</div></td>");
writeln("<td height='100%' bgcolor='#d4d5d9'>&nbsp;</td>");



writeln("<map name='submenu'>");
writeln("</map>");


	}
}


