function DirectURL(src)
{
	location.href=src;
}

//NAMO Function
function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
	var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
	if (name == '')
		return;
	if (img) {
		img.altsrc = img.src;
		img.src    = rpath;
	}
}

function Check_Blank(frm_obj,msg)
{
	if (frm_obj.value == false)
	{
		alert(msg + " ÀÔ·ÂÇÏ¼¼¿ä.");
		frm_obj.focus();
		return false;
	}
	else
	{
		return true;
	}
}


// pop ¸Þ´º
 function pop(content2a,content2b,contentW) {
	var content, contentW2
	if(!contentW){contentW=300;}
	contentW2 = contentW-24;
    contentWW = contentW
	if (nav) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove = get_mouse;
    
	content =
		"<table border=0 cellpadding=0 cellspacing=0 width=" + contentW + ">" +
		"<col width=12></col><col width=" + contentW2 + "></col><col width=12></col>" +
		"<tr height=20><td><img src='http://218.232.109.85/4th_shop/bdTalk_lt.gif' width=12 height=20></td><td background='http://218.232.109.85/4th_shop/bdTalk_ct.gif' align=center><img src='http://218.232.109.85/4th_shop/bdTalk_tail.gif' width=15 height=20></td><td><img src='http://218.232.109.85/4th_shop/bdTalk_rt.gif' width=12 height=20></td></tr>" +
		"<tr><td background='http://218.232.109.85/4th_shop/bdTalk_lm.gif'></td><td bgcolor=white>"
		
	if(content2a != ""){content = content + "<font class=pshop_expTitleA>" + content2a + "</font><br><p class=p2>"}

	content = content + content2b + "</td><td background='http://218.232.109.85/4th_shop/bdTalk_rm.gif'></td></tr>"+
		"<tr height=12><td><img src='http://218.232.109.85/4th_shop/bdTalk_lb.gif' width=12 height=12></td><td background='http://218.232.109.85/4th_shop/bdTalk_cb.gif'</td><td><img src='http://218.232.109.85/4th_shop/bdTalk_rb.gif' width=12 height=12></td></tr>" +
		"</table>"

	if (nav)
	{
		skn.document.write(content);
		skn.document.close();
		skn.visibility = "visible";
	}
		else if (iex)
	{
		document.all("topdeck").innerHTML = content;
		skn.visibility = "visible";
	}
}

function get_mouse(e)
{
	var x = (nav) ? e.pageX : event.x+document.body.scrollLeft;
	var y = (nav) ? e.pageY : event.y+document.body.scrollTop;
	skn.left = x-(contentWW/2); // 

	skn.top  = y+15;
}

function kill()
{skn.visibility = "hidden";}

// pop ¸Þ´º

function linkparent(url)
{
	parent.document.location.href = url;
}


function DirectURL(url)
{
	location.href = url;
}

function pollChk()
{
	cFlag = false;

	for(i = 0; i < document.pollForm.PollAns.length; i++)
		if(document.pollForm.PollAns[i].checked)
			cFlag = true;

	if(!cFlag)
	{
		alert('´äº¯À» ¼±ÅÃÇÏ¼¼¿ä.');
		return false;
	}
	else
		return true;

}


	function openFileUpload(UserID, FileLoc, fMethod, isImage)
	{
		if (isImage)
		{
			launchCenter('/include/imageupload.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, "ImageUpload", 555, 480, false);
		}
		else
		{
			launchCenter('/include/fileupload.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, 'fileupload', 362, 185, false)
		}
	}
	function launchCenter(url, name, width, height, isScrollBar) 
	{
		
		var str = "height=" + height + ",innerHeight=" + height;
		str += ",width=" + width + ",innerWidth=" + width;
		str += ",scrollbars=" + ((isScrollBar) ? "yes" : "no");

		if (window.screen) 
		{
			var ah = screen.availHeight - 30;
			var aw = screen.availWidth - 10;

			var xc = (aw - width) / 2;
			var yc = (ah - height) / 2;

			str += ",left=" + xc + ",screenX=" + xc;
			str += ",top=" + yc + ",screenY=" + yc;
		}
		var win = window.open(url, name, str);
		win.focus();
		return win;
	}

	function fileDownload(filePath, fileName)
	{
		//window.open("/include/fileupload/filedownload.asp?filepath=" + escape(filePath) + "&filename=" + escape(fileName))
		location.href="/include/filedownload.asp?filepath=" + escape(filePath) + "&filename=" + escape(fileName)
	}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
