function flash(CateStr, widthSWF, heightSWF) {
 document.write('<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="'+widthSWF+'" height="'+heightSWF+'" id=ShockwaveFlash1>')
 document.write('<param name="movie" value="images/'+CateStr+'">')
 document.write('<param name="menu" value="false">')
 document.write('<param name="quality" value="best">')
 document.write('<param name="wmode" value="transparent">')
 document.writeln('<embed src="images/'+CateStr+'" width="'+widthSWF+'" height="'+heightSWF+'" menu=false quality=best pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>')
 document.writeln('</object>')
}

 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_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_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 autoBlur(){ 
  if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
  document.body.focus(); 
} 
  document.onfocusin=autoBlur; 

var old='';
function diy_view(a)
{
	submenu = eval("document.all.layerview"+a+".style");
	if(old!=submenu) {
		if(old!='') {
			old.visibility='hidden';
		}
		submenu.visibility='visible';
		old = submenu;
	}
}

function winOpen(url,name,size){
	window.open(url,name,size);
}


function pop_PointView() {
    LeftPosition = (screen.width) ? (screen.width-winwidth)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-winheight)/2 : 0;
	var winwidth = 520;
	var winheight = 280;
	var href='/point.html';
    look = 'height='+winheight+',width='+winwidth+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' 
	popwin=window.open(href,"pop_Point",look);
	popwin.focus();
}

function winOpen(url,name,size){
	window.open(url,name,size);
}

function popGift() {
	win_pop = window.open('pop_gift.php?choice='+document.form.option3.value,'gift','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=540,height=400,left=310,top=0');
	win_pop.focus();
}

function popGiftV(gift) {
	win_pop = window.open('pop_gift.php?choice='+gift,'gift','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=540,height=400,left=310,top=0');
	win_pop.focus();
}

function popOptionV(option) {
	win_pop = window.open('pop_option.php?choice='+option+'&check=no','option','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=540,height=400,left=310,top=0');
	win_pop.focus();
}

//ÀÌÁö½ºÈ¿¼º - ¾ÈÀü°Å·¡ °¡¸ÍÁ¡ È®ÀÎ Ã¢.
function funchyosung() {

	var command = 'hyosung';

	var form = makeForm(command);
	makeHidden(command, 'service_id',	'mikikorea');
	makeHidden(command, 'biz_no',		'5038111397');

	popwindow = window.open('','pop_window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=405,height=310');
	form.action = "http://www.allthegate.com/hyosung/paysafe/escrow_check.jsp";
	form.method = "POST";
	form.target = "pop_window";
	form.submit();
	popwindow.focus();
}


function makeHidden(command, key, val)
{
	if(key == null || key == '' || val == null) return null;
	var form = eval("document." + command);
	if(form == null) form = makeForm(command);

	var hid_obj = eval("form." + key);
	if(hid_obj != null) {
		hid_obj.value = val;
		return hid_obj;
	}

	hid_obj = document.createElement("<INPUT type='hidden' name='" + key + "' value='" + val + "'>");
	form.appendChild(hid_obj);
	return hid_obj;
}

function makeForm(command)
{
	var retVal = eval("document." + command);
	if(retVal != null) return retVal;
	var form = document.createElement("<FORM name='" + command + "'></FORM>");
	document.body.appendChild(form);
	return makeForm(command);
}