<!--
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_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; }
}

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 MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function trans(id,after) { 
	eval(id+'.filters.blendTrans.stop();'); 
	eval(id+'.filters.blendTrans.Apply();'); 
	eval(id+'.src="'+after+'";'); 
	eval(id+'.filters.blendTrans.Play();'); 
}

// Windows XP SP2
function check_ie(){
	if (window.navigator.userAgent.indexOf("SV1") != -1) ieVer = true;
}

function openWin(mypage, myname, w, h, scroll, center) {
	if(center == 1){
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2 - 40;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,status=no,resizable=no';
	}else{
		winprops = 'height='+h+',width='+w+',top=0,left=0,scrollbars='+scroll+',toolbar=no,status=no,resizable=no';
	}
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function email(str){
	document.noPage.location.href='/src/inc/email.php?eml='+str;
}

function down(file){
	document.noPage.location.href='/upfiles/down.php?file='+file;
}

function setCookie(name, value, expiredays){
	var today = new Date();
	today.setDate( today.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";";
}

function getCookie( name ){
	var nameOfCookie = name + '=';
	var x = 0;
	while ( x <= document.cookie.length )
	{
			var y = (x+nameOfCookie.length);
			if ( document.cookie.substring( x, y ) == nameOfCookie ) {
					if ( (endOfCookie=document.cookie.indexOf( ';', y )) == -1 )
							endOfCookie = document.cookie.length;
					return unescape( document.cookie.substring( y, endOfCookie ) );
			}
			x = document.cookie.indexOf( ' ', x ) + 1;
			if ( x == 0 )
					break;
	}
	return '';
}

function closeWin(){
	if (document.form1.popup.checked){
		setCookie("popup", "done", 1);
	}
	divpop.style.visibility = "hidden";
}

function toggle(obj){
	if(obj.style.display!='none') {
		obj.style.display = 'none';
	}else{
		obj.style.display = '';
	}
}

/* Äü¸Þ´º¿ë */
var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
function CheckUIElements(){
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;
	var topSize = 120; // top 
	var divSize = 350; // div 
	if ( bNetscape4plus ) { 
		yMenuFrom   = document["quickBar"].top;
		yMenuTo     = top.pageYOffset + topSize;
	}else if ( bExplorer4plus ) {
		yMenuFrom   = parseInt (quickBar.style.top, 10);
		yMenuTo     = document.body.scrollTop + topSize;
	}
	timeoutNextCheck = 500;
	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
		if ( yMenuTo < yMenuFrom )
				yOffset = -yOffset;
		if ( bNetscape4plus ) {
			document["quickBar"].top += yOffset;
		}else if ( bExplorer4plus ) {
			if(yMenuTo < document.body.scrollHeight-divSize) {
				quickBar.style.top = parseInt (quickBar.style.top, 10) + yOffset;
			}
		}
		timeoutNextCheck = 10;
	}
	setTimeout ("CheckUIElements()", timeoutNextCheck);
}
function OnLoad() {
	var y;
	if ( top.frames.length )
	if ( bNetscape4plus ) {
			document["quickBar"].top = top.pageYOffset + 120;
			document["quickBar"].visibility = "visible";
	}else if ( bExplorer4plus ) {
			quickBar.style.top = document.body.scrollTop + 120;
			quickBar.style.visibility = "visible";
	}
	CheckUIElements();
	return true;
}

/* »óÅÂ¹Ù¿¡¼­ ¸µÅ© Á¤º¸ ¼û±â±â */
function hidestatus(){
	window.status=''
	return true
}
/*
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus
*/

/* ÀÚ¹Ù½ºÅ©¸³Æ® ¿À·ùÃâ·Â¹æÁö */
var e_msg=""; 
var e_file=""; 
var e_line=""; 
function ErrorSetting(msg, file_loc, line_no) { 
	e_msg=msg; 
	e_file=file_loc; 
	e_line=line_no; 
	return true; 
} 
//window.onerror = ErrorSetting; /* ÀÚ¹Ù½ºÅ©¸³Æ® ¿À·ùÃâ·Â¹æÁö */

/* ÀÚ¹Ù½ºÅ©¸³Æ® ¿À·ùÅ×½ºÆ® */
function ErrorTest(msg,url,line) {
	var str = "Error: " + msg + " on line: " 
	+ line + "\nURL: " + url  + "\nWeb: " 
	+ navigator.appName + " " + navigator.appName 
	+ " " + navigator.appVersion;
	alert(str);
	return true;
}
//window.onerror = ErrorTest; /* ÀÚ¹Ù½ºÅ©¸³Æ® ¿À·ùÅ×½ºÆ® */

//-->

/* È®´ë ÀÌ¹ÌÁö ÆË¾÷ */
function popView(data) {
	window.open("/inc/pop_view.php?imgdata="+data,'popview','top=10,left=10');
}
