<!--//
function mypage(url, sessid) { 
	if(url != ""){
		url = 'http://www.iportal.jp/mypage' + url;
		if(sessid != ""){
			if(url.match(/\?/)){
				url = url + '&SESSID=' + sessid;
			}else{
				url = url + '?SESSID=' + sessid;
			}
		}
		mypage_win=window.open(url,"mypage",'toolbar=no,location=no,directories=no,status=no,menubar=no, scrollbars=yes,resizable=yes,width=800,height=660');
		mypage_win.focus();
	}
}
function SHOP_WIN(url) 
{
	if (url != ''){
		win=window.open(url,null,"scrollbars=1,resizable=no,width=800,height=650");
		// win=window.open(url,"shop_win","scrollbars=1,resizable=no,width=690,height=560");
	}
}
function loadImage() { 
	var rollover = new Array();
	for (var i=0; i < 30 ; i++) {
		rollover[i] = new Image();
	}
	rollover[0].src = "/img/";
}

function changeImg(iName,img){
	document.images[iName].src=img;
}

function popUp(url) { 
	sealWin=window.open(url,"win",'toolbar=0,location=1,directories=0,status=1,menubar=1, scrollbars=1,resizable=1,width=500,height=450'); 
	self.name = "mainWin";
}

function _JumpURLnewWin(url,sizeX,sizeY) 
{
  if (url != ''){
    win=window.open(url,"a","scrollbars=1,resizable=yes,width=" + sizeX + ",height=" + sizeY);
  }
}
function _TargetWinOpen(url,sizeX,sizeY,target) 
{
  if (url != ''){
    win=window.open(url,target,"scrollbars=1,resizable=yes,width=" + sizeX + ",height=" + sizeY);
  }
}
function SelectJumpURL(obj) 
{
  url = obj.options[obj.selectedIndex].value;
  if (url != '')
  {
    window.location = url;
  }
}
function mOvr(src,clrOver){ 
	if (!src.contains(event.fromElement)){
		src.style.cursor = 'hand'; 
		src.bgColor = clrOver; 
	} 
} 
function mOut(src,clrIn){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = clrIn; 
	} 
} 
function showHELP(msg){
	window.status = msg;
}
function popUp(url) { 
	sealWin=window.open(url,"win",'toolbar=0,location=1,directories=0,status=1,menubar=1, scrollbars=1,resizable=1,width=500,height=450');
	self.name = "mainWin";
}
//showLayer
function showLay(idName){ 
	if(document.getElementById){//NN6,Mozilla,IE5用
		document.getElementById(idName).style.visibility = 'visible';
	}else if(document.all){//IE4用
		document.all(idName).style.visibility = 'visible';
	}else if(document.layers){//NN4用
		document.layers[idName].visibility = 'show';
	}
}

//hideLayer
function hideLay(idName){ 
	if(document.getElementById){//NN6,Mozilla,IE5用
		document.getElementById(idName).style.visibility = 'hidden';
	}else if(document.all){//IE4用
		document.all(idName).style.visibility = 'hidden';
	}else if(document.layers){//NN4用
		document.layers[idName].visibility = 'hide';
	}
}

function mopen(url){
	wo1=window.open(url,"new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=421,height=445");
}  

function jumpURL(n,y)
{
	if (n ==0) location.href = "./?qu=" + y;	//　トップページ
	if (n ==1) location.href = "./?qu=" + y;	//　トップページ

}	

	
//　8/31 sakurai	
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		detox_map_ImageMap_08_over = newImage("/special/detox/images/detox_map-ImageMap_08_over.gif");
		detox_map_ImageMap_07_over = newImage("/special/detox/images/detox_map-ImageMap_07_over.gif");
		detox_map_ImageMap_06_over = newImage("/special/detox/images/detox_map-ImageMap_06_over.gif");
		detox_map_ImageMap_05_over = newImage("/special/detox/images/detox_map-ImageMap_05_over.gif");
		detox_map_ImageMap_04_over = newImage("/special/detox/images/detox_map-ImageMap_04_over.gif");
		detox_map_ImageMap_03_over = newImage("/special/detox/images/detox_map-ImageMap_03_over.gif");
		detox_map_ImageMap_02_over = newImage("/special/detox/images/detox_map-ImageMap_02_over.gif");
		detox_map_ImageMap_01_over = newImage("/special/detox/images/detox_map-ImageMap_01_over.gif");
		preloadFlag = true;
	}
}

// smartRollover
//var aaaa;
function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_rll."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_rll.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_rll."));
				}
			}
		}
	}
}

function smartRollover_i() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("input");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src") != null){
				
				if(images[i].getAttribute("src").match("_rll."))
				{
					images[i].onmouseover = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_rll.", "_on."));
					}
					images[i].onmouseout = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_on.", "_rll."));
					}
				}
				
			}
		}
	}
}


function TRANSMIT_WIN(url) 
{
	if (url != ''){
		win=window.open(url,"_blank","scrollbars=1,resizable=no,width=600,height=650");
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
	window.addEventListener("load", smartRollover_i, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
	window.attachEvent("onload", smartRollover_i);
}


//-->