<!--
function hidestatus() { window.status = ""; return true; }
if (document.layers) document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
document.onmouseover = hidestatus;
document.onmouseout = hidestatus;

function initHtml() {
	if (document.getElementById("strContents")) {
		resizeImages(document.getElementById("strContents"),525);
	}
}

function moveMouse(obj,xPos,yPos) {
	var obj = document.all[obj];
	obj.style.posLeft = event.x + xPos + document.body.scrollLeft;
	obj.style.posTop = event.y + yPos + document.body.scrollTop;
}

function showObj(obj) {
	obj = document.all[obj];
	if (obj.style.display == "") {
		obj.style.display = "none";
	} else { obj.style.display = ""; }
}

function checkNull(str) {
	return (str == null || str.replace(/ /gi,"") == "");
}

function isNumber(str) {
	var chars = "0123456789";
	for (var i=0;i<str.length;i++) {
		if (chars.indexOf(str.charAt(i)) == -1) return false;
	}
	return true;
}

function checkLen(str,maxLen) {
	var i, len = 0;
	if (checkNull(str)) {
		return false;
	} else {
		for (i=0;i < str.length; i++) { (str.charCodeAt(i) > 255) ? len += 2: len++; }
		return maxLen >= len;
	}
}

function checkEmail(str) {
	return str.search(/^\s*[\w\~\-\.]+\@[\w\~\-]+(\.[\w\~\-]+)+\s*$/g) >= 0;
}

function checkValidChar(str) {
	var chars = "'&@%*_[]";
	for (i=0;i < str.length; i++) {
		for (j=0;j < chars.length; j++)
			if (str.charAt(i) == chars.charAt(j)) return false;
	}
	return true;
}

function checkFile(str,ext) {
	return (ext.toLowerCase() == str.substring(str.lastIndexOf(".")+1).toLowerCase());
}

function checkFileEXE(str) {
	var exts = "exe,com,bat,dll,cpl,asp,aspx,vbs,jsp,php,htm,html"; //Â÷´ÜÇÒ È®ÀåÀÚ Ãß°¡.. 
	return (exts.indexOf(str.substring(str.lastIndexOf(".")+1).toLowerCase()) != -1);
}

function checkFileIMG(str) {
	var exts = "gif,jpg,jpeg,png,bmp,tif,tiff,pcx"; //Â÷´ÜÇÒ È®ÀåÀÚ Ãß°¡.. 
	return (exts.indexOf(str.substring(str.lastIndexOf(".")+1).toLowerCase()) != -1);
}

function checkIDPwd(str,minSize,maxSize) {
	var i, chr;
	if (str.length < minSize || str.length > maxSize) return false;
	for (i = 0; i < str.length; i++) {
		chr = str.charAt(i);
		if (!(('0'<=chr && chr<='9') || ('a'<=chr && chr<='z') || ('A'<=chr && chr<='Z'))) return false;
	}
	return true;
}

function openImage(evt) {
	if (typeof evt == "undefined" || typeof evt.target == "undefined") {
		(evt = event).target = event.srcElement;
	}
	var imgSrc = evt.target.src;
	var imgWidth = imgSrc.width;
	var imgHeight = imgSrc.height;
	imgSizeOpen(imgSrc,imgWidth,imgHeight);
}
function resizeImages(obj,intSize) {
	var objIMGs = obj.getElementsByTagName("IMG");
	for (i=0;i<objIMGs.length;i++) {
		if (objIMGs[i].width > intSize) {
			objIMGs[i].width = intSize;
			try {
				objIMGs[i].style.cursor = "pointer";
				objIMGs[i].attachEvent("onclick", openImage);
			} catch(e) {
				objIMGs[i].addEventListener("click", openImage, false);
			}
		}
	}
}
function imgSizeOpen(imgSrc,imgWidth,imgHeight) {
	if (!imgSrc) return;
	if (!imgWidth || !imgHeight) {
		if (imgSrc.match(/\.swf$/i)) {
			imgWidth = 400;
			imgHeight = 250;
			var tmpStr = ',resizable=no';
		} else {
			tmpIMG = new Image();
			tmpIMG.src = imgSrc;
			if ((tmpIMG.width != 0)&&(tmpIMG.height != 0)) {
				imgWidth = tmpIMG.width;
				imgHeight = tmpIMG.height;
			} else {
				recountID = setTimeout("imgSizeOpen('"+ imgSrc +"','','')",50);
				return;
			}
		}
	}
	var maxWidth = screen.width - 30;
	var maxHeight = screen.height - 50;
	if (maxWidth < imgWidth || maxHeight < imgHeight) {
		imgWidth = maxWidth;
		imgHeight = maxHeight;
		var tmpStr = ',scrollbars=no,resizable=no,status=no,menubar=no,toolbar=no';
	}
	var left = (screen.width) ? (screen.width-imgWidth)/2 : 100;
	var top = (screen.height) ? (screen.height-imgHeight)/2 : 100;
	popupWin = window.open('','','top='+ top +',left='+ left +',width='+ imgWidth +',height='+ imgHeight + tmpStr);
	if (popupWin) {
		var winSrc =
			'<html><head><title>Image Viewer</title><meta http-equiv="imagetoolbar" content="no">'
			+'<script>dragstart=0; is_left=0; is_top=0; x=0; y=0;'
			+'function move(ev){if(dragstart==1){is_left=temp1+event.clientX-x;is_top=temp2+event.clientY-y;onloadimg.style.left=is_left;onloadimg.style.top=is_top;return false;}}'
			+'function drags(this_img){onloadimg=this_img;if(opener.this_browser=="n")window.close();dragstart=1;temp1=parseInt(onloadimg.style.left+0);temp2=parseInt(onloadimg.style.top+0);x=event.clientX;y=event.clientY;document.onmousemove=move;}'
			+'function dragstop(){dragstart=0;if(is_left==temp1 && is_top==temp2) window.close();}'
			+'</script></head>'
			+'<body style="border:0;padding:0;" topmargin=0 rightmargin=0 leftmargin=0>'
			+'<table width=100% height=100% border=0 cellpadding=0 cellspacing=0><tr><td align=center>';
		if (imgSrc.match(/\.swf$/i)) {
			winSrc += '<embed src="'+ imgSrc +'" width=98% height=98%>';
		} else {
			winSrc += '<img src="'+ imgSrc +'" title="Å¬¸¯ÇÏ¸é ´ÝÈü´Ï´Ù." style="cursor:pointer;position:relative;" border=0 onmousedown="drags(this);" onmouseup="dragstop();">';
		}
		winSrc += '</td></tr></table></body></html>';
		popupWin.document.write(winSrc);
		popupWin.document.close();
	}
}

function goUrl(url) {
	if (url != "") location.href = url;
	else location.href = "/";
}

function newWin(s,n,w,h,t,l) {
	if (s != "") {
		window.open(s,n,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+ w +",height="+ h +",top="+ t +",left="+ l);
	} else { return; }
}

function makeFlashString(id, filename, width, height, wmode, isloop, param) {
	var tempFlash =
		'<object id="'+ id +'" name="'+ id +'" width="'+ width +'" height="'+ height +'" '
		+'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
		+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0">'
		+'<param name="movie" value="'+ filename +'" />'
		+'<param name="wmode" value="'+ wmode +'" />'
		+'<param name="loop" value="'+ isloop +'" />'
		+'<param name="quality" value="high" />'+ param
		+'<embed src="'+ filename +'" width="'+ width +'" height="'+ height +'" wmode="'+ wmode +'" loop="'+ isloop +'" '
		+'quality="high" type="application/x-shockwave-flash" '
		+'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash">'
		+'</embed></object>';
	return tempFlash;
}
function makeMovieString(id, filename, width, height, autoplay, param) {
	var tempMovie =
		'<object id="'+ id +'" name="'+ id +'" width="'+ width +'" height="'+ height +'" '
		+'classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" '
		+'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701">'
		+'<param name="FileName" value="'+ filename +'" />'
		+'<param name="ShowControls" value="1" />'
		+'<param name="ShowStatusBar" value="0" />'
		+'<param name="AutoRewind" value="1" />'
		+'<param name="ShowDisplay" value="0" />'
		+'<param name="DefaultFrame" value="1" />'
		+'<param name="AutoStart" value="1" />'
		+'<param name="EnableContextMenu" value="false" />'+ param
		+'<embed src="'+ filename +'" width="'+ width +'" height="'+ height +'" autostart="'+ autoplay +'" '
		+'type="application/x-mplayer2" '
		+'pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp">'
		+'</embed></object>';
	return tempMovie;
}
function loadObjectString(target, code) { 
	target.innerHTML = code; 
}
//-->
