
function fncTopOnOff(names,files){
	var names , files
	var img = eval("document.images('"+names+"')");
	img.src=files;
}

function FncImageZoom(code){
	var code;
	window.open("/goods/goodsZoom.asp?pcode="+code ,"","width=100,height=100");
}

function fncQnaPop(){
	window.open("/customer/customerbbs.asp?gu=new&gp=&ix=&sp=&sw=", "QnaPop", "width=834,height=381");
}


function fncNormalPop(url,w,d,s){
	
	window.open(url, "", "width="+w+",height="+d+",scrollbars="+s);
	
}

function pop_ShowExplain(data){
	if(data == "orderflow"){
		fncNormalPop("/goods/pop/pop_ShowExplain.asp?fn=/imgNew/ordermade/pop_orderflow.gif&w=800&d=430",800,400,"no")
	}else if(data == "insertdata"){
		fncNormalPop("/goods/pop/pop_ShowExplain.asp?fn=/imgNew/ordermade/pop_print.gif&w=820&d=430",820,430,"yes")
	}else if(data == "pop_print"){
		fncNormalPop("/goods/pop/pop_ShowExplain.asp?fn=/imgNew/ordermade/pop_print.gif&w=800&d=720",800,720,"no")
	}else if(data == "pop_print_opp"){
		fncNormalPop("/goods/pop/pop_ShowExplain.asp?fn=/imgNew/ordermade/pop_print_opp.gif&w=750&d=800",750,800,"no")
	}else if(data == "pop_printshare"){
		fncNormalPop("/goods/pop/pop_ShowExplain.asp?fn=/imgNew/ordermade/pop_printshare.gif&w=800&d=500",800,500,"no")
	}else if(data == "pop_printprice"){
		fncNormalPop("/goods/pop/pop_ShowExplain.asp?fn=/imgNew/ordermade/pop_printprice.gif&w=800&d=340",800,340,"no")
	}
}

/* ---- pop content length auto resize --*/
function winResize(){
	var Dwidth = parseInt(document.body.scrollWidth);
	var Dheight = parseInt(document.body.scrollHeight);
	var divEl = document.createElement("div");
	divEl.style.position = "absolute";
	divEl.style.left = "0px";
	divEl.style.top = "0px";
	divEl.style.width = "100%";
	divEl.style.height = "100%";
	
	document.body.appendChild(divEl);
	
	window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight);
	document.body.removeChild(divEl);
}

function FncCntplus(opt){//opt=1 plus , opt=2 minus
	var frm = document.form1;
	if (opt=="1"){//plus
		frm.pEa.value=parseInt(frm.pEa.value)+1;
	}
	else if (opt=="2"){
		if(frm.pEa.value>1){
			frm.pEa.value=parseInt(frm.pEa.value)-1;
		}
		else{
			return;
		}
	}
}


function FncGoWish(){	//お気に入り
	var f = document.form1
	f.action="/goods/goodsWishOk.asp"
	f.submit();
}

function onlyNumber()  {//数字のみ許可
   if((event.keyCode<48)||(event.keyCode>57))
   event.returnValue=false;
}

function onlyNumber2()  {//数字のみ許可

	if(event.keyCode==13){
		FncPoint();
	}
}


// --------------- S ------------------------------------------------
function onlyNumberCross(e)  {

	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

	if(isIE){
		if((event.keyCode<48)||(event.keyCode>57)){
			event.returnValue=false;
		}else{
			
		}
		
	}else{
		if((e.which<48)||(e.which>57)){
			e.preventDefault();
		}else{
			
		}				
	}
}
// --------------- E ------------------------------------------------

function fncMsOver(num){
	var num;
	var f = document.getElementById("th");
	if (f.length==null){
		//document.all.item("th").style.background="#F7F7F7";
		document.getElementById("th").style.background="#F7F7F7";
	}
	else{
		//document.all.item("th")[num].style.background="#F7F7F7";
		document.getElementById("th")[num].style.background="#F7F7F7";
	}
}


function fncWinopen(url , names , features){

	var url , names , features
	window.open(url,names,features);
}


function fncTopSearchEnter(){
	if (event.keyCode==13){ fncTopSearch(); }
}

function fncTopSearch(){
	var f = document.sfrm
	var skey = document.all.item("key1");
	if (!skey.value){
		alert("検索キーワードをご入力ください。");
		skey.focus();
		return;
	}
	else{
		f.sw1.value=skey.value;
		f.LCode.value="";
		f.MCode.value="";
		f.SCode.value="";
		f.submit();
	}
}


function fncLeftSearchEnter(){
	if (event.keyCode==13){ fncLeftSearch(); }
}

function fncLeftSearch(){
	var f = document.sfrm
	var skey = document.all.item("key2");
	if (!skey.value){
		alert("検索キーワードをご入力ください。");
		skey.focus();
		return;
	}
	else{
		f.sw1.value=skey.value;
		f.submit();
	}
}







//====================================== Loading ======================================================================================================================================================================

function show_loading(loadingID) {		
	document.getElementById(loadingID).style.display="block";			
	document.getElementById(loadingID).style.top=document.body.scrollTop + (document.body.clientHeight / 2) - document.getElementById(loadingID).style.height/2 - document.getElementById(loadingID).offsetHeight/2; 
	document.getElementById(loadingID).style.left=document.body.scrollLeft + (document.body.clientWidth / 2) - document.getElementById(loadingID).style.width/2 - document.getElementById(loadingID).offsetWidth/2;
}
function hide_loading(loadingID) {
	document.getElementById(loadingID).style.display="none";
}

function show_loading_parent(loadingID) {		
	parent.document.getElementById(loadingID).style.display="block";
}
function hide_loading_parent(loadingID) {
	parent.document.getElementById(loadingID).style.display="none";
}


var obj = document.getElementById("loadingBar");

self.onError=null;
currentX = currentY = 0; 
whichIt = null; 
lastScrollX = 0; lastScrollY = 0;
NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;

<!-- STALKER CODE -->
function heartBeat() {
if(IE) { 
  diffY = document.body.scrollTop; 
  diffX = 0; 
}
if(NS) {
  diffY = self.pageYOffset; diffX = self.pageXOffset; 
}  
	
	
	if(diffY != lastScrollY) {
		percent = .1 * (diffY - lastScrollY);
		if(percent > 0) percent = Math.ceil(percent);
		else percent = Math.floor(percent);
		if(IE) {
			if(obj!=undefined){
				obj.style.pixelTop += percent;
			}
		}
		if(NS) obj.top += percent; 
		lastScrollY = lastScrollY + percent;
	}

	if(diffX != lastScrollX) {
		percent = .1 * (diffX - lastScrollX);
		if(percent > 0) percent = Math.ceil(percent);
		else percent = Math.floor(percent);
		if(IE) {
			if(obj!=undefined){
				obj.style.pixelLeft += percent;
			}
		}
		
		if(NS) obj.top += percent;
		lastScrollY = lastScrollY + percent;
	} 
} 
//if(NS || IE) action = window.setInterval("heartBeat()",1);

//====================================== Loading ======================================================================================================================================================================



// ----------------------------------------------------------------------------- show Flash with SetVariable------------------------------------------------------------------------------------
// From Naver.com 
// NHN Flash UI common - Flash Contents
// v0.9 lastUpdate : 2007. 4. 5
var fc_isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var fc_isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var fc_isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function checkFlashPlayerVersion(){
	var _version;
	var _e;
	try {
		var _axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.5");
		_version = _axo.GetVariable("$version");
	} catch (_e) {
		_version = -1;
	}
	return _version;
}

function showFlash(_swfURL_,_flashID_,_width_,_height_,_wmode_,_flashVars_,_bgColor_){

	_wmode_ = (_wmode_ == undefined)? "window" : _wmode_;
	_bgColor_ = (_bgColor_ == undefined)? "#ffffff" : _bgColor_;

	if(fc_isIE && fc_isWin && !fc_isOpera){
		_object_ ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+_width_+'" height="'+_height_+'" id="'+_flashID_+'" align="middle">';
		_object_ += '<param name="allowScriptAccess" value="always" />';
		_object_ += '<param name="quality" value="high" />'; 
		_object_ += '<param name="movie" value="'+_swfURL_+'" />';
		_object_ += '<param name="wmode" value="'+_wmode_+'" />'; 
		_object_ += '<param name="bgcolor" value="'+_bgColor_+'" />'; 
		_object_ += '<param name="FlashVars" value="'+_flashVars_+'">';
		_object_ += '</object>';
		
	}else{
		_object_ = '<embed src="'+_swfURL_+'" quality="high" wmode="'+_wmode_+'" FlashVars="'+_flashVars_+'" bgcolor="'+_bgColor_+'" width="'+_width_+'" height="'+_height_+'" name="'+_flashID_+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; 
	}

	document.write(_object_);
}
// ----------------------------------------------------------------------------- show Flash with SetVariable------------------------------------------------------------------------------------





function FncSearchZip(mode, gu, formName){

	var frm = document.forms['searchzip']; 
	var frm2 = document.forms[formName]; 

	if(mode == "mem"){
		
		frm.uZip1.value=frm2.uZip1.value;
		frm.uZip2.value=frm2.uZip2.value;
		frm.gubun.value=gu;

		frm.submit();

	}else if(mode == "orderB"){
		
		frm.uZip1.value=frm2.b_zip1.value;
		frm.uZip2.value=frm2.b_zip2.value;
		frm.gubun.value=gu;

		frm.submit();

	}else if(mode == "orderR"){	
	
		frm.uZip1.value=frm2.r_zip1.value;
		frm.uZip2.value=frm2.r_zip2.value;
		frm.gubun.value=gu;

		frm.submit();
	}
}

function FncSearchZip2(mode, gu, formName, num){

	var frm = document.forms['searchzip']; 
	var frm2 = document.forms[formName]; 

	if(mode == "orderB"){
		
		frm.uZip.value=eval("frm2.b_zipcode"+num+".value");
		frm.gubun.value=gu;
		frm.num.value=num;

		frm.submit();

	}else if(mode == "orderR"){	
	
		frm.uZip.value=eval("frm2.r_zipcode"+num+".value");
		frm.gubun.value=gu;
		frm.num.value=num;

		frm.submit();
	}
}


function changeEA(frm,obj){	
	//var frm = document.forms['frm001'];
	var frm = document.forms[frm];
	//var v = frm.eQuantity.value;
	var v = eval( "frm." + obj + ".value ");			
	
	if(v < 10){
		v = 10;
	}
	frm.eQuantity.value = (Math.round( (parseInt(v) / 10) ) * 10);
}




//----------- Tooltip S ------------------------------------
var tooltip=function(){	
	var id = 'tt';
	var top = 3;
	var left = 3;
	var maxw = 1800;
	var speed = 30;
	var timer = 20;
	var endalpha = 95;
	var alpha = 0;
	var tt,t,c,b,h;
	var ie = document.all ? true : false;
	return{
		show:function(v,w,t,l){
			
			top = t ? t : top
			left = l ? l : left
			if(tt == null){

				tt = document.createElement('div');
				tt.setAttribute('id',id);

				tl = document.createElement('div');
				tl.setAttribute('id','tl');
				tr = document.createElement('div');
				tr.setAttribute('id','tr');

				c = document.createElement('div');
				c.setAttribute('id','TooltipCon');				

				bl = document.createElement('div');
				bl.setAttribute('id','bl');
				br = document.createElement('div');
				br.setAttribute('id','br');

				tt.appendChild(tl);
				tt.appendChild(tr);
				tt.appendChild(c);
				tt.appendChild(bl);
				tt.appendChild(br);

				document.body.appendChild(tt);
				tt.style.opacity = 0;
				tt.style.position = "absolute";
				tt.style.filter = 'alpha(opacity=0)';
				document.onmousemove = this.pos;

			}
			tt.style.display = 'block';
			c.innerHTML = v;
			
			tt.style.width = w ? w + 'px' : 'auto';
			if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
			h = parseInt(tt.offsetHeight) + top;
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(1)},timer);
		},
		pos:function(e){
			var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
			var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;

			tt.style.top = (u - h) + 'px';
			tt.style.left = (l + left) + 'px';
/*
			var u = ie ? event.clientY + document.body.scrollTop : e.pageY;
			var l = ie ? event.clientX + document.body.scrollLeft : e.pageX;


			tt.style.top = u - h;
			tt.style.left = l + left;
*/
		},
		fade:function(d){
			var a = alpha;
			if((a != endalpha && d == 1) || (a != 0 && d == -1)){
				var i = speed;
				if(endalpha - a < speed && d == 1){
					i = endalpha - a;
				}else if(alpha < speed && d == -1){
					i = a;
				}
				alpha = a + (i * d);
				tt.style.opacity = alpha * .01;
				tt.style.filter = 'alpha(opacity=' + alpha + ')';
			}else{
				clearInterval(tt.timer);
				if(d == -1){tt.style.display = 'none'}
			}
		},
		hide:function(){
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(-1)},timer);
		}
	};
}();
//----------- Tooltip E ------------------------------------




//----------------
function _goBookMark() {
   window.external.AddFavorite('http://www.danboru.net', 'Danboru.net')
} 
//----------------




//------------------ Layer Pop S ------------------------------------------------------------------
function closeImgWin() { 
	var obj = document.getElementById("div_img_pop");
	obj.style.visibility = "hidden";
}
function fncDivPop(Lcode,Pcode,FileEXT){
	var obj = document.getElementById("div_img_pop");
	var innerSTR;
	innerSTR = "<table width=300 cellpadding=2 cellspacing=0 border=0>";
	innerSTR += "<tr>";
	innerSTR += "<td style='border:1px #666666 solid' align='center' bgcolor='#efefef'>";
	innerSTR += "<img src='/shopimg/"+Lcode+"/"+Pcode+"_1."+FileEXT+"' onclick='closeImgWin()'>";
	innerSTR += "</td>";
	innerSTR += "</tr>";
	innerSTR += "<tr>";
	innerSTR += "<td style='border:1px #666666 solid' align='center' bgcolor='#ffffcc'>";
	innerSTR += "<input type='button' value='CLOSE' onclick='closeImgWin() '>";
	innerSTR += "</td>";
	innerSTR += "</tr>";
	innerSTR += "</table>";
	obj.innerHTML = innerSTR ;
	obj.style.visibility = "visible";
}

function fncDivPop2(imgName){
	var obj = document.getElementById("div_img_pop");
	var innerSTR;
	innerSTR = "<table width=300 cellpadding=2 cellspacing=0 border=0>";
	innerSTR += "<tr>";
	innerSTR += "<td style='border:1px #666666 solid' align='center' bgcolor='#efefef'>";
	innerSTR += "<img src='"+imgName+"' onclick='closeImgWin()'>";
	innerSTR += "</td>";
	innerSTR += "</tr>";
	innerSTR += "<tr>";
	innerSTR += "<td style='border:1px #666666 solid' align='center' bgcolor='#ffffcc'>";
	innerSTR += "<input type='button' value='CLOSE' onclick='closeImgWin()'>";
	innerSTR += "</td>";
	innerSTR += "</tr>";
	innerSTR += "</table>";
	obj.innerHTML = innerSTR ;
	obj.style.visibility = "visible";
}

function fncDivPop3(e,TagName){
	var obj = document.getElementById(TagName);
	obj.style.visibility = "visible";
}
function closeImgWin2(e,TagName){
	var obj = document.getElementById(TagName);
	obj.style.visibility = "hidden";
}
//------------------ Layer Pop E ------------------------------------------------------------------



function ChangeProductImage(gu, fpath, forder, pCode, fext){

	var fname;
	var obj = document.getElementById("box1_image");

	if(gu=="B"){
		fname = pCode + "_" + forder + "_l." + fext;
		w=500;
		d=500;
	}else if(gu=="M"){
		fname = pCode + "_" + forder + "_m." + fext;
		w=320;
		d=320;
	}else if(gu=="S"){
		fname = pCode + "_" + forder & "_s." + fext;
		w=120;
		d=120;
	}else if(gu=="SS"){
		fname = pCode + "_" + forder & "_ss." + fext;
		w=70;
		d=70;
	}

	if( obj == "[object]" ||  obj == "[object HTMLDivElement]" ){
		obj.innerHTML = "<img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0' onclick=\"FloatShowProductImage('B', '"+fpath+"', '"+forder+"', '"+pCode+"', '"+fext+"')\" style='cursor:pointer' />";
	}else{
		return;
	}

}


function FloatShowProductImage(gu, fpath, forder, pCode, fext){

	var fname;
	var jj;
	var str;


	if(document.getElementById("FloatShow_Image") != "[object]" &&  document.getElementById("FloatShow_Image") != "[object HTMLDivElement]"){
		jj = document.createElement('div');
		jj.setAttribute('id','FloatShow_Image');
		document.body.appendChild(jj);
	
		jj.style.position = "absolute";
		jj.style.display = 'block';
		//jj.style.opacity = 0;
		//jj.style.filter = 'alpha(opacity=0)';

		/*
		jj.style.width = "500px";
		jj.style.height = "500px";

		jj.style.top = "100px";
		jj.style.left = "500px";
		*/

		jj.style.width = "500px";
		jj.style.height = "500px";

		jj.style.top = "200px";
		jj.style.left = "700px";

	}else{
		document.getElementById("FloatShow_Image").innerHTML = "";
		document.getElementById("FloatShow_Image").style.display = "block";
	}

	var obj = document.getElementById("FloatShow_Image");

	if(gu=="B"){
		fname = pCode + "_" + forder + "_l." + fext;
		w=500;
		d=500;
	}else if(gu=="M"){
		fname = pCode + "_" + forder + "_m." + fext;
		w=320;
		d=320;
	}else if(gu=="S"){
		fname = pCode + "_" + forder & "_s." + fext;
		w=120;
		d=120;
	}else if(gu=="SS"){
		fname = pCode + "_" + forder & "_ss." + fext;
		w=70;
		d=70;
	}

	if( obj == "[object]" ||  obj == "[object HTMLDivElement]" ){
		//alert("<img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0' onclick='' />");

		//str = "<div style='clear:both; text-align:center; font-weight:bold; font-size:14px; background-color:#87cdfe; cursor:pointer'  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\">Close</div>"
		//str = str + "<div style='clear:both'><img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0'  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\" /></div>"


		var imgStr = "<img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0'  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\" />"

		str = "<div id=\"hmbox3p\">"
		str = str + "	<div id=\"img\"><img src=\"/imgNew/box/enlarge_top.jpg\" border=\"0\" /></div>"
		str = str + "	<div id=\"line\">"
		str = str + "		<div id=\"imgbox\">"
		str = str + "			<div id=\"imgBig\">" +imgStr+ "</div>"
		str = str + "			<div id=\"vheight_2\"></div>"
		str = str + "			<div id=\"imgClose\"><img src=\"/imgNew/box/enlarge_close.jpg\" border=\"0\"  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\" style='cursor:pointer' /></div>"
		str = str + "		</div>"
		str = str + "	</div>"
		str = str + "	<div id=\"img\"><img src=\"/imgNew/box/enlarge_bot.jpg\" border=\"0\" /></div>"
		str = str + "</div>"

		
		obj.innerHTML = str;
	}else{
		return;
	}

}



function ChangeProductImage2(gu, fpath, forder, fname, fname2){

	var obj = document.getElementById("box1_image");

	if(gu=="B"){		
		w=500;
		d=500;
	}else if(gu=="M"){
		w=320;
		d=320;
	}else if(gu=="S"){
		w=120;
		d=120;
	}else if(gu=="SS"){
		w=70;
		d=70;
	}

	if( obj == "[object]" ||  obj == "[object HTMLDivElement]" ){
		obj.innerHTML = "<img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0' onclick=\"FloatShowProductImage2('B', '"+fpath+"', '"+forder+"', '"+fname2+"')\" style='cursor:pointer' />";
	}else{
		return;
	}

}

function FloatShowProductImage2(gu, fpath, forder, fname){

	var jj;
	var str;


	if(document.getElementById("FloatShow_Image") != "[object]" &&  document.getElementById("FloatShow_Image") != "[object HTMLDivElement]"){
		jj = document.createElement('div');
		jj.setAttribute('id','FloatShow_Image');
		document.body.appendChild(jj);
	
		jj.style.position = "absolute";
		jj.style.display = 'block';
		//jj.style.opacity = 0;
		//jj.style.filter = 'alpha(opacity=0)';

		/*
		jj.style.width = "500px";
		jj.style.height = "500px";

		jj.style.top = "100px";
		jj.style.left = "500px";
		*/

		jj.style.width = "500px";
		jj.style.height = "500px";

		jj.style.top = "200px";
		jj.style.left = "600px";

	}else{
		document.getElementById("FloatShow_Image").innerHTML = "";
		document.getElementById("FloatShow_Image").style.display = "block";
	}

	var obj = document.getElementById("FloatShow_Image");

	if(gu=="B"){
		w=500;
		d=500;
	}else if(gu=="M"){
		w=320;
		d=320;
	}else if(gu=="S"){
		w=120;
		d=120;
	}else if(gu=="SS"){
		w=70;
		d=70;
	}

	if( obj == "[object]" ||  obj == "[object HTMLDivElement]" ){
		//alert("<img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0' onclick='' />");

		//str = "<div style='clear:both; text-align:center; font-weight:bold; font-size:14px; background-color:#87cdfe; cursor:pointer'  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\">Close</div>"
		//str = str + "<div style='clear:both'><img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0'  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\" /></div>"


		var imgStr = "<img src='"+fpath+fname+"' width='"+w+"' height='"+d+"' border='0'  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\" />"

		str = "<div id=\"hmbox3p\">"
		str = str + "	<div id=\"img\"><img src=\"/imgNew/box/enlarge_top.jpg\" border=\"0\" /></div>"
		str = str + "	<div id=\"line\">"
		str = str + "		<div id=\"imgbox\">"
		str = str + "			<div id=\"imgBig\">" +imgStr+ "</div>"
		str = str + "			<div id=\"vheight_2\"></div>"
		str = str + "			<div id=\"imgClose\"><img src=\"/imgNew/box/enlarge_close.jpg\" border=\"0\"  onclick=\"document.getElementById('FloatShow_Image').style.display='none';\" style='cursor:pointer' /></div>"
		str = str + "		</div>"
		str = str + "	</div>"
		str = str + "	<div id=\"img\"><img src=\"/imgNew/box/enlarge_bot.jpg\" border=\"0\" /></div>"
		str = str + "</div>"

		
		obj.innerHTML = str;
	}else{
		return;
	}

}








