/*---------------------------------------------
 load
---------------------------------------------*/
with (document) {
	write('<script type="text/javascript" src="/js/shop/d_common.js"></script>\n');
}

//=============================================
// Img RollOver
//=============================================
var initRollovers = {
	temp : {
		cName    : "ov",
		sTempSrc : null,
		src      : null,
		hsrc     : null,
		ftype    : null,
		setTag   : new Array("img","input")
	},

	setProcess : function (){
		for( var si=0 ; si < initRollovers.temp.setTag.length ; si++ ){
			initRollovers.main(initRollovers.temp.setTag[si]);
		}
	},

	main : function (tag){
		var aPreLoad = new Array();
		var sTempSrc;
		var aImages = document.getElementsByTagName(tag);

		for (var i = 0; i < aImages.length; i++) {
			if ( aImages[i].className.indexOf(initRollovers.temp.cName)  != -1 ) {
				var src = aImages[i].getAttribute('src');
					initRollovers.temp.src = src;
				var ftype = src.substring(src.lastIndexOf('.'), src.length);
					initRollovers.temp.ftype = ftype;
				var hsrc = src.replace(ftype, '_on'+ftype);
					initRollovers.temp.hsrc = hsrc;

				aImages[i].setAttribute('hsrc', hsrc);

				aPreLoad[i] = new Image();
				aPreLoad[i].src = hsrc;

				try {
					aImages[i].addEventListener('mouseover', initRollovers.imgOver, false);
					aImages[i].addEventListener('mouseout', initRollovers.imgOut, false);
				} catch (e) {
					aImages[i].attachEvent('onmouseover', (function(el){return function(){initRollovers.imgOver.call(el);};})(aImages[i])); 
					aImages[i].attachEvent('onmouseout', (function(el){return function(){initRollovers.imgOut.call(el);};})(aImages[i])); 
				}
			}
		}
	},

	imgOver : function(){
		var src  = initRollovers.temp.src;
		var hsrc = initRollovers.temp.hsrc;
		initRollovers.temp.sTempSrc = this.getAttribute('src');
		this.setAttribute('src', this.getAttribute('hsrc'));
	},

	imgOut : function(){
		var src   = initRollovers.temp.src;
		var hsrc  = initRollovers.temp.hsrc;
		var ftype = initRollovers.temp.ftype;
		if (!initRollovers.temp.sTempSrc) initRollovers.temp.sTempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
		this.setAttribute('src', initRollovers.temp.sTempSrc);
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.setProcess, false);
		} catch (e) {
			window.attachEvent('onload', this.setProcess);
		}
	}
}
initRollovers.addEvent();


//=============================================
// change Image
//=============================================
	function changeImage(fileName, imageName){
		document.images[imageName].src = fileName;
	}


//=============================================
// form elements onfocus bgColor
//=============================================
var initFormelEments = {
	temp : {
		focusColor : "#FFFBBF",
		blurColor  : "#FFFFFF",
		cName      : "ontxt",
//		formTag    : new Array("input","select","textarea")
		formTag    : new Array("input","textarea")
	},

	setProcess : function (){
		if (!document.getElementById) return
		for( si=0 ; si < initFormelEments.temp.formTag.length ; si++ ){
			initFormelEments.main(initFormelEments.temp.formTag[si]);
		}
	},

	main : function (tagName){
		if( tagName == "select" ){
			var tagName = document.getElementsByTagName(tagName);
			if( tagName.length != 0 ){
				for( i=0 ; i < tagName.length ; i++ ){
					try {
						tagName[i].addEventListener('mousedown', initFormelEments.changeBGSelectMousedown, false);
						tagName[i].addEventListener('blur', initFormelEments.changeBGBlur, false);
					} catch (e) {
						tagName[i].attachEvent('onmousedown', (function(el){return function(){initFormelEments.changeBGSelectMousedown.call(el);};})(tagName[i])); 
						tagName[i].attachEvent('onblur', (function(el){return function(){initFormelEments.changeBGBlur.call(el);};})(tagName[i])); 
					}
				}
			}
		} else {
			var tagName = document.getElementsByTagName(tagName);
			if( tagName.length != 0 ){
				for( i=0 ; i < tagName.length ; i++ ){
					try {
						tagName[i].addEventListener('focus', initFormelEments.changeBGFocus, false);
						tagName[i].addEventListener('blur', initFormelEments.changeBGBlur, false);
					} catch (e) {
						tagName[i].attachEvent('onfocus', (function(el){return function(){initFormelEments.changeBGFocus.call(el);};})(tagName[i])); 
						tagName[i].attachEvent('onblur', (function(el){return function(){initFormelEments.changeBGBlur.call(el);};})(tagName[i])); 
					}
				}
			}
		}
	},

	changeBGFocus : function(){
		if ( this.className.indexOf(initFormelEments.temp.cName)  != -1 ) {
			this.style.backgroundColor = initFormelEments.temp.focusColor;
		}
	},
	changeBGSelectMousedown : function(){
		if ( this.className.indexOf(initFormelEments.temp.cName)  != -1 ) {
			this.style.backgroundColor = initFormelEments.temp.focusColor;
			this.focus();
		}
	},
	changeBGBlur : function(){
		var bColor = "#ffffff";
		if ( this.className.indexOf(initFormelEments.temp.cName)  != -1 ) {
			this.style.backgroundColor =  initFormelEments.temp.blurColor;
		}
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.setProcess, false);
		} catch (e) {
			window.attachEvent('onload', this.setProcess);
		}
	}
}
initFormelEments.addEvent();


/* ===============================================
	レイヤーの表示形式を変更
=============================================== */
	function changeLayerDisplay(id,dis){
		if(document.all || document.getElementById){
			if(document.all){
				document.all(id).style.display = dis;
			} else if(document.getElementById){
				document.getElementById(id).style.display = dis;
			}
		}
	}

/* ===============================================
	レイヤーの高さ取得
=============================================== */
	function getLayerHeight(id){
		if(document.all || document.getElementById){
			if(document.all){
				return document.all(id).offsetHeight;
			} else if(document.getElementById){
				return document.getElementById(id).offsetHeight;
			}
		}
	}
/* ===============================================
	レイヤーの横幅取得
=============================================== */
	function getLayerWidth(id){
		if(document.all || document.getElementById){
			if(document.all){
				return document.all(id).offsetWidth;
			} else if(document.getElementById){
				return document.getElementById(id).offsetWidth;
			}
		}
	}

/* ===============================================
	レイヤーのY座標設定
=============================================== */
	function setLayerPositionY(id,y){
		if(document.all || document.getElementById){
			if(document.all){
				document.all(id).style.top  = y + "px";
			} else if(document.getElementById){
				document.getElementById(id).style.top  = y + "px";
			}
		}
	}


/* ===============================================
	在庫状況の見かた設定
=============================================== */
function popupStockSatus(){
	var id = "popup-stockstatus";
	if(document.all || document.getElementById){
		if(document.all){
			var dis = (document.all(id).style.display == "none") ? "block": "none";
		} else if(document.getElementById){
			var dis = (document.getElementById(id).style.display == "none") ? "block": "none";
		}
	}
	changeLayerDisplay(id,dis);
	if( dis == 'block' ){
		var y = getLayerHeight(id);
		y = 0 - y - 10;
		setLayerPositionY(id,y);
	}
}


/* ===============================================
	商品ラインアップ・在庫状況 設定
=============================================== */
var itemDetailTableTRBGColor = {
	temp : {
		focusColor : "#FFFBBF",
		blurColor  : "#FFFFFF",
		cName      : "itemdetailline",
		dName      : "itemdetailnoline",
		tdName     : "itemdetailnolineTd",
		setTag    : new Array("tr")
	},

	setProcess : function (){
		if (!document.getElementById) return
		for( si=0 ; si < itemDetailTableTRBGColor.temp.setTag.length ; si++ ){
			itemDetailTableTRBGColor.main(itemDetailTableTRBGColor.temp.setTag[si]);
		}
	},

	main : function (tagName){
		var tagName = document.getElementsByTagName(tagName);
		if( tagName.length != 0 ){
			for( i=0 ; i < tagName.length ; i++ ){
				try {
					tagName[i].addEventListener('mouseover', itemDetailTableTRBGColor.changeClassName, false);
					tagName[i].addEventListener('mouseout', itemDetailTableTRBGColor.defaltClassName, false);
				} catch (e) {
					tagName[i].attachEvent('onmouseover', (function(el){return function(){itemDetailTableTRBGColor.changeClassName.call(el);};})(tagName[i])); 
					tagName[i].attachEvent('onmouseout', (function(el){return function(){itemDetailTableTRBGColor.defaltClassName.call(el);};})(tagName[i])); 
				}
			}
		}

		var tdTagName = document.getElementsByTagName('td');
		if( tdTagName.length != 0 ){
			for( i=0 ; i < tdTagName.length ; i++ ){
				if ( tdTagName[i].className.indexOf(itemDetailTableTRBGColor.temp.tdName)  != -1 ) {
					try {
						tdTagName[i].addEventListener('click', itemDetailTableTRBGColor.trClick, false);
					} catch (e) {
						tdTagName[i].attachEvent('onclick', (function(el){return function(){itemDetailTableTRBGColor.trClick.call(el);};})(tdTagName[i])); 
					}
				}
			}
		}
	},

	trClick : function(){
		var aTagName = this.getElementsByTagName('a');
		location = aTagName[0].href;
	},

	changeClassName : function(){
		if ( this.className.indexOf(itemDetailTableTRBGColor.temp.dName)  != -1 ) {
			this.className = itemDetailTableTRBGColor.temp.cName;
		}
	},
	defaltClassName : function(){
		if ( this.className.indexOf(itemDetailTableTRBGColor.temp.cName)  != -1 ) {
			this.className = itemDetailTableTRBGColor.temp.dName;
		}
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.setProcess, false);
		} catch (e) {
			window.attachEvent('onload', this.setProcess);
		}
	}
}
itemDetailTableTRBGColor.addEvent();


/* ===============================================
	BrowserName取得
=============================================== */
	function getBrowserName(){
		var uName = navigator.userAgent.toUpperCase();
		var aName = navigator.appName.toUpperCase();
		var br = "false";
		br = (uName.indexOf("OPERA") != -1) ? "OPERA" : br;
		br = (aName.indexOf("NETSCAPE") != -1) ? "NETSCAPE" : br;
		br = (uName.indexOf("SAFARI") != -1) ? "SAFARI" : br;
		br = (uName.indexOf("FIREFOX") != -1) ? "FIREFOX" : br;
		br = (aName.indexOf("MICROSOFT") != -1) ? "IE" : br;
		return br;
	}

/* ===============================================
	レイヤーの高さ設定
=============================================== */
	function setLayerHeight(id,h){
		if(document.all || document.getElementById){
			if(document.all){
				document.all(id).style.height = h + "px";
			} else if(document.getElementById){
				document.getElementById(id).style.height = h + "px";
			}
		}
	}

/* ===============================================
	レイヤーの横幅設定
=============================================== */
	function setLayerSizeWidth(id,x){
		if( x == "auto" ){
			if(document.all || document.getElementById){
				if(document.all){
					document.all(id).style.width = "auto";
				} else if(document.getElementById){
					document.getElementById(id).style.width = "auto";
				}
			}
		}else{
			if(document.all || document.getElementById){
				if(document.all){
					document.all(id).style.width = x + "px";
				} else if(document.getElementById){
					document.getElementById(id).style.width = x + "px";
				}
			}
		}
	}

/* ===============================================
	指定された ID領域に記述
=============================================== */
	function writeIdArea(id,writeData){
		if(document.all || document.getElementById){
			if(document.all){
				document.all(id).innerHTML = writeData;
			} else if(document.getElementById){
				document.getElementById(id).innerHTML = writeData;
			}
		}
	}

/* ===============================================
	レイヤーの座標設定
=============================================== */
	function setLayerPosition(id,x,y){
		if(document.all || document.getElementById){
			if(document.all){
				document.all(id).style.top  = y + "px";
				document.all(id).style.left = x + "px";
			} else if(document.getElementById){
				document.getElementById(id).style.top  = y + "px";
				document.getElementById(id).style.left = x + "px";
			}
		}
	}


/* ===============================================
	画像横幅取得
=============================================== */
	function getImgWidth(imgUrl){
		thisImg = new Image();
		thisImg.src = imgUrl;
		var imgWidth = thisImg.width;
		return imgWidth;
	}


/* ===============================================
	画像縦幅取得
=============================================== */
	function getImgHeight(imgUrl){
		thisImg = new Image();
		thisImg.src = imgUrl;
		var imgHeight = thisImg.height;
		return imgHeight;
	}


/* ===============================================
	画像拡大
=============================================== */
var picExpansion = {
	temp : {
		br        : getBrowserName(),
		pEid      : "picExpansion",
		pEBgid    : "picExpansionBg",
		pEBlockid : "picExpansionBlock",
		pEImgid   : "picExpansionImg",
		cName     : "onPicExpansion"
	},

	setProcess : function (){
		var thisImg  = new Array();
		var aTag = document.getElementsByTagName("a");
		for (var i = 0; i < aTag.length; i++) {
			if ( aTag[i].className.indexOf(picExpansion.temp.cName) != -1 ) {
				thisImg[i] = new Image();
				thisImg[i].src = aTag[i].href;

				var pEidInner = '<img src="'+aTag[i].href+'" alt=""><br>';
				writeIdArea(picExpansion.temp.pEImgid,pEidInner);

				try {
					aTag[i].addEventListener('click', picExpansion.main, false);
				} catch (e) {
					aTag[i].attachEvent('onclick', (function(el){return function(){picExpansion.main.call(el);};})(aTag[i])); 
				}
			}
		}
	},

	main : function (tempUrl){
		var imgUrl = ( this.href != null ) ? this.href : tempUrl;

		var selectTag = document.getElementsByTagName('select');
		if( selectTag.length != 0 ){
			for( i=0 ; i < selectTag.length ; i++ ){
				selectTag[i].style.visibility = 'hidden';
			}
		}

		var idScreenH;
		var idScreenW;
		var idScrollLeft;
		var idScrollTop;
		var idBodyH;
		var idBodyW;
		if ( picExpansion.temp.br == "IE" ) {
			if (document.all && document.getElementById && (document.compatMode=='CSS1Compat')) {
			// ウィンドウズIE 6・標準モード。
				idScreenH = document.documentElement.clientHeight;
				idScreenW = document.documentElement.clientWidth;
				idScrollLeft = document.documentElement.scrollLeft;
				idScrollTop = document.documentElement.scrollTop;
				idBodyH = document.body.clientHeight;
				idBodyW = document.body.clientWidth;
			} else {
				idScreenH = document.body.clientHeight;
				idScreenW = document.body.clientWidth;
				idScrollLeft = document.body.scrollLeft;
				idScrollTop = document.body.scrollTop;
				idBodyH = document.body.clientHeight;
				idBodyW = document.body.clientWidth;
			}
		} else if( (picExpansion.temp.br == "FIREFOX") || (picExpansion.temp.br == "SAFARI") ) {
			idScreenH    = (document.documentElement.clientHeight) ? document.documentElement.clientHeight: window.innerHeight;
			idScreenW    = (document.documentElement.clientWidth)  ? document.documentElement.clientWidth : window.innerWidth;
			idScrollLeft = (document.documentElement.scrollLeft)   ? document.documentElement.scrollLeft  : pageXOffset;
			idScrollTop  = (document.documentElement.scrollTop)    ? document.documentElement.scrollTop   : pageYOffset;
			idBodyH      = (document.documentElement.offsetHeight) ? document.documentElement.offsetHeight: document.body.innerHeight;
			idBodyW      = (document.documentElement.offsetWidth)  ? document.documentElement.offsetWidth : document.body.innerWidth;
		} else {
			idScreenH = document.all ? document.documentElement.clientHeight : window.innerHeight;
			idScreenW = document.all ? document.documentElement.clientWidth : window.innerWidth;
			idScrollLeft = document.all ? document.documentElement.scrollLeft : pageXOffset;
			idScrollTop = document.all ? document.documentElement.scrollTop : pageYOffset;
			idBodyH = document.all ? document.body.clientHeight : document.body.innerHeight;
			idBodyW = document.all ? document.body.clientWidth : document.body.innerWidth;

			if( window.innerHeight                    ) { idScreenH = window.innerHeighth;}
			if( document.documentElement.clientHeight ) { idScreenH = document.documentElement.clientHeight;}

			if( window.innerWidth                    ) { idScreenW = window.innerWidth;}
			if( document.documentElement.clientWidth ) { idScreenW = document.documentElement.clientWidth;}

			if( pageXOffset                         ) { idScrollLeft = pageXOffset;}
			if( document.documentElement.scrollLeft ) { idScrollLeft = document.documentElement.scrollLeft;}
			if( document.body.pixelLeft )             { idScrollLeft = document.body.pixelLeft;}

			if( pageYOffset                        ) { idScrollTop = pageYOffset;}
			if( document.documentElement.scrollTop ) { idScrollTop = document.documentElement.scrollTop;}
			if( document.body.pixelTop )             { idScrollTop = document.body.pixelTop;}

			if( document.body.innerHeight ) { idBodyH = document.body.innerHeight;}
			if( document.body.clientHeight ){ idBodyH = document.body.clientHeight;}

			if( document.body.innerWidth )  { idBodyW = document.body.innerWidth;}
			if( document.body.clientWidth ) { idBodyW = document.body.clientWidth;}
		}

		changeLayerDisplay(picExpansion.temp.pEid,'block');

		setLayerHeight(picExpansion.temp.pEid,idBodyH);

		var imgWidth  = getImgWidth(imgUrl);
		var imgHeight = getImgHeight(imgUrl);

		var boxWidth  = ( imgWidth != null  ) ? imgWidth + 46: getLayerWidth(picExpansion.temp.pEBlockid);
		var boxHeight = ( imgHeight != null ) ? imgHeight + 31: getLayerHeight(picExpansion.temp.pEBlockid);

//		var pEidInner = '<img src="'+imgUrl+'" alt="" width="'+imgWidth+'" height="'+imgHeight+'"><br>';
//		writeIdArea(picExpansion.temp.pEImgid,pEidInner);

//	↓追加(2009/03/25)
		var pEidInner = '<img src="'+imgUrl+'" alt=""><br>';
		writeIdArea(picExpansion.temp.pEImgid,pEidInner);
//	↑追加(2009/03/25)

		var imgX = (idBodyW - boxWidth) / 2;
		imgX = ( boxWidth >= idBodyW ) ? 0: imgX;
		imgX = parseInt(imgX);

		var imgY = (idScreenH - boxHeight) / 2 + idScrollTop;
		imgY = ( boxHeight >= idScreenH ) ? 0 + idScrollTop: imgY;
		imgY = parseInt(imgY);


		var aName = navigator.appName.toUpperCase();
		var aVer  = navigator.appVersion;
		if(aName.indexOf("MICROSOFT") != -1){
			var tmpS = aVer.indexOf("MSIE",0);
			var tmpE = aVer.indexOf(";",tmpS);
			tmpS = tmpS + 5;
			var brVer = aVer.substring(tmpS,tmpE);
			brVer = parseInt(brVer);

			if( brVer <= 6 ){
				changeLayerDisplay(picExpansion.temp.pEBgid,'block');
				setLayerHeight(picExpansion.temp.pEBgid,idBodyH);
				setLayerSizeWidth(picExpansion.temp.pEBgid,idBodyW);
			}
		}

		setLayerPosition(picExpansion.temp.pEBlockid,imgX,imgY);
	},

	close : function(){
		var selectTag = document.getElementsByTagName('select');
		if( selectTag.length != 0 ){
			for( i=0 ; i < selectTag.length ; i++ ){
				selectTag[i].style.visibility = 'visible';
			}
		}
		changeLayerDisplay(picExpansion.temp.pEid,'none');
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.setProcess, false);
		} catch (e) {
			window.attachEvent('onload', this.setProcess);
		}
	}
}
picExpansion.addEvent();


/* ===============================================
	silde
=============================================== */
var slide = {
	temp : {
		process      : false,
		obj          : null,
		objSlidePx   : 35,
		objSlideTime : 10,
		timemer      : null,
		objHeight    : null
	},

	del : function(id){
		if( slide.temp.process ){ return; }

		var obj;
		if(document.all || document.getElementById){
			if(document.all){
				slide.temp.obj = document.all(id);
			} else if(document.getElementById){
				slide.temp.obj = document.getElementById(id);
			}
		}
		obj = slide.temp.obj;

		if( obj.offsetHeight == 0 ){ return; }
		slide.temp.process = true;

		obj.style.display  = "block";
		obj.style.overflow = "hidden";
		obj.style.height   = "auto";
		slide.temp.objHeight = obj.offsetHeight;

		slide.delProcess(slide.temp.objHeight);
	},
	delProcess : function(h){
		obj = slide.temp.obj;

		h = h - slide.temp.objSlidePx;
		h = ( h <= 0) ? 0: h;

		obj.style.height   = h + "px";
		if( h != 0 ){
			slide.temp.timmer = setTimeout( function(){ slide.delProcess(h) } ,slide.temp.objSlideTime);
		} else {
			slide.temp.process = false;
			clearTimeout(slide.temp.timmer);
		}
	},

	view : function(id){
		if( slide.temp.process ){ return; }

		var obj;
		if(document.all || document.getElementById){
			if(document.all){
				slide.temp.obj = document.all(id);
			} else if(document.getElementById){
				slide.temp.obj = document.getElementById(id);
			}
		}
		obj = slide.temp.obj;

		if( obj.offsetHeight != 0 ){ return; }
		slide.temp.process = true;

		obj.style.display  = "block";
		obj.style.overflow = "hidden";
		obj.style.height   = "auto";
		slide.temp.objHeight = obj.offsetHeight;
		obj.style.height   = "0px";

		slide.viewProcess(0);
	},
	viewProcess : function(h){
		obj = slide.temp.obj;

		h = h + slide.temp.objSlidePx;
		h = ( h >= slide.temp.objHeight) ? slide.temp.objHeight: h;

		obj.style.height   = h + "px";
		if( h != slide.temp.objHeight ){
			slide.temp.timmer = setTimeout( function(){ slide.viewProcess(h) } ,slide.temp.objSlideTime);
		} else {
			slide.temp.process = false;
			clearTimeout(slide.temp.timmer);
		}
	}
}


/* ===============================================
	FAQ silde
=============================================== */
var faqSlide = {
	temp : {
		process      : false,
		obj          : null,
		objSlidePx   : 35,
		objSlideTime : 10,
		timemer      : null,
		objHeight    : null
	},

	del : function(id){
		if( faqSlide.temp.process ){ return; }

		var obj;
		if(document.all || document.getElementById){
			if(document.all){
				faqSlide.temp.obj = document.all(id);
			} else if(document.getElementById){
				faqSlide.temp.obj = document.getElementById(id);
			}
		}
		obj = faqSlide.temp.obj;

		if( obj.offsetHeight == 0 ){ return; }
		faqSlide.temp.process = true;

		obj.style.display  = "block";
		obj.style.overflow = "hidden";
		obj.style.height   = "auto";
		faqSlide.temp.objHeight = obj.offsetHeight;

		faqSlide.delProcess(faqSlide.temp.objHeight);
	},
	delProcess : function(h){
		obj = faqSlide.temp.obj;

		h = h - faqSlide.temp.objSlidePx;
		h = ( h <= 0) ? 0: h;

		obj.style.height   = h + "px";
		if( h != 0 ){
			faqSlide.temp.timmer = setTimeout( function(){ faqSlide.delProcess(h) } ,faqSlide.temp.objSlideTime);
		} else {
			faqSlide.temp.process = false;
			clearTimeout(faqSlide.temp.timmer);
		}
	},

	view : function(id){
		if( faqSlide.temp.process ){ return; }

		var obj;
		if(document.all || document.getElementById){
			if(document.all){
				faqSlide.temp.obj = document.all(id);
			} else if(document.getElementById){
				faqSlide.temp.obj = document.getElementById(id);
			}
		}
		obj = faqSlide.temp.obj;

		if( obj.offsetHeight != 0 ){ faqSlide.del(id); return; }
		faqSlide.temp.process = true;

		obj.style.display  = "block";
		obj.style.overflow = "hidden";
		obj.style.height   = "auto";
		faqSlide.temp.objHeight = obj.offsetHeight;
		obj.style.height   = "0px";

		faqSlide.viewProcess(0);
	},
	viewProcess : function(h){
		obj = faqSlide.temp.obj;

		h = h + faqSlide.temp.objSlidePx;
		h = ( h >= faqSlide.temp.objHeight) ? faqSlide.temp.objHeight: h;

		obj.style.height   = h + "px";
		if( h != faqSlide.temp.objHeight ){
			faqSlide.temp.timmer = setTimeout( function(){ faqSlide.viewProcess(h) } ,faqSlide.temp.objSlideTime);
		} else {
			faqSlide.temp.process = false;
			clearTimeout(faqSlide.temp.timmer);
		}
	}
}


/* ===============================================
	change className
=============================================== */
	function changeCName(id,cName){
		if(document.all || document.getElementById){
			if(document.all){
				document.all(id).className = cName;
			} else if(document.getElementById){
				document.getElementById(id).className = cName;
			}
		}
	}


/* ===============================================
	cnts CategoryNavi
=============================================== */
var cntsCategoryNavi = {
	temp : {
		cName       : "cntsCategoryNavi",
		tdOverColor : "#EF8567",
		tdOutColor  : "#F3F3E8",
		aOverColor  : "#ffffff",
		aOutColor   : "#814336"
	},

	main : function (){
		if (!document.getElementById) return
		var tagName = document.getElementsByTagName('td');
		if( tagName.length != 0 ){
			for( i=0 ; i < tagName.length ; i++ ){
				try {
					tagName[i].addEventListener('mouseover', cntsCategoryNavi.mOver, false);
					tagName[i].addEventListener('mouseout', cntsCategoryNavi.mOut, false);
					tagName[i].addEventListener('click', cntsCategoryNavi.mClick, false);
				} catch (e) {
					tagName[i].attachEvent('onmouseover', (function(el){return function(){cntsCategoryNavi.mOver.call(el);};})(tagName[i])); 
					tagName[i].attachEvent('onmouseout', (function(el){return function(){cntsCategoryNavi.mOut.call(el);};})(tagName[i])); 
					tagName[i].attachEvent('onclick', (function(el){return function(){cntsCategoryNavi.mClick.call(el);};})(tagName[i])); 
				}
			}
		}
	},

	mOver : function(){
		if ( this.className.indexOf(cntsCategoryNavi.temp.cName)  != -1 ) {
			this.style.backgroundColor = cntsCategoryNavi.temp.tdOverColor;
			var aTag = this.getElementsByTagName('a');
			if( aTag.length != 0 ){
				aTag[0].style.color = cntsCategoryNavi.temp.aOverColor;
			}
		}
	},

	mOut : function(){
		if ( this.className.indexOf(cntsCategoryNavi.temp.cName)  != -1 ) {
			this.style.backgroundColor = cntsCategoryNavi.temp.tdOutColor;
			var aTag = this.getElementsByTagName('a');
			if( aTag.length != 0 ){
				aTag[0].style.color = cntsCategoryNavi.temp.aOutColor;
			}
		}
	},

	mClick : function(){
		if ( this.className.indexOf(cntsCategoryNavi.temp.cName)  != -1 ) {
			var aTag = this.getElementsByTagName('a');
			if( aTag.length != 0 ){
				document.location = aTag[0].href;
			}
		}
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.main, false);
		} catch (e) {
			window.attachEvent('onload', this.main);
		}
	}
}
cntsCategoryNavi.addEvent();


/* ===============================================
	ウインドウを表示する命令セット
=============================================== */
	function opWin(opUrl,winWidth,winHeight){
		winWidth  = ( winWidth != null  ) ? winWidth: 693;
		winHeight = ( winHeight != null ) ? winHeight: 480;

		var win_set = '';
		win_set += 'toolbar=no,';
		win_set += 'location=no,';
		win_set += 'directories=no,';
		win_set += 'status=yes,';
		win_set += 'menubar=yes,';
		win_set += 'scrollbars=yes,';
		win_set += 'resizable=yes,';
		win_set += 'width='+ winWidth +',';
		win_set += 'height='+ winHeight;

		openWindow = window.open(opUrl,"popup",win_set);
		openWindow.focus();
	}

/* ===============================================
	ID存在チェック
=============================================== */
	function checkLayerId(id){
		if(document.all || document.getElementById){
			if(document.all){
				if( document.all(id) != null ){
					return true;
				}
			} else if(document.getElementById){
				if( document.getElementById(id) != null ){
					return true;
				}
			}
		}
		return null;
	}


//=============================================
// Page Scroll Next ID
//=============================================
var pageScrollNextID = {
	temp : {
		scrollStart : null,
		scrollRoll  : null,
		scrollEnd   : null,
		scrollPixel : 100,
		scrollTime  : 10
	},

	main : function(id){
		if(document.all || document.getElementById){
			if(document.all){
				pageScrollNextID.temp.scrollEnd = document.all(id).offsetTop;
			} else if(document.getElementById){
				pageScrollNextID.temp.scrollEnd  = document.getElementById(id).offsetTop;
			}
		}

		var br = getBrowserName();
		var idScrollTop;
		if ( br == "IE" ) {
			if (document.all && document.getElementById && (document.compatMode=='CSS1Compat')) {
				idScrollTop = document.documentElement.scrollTop;
			} else {
				idScrollTop = document.body.scrollTop;
			}

			// IE bug FIX
			pageScrollNextID.temp.scrollEnd = pageScrollNextID.temp.scrollEnd + document.all('main').offsetTop;
			if( checkLayerId('pankuzu') ){
				pageScrollNextID.temp.scrollEnd = pageScrollNextID.temp.scrollEnd + document.all('pankuzu').offsetTop;
				pageScrollNextID.temp.scrollEnd = pageScrollNextID.temp.scrollEnd + getLayerHeight('pankuzu');
			}
			pageScrollNextID.temp.scrollEnd = pageScrollNextID.temp.scrollEnd + 15;

		} else {
			idScrollTop = document.all ? document.documentElement.scrollTop : pageYOffset;
		}

		pageScrollNextID.temp.scrollStart = idScrollTop;

		if ( br == "SAFARI" ){
			var ver = navigator.userAgent.split("/")[3];
			ver = ver.split(" ")[0];
			ver = ver.split(".")[0];
			if( (ver >= 85) || (ver < 2) ){
				window.scroll(0,pageScrollNextID.temp.scrollEnd);
				return false;
			}
		}

		if( pageScrollNextID.temp.scrollStart > pageScrollNextID.temp.scrollEnd ){
			pageScrollNextID.goPageScrollUp();
		}else{
			pageScrollNextID.goPageScrollDown();
		}
	},

	goPageScrollUp : function(){
		pageScrollNextID.temp.scrollRoll = pageScrollNextID.temp.scrollStart - pageScrollNextID.temp.scrollPixel;
		pageScrollNextID.temp.scrollStart = pageScrollNextID.temp.scrollRoll;
		if( pageScrollNextID.temp.scrollRoll > pageScrollNextID.temp.scrollEnd ){
			window.scroll(0,pageScrollNextID.temp.scrollRoll);
			this.timmer = setTimeout(function(){pageScrollNextID.goPageScrollUp();},pageScrollNextID.temp.scrollTime);
		}else{
			window.scroll(0,pageScrollNextID.temp.scrollEnd);
		}
	},
	goPageScrollDown : function(){
		pageScrollNextID.temp.scrollRoll = pageScrollNextID.temp.scrollStart + pageScrollNextID.temp.scrollPixel;
		pageScrollNextID.temp.scrollStart = pageScrollNextID.temp.scrollRoll;
		if( pageScrollNextID.temp.scrollRoll < pageScrollNextID.temp.scrollEnd ){
			window.scroll(0,pageScrollNextID.temp.scrollRoll);
			this.timmer = setTimeout(function(){pageScrollNextID.goPageScrollDown();},pageScrollNextID.temp.scrollTime);
		}else{
			window.scroll(0,pageScrollNextID.temp.scrollEnd);
		}
	}
}


//=============================================
// change Item Pic Border Color
//=============================================
var initItemPicBorder = {
	temp : {
		moverColor : "#E5A0B8",
		moutColor  : "#E5E5CD",
		cName      : "itemBorder"
	},

	main : function (tagName){
		var tagName = document.getElementsByTagName('td');
		if( tagName.length != 0 ){
			for( i=0 ; i < tagName.length ; i++ ){
				try {
					tagName[i].addEventListener('mouseover', initItemPicBorder.mOver, false);
					tagName[i].addEventListener('mouseout', initItemPicBorder.mOut, false);
					tagName[i].addEventListener('click', initItemPicBorder.mClick, false);
				} catch (e) {
					tagName[i].attachEvent('onmouseover', (function(el){return function(){initItemPicBorder.mOver.call(el);};})(tagName[i])); 
					tagName[i].attachEvent('onmouseout', (function(el){return function(){initItemPicBorder.mOut.call(el);};})(tagName[i])); 
					tagName[i].attachEvent('onclick', (function(el){return function(){initItemPicBorder.mClick.call(el);};})(tagName[i])); 
				}
			}
		}
	},

	mOver : function(){
		if ( this.className.indexOf(initItemPicBorder.temp.cName) != -1 ) {
			var cNameTmp = this.className.substring(11,12);
			this.className = "itemBorder1" + cNameTmp;
		}
	},
	mOut : function(){
		if ( this.className.indexOf(initItemPicBorder.temp.cName) != -1 ) {
			var cNameTmp = this.className.substring(11,12);
			this.className = "itemBorder0" + cNameTmp;
		}
	},
	mClick : function(){
		if ( this.className.indexOf(initItemPicBorder.temp.cName)  != -1 ) {
			var aTag = this.getElementsByTagName('a');
			if( aTag.length != 0 ){
				if ( aTag[0].className.indexOf("onPicExpansion")  != -1 ) {
					var c = aTag[0].href;
					picExpansion.main(c);
				} else {
					document.location = aTag[0].href;
				}
			}
		}
	},

	addEvent : function(){
		try {
			window.addEventListener('load', this.main, false);
		} catch (e) {
			window.attachEvent('onload', this.main);
		}
	}
}
initItemPicBorder.addEvent();


/* ===============================================
	トップページ レモールの最新カタログ
=============================================== */
var topNewCatalog = {
	mOver : function(c){
		var fileDir = "/images/product/common/idx_pic_";
		var fileName = fileDir + c + "_txt_on.gif";
		var imageName = c + "txt";
		changeImage(fileName, imageName);
	},
	mOut : function(c){
		var fileDir = "/images/product/common/idx_pic_";
		var fileName = fileDir + c + "_txt.gif";
		var imageName = c + "txt";
		changeImage(fileName, imageName);
	}
}







