 /* 
   Copyright (C)1999 Koichi Kawasaki .
   All Rights Reserved.
 */
//styleTag = '<link rel="stylesheet" type="text/css" href="'+configPath+'css/'+platform+OS; styleTag+='.css">';
//document.write(styleTag);

/*
if(document.title == midTITLE){
	if(platform=="ie") document.write('<bgsound src="Media/indust.mid" loop="-1">');
	if(platform=="nn") document.write('<embed src="Media/indust.mid" autostart="true" loop="true" volume="100" width="0" height="0">');
}
*/
function verCheck(){
	if (name=="Netscape" && ver>=4)
	    nc4=true;
	else if (name=="Microsoft Internet Explorer" && ver>=4)
	    ie4=true;
	else
	    location.href="index2.html";
}

function init() {
	verCheck();
	//setBgColor('NAVItop','ffffff');

}

function Initializ() 
{
	//MM_preloadImages(baseurl+'images/headmenu/00_f2.gif',baseurl+'images/headmenu/01_f2.gif',baseurl+'images/headmenu/02_f2.gif',baseurl+'images/headmenu/03_f2.gif',baseurl+'images/headmenu/04_f2.gif',baseurl+'images/headmenu/05_f2.gif',baseurl+'images/headmenu/06_f2.gif',baseurl+'images/headmenu/07_f2.gif',baseurl+'images/headmenu/08_f2.gif',baseurl+'images/headmenu/09_f2.gif',baseurl+'images/headmenu/10_f2.gif',baseurl+'images/headmenu/11_f2.gif',baseurl+'images/headmenu/12_f2.gif',baseurl+'images/headmenu/13_f2.gif',baseurl+'images/headmenu/14_f2.gif');
}


// 背景色を変えるデフォルトコメントの表示
function setBgColor(Id, Color) {
       	if (nc4) {
		document.layers[Id].bgColor = Color;
       	}
       	if (ie4) {
		document.all(Id).style.backgroundColor = Color;
       	}
	return false;
}

function showLayer(Id){
	MENU_ID = "MENU"+Id;
        if (nc4) {
		for (i=1;i<MaxMenuItem;i++){
                document.layers["MENU"+i].visibility='hide';
		}
                if(Id<MaxMenuItem) document.layers[MENU_ID].visibility='show';
        }
        if (ie4) {
		for (i=1;i<MaxMenuItem;i++){
                document.all("MENU"+i).style.visibility='hidden';
		}
                if(Id<MaxMenuItem) document.all(MENU_ID).style.visibility='visible';
        }
			return false;
}

function openTimming(timeup,count) {
      count++;alert(count);
      timeID = setTimeout("openTimming("+timeup+","+count+")",1000);//1st
      if(count>=timeup){clearTimeout(timeID);ThankYou();}//timeup
}

function ThankYou(){
	wo=window.open("ThankYou.htm","ThankYou", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=500,height=200");
	return wo;
}

function bye(){
	window.close();
}

function frameTest(product){
	if(product=="") return;
	var masterFrame=arguments.length!=0?"index.asp?Stage="+product : "index.asp";
	var baseSite="http://www.sanshoright.co.jp/";//+arguments.length!=0?arguments[0]:"";
	var URL=unescape(top.frames.location);
	
	if(top==self) {location.href=baseSite+masterFrame;}
	//else if(URL.indexOf(baseSite)==-1) {location.href=baseSite+masterFrame;}
}

//------

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
