
// mouseover
function smartRollover() {
	if(document.getElementsByTagName) {	
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_d."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_d.", "_x."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_x.", "_d."));
				}
			}
		}		

		var images = document.getElementsByTagName("input");
		for(var i=0; i < images.length; i++) {
			if ( !images[i].getAttribute("src") ) { continue; }
			if(images[i].getAttribute("src").match("_d."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_d.", "_x."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_x.", "_d."));
				}
			}
		}		
	}
}
if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}


// popup
function MM_openBrWindow(theURL,winName,WW,WH,SCB) { //v2.0
  var Features = 'status=no,directories=no,menubar=no,resizable=no,toolbar=no,scrollbars=' + SCB + ',width=' + WW + ',height=' + WH;
  subWin_a = window.open(theURL,winName,Features);
  subWin_a.focus()
}

// popup openMainWindow
function popOpenWindow(theURL) { //v2.0
  opener.location.href=theURL;
}

// tab

function Display(no){
    
    if(no == "no1"){
    
        document.getElementById("img1").style.display = "block";
        document.getElementById("img2").style.display = "none";
        
    }else if(no == "no2"){
    
        document.getElementById("img1").style.display = "none";
        document.getElementById("img2").style.display = "block";
    
    }

}


// openNonSSL
function openNonSSL(theURL) { 
     var src = "http://" + window.location.hostname;
     src = src + "/" + theURL;
     window.open(src, "_top");
}

// openSSL
function openSSL(theURL) { 
     var src = "https://" + window.location.hostname;
     src = src + "/" + theURL;
     window.open(src, "_top");
}

// openerSSL
function openerSSL(theURL) { 
     var src = "https://" + window.location.hostname;
     src = src + "/" + theURL;
     opener.location.href=src;
}

// openerNonSSL
function openerNonSSL(theURL) { 
     var src = "http://" + window.location.hostname;
     src = src + "/" + theURL;
     opener.location.href=src;
}

function MM_openHttpBrWindow(theURL,winName,WW,WH,SCB) { //v2.0
  var Features = 'status=no,directories=no,menubar=no,resizable=no,toolbar=no,scrollbars=' + SCB + ',width=' + WW + ',height=' + WH;
  subWin_a = window.open("http://" + location.hostname + "/" + theURL,winName,Features);
  subWin_a.focus()
}

function openNewSSL(formAct,winName){
     var src = "https://" + window.location.hostname;
     src = src + formAct;
     window.open(src,winName,'toolbar=no,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=830, height=830');
}
