var APP_PATH ="contents";
function OpenWin(RECORD_ID,W,H) {
	if(RECORD_ID!="") {
		window.open("/"+APP_PATH+"/popupview.html?recordid="+RECORD_ID,"Win","toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+W+",height="+H+"");
	}
		
}

function OpenItem(SHOP_ID,ITEM_NO,W,H) {
		
	if(SHOP_ID!="" && ITEM_NO!="") {
		window.open("/"+APP_PATH+"/shopping/popupitem.html?shopid="+SHOP_ID+"&itemno="+ITEM_NO,"Win","toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+W+",height="+H+"");
	}
		
}

function ContactUs(W,H) {
		
	window.open("/"+APP_PATH+"/shopping/contactus.html?actionId=request","Win","toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+W+",height="+H+"");
		
}

function SetSearchForm(VALUE) {

	if(document.forms[0]!=null && document.forms[0].keyword!=null) {
		document.forms[0].keyword.value=VALUE;
	}
	if(document.forms[1]!=null && document.forms[1].keyword!=null) {
		document.forms[1].keyword.value=VALUE;
	}
	
}

function runSubmitByName(name) {

	if(document.forms[0]!=null && document.forms[0].name!=null) {
		document.forms[0].method="POST";
		document.forms[0].name.value=name;
		document.forms[0].submit();
	}
	
}

function OpenImage(W, H, T, F) {
	var WIN;
	WIN=window.open("","Win","toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+W+",height="+H+"");		
	WIN.document.write("<html><head><title>"+T+"</title>");
	WIN.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=Shift_JIS\">");	
	WIN.document.write("</head>");	
	WIN.document.write("</body>");	
	//WIN.document.write("<a href=javascript:window.close()>Close</a><br>");
	WIN.document.write("<input type=button value=close onclick=javascript:window.close()></br>");
	WIN.document.write("<img src="+F+" border=0>");	
	WIN.document.write("</body>");	
	WIN.document.write("</html>");	
	WIN.document.close();

}

function RedirectView(PAGE,SID,INO) {
	PAGEURL='/'+APP_PATH+'/'+PAGE+'?shopid='+SID+'&itemno='+INO;
	location.href=PAGEURL;
}

function SwapImage(IMG,ID) {
	//alert(IMG+','+ID);
	document.mainImage.src=IMG;
	if (document.getElementById('mainComent1')!=null) {
		document.getElementById('mainComent1').style.display='none';
	}
	if (document.getElementById('mainComent2')!=null) {
		document.getElementById('mainComent2').style.display='none';
	}
	if (document.getElementById('mainComent3')!=null) {
		document.getElementById('mainComent3').style.display='none';
	}
	if (document.getElementById('mainComent4')!=null) {
		document.getElementById('mainComent4').style.display='none';
	}
	if (document.getElementById('mainComent5')!=null) {
		document.getElementById('mainComent5').style.display='none';
	}
	
	document.getElementById(ID).style.display='';
}

function OpenFlashFile(W, H, T, F, FW, FH) {
	var WIN;
	WIN=window.open("","Win","toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,width="+W+",height="+H+"");		
	WIN.document.write("<html><head><title>"+T+"</title>");
	WIN.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=Shift_JIS\">");	
	WIN.document.write("</head>");	
	WIN.document.write("</body>");	
	WIN.document.write("<input type=button value=close onclick=javascript:window.close()></br>");
	WIN.document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width="+FW+" height="+FH+">");
    WIN.document.write("<param name=movie value=\"/contents_images/style/datecourse/midtown.lzx.lzr=swf8.swf\">");
    WIN.document.write("<param name=quality value=high>");
    WIN.document.write("<embed src="+F+" quality=high pluginspage=\"http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+FW+" height="+FH+">");
    WIN.document.write("</embed>");
	WIN.document.write("</object>");
	WIN.document.write("</body>");	
	WIN.document.write("</html>");	
	WIN.document.close();

}



