// JavaScript Document
function smartRollover() {   
    if(document.getElementsByTagName) {   
        var images = document.getElementsByTagName("img");   
        for(var i=0; i < images.length; i++) {   
            if(images[i].getAttribute("src").match("_off."))   
            {   
                images[i].onmouseover = function() {   
                    this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));   
                }   
                images[i].onmouseout = function() {   
                    this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));   
                }   
            }   
        }   
    }   
}   
if(window.addEventListener) {   
    window.addEventListener("load", smartRollover, false);   
}   
else if(window.attachEvent) {   
    window.attachEvent("onload", smartRollover);   
}

function disp(url){ 

window.open(url, "window_name", "width=750,height=800,scrollbars=yes"); 

} 



function popupMenu( id ){
	var obj = document.getElementById( id );
	obj.style.display = "block";
}

function popupHidden( id ){
	var obj = document.getElementById( id );
	obj.style.display = "none";
}

//未入力項目をチェックする
function chValie() {
	// 入力必須項目（「,」で区切って追加可能）
ess = new Array("entry", "name", "mail");
for(i=0; i<ess.length; i++) {
txt = document.contact.elements[ess[i]].value;
if(txt == "") {
alert("未入力項目があります。再度お確かめになって送信してください。");
return false;
}
}
	// メールアドレスかどうかチェックする
ml = /.+@.+\..+/; // チェック方式
mf = document.contact.mail.value;
  if(!mf.match(ml)) {
    alert("メールアドレスが不正です");
    return false;
  }
  return true;
}
