function open_adrwin(){
	window.open("search_adr/step01.php","","width=550,height=550,left=400,top=200,toolbar=no,scrollbars=yes,resizable=yes");
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function A_Li(){
Sel=document.Link1.OP.selectedIndex;
Ms=document.Link1.OP.options[Sel].value;
location.href=Ms;
}

/*¥¦¥£¥ó¥É¥¦¤òÊÄ¤¸¤ë¡¡*/
function Winclose(){
window.close();
}

 /* »ØÄê¥µ¥¤¥º¤Ç¥¦¥¤¥ó¥É¥¦¤ò³«¤¯ */ 
function openwin(url,name,size) {
 w = window.open(url, name , size+'status=no,scrollbars=yes, directories=no,menubar=no,resizable=yes,toolbar=no');
}

function open_subWin(url) {
 w = window.open(url,'sub_win','width=500,height=400,left=400,top=200,status=no,scrollbars=yes, directories=no,menubar=no,resizable=yes,toolbar=no');
}

function del_nego(geturl){
res=confirm("¤³¤Î¾¦ÃÌ¤òºï½ü¤·¤Þ¤¹¡£\n"+
	"¤³¤Î½èÍý¤ò¼Â¹Ô¤·¤Æ¤è¤í¤·¤¤¤Ç¤¹¤«¡©");
	if(res==true) {
		location.href=geturl;
	}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/* »ØÄê¥µ¥¤¥º¤Ç¥¦¥¤¥ó¥É¥¦¤ò³«¤¯ */ 
function openwin_itemShosai(url) {
 w = window.open(url, 'win','width=550,height=280,status=no,scrollbars=yes, directories=no,menubar=no,resizable=yes,toolbar=no');
}

/*¾ÃÈñÀÇ¤Î·×»»¤È¡¢ÀÇ³Û¤ÎÉ½¼¨ */
function zeikomi(){
	var shohizei;
	var zeikomi;
	var roundNum;
	price = document.set_item.brd_price_noTax;
	tax = document.set_item.brd_price;
	shohizei=price.value*1.05;
	//zeikomi=parseFloat(price.value)+parseFloat(shohizei);
	roundNum=Math.floor(shohizei);
	tax.value=String(roundNum);
}
function zeinuki(){
	var zeinuki;
	var round_num;
	no_tax = document.set_item.brd_price;
	tax_price = document.set_item.brd_price_noTax;
	zeinuki=no_tax.value/1.05;
	round_num=Math.floor(zeinuki);
	tax_price.value=String(round_num);
}

<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function del_data(geturl){
res=confirm("ÁªÂò¤·¤¿¾¦ÃÌ¾ðÊó¤òºï½ü¤·¤Þ¤¹¡£\n"+
	"¤³¤Î½èÍý¤ò¼Â¹Ô¤·¤Æ¤è¤í¤·¤¤¤Ç¤¹¤«¡©");
	if(res==true) {
		location.href=geturl;
	}
}
function sel_category(){
    selurl=document.select_ct.category.options[document.select_ct.category.selectedIndex].value;
    if (selurl != "" )location.href=selurl;
}

function sel_order(){
    selurl=document.select_ok.order_key.options[document.select_ok.order_key.selectedIndex].value;
    if (selurl != "" )location.href=selurl;
}
function selLink(){
    selurl=document.sel_ct.category.options[document.sel_ct.category.selectedIndex].value;
    if (selurl != "" )location.href=selurl;
}
function orderLink(){
    selurl=document.sel_order.order.options[document.sel_order.order.selectedIndex].value;
    if (selurl != "" )location.href=selurl;
}
function open_adrwin(){
	window.open("search_adr/step01.php","","width=550,height=550,left=400,top=200,toolbar=no,scrollbars=yes,resizable=yes");
}

function addPayInfo() {
	edit_item.fconf_payInfo.value = '¸½¶â¤Î¼õÅÏ¤Î¤ßÂÐ±þ¤·¤Þ¤¹¡£¤½¤ÎÂ¾¤Î»ÙÊ§ÊýË¡¤Ï¤¢¤ê¤Þ¤»¤ó¡£';
}
function addDeriInfo() {
	edit_item.fconf_deriInfo.value = 'Ä¾ÀÜ¼õÅÏ¤Î¤ßÂÐ±þ¤·¤Þ¤¹¡£¾¦ÉÊ¤ÎÈ¯Á÷¤Ï¤Ç¤­¤Þ¤»¤ó¡£';
}
function addoffInfo(kubun) {

	if (kubun == "yes") {
		info_message = '¼õÉÕ¤±¤Þ¤¹¡£';
	}else if (kubun == "bad") {
		info_message = 'ÉÔÎÉÉÊ¤Î¤ß¼õÉÕ¤±¤Þ¤¹¡£';
	}else if (kubun == "no") {
		info_message = '¥Î¡¼¥¯¥ì¡¼¥à¡¦¥Î¡¼¥ê¥¿¡¼¥ó¤Ç¤ª´ê¤¤¤·¤Þ¤¹¡£';
	}
	edit_item.fconf_coolOffInfo.value = info_message;
}

function PicFullOpen(picPath,normal_w,normal_h) {

	//if(picPath != "nophoto.jpg") {
		var img_w2 = eval(normal_w) + eval(5);
		var img_h2 = eval(normal_h) + eval(5);
		
		picWin = window.open("","_blank","width="+img_w2+",height="+img_h2+",left=300,top=200,status=no,scrollbars=no,directories=no,menubar=no,resizable=yes,toolbar=no");
		picWin.document.open();
		picWin.document.write("<html><head><title>¾¦ÉÊ²èÁü</title><link href=\"../css/style.css\" rel=\"stylesheet\" type=\"text/css\"></head><body><span align=center>");
		picWin.document.write("<table align=center border=0><tr><td><a href=\"#\" onClick=\"javascript:window.close();\"><img src=\"../pics/normal/"+picPath+"\" border=0></a></td></tr></table></body>");
		picWin.document.write("</span></body><html>");
		picWin.document.close();
	//}
}

function picFullOpen(picPath,picName,normal_w,normal_h) {

	//if(picPath != "nophoto.jpg") {
		var img_w2 = eval(normal_w) + eval(5);
		var img_h2 = eval(normal_h) + eval(5);
		
		picWin = window.open("","_blank","width="+img_w2+",height="+img_h2+",left=300,top=200,status=no,scrollbars=no,directories=no,menubar=no,resizable=yes,toolbar=no");
		picWin.document.open();
		picWin.document.write("<html><head><title>¾¦ÉÊ²èÁü</title><link href=\"../css/style.css\" rel=\"stylesheet\" type=\"text/css\"></head><body><span align=center>");
		picWin.document.write("<table align=center border=0><tr><td><a href=\"#\" onClick=\"javascript:window.close();\"><img src=\""+picPath+"/"+picName+"\" border=0></a></td></tr></table></body>");
		picWin.document.write("</span></body><html>");
		picWin.document.close();
	//}
}

function infoPicFullOpen(picPath,normal_w,normal_h) {

	//if(picPath != "nophoto.jpg") {
		var img_w2 = eval(normal_w) + eval(5);
		var img_h2 = eval(normal_h) + eval(5);
		
		picWin = window.open("","_blank","width="+img_w2+",height="+img_h2+",left=300,top=200,status=no,scrollbars=no,directories=no,menubar=no,resizable=yes,toolbar=no");
		picWin.document.open();
		picWin.document.write("<html><head><title>¾¦ÉÊ²èÁü</title><link href=\"../css/style.css\" rel=\"stylesheet\" type=\"text/css\"></head><body><span align=center>");
		picWin.document.write("<table align=center border=0><tr><td><a href=\"#\" onClick=\"javascript:window.close();\"><img src=\"../pics/shop_image/normal/"+picPath+"\" border=0></a></td></tr></table></body>");
		picWin.document.write("</span></body><html>");
		picWin.document.close();
	//}
}

function copyView() {
	frmCopyArray=new Array();
	frmMaker2=set_item.frmT_maker.value;
	frmWidth2=set_item.frmT_width.value;
	frmDepth2=set_item.frmT_depth.value;
	frmHeight2=set_item.frmT_height.value;
	if (frmMaker2 != "") {
		frmCopyArray.push(frmMaker2);
	}else{
		frmMaker = "";
	}
	if (frmWidth2 != "") {
		frmWidth = 'Éý'+frmWidth2+'cm';
		frmCopyArray.push(frmWidth);
	}else{
		frmWidth = "";
	}
	if (frmDepth2 != "") {
		frmDepth = '±ü¹Ô'+frmDepth2+'cm';
		frmCopyArray.push(frmDepth);
	}else{
		frmDepth = "";
	}
	if (frmHeight2 != "") {
		frmHeight =  '¹â¤µ'+frmHeight2+'cm';
		frmCopyArray.push(frmHeight);
	}else{
		frmHeight = "";
	}
	frmCopy2 = frmCopyArray.join("¡¦");
	frmCopy = frmCopy2+" ";
	set_item.frmT_copy.value = frmCopy;
	
}
function pic_del(ic,no){

    if(confirm("²èÁü¤òºï½ü¤·¤Þ¤¹¡£¤è¤í¤·¤¤¤Ç¤¹¤«¡©")){
		location.href='edit_itemPics.php?ic='+ic+'&mode=pic_del&no='+no;
    }else{
        return false;
    }

}
function pic_delMain(ic,no){

    if(confirm("¥á¥¤¥ó²èÁü¤òºï½ü¤¹¤ë¤È¡¢Í½È÷²èÁü¤â¤¹¤Ù¤Æºï½ü¤µ¤ì¤Þ¤¹¡£ºï½ü¤ò¼Â¹Ô¤·¤Æ¤è¤í¤·¤¤¤Ç¤¹¤«¡©")){
		location.href='edit_itemPics.php?ic='+ic+'&mode=pic_del_all&no='+no;
    }else{
        return false;
    }

}

function del_check(frm_code) {
    if(confirm("¾¦ÉÊ¥Ç¡¼¥¿µÚ¤Ó´ØÏ¢¾ðÊó¤òºï½ü¤·¤Þ¤¹¡£¤è¤í¤·¤¤¤Ç¤¹¤«¡©")){
		location.href='sell_finish.php?mode=del&ic='+frm_code;
    }else{
        return false;
    }
}
function open_adrwin(){
	window.open("search_adr/step01.php","","width=550,height=550,left=400,top=200,toolbar=no,scrollbars=yes,resizable=yes");
}
function restart(ic){

    if(confirm("¸½ºß¤Î¥Ç¡¼¥¿¤òÇË´þ¤·¤ÆºÇ½é¤«¤é¤ä¤êÄ¾¤·¤Þ¤¹¡£¤è¤í¤·¤¤¤Ç¤¹¤«¡©")){
		location.href='confirm_itemData.php?ic='+ic;
    }else{
        return false;
    }

}
function alert_del_mainPic() {
	if (document.set_item.del_mainPic.checked==true) {
		alert("¥á¥¤¥ó²èÁü¤òºï½ü¤¹¤ë¤È¡¢Í½È÷²èÁü¡õÀâÌÀÅù¤¹¤Ù¤Æºï½ü¤µ¤ì¤Þ¤¹¡£");
	}
}

function gaiji_check(){
	
	gaiji = "­µ­¶­·­¸¦Õ­ê­ë­ä­À­Á­Â­Ã­Ä­Í­Ð­Ñ­Ò­Ó­Ô­Õ­Ö­ß";
    if(document.myform.Name.value==""){
        alert("µ­¹æ¤ä³¨Ê¸»ú¤Ê¤É»ÈÍÑ¤Ç¤­¤Ê¤¤Ê¸»ú¤¬ÆþÎÏ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£\n¡Ö­µ­¶­·­¸¦Õ­ê­ë­ä­À­Á­Â­Ã­Ä­Í­Ð­Ñ­Ò­Ó­Ô­Õ­Ö­ß¡×¤³¤ì¤é¤ÎÊ¸»ú¤Ï¤½¤Î°ìÉô¤Ç¤¹¡£");
        return false;
    }
}
function update(){
    if(confirm("¥Ç¡¼¥¿¤ò¹¹¿·¤·¤Þ¤¹¡£¤è¤í¤·¤¤¤Ç¤¹¤«¡©")){
        return true;
    }else{
        return false;
    }
}

//ajax
function dataSave(filename,code,param){
	var url = filename+"?mode=set_recom&ic="+code+"&nr="+param;
	new Ajax.Request(url, { method: "get", onComplete: displayData });
}

function displayData(httpObj) {
	$("result").innerHTML = httpObj.responseText;
}