// トップストリート案内
if (document.images) {
	// 設定開始（使用する画像を設定してください）
	// 通常の画像
	var img0 = new Image();
	img0.src = "images/staff.jpg";
	// ポイント時の画像1
	var img1 = new Image();
	img1.src = "images/staff_pat.gif";
	// ポイント時の画像2
	var img2 = new Image();
	img2.src = "images/staff_des.gif";
	// ポイント時の画像3
	var img3 = new Image();
	img3.src = "images/staff_tm.gif";
	// 設定終了
}
// ポイント時の処理
function On(name) {
	if (document.images) {
		document.images['def'].src = eval(name + '.src');
	}
}
// 放した時の処理
function Off() {
	if (document.images) {
		document.images['def'].src = img0.src;
	}
}

var TimeOut         = 300;
var currentLayer    = null;
var currentitem     = null;
var currentLayerNum = 0;
var noClose         = 0;
var closeTimer      = null;

function mopen(n) {
  var l  = document.getElementById("menu"+n);
  var mm = document.getElementById("mmenu"+n);
	
  if(l) {
    mcancelclosetime();
    l.style.visibility='visible';
    if(currentLayer && (currentLayerNum != n))
      currentLayer.style.visibility='hidden';
    currentLayer = l;
    currentitem = mm;
    currentLayerNum = n;			
  } else if(currentLayer) {
    currentLayer.style.visibility='hidden';
    currentLayerNum = 0;
    currentitem = null;
    currentLayer = null;
 	}
}

function mclosetime() {
  closeTimer = window.setTimeout(mclose, TimeOut);
}

function mcancelclosetime() {
  if(closeTimer) {
    window.clearTimeout(closeTimer);
    closeTimer = null;
  }
}

function mclose() {
  if(currentLayer && noClose!=1)   {
    currentLayer.style.visibility='hidden';
    currentLayerNum = 0;
    currentLayer = null;
    currentitem = null;
  } else {
    noClose = 0;
  }
  currentLayer = null;
  currentitem = null;
}

document.onclick = mclose; 

var uagent=navigator.userAgent;
function setCSS()
{
if(uagent.indexOf('MSIE')>=0){
 dirName="import.css"
 }
if(document.layers){
dirName="style_n.css"
if(uagent.indexOf('Mac')==-1){
dirName="import.css"
}
}
else{
 dirName="import.css"
}
    document.write("<LINK REL='stylesheet' type='text/css' HREF='"+dirName+"'>")
}
setCSS("");

//トップ画像の変更
if (document.images) { 
// 設定開始（使用する画像を設定してください） 
// 通常の画像 
var img0 = new Image(); 
img0.src = "images/top_image.jpg"; 
// ポイント時の画像1 
var img1 = new Image(); 
img1.src = "images/top_img_pat.jpg"; 
// ポイント時の画像2 
var img2 = new Image(); 
img2.src = "images/top_img_des.jpg"; 
// ポイント時の画像3 
var img3 = new Image(); 
img3.src = "images/top_img_tm.jpg"; 
// 設定終了 
} 

// ポイント時の処理 
function On(name) { 
	if (document.images) { 
		document.images['def'].src = eval(name + '.src'); 
	} 
} 

// 放した時の処理 
function Off() { 
	if (document.images) { 
		document.images['def'].src = img0.src; 
	} 
} 

// 知財情報
function Control(id){
  href_type = "tizai" + id + ".html";
  location.href = href_type;
    }

// 確認
function check(){ 
if(window.confirm('上記の内容でよろしいですか？')){
return true;
} 
else{
window.alert('キャンセルされました');
return false;
}
}

function imgFlash()
{
imgObj = document.myFlashIMG.style;
imgObj.visibility = (imgObj.visibility == "visible") ? "hidden" : "visible";
}

function ccheck(){
	if (!navigator.cookieEnabled){
		alert("Cookieが無効になっています。\nクッキーを有効にして下さい。");
		return false;
	}
	else{
		return true;
	}
}

function mjcheck(){
	if(document.send.henkock[0].checked==true){
		if(document.send.an1.value=="" && document.send.an2.value=="" && 
			document.send.an3.value=="" && document.send.an4.value=="" && 
			document.send.an5.value==""){
			alert("変更を希望される案件をご入力下さい。");
		}else if(document.send.af_name.value=="" && document.send.af_address.value==""){
			alert("変更後の内容をご入力下さい。");
		}else{
			if(document.send.tan_name.value==""){
				alert("お客様情報のご担当者名をご入力下さい。");
			}else if(document.send.tan_tel.value==""){
				alert("電話番号をご入力下さい。");
			}else if(document.send.tan_email.value==""){
				alert("電話番号をご入力下さい。");
			}else{
				document.send.action = "s_henko.php";
				document.send.submit();
			}
		}
	}else if(document.send.henkock[1].checked==true){
		if(document.send.be_tan.value=="" && document.send.be_tan_add.value=="" && 
			document.send.be_tan_tel.value=="" && document.send.be_tan_fax.value=="" && 
			document.send.be_tan_email.value==""){
			alert("変更後のご担当者の情報をご入力下さい。");
		}else{
			if(document.send.tan_name.value==""){
				alert("お客様情報のご担当者名をご入力下さい。");
			}else if(document.send.tan_tel.value==""){
				alert("電話番号をご入力下さい。");
			}else if(document.send.tan_email.value==""){
				alert("メールアドレスをご入力下さい。");
			}else{
				document.send.action = "s_henko.php";
				document.send.submit();
			}
		}
	}
}

function mjmousikomi(){
	document.send.action = "henko_send.php";
	document.send.submit();
}

function henko_top(){
	window.history.back() 
}

function windowpop( data ) {
	window.open( data, "MiniWindow", "width=300,height=400,scrollbars=yes" );
}
