function flash(value, width, height){	//???
	document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
	document.writeln('<param name="movie" value="'+value+'">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('<param name="wmode" value="transparent">');
	document.writeln('<param name="menu" value="false">');
	document.writeln('<embed src="'+value+'" width="'+width+'" height="'+height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" menu="false"></embed>');
	document.writeln('</object>');
}


function movie(value, width, height){	//???
	document.writeln('<object id="WMP" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" standby="Loading Microsoft Windows Media Player..." width="'+width+'" height="'+height+'">');
	document.writeln('<param name="FileName" value="'+value+'">');
	document.writeln('<param name="AutoStart" value="true">');
	document.writeln('<param name="AutoSize" value="false">');
	document.writeln('<param name="transparentAtStart" value="True">');
	document.writeln('<param name="transparentAtStop" value="True">');
	document.writeln('<param name="ShowControls" value="false">');
	document.writeln('<param name="ShowStatusBar" value="false">');
	document.writeln('<param name="loop" value="-1">');
	document.writeln('<param name="Volume" value="-600">');
	document.writeln('<param name="PLUGINSPAGE" value="http://www.microsoft.com/korea/windows/windowsmedia/">');
	document.writeln('<embed src="'+value+'" width="'+width+'" height="'+height+'" autostart="False" loop="-1" filename="'+value+'" autosize="false" showcontrols="false" showstatusbar="false" volume="-600" pluginspage="http://www.microsoft.com/korea/windows/windowsmedia/"></embed>');
	document.writeln('</object>');
}
/////popup
function MM_openBrWindow(url,title,opt) { //v3.0
  var popup=window.open(url,title, "toolbar=no, location=no, directories=no, status=no, fullscreen=no, menubar=no, scrollbars=no, resizable=no, " + opt);
}

/////popup-scrillOK
function MM_openBrWindow2(url,title,opt) { //v3.0
  var popup=window.open(url,title, "toolbar=no, location=no, directories=no, status=no, fullscreen=no, menubar=no, scrollbars=yes, resizable=yes, " + opt);
}
/////
var curtvfontsize = 12;
function tvFontSizeMinus()
{
	var obj = document.all['tvcont'];
	if ( obj )
	{
		if ( curtvfontsize > 10 )
		{
			curtvfontsize--;
			obj.style.fontSize = curtvfontsize+"px";
		}
	}
}
function tvFontSizePlus()
{
	var obj = document.all['tvcont'];
	if ( obj )
	{
		if ( curtvfontsize < 15 )
		{
			curtvfontsize++;
			obj.style.fontSize = curtvfontsize+"px";
		}
	}
}
function AddRedP( userid, bid, seq, tname )
{
	if ( userid == 0 )
	{
		if ( confirm("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ¼­ºñ½ºÀÔ´Ï´Ù.\n·Î±×ÀÎÇÏ½Ã°Ú½À´Ï±î?") )
		{
			Login();
		}
		return;
	}

	var url = "http://noriter.ipop.co.kr/cgi-bin/tv/recom.cgi?bid="+bid+"&seq="+seq+"&tname="+tname;
	NORITEREXEC.location.replace(url);
}
function clickshow(num){
	oj = eval("document.all.block"+num);
	if(oj.style.display == "none"){
		oj.style.display = "inline";
	}else{
		oj.style.display = "none";
	}
}
function change_background(that){
	that.style.backgroundImage ="url(img/over_bg.gif)";
}
function change2_background(that){
	that.style.backgroundImage ="url(img/off_bg.gif)";
}
function show_district(id){
	var j = 0;
	setCookie('district_id', id);
	for(i = 0; i < j; i++){
		document.getElementById('district'+i).style.display = "none";
	}
	document.getElementById('district').innerHTML = document.getElementById(id).innerHTML;
	return;
}
function hotcode_open(hotcode){
	URL = "/ktf/popup0412.html?tmpgoodcd="+hotcode;
	window.open(URL,'hotcode','width=345,height=512,toolbar=no,directories=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,left=0,top=0');
}
function del_comment(uid){
	wine_uid = document.comment.wine_uid.value;
	document.location.href="comment_p.php?mode=delete&uid="+uid+"&wine_uid="+wine_uid;
}
function del_comment_seller(uid){
	seller_uid = document.comment.seller_uid.value;
	document.location.href="comment_seller_p.php?mode=delete&uid="+uid+"&seller_uid="+seller_uid;
}
function del_comment_review(uid){
	review_uid = document.comment.review_uid.value;
	document.location.href="comment_p.php?mode=delete&uid="+uid+"&review_uid="+review_uid;
}
function show_grape(GRAPE){
	document.getElementById(GRAPE).style.display='inline';
	setCookie("GRAPE_TYPE",GRAPE);
	for(i = 0;i < GRAPE_TYPE.length;i++){
		if(GRAPE_TYPE[i] != GRAPE){
			document.getElementById(GRAPE_TYPE[i]).style.display='none';
		}
	}
}
function show_grape2(GRAPE_TYPE){
	document.getElementById(GRAPE_TYPE).style.display='inline';
}
function show_winery_info(){
	if(document.getElementById('winery_info').style.display == 'inline'){
		document.getElementById('winery_info').style.display='none';
	}else{
		document.getElementById('winery_info').style.display='inline';
	}
}
function sell_location_result(oj){
        var res = decodeURIComponent(oj.responseText);
	var str = res.split('|');
	//sel_oj = document.pw_search.pw_location;
	sel_oj = document.getElementById('pw_location');
	sel_oj.length = str.length;
	sel_oj.options[0].text = "-Áö¿ªÀ» ¼±ÅÃ ÇÏ¼¼¿ä.-";
	sel_oj.options[0].value = "-";
	sel_oj.options[0].selected = true;
	if(str.length > 2){
		for(i = 0; i < str.length;i++){
			if(str[i].length){
				sel_oj.options[i+1].text = str[i];
			}
		}
	}else{
		sel_oj.options[1].text = "all";
	}
}
	
function sell_location(oj){
	for(i = 0 ; i < oj.length;i++){
		if(oj.options[i].selected == true){
			country = oj.options[i].value;
			break;
		}
	}
	DATA = "&country="+country;
	sendRequest(sell_location_result, DATA,'POST','/wine_search/get_location.php',true,true);
}
function sell_district_result(oj){
        var res = decodeURIComponent(oj.responseText);
	var str = res.split('|');
	//sel_oj = document.pw_search.pw_district;
	sel_oj = document.getElementById('pw_district');
	sel_oj.length = str.length;
	sel_oj.options[0].text = "-¸¶À»À» ¼±ÅÃ ÇÏ¼¼¿ä.-";
	sel_oj.options[0].value = "-";
	sel_oj.options[0].selected = true;
	if(str.length >= 2){
		for(i = 0; i < str.length;i++){
			if(str[i].length){
				sel_oj.options[i+1].text = str[i];
			}
		}
	}else{
		sel_oj.options[1].text = "all";
	}
}

function sell_district(oj){
	for(i = 0 ; i < oj.length;i++){
		if(oj.options[i].selected == true){
			location_t = oj.options[i].text;
			break;
		}
	}
	//for(i = 0 ; i < document.pw_search.pw_country.length;i++){
	for(i = 0 ; i < document.getElementById('pw_country').length;i++){
		if(document.getElementById('pw_country').options[i].selected == true){
		//if(document.pw_search.pw_country.options[i].selected == true){
			country = document.getElementById('pw_country').options[i].value;
			//country = document.pw_search.pw_country.options[i].value;
			break;
		}
	}
	location_t = location_t.replace("&","|");
	DATA = "&country="+country+"&location="+location_t;
	sendRequest(sell_district_result, DATA, 'POST','/wine_search/get_district.php',true,true);
}
function get_importer_result(oj){
        var res = decodeURIComponent(oj.responseText);
	document.getElementById('modify').innerHTML = res;
}
function get_importer(uid){
	DATA = "&uid="+uid;
	link_str= document.importer.link_str.value;
	page = document.importer.page.value;
	DATA = DATA+"&"+link_str+"&page="+page;
	sendRequest(get_importer_result, DATA,'POST','/admin/winery/get_importer.php',true,true);
}
function del_importer(uid, name){
	link_str= document.importer.link_str.value;
	page = document.importer.page.value;
	if(confirm(name+"À» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="importer_p.php?mode=del&uid="+uid+"&"+link_str+"&page="+page;
	}
	return;
}
function del_maker(uid, name){
	link_str= document.maker.link_str.value;
	page = document.maker.page.value;
	if(confirm(name+"À» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="winery_p.php?mode=del&uid="+uid+"&"+link_str+"&page="+page;
	}
	return;
}
function get_maker_result(oj){
        var res = decodeURIComponent(oj.responseText);
	document.getElementById('modify').innerHTML = res;
}
function get_maker(uid){
	DATA = "&uid="+uid;
	link_str= document.maker.link_str.value;
	page = document.maker.page.value;
	DATA = DATA+"&"+link_str+"&page="+page;
	sendRequest(get_maker_result, DATA,'POST','/admin/winery/get_maker.php',true,true);
}
function get_grape_result(oj){
        var res = decodeURIComponent(oj.responseText);
	document.getElementById('modify').innerHTML = res;
}
function get_grape(uid){
	DATA = "&uid="+uid;
	link_str= document.grape.link_str.value;
	page = document.grape.page.value;
	DATA = DATA+"&"+link_str+"&page="+page;
	sendRequest(get_grape_result, DATA,'POST','/admin/winery/get_grape.php',true,true);
}
function del_grape(uid, name){
	link_str= document.grape.link_str.value;
	page = document.grape.page.value;
	if(confirm(name+"À» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="grape_p.php?mode=del&uid="+uid+"&"+link_str+"&page="+page;
	}
	return;
}
function del_review(uid, open){
	if(confirm("»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="review_p.html?mode=del&uid="+uid+"&open="+open;
	}
	return;
}
function del_seller(uid){
	if(confirm("»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="shop_intro_p.html?mode=del&uid="+uid;
	}
	return;
}
function del_error(uid){
	if(confirm("»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")){
		document.location.href="error_p.html?mode=del&uid="+uid;
	}
	return;
}
function open_winery(uid){
	var popup=window.open("winery_write_popup.html?uid="+uid,'', "width=765,height=712,toolbar=no, location=no, directories=no, status=no, fullscreen=no, menubar=no, scrollbars=yes, resizable=no");
}	
function show_grape_info(uid){
	if(document.getElementById(uid).style.display == "inline"){
		document.getElementById(uid).style.display = "none";
	}else{
		document.getElementById(uid).style.display = "inline";
	}
}
function open_wine_image(uid){
	var popup=window.open("show_image.html?uid="+uid,'', "width=300,,height=300,toolbar=no, location=no, directories=no, status=no, fullscreen=no, menubar=no, scrollbars=yes, resizable=no");
}
