<!--
var i;
var show;
i = 0;
n4=(document.layers)?1:0;
e4=(document.all)?1:0;

var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

var isIE = is_IE();
//cross browsing
function is_IE()
{
	if(navigator.appName && navigator.appName.indexOf("Microsoft") != -1)
		return true;
	else
		return false;
}

function getNavigatorType() {
	if ( navigator.appName == "Microsoft Internet Explorer" )
		return 1;
	else if ( navigator.appName == "Netscape" )
		return 2;
	else
		return 0;
}

function getNavigatorVersion() {
	info = window.navigator.appVersion.split(" ");
	return info[0];
}

function getNode()	{
	_event = window.event;
	node = _event.srcElement;
	nodeName = _event.srcElement.nodeName;
	nodeValue = _event.srcElement.value;
}

//================================= ·Ñ ¿À¹ö S ============================================//

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.0
  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 && document.getElementById) x=document.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;
}

//================================= ·Ñ ¿À¹ö E ============================================//

//================================= »õÃ¢ ¿­±â S ============================================//

function MM_openBrModal(theURL,winName,features){
	showModalDialog(theURL, winName, features);
	//"dialogHeight:226px; dialogWidth:213px; dialogLeft:500px; dialogTop:500px; status:no; help:no; scroll:no"
}

function open_Modal(winName, theURL, left, top, width, height, statusbar, scrollbar, help, resizable){
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	help_str = help ? 'yes' : 'no';
	showModalDialog(theURL, winName, 'dialogLeft:' + left + '; dialogTop:' + top + '; dialogWidth:' + width + '; dialogHeight:' + height + '; status:' + statusbar_str + '; scroll:' + scrollbar_str + '; help:' + help_str);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function open_Win(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable){
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

//================================= ÆäÀÌÁö ÀÌµ¿ ============================================//

function select_move(obj) {
	location.href = obj.value;
}

//================================= ¸¶¿ì½º ÈÙ¹öÆ° Á¦¾î =====================================//

/* This is high-level function. */
function handle(delta) {
	var s = delta + ": ";
	if (delta < 0) s += "down";
	else s += "up";
	document.getElementById('delta').innerHTML = s;
}

/* ÈÙ ¹öÆ° ºñ È°¼³È­ */
function nowheel(e){
	if(!isIE){
		e.preventDefault();
	}
	return false;
}

/* Event handler for mouse wheel event. */
function wheel(event){
	var delta = 0;
	if (!event) event = window.event;
	if (event.wheelDelta) {
		delta = event.wheelDelta/120;
		if (window.opera) delta = -delta;
	} else if (event.detail) delta = -event.detail/3;
	//if (delta) handle(delta);
}

/* Initialization code. */
//if (window.addEventListener)
//    window.addEventListener('DOMMouseScroll', wheel, false);
//window.onmousewheel = document.onmousewheel = wheel;

//============================== ·¹ÀÌ¾î ¸Þ¼¼Áö ¶ç¿ì±â ===========================================//

function show_explan(msg, obj, aHor, aVer){
	newDIV = document.createElement("DIV");
	document.body.appendChild(newDIV);
	newDIV.id = "explan";
	newDIV.style.display = "none";
	newDIV.style.position = "absolute";
	newDIV.style.left = "0";
	newDIV.style.top = "0";
	newDIV.style.width = "230";
	newDIV.style.height = "0";
	newDIV.style.zindex = "10";
	newDIV.style.background = "transparent";

	//collRect = document.all["nickname"].getClientRects();
	//var eLeftPos = collRect[0].left;
	//var eTopPos = collRect[0].top;

	collRect = obj.getBoundingClientRect();
	var eLeftPos = collRect.left;
	var eTopPos = collRect.top;

	newDIV.style.left = eLeftPos + 120;
	newDIV.style.top = eTopPos - 74 ;
	//newDIV.style.left = leftPos;
	//newDIV.style.top = topPos;

	str = "<table width=\"230\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";

	if(aVer == "top"){
		if(aHor == "left")
			str += "<tr height=\"15\" valign=\"top\"><td align=\"left\"><img src=\"http://www.careerinside.net/image/popup/arrow_up.gif\"></td></tr>";
		else if(aHor == "right")
			str += "<tr height=\"15\" valign=\"top\"><td align=\"right\"><img src=\"http://www.careerinside.net/image/popup/arrow_up.gif\"></td></tr>";
	}

	str += "<tr><td><img src=\"http://www.careerinside.net/image/popup/layer_check_top.gif\" width=\"230\" border=\"0\"></td></tr><tr><td><table width=\"230\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"f9f9f9\" style=\"border-left:#4ea39c solid 2px;border-right:#4ea39c solid 2px;\"><tr><td width=\"230\" style=\"padding-left:10px;padding-right:10px\"><table width=\"205\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"205\">";
	str += msg;
	str += "</td></tr></table></td></tr></table></td></tr><tr><td><img src=\"http://www.careerinside.net/image/popup/layer_check_bottom.gif\" width=\"230\"></td></tr>"

	if(aVer == "bottom"){
		if(aHor == "left")
			str += "<tr height=\"15\" valign=\"bottom\"><td align=\"left\"><img src=\"http://www.careerinside.net/image/popup/arrow_down.gif\"></td></tr>";
		else if(aHor == "right")
			str += "<tr height=\"15\" valign=\"bottom\"><td align=\"right\"><img src=\"http://www.careerinside.net/image/popup/arrow_down.gif\"></td></tr>";
	}

	str += "</table>";


	document.getElementById("explan").innerHTML = str;
	document.getElementById("explan").style.display = "";
}

//================================= ÅëÇÕ ¸ðµâ ¶ç¿ì±â ============================================//

function wheel_shield(e){
	var divBody = document.getElementById("shield");
	var wheelAmount = 100;
	var wheelDirection;
	if(isIE){
		wheelDirection = -1*event.wheelDelta/Math.abs(event.wheelDelta);
	}else{
		wheelDirection = e.detail/Math.abs(e.detail);
	}
	if (event.wheelDelta) {
		delta = event.wheelDelta/120;
		delta = 0;
	}
/*
	if(wheelDirection > 0){
		if(divBody.scrollTop + 600 + wheelDirection*wheelAmount < document.body.scrollHeight){
			divBody.scrollTop = document.body.scrollHeight - 600;
			divBody.onmousewheel = nowheel;
		}else{
			divBody.scrollTop += wheelDirection*wheelAmount;
		}
	}else{
		if(divBody.scrollTop - wheelDirection*wheelAmount < 0){
			divBody.scrollTop = 0;
		}else{
			divBody.scrollTop += wheelDirection*wheelAmount;
		}
	}
*/
	divBody.scrollTop += wheelDirection*wheelAmount;
}

function findIFrame(win) {
	var ifs = win.document.getElementsByTagName("iframe");
	var fs = win.document.frames;

	for (var i=0; i<fs.length; i++) {
		if (fs[i] == win)
			return ifs[i];
	}
}

function shield_pos(){
	document.getElementById("sc_frame").style.pixelTop = document.body.scrollTop + 30 ;
	timeoutNextCheck = 0;
	setTimeout ("shield_pos()", timeoutNextCheck);
}

function shield_pos1(){
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

	if ( bNetscape4plus ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤
		yMenuFrom   = document["sc_frame"].top;
		yMenuTo     = top.pageYOffset + 30;   // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
	}else if ( bExplorer4plus ) {  // ÀÍ½ºÇÃ·Î·¯ ¿ë ¼³Á¤
		yMenuFrom   = parseInt (document.getElementById("sc_frame").style.top, 10);
		yMenuTo     = document.body.scrollTop + 30; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
	}

	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 2 );
		if ( yMenuTo < yMenuFrom )
			yOffset = -yOffset;

		if ( bNetscape4plus )
			document["sc_frame"].top += yOffset;
		else if ( bExplorer4plus )
			document.getElementById("sc_frame").style.top = parseInt (document.getElementById("sc_frame").style.top, 10) + yOffset;

		timeoutNextCheck = 0;
	}

	setTimeout ("shield_pos1()", timeoutNextCheck);

}

function show_shield(source, fWith, fHeight, innerWidth, innerHeight){
	newDIV = document.createElement("DIV");
	document.body.appendChild(newDIV);
	newDIV.id = "shield";
	newDIV.style.display = "none";

	//var leftmiddle = document.body.scrollLeft + (document.body.clientWidth / 2) - (818/2);
	//var shieldWidth = document.body.clientWidth + document.body.scrollLeft;
	if(document.body.scrollWidth > 818){
		var leftmiddle = (document.body.scrollWidth - 818) / 2;
		var shieldWidth = document.body.scrollWidth;
	}else{
		var leftmiddle = 0;
		var shieldWidth = 818;
	}

	var topmiddle = document.body.scrollTop + 50;
	if(document.body.scrollTop + parseInt(innerHeight, 10) + 50 > document.body.scrollHeight){
		var shieldHeight = document.body.scrollTop + parseInt(innerHeight, 10) + 50;
	}else{
		var shieldHeight = document.body.scrollHeight;
	}

	if (source.indexOf("?") != -1){
		source = source + "&style=shield"
	}else{
		source = source + "?style=shield"
	}

	str = "<div id=\"curtain\" name=\"curtain\" style=\"display:; cursor:hand; position:absolute; left:0; top:0; width:" + shieldWidth + "; height:" + shieldHeight + "; z-index:50; background:#000000;FILTER: Alpha(Opacity=50, FinishOpacity=50, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=100);\" onclick=\"hide_shield();\"></div><iframe id=\"sc_frame\" name=\"sc_frame\" src=" + source + " frameborder=\"0\" width=\"" + fWith + "\" height=\"" + fHeight + "\" allowTransparency=\"false\" style=\"display:; position:absolute; left:" + leftmiddle + "; top:" + topmiddle +"; z-index:100; background:transparent;overflow-x: hidden\" onload=\"resizeFrame(this, '" + innerWidth + "', '" + innerHeight + "')\" scrolling=\"auto\"></iframe>";


	document.getElementById("shield").innerHTML = str;
	document.getElementById("shield").style.display = "";

	if(isIE){
		document.body.onmousewheel = nowheel;
	}else{
		document.addEventListener('DOMMouseScroll', nowheel, false);
	}
	shield_pos();
}

function show_shield_today(source, fWith, fHeight, innerWidth, innerHeight){
	newDIV = document.createElement("DIV");
	document.body.appendChild(newDIV);
	newDIV.id = "shield_today";
	newDIV.style.display = "none";

	//var leftmiddle = document.body.scrollLeft + (document.body.clientWidth / 2) - (818/2);
	//var shieldWidth = document.body.clientWidth + document.body.scrollLeft;
	if(document.body.scrollWidth > 538){
		var leftmiddle = (document.body.scrollWidth - 538) / 2;
		var shieldWidth = document.body.scrollWidth;
	}else{
		var leftmiddle = 0;
		var shieldWidth = 538;
	}

	var topmiddle = document.body.scrollTop + 50;
	if(document.body.scrollTop + parseInt(innerHeight, 10) + 50 > document.body.scrollHeight){
		var shieldHeight = document.body.scrollTop + parseInt(innerHeight, 10) + 100;
	}else{
		var shieldHeight = document.body.scrollHeight;
	}

	if (source.indexOf("?") != -1){
		source = source + "&style=shield_today"
	}else{
		source = source + "?style=shield_today"
	}

	str = "<div id=\"curtain\" name=\"curtain\" style=\"display:; cursor:hand; position:absolute; left:0; top:0; width:" + shieldWidth + "; height:" + shieldHeight + "; z-index:50; background:#FBFEFF;FILTER: Alpha(Opacity=50, FinishOpacity=50, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=100);\" onclick=\"hide_shield_today();\"></div><iframe id=\"sc_frame\" name=\"sc_frame\" src=" + source + " frameborder=\"0\" width=\"" + fWith + "\" height=\"" + fHeight + "\" allowTransparency=\"false\" style=\"display:; position:absolute; left:" + leftmiddle + "; top:" + topmiddle +"; z-index:100; background:transparent;overflow-x: hidden\" onload=\"resizeFrame_today(this, '" + innerWidth + "', '" + innerHeight + "')\" scrolling=\"no\"></iframe>";


	document.getElementById("shield_today").innerHTML = str;
	document.getElementById("shield_today").style.display = "";

	if(isIE){
		document.body.onmousewheel = nowheel;
	}else{
		document.addEventListener('DOMMouseScroll', nowheel, false);
	}
	shield_pos();
}

function resizeFrame(iframeObj, innerWidth, innerHeight){
	//var innerBody = iframeObj.contentWindow.document.body;
	//var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	//var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	if(innerWidth != ""){
		//iframeObj.style.width = innerWidth;
		iframeObj.style.width = 818;
	}
	if(innerHeight != ""){
		//iframeObj.style.height = innerHeight;
		//iframeObj.style.height = document.body.scrollHeight - 50;
		iframeObj.style.height = document.body.offsetHeight - 50;
	}
}

function resizeFrame_today(iframeObj, innerWidth, innerHeight){
	//var innerBody = iframeObj.contentWindow.document.body;
	//var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	//var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	if(innerWidth != ""){
		//iframeObj.style.width = innerWidth;
		iframeObj.style.width = 538;
	}
	if(innerHeight != ""){
		//iframeObj.style.height = innerHeight;
		//iframeObj.style.height = document.body.scrollHeight - 50;
		iframeObj.style.height = 420;
	}
}

function hide_shield()
{
	var sure = confirm("Ã¢À» ´ÝÀ¸½Ã°Ú½À´Ï±î?\r\nÃ¢À»´ÝÀ¸¸é ÇöÀçÆäÀÌÁö´Â ´ÝÈü´Ï´Ù.");

	if(sure)
	{
		if(parent.location.pathname == "/"){
			parent.location.href = "/";
		}else{
			parent.location.reload();
		}
	}
}

function hide_shield_today()
{	
	//var dObj = document.getElementById("shield_today").removeNode(true);	
	dObj = document.getElementById("shield_today");
	dObjBody = document.body;
	dObjBody.removeChild(dObj);
}

function resizeShield(){
	if(document.all["shield"]){
		if(document.body.scrollWidth > 818){
			curtain.style.width = document.body.scrollWidth;
			document.getElementById("sc_frame").style.left = (document.body.scrollWidth - 818) / 2;
		}else{
			curtain.style.width = 0;
			document.getElementById("sc_frame").style.left = 818;
		}

		document.getElementById("sc_frame").style.top = document.body.scrollTop + 50;
		if(document.body.scrollTop + document.getElementById("sc_frame").style.height + 50 > document.body.scrollHeight){
			curtain.style.height = document.body.scrollTop + parseInt(innerHeight, 10) + 50;
		}else{
			curtain.style.height = document.body.scrollHeight;
		}
	}
}

window.onresize = resizeShield;

//================================= À§Ä¡ °íÁ¤ ÀÌ¹ÌÁö1 ============================================//

function always_pos(){
	var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

	if ( bNetscape4plus ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤
		yMenuFrom   = document["scrollmenu"].top;
		yMenuTo     = top.pageYOffset + 140;   // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
	}else if ( bExplorer4plus ) {  // ÀÍ½ºÇÃ·Î·¯ ¿ë ¼³Á¤
		yMenuFrom   = parseInt (scrollmenu.style.top, 10);
		if (document.body.scrollTop < 450){
			yMenuTo     = document.body.scrollTop + 100; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
		}else{
			yMenuTo     = 450; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
		}
	}
/*
	timeoutNextCheck = 500;

	if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
		setTimeout ("always_pos()", timeoutNextCheck);
		return;
	}


	if ( yButtonFrom != yButtonTo ) {
		yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );

		if ( yButtonTo < yButtonFrom )
			yOffset = -yOffset;

		if ( bNetscape4plus )
			document["divLinkButton"].top += yOffset;
		else if ( bExplorer4plus )
			divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

		timeoutNextCheck = 10;
	}
*/
	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
		if ( yMenuTo < yMenuFrom )
			yOffset = -yOffset;

		if ( bNetscape4plus )
			document["scrollmenu"].top += yOffset;
		else if ( bExplorer4plus )
			scrollmenu.style.top = parseInt (scrollmenu.style.top, 10) + yOffset;

		timeoutNextCheck = 10;
	}

	setTimeout ("always_pos()", timeoutNextCheck);
}

//================================= À§Ä¡ °íÁ¤ ÀÌ¹ÌÁö2 ============================================//

var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";

function getRef(id) {
	if (isDOM) return document.getElementById(id);
	if (isIE4) return document.all[id];
	if (isNS4) return document.layers[id];
}

function getSty(id) {
	x = getRef(id);
	return (isNS4 ? getRef(id) : getRef(id).style);
}

function moveRightEdge() {
	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

	if (isNS4) {
		yMenuFrom   = btn_top.top;
		yMenuTo     = windows.pageYOffset + 140;
	} else if (isDOM) {
		yMenuFrom   = parseInt (btn_top.style.top, 10);
		yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + 450;
	}
	timeoutNextCheck = 500;

	if (yMenuFrom != yMenuTo) {
		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
		if (yMenuTo < yMenuFrom)
			yOffset = -yOffset;
		if (isNS4)
			btn_top.top += yOffset;
		else if (isDOM)
			btn_top.style.top = parseInt (btn_top.style.top, 10) + yOffset;
			timeoutNextCheck = 10;
	}
	setTimeout ("moveRightEdge()", timeoutNextCheck);
}

//================================= À§Ä¡ °íÁ¤ ÀÌ¹ÌÁö3 ============================================//

function same_pos(obj, topPos, maxTop){
	var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

	if ( bNetscape4plus ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤
		yMenuFrom   = document[obj].top;
		yMenuTo     = top.pageYOffset + topPos;   // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
	}else if ( bExplorer4plus ) {  // ÀÍ½ºÇÃ·Î·¯ ¿ë ¼³Á¤
		yMenuFrom   = parseInt (document.getElementById(obj).style.top, 10);
		if (document.body.scrollTop < maxTop){
			yMenuTo     = document.body.scrollTop + topPos; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
		}else{
			yMenuTo     = maxTop; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
		}
	}

	if ( yMenuFrom != yMenuTo ) {
		yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
		if ( yMenuTo < yMenuFrom )
			yOffset = -yOffset;

		if ( bNetscape4plus )
			document[obj].top += yOffset;
		else if ( bExplorer4plus )
			document.getElementById(obj).style.top = parseInt (document.getElementById(obj).style.top, 10) + yOffset;

		timeoutNextCheck = 10;
	}

	setTimeout ("same_pos('" + obj + "', " + topPos + ", " + maxTop + ")", timeoutNextCheck);
}

//============================================ ÀÎ¼â °ü·Ã ====================================================//

function ieExecWB( intOLEcmd, intOLEparam )
{
//Âü°í·Î IE 5.5 ÀÌ»ó¿¡¼­¸¸ µ¿ÀÛÇÔ

// À¥ ºê¶ó¿ìÀú ÄÁÆ®·Ñ »ý¼º
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';

// À¥ ÆäÀÌÁö¿¡ °´Ã¼ »ðÀÔ
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);

// if intOLEparamÀÌ Á¤ÀÇµÇ¾î ÀÖÁö ¾ÊÀ¸¸é µðÆúÆ® °ª ¼³Á¤
if ( ( ! intOLEparam ) || ( intOLEparam < -1 ) || (intOLEparam > 1 ) )
intOLEparam = 1;

// ExexWB ¸Þ½îµå ½ÇÇà
WebBrowser1.ExecWB( intOLEcmd, intOLEparam );

// °´Ã¼ ÇØÁ¦
WebBrowser1.outerHTML = "";
}

/* »ç¿ë¹ý
<input type="button" value="ÀÎ¼â ¹Ì¸® º¸±â" onclick="window.ieExecWB(7)">
<input type="button" value="ÆäÀÌÁö ¼³Á¤" onclick="window.ieExecWB(8)">
<input type="button" value="ÀÎ¼âÇÏ±â(´ëÈ­»óÀÚ Ç¥½Ã)" onclick="window.ieExecWB(6)">
<input type="button" value="ÀÎ¼â ¹Ù·Î ÇÏ±â" onclick="window.ieExecWB(6, -1)">
*/
/*
ÀÍ½ºÇÃ·Î·¯¿¡¼­ À¥ÆäÀÌÁö¸¦ Ãâ·ÂÇÏ¸é URLÀÌ ÆäÀÌÁö »ó´Ü°ú ÇÏ´Ü¿¡ °°ÀÌ ³ª¿À´Âµ¥, ÀÌ·± ¸Ó¸´±Û°ú ¹Ù´Ú±ÛÀº ´ÙÀ½°ú °°ÀÌ º¯°æÇÒ ¼ö ÀÖ´Ù.
¢¹ ·¹Áö½ºÆ®¸® ÆíÁý±â ½ÇÇà(Regedit) -> HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\PageSetup·Î ÀÌµ¿ -> header¿Í footer°ªÀ» Ãâ·ÂÀ» ¿øÇÏ´Â °ªÀÌ³ª, È¤Àº ¾ø¾Ö°í ½ÍÀº °æ¿ì ºó Ä­À¸·Î º¯°æ.

ÀÔ·Â ¹®ÀÚ        ÀÎ¼âÇÒ ³»¿ë
&w        Ã¢ Á¦¸ñ
&u        ÆäÀÌÁö ÁÖ¼Ò(URL)
&d        Á¦¾îÆÇÀÇ ±¹°¡º° ¼³Á¤¿¡¼­ ÁöÁ¤ÇÑ °£´ÜÇÑ Çü½ÄÀÇ ³¯Â¥
&D        Á¦¾îÆÇÀÇ ±¹°¡º° ¼³Á¤¿¡¼­ ÁöÁ¤ÇÑ ÀÚ¼¼ÇÑ Çü½ÄÀÇ ³¯Â¥
&t        Á¦¾îÆÇÀÇ ±¹°¡º° ¼³Á¤¿¡¼­ ÁöÁ¤ÇÑ Çü½ÄÀÇ ½Ã°£
&T        24½Ã°£Á¦ Çü½ÄÀ¸·Î Ç¥½ÃÇÑ ½Ã°£
&p        ÇöÀç ÆäÀÌÁö ¹øÈ£
&P        ÀüÃ¼ ÆäÀÌÁö ¼ö
&&        ´ÜÀÏ ¾ÚÆÛ»÷µå(&)
&b        ÀÌ ¹®ÀÚ ´ÙÀ½¿¡ ¿À´Â ÅØ½ºÆ®¸¦ °¡¿îµ¥ ¸ÂÃã
&b&b        Ã³À½ "&b" ´ÙÀ½¿¡ ¿À´Â ÅØ½ºÆ®´Â °¡¿îµ¥ ¸ÂÃãÀ¸·Î, µÎ ¹øÂ° "&b" ´ÙÀ½¿¡ ¿À´Â ÅØ½ºÆ®´Â ¿À¸¥ÂÊ Á¤·Ä

*/

/*
ÀÎ¼â °ü·Ã ÆÁ
1. ÇØ´ç °´Ã¼ ÀÌÀü¿¡ ÆäÀÌÁö ³Ñ±è
	1-1. HTML : <ELEMENT style="page-break-before:sVal;">
	1-2. SCRIPT : object.style.pageBreakBefore=[sVal];
	1-3. CSS : cssSelector {page-break-before:sVal;}

	1-4. sVal ¿¡ µé¾î°¥ °ª
		always : °³Ã¼ ÀÌÀü¿¡ Ç×»ó ÆäÀÌÁö ³Ñ±èÀ» »ðÀÔÇÑ´Ù.
		auto : µðÆúÆ®ÀÌ¸ç, °³Ã¼ ÀÌÀü¿¡ ÆäÀÌÁö ³Ñ±èÀ» °­Á¦·Î ÇÏÁöµµ, ±ÝÁöÇÏÁöµµ ¾Ê°í ÀÚµ¿À¸·Î ÇÑ´Ù.
		(ºó¹®ÀÚ¿­) : °³Ã¼ ÀÌÀü¿¡ ÆäÀÌÁö ³Ñ±èÀ» ÇÏÁö ¾Ê´Â´Ù.
		left : ÇöÀç·Î¼­´Â always¿Í °°ÀÌ ÀÛ¿ëÇÑ´Ù.
		right : ÇöÀç·Î¼­´Â always¿Í °°ÀÌ ÀÛ¿ëÇÑ´Ù.

2. ÇØ´ç °´Ã¼ ÀÌÈÄ¿¡ ÆäÀÌÁö ³Ñ±è <ELEMENT style="page-break-after:sVal;">
*/

//================================= ÇÁ·¹ÀÓ±¸Á¶¿¡¼­ ½ºÅ©·Ñ ¾ø¾Ö±â ============================================//

function resize_parent(frm) {
	var pFrame = eval(frm + ".document.body;");
	var iFrame = eval("document.all." + frm + ";");

	iFrame.style.height = pFrame.scrollHeight + (pFrame.offsetHeight - pFrame.clientHeight);
}

//================================= ÄíÅ° °ü·Ã S ============================================//

//ÄíÅ° ¾²±â
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

//ÄíÅ° ÀÐ±â
function getCookie(name) {
	var Found = false;
	var start, end;
	var i = 0;

	while(i<=document.cookie.length) {
		start = i;
		end = start + name.length;
		if(document.cookie.substring(start, end) == name) {
			Found = true;
			break;
		}
		i++;
	}

	if(Found == true) {
		start = end + 1;
		end = document.cookie.indexOf(";", start)

		if(end <start)
			end = document.cookie.length;

		return document.cookie.substring(start, end);
	}

	return "";
}

//================================= ÄíÅ° °ü·Ã E ============================================//

//================================= À¯È¿¼º °Ë»ç S ============================================//

function con_search(form) {
  if(form.searchword.value=="") {
    alert("°Ë»ö Á¶°ÇÀ» ÀÔ·ÂÇÏ¼¼¿ä");
    form.searchword.focus();
    return false;
  }
}

//ÀÔ·Â Å° °Ë»ç
// keyFilter('[ ]') : ÇÑ±Û¸¸ ÀÔ·Â
// keyFilter('[0-9a-zA-Z]') ¿øÇÏ´Â ¹®ÀÚ¿­·Î Á¤±Ô½Ä
function keyFilter(inValue)
{
	var inKey = String.fromCharCode(event.keyCode);
	var reKey = new RegExp(inValue);
	var accept_pattern = /[\r]/;	//Á¤±Ô½Ä  : ¹é½ºÆäÀÌ½º, \r : ¿£ÅÍ

	// Enter´Â Å°°Ë»ç¸¦ ÇÏÁö ¾Ê´Â´Ù.
	if ( !(reKey.test(inKey) || accept_pattern.test(inKey)) ) {
		//if(event.keyCode == 229)
		//	alert("ÇÑ±Û·Î ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		event.returnValue = false;
	}
}

//ÀÔ·Â Å° °Ë»ç - ¼ýÀÚ¸¸ ÀÔ·Â
function Chk_Num()
{
    if(!(event.keyCode>=48 && event.keyCode<=57 || event.keyCode>=96 && event.keyCode<=105 || event.keyCode==8 || event.keyCode==9 || event.keyCode==13 || event.keyCode==16 || event.keyCode==17 || event.keyCode==18 || event.keyCode==20 || event.keyCode==35 || event.keyCode==36 || event.keyCode==37 || event.keyCode==39 || event.keyCode==46 || event.keyCode==106 || event.keyCode==107 || event.keyCode==109 || event.keyCode==110 || event.keyCode==111 || event.keyCode==116 || event.keyCode==191)) {event.returnValue=false;alert("¼ýÀÚ·Î¸¸ ÀÔ·ÂÇÏ¼¼¿ä.");}
}

//ÀÔ·Â Å° °Ë»ç - , ÀÔ·Â ºÒ°¡
function Chk_Comma()
{
	if(event.keyCode==188) {event.returnValue=false;alert(",´Â »ç¿ëÇÒ¼ö ¾ø´Â ¹®ÀÚÀÔ´Ï´Ù.");}
}

//ÀÔ·Â Å° °Ë»ç - ½ºÆäÀÌ½º ÀÔ·ÂºÒ°¡
function nospace(){
	if(event.keyCode==32){
		event.returnValue=false;
	}
}

//ÀÔ·Â °ª °Ë»ç - Æ¯¼öÅ° ÀÔ·Â ºÒ°¡
function onlyEng(objtext1) {
	var inText = objtext1.value;
	var deny_pattern = /[^(°¡-ÆRa-zA-Z0-9)]/;	//Á¤±Ô½Ä

	if(deny_pattern.test(inText))
	{
		alert("¿µ¹®ÀÚ¿Í ÇÑ±Û,¼ýÀÚ¸¸À» ÀÔ·ÂÇÏ¼¼¿ä");
		objtext1.value = "";
		objtext1.focus();
		return false;
	}
	return true;
}

//ÀÔ·Â °ª °Ë»ç - ¼ýÀÚ¸¸ ÀÔ·Â °¡´É
function onlyNum(objtext1) {
	var inText = objtext1.value;
	var deny_pattern = /[^(0-9)]/;	//Á¤±Ô½Ä

	if(deny_pattern.test(inText))
	{
		alert("¼ýÀÚ¸¸À» ÀÔ·ÂÇÏ¼¼¿ä");
		objtext1.value = "";
		objtext1.focus();
		return false;
	}
	return true;
}

function checkSpecialChar()
{
	var objEv = event.srcElement;
	var num ="'; ";
	event.returnValue = true;

	for (var i=0;i<objEv.value.length;i++)
	{
		if(-1 != num.indexOf(objEv.value.charAt(i)))
		event.returnValue = false;
	}

	if (!event.returnValue)
	{
		alert("Æ¯¼ö¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
		objEv.value="";
	}
}

//ÀÌ¸ÞÀÏ À¯È¿¼º °Ë»ç
function emailcheck(str)
{
	if (str.match(/\S+\@\S+\.\S+/g) == str) {
		return false;
	}else { return true; }
}

//ÀÌ¸ÞÀÏ À¯È¿¼º °Ë»ç
function Chk_Email(obj)
{
	var str = obj.value;
	if (str != ""){
		if (!(str.match(/\S+\@\S+\.\S+/g) == str)) {
			obj.value="";
			alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.\n\nÁ¤È®ÇÑ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			obj.focus();
		}
	}
}
//ÀÌ¸ÞÀÏ À¯È¿¼º °Ë»ç
function Chk_Email2(obj1,obj2)
{
	var str1 = obj1.value;
	var str2 = obj2.value;
	var str = str1 + "@" + str2
	if (str != ""){
		if (!(str.match(/\S+\@\S+\.\S+/g) == str)) {
			obj1.value="";
			obj2.value="";
			alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.\n\nÁ¤È®ÇÑ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
			obj1.focus();
		}
	}
}

//³¯Â¥ À¯È¿¼º °Ë»ç
function isDate(yyyy,mm,dd)
{
	yyyy=parseInt(yyyy,10);
	mm=parseInt(mm,10);
	dd=parseInt(dd,10);
	d = new Date(yyyy,mm-1,dd);
	if(d=="NaN")
		return false;
	if(yyyy == d.getFullYear() && mm == d.getMonth()+1 && dd == d.getDate() )
		return true;
	return false;
}

//³¯Â¥ À¯È¿¼º °Ë»ç - yyyy-mm-dd ÇüÅÂ
function isDate_yyyy_m_d(s)
{
	s=s.replace(/\s/g,""); // °ø¹éÁ¦°Å
	if(s.match(/\d+\-\d+\-\d+/g)!=s)
		return false; // 1111-11-11 Æ÷¸ËÀÌ ¾Æ´Ô
	var d = s.split(/\-/g);
	return isDate(d[0],d[1],d[2]);
}

//³¯Â¥ À¯È¿¼º °Ë»ç - yyyymmdd ÇüÅÂ
function isDate_yyyymmdd(s)
{
	s=s.replace(/\s/g,"");
	if(s.length!=8)
		return false;
	return isDate(s.substr(0,4),s.substr(4,2),s.substr(6,2));
}

//³¯Â¥ À¯È¿¼º °Ë»ç - yyyy-mm-dd,yyyymmdd µÑÁß ÇÏ³ª ¼±ÅÃ °Ë»ç
function ChkDate(dtype, obj){
	var isD = true;
	if(obj.value != ""){
		if(dtype == "0")
			isD=isDate_yyyy_m_d(obj.value) ;
		else
			isD=isDate_yyyymmdd(obj.value) ;
	}

	if(!(isD)) {
		alert("³¯Â¥°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù");
		obj.value="";
		obj.focus();
		return false;
	}else{
		return true;
	}
}

//============= ³¯Â¥ À¯È¿¼º °Ë»ç select ·Î µÈ ³¯Â¥ °Ë»ç
	/*
		<select name='hope_s_year' onchange='setEndDay(ResForm.hope_s_year, ResForm.hope_s_month, ResForm.hope_s_day)' class="inputBox2"<% if mData("rs_status") <> "STATUS33" then %> disabled<% end if %>>
		<script language='javascript'>
		now = new Date();
		for (var i = now.getYear(); i < now.getYear() + 3; i++) {
		  document.write ("<option value="+i+">"+i);
		}
		</script>
		</select>³â
		<select name='hope_s_month' onchange='setEndDay(ResForm.hope_s_year, ResForm.hope_s_month, ResForm.hope_s_day)' class="inputBox2"<% if mData("rs_status") <> "STATUS33" then %> disabled<% end if %>>
		<script language='javascript'>
		for (var i=1; i <= 12; i++) {
		  document.write ("<option value="+i+">"+i);
		}
		</script>
		</select>¿ù
		<select name='hope_s_day' class="inputBox2"<% if mData("rs_status") <> "STATUS33" then %> disabled<% end if %>>
		<script language='javascript'>
		for (var i=1; i <= 31; i++) {
		  document.write ("<option value="+i+">"+i);
		}
		</script>
		</select>ÀÏ
*/

function lastOfMonth(year,month){
	var d=new Date(year,month,"1");
	d.setDate(0);
	return d.getDate();
}

function setEndDay(obj){
	var year=obj.hope_year[obj.hope_year.selectedIndex].value;
	var month=obj.hope_month[obj.hope_month.selectedIndex].value;
	var sday =obj.hope_day;
	var lom = lastOfMonth(year,month);
	sday.length=lom;
	for(var i=0;i<lom;i++) {
	sday[i]=new Option(i+1,i+1);
	}
	sday.selectedIndex=0;
}

function setDay(s, fYear, fMonth, fDay){
	s = s.split(/\-/g);
	if(s.length == 3) {
	fYear.selectedIndex = parseInt(s[0],10) - fYear[0].value;
	fMonth.selectedIndex = parseInt(s[1],10) - 1;
	fDay.selectedIndex = parseInt(s[2],10) - 1;
	}
}
//=====================================================

//ÀÔ·Â ±æÀÌ °Ë»ç
function check_length(str, val, len) {
	if(val.value.length < len){
		window.alert(str + "´Â " + len + "±ÛÀÚ ÀÌ»óÀÌ¾î¾ß ÇÕ´Ï´Ù.");
		val.focus();
		return false;
	}else
		return true;
}

//ÁÖ¹Î µî·Ï °Ë»ç - ¿Ü±¹ÀÎ µî·Ï¹øÈ£°Ë»çµµ ÇÔ²² µÇ¾î ÀÖÀ½
function Check_Ssd(jumin_ymd, jumin_num) {
	//ÁÖ¹Îµî·ÏÃ¼Å©
	a = new Array(6)
	b = new Array(7)
	tot=0
	c=0

	/*
	if (parseInt(jumin_ymd.value.substring(2,4)) < 1 || parseInt(jumin_ymd.value.substring(2,4)) > 12) {
		alert("ÁÖ¹Îµî·Ï¹øÈ£ ¶Ç´Â ¿Ü±¹ÀÎ¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		jumin_ymd.value = "";
		jumin_num.value = "";
		jumin_ymd.focus();
		return false;
	}
	*/
	for(i=1;i<7;i++) {
		a[i] = jumin_ymd.value.substring(i-1,i)
		b[i] = jumin_num.value.substring(i-1,i)
		if(i<3){
			c=Number(b[i])*(i+7)
		}else if(i>=3){
			c=Number(b[i])*((i+9)%10)
		}
		tot = tot + Number(a[i])*(i+1) + c
	}

	b[7] = jumin_num.value.substring(6,7)

	if(Number(b[7]) != ((11-(tot%11))%10)){
		if(!check_no(jumin_ymd, jumin_num)){
			alert("ÁÖ¹Îµî·Ï¹øÈ£ ¶Ç´Â ¿Ü±¹ÀÎ¹øÈ£¸¦ Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
			jumin_ymd.value = "";
			jumin_num.value = "";
			jumin_ymd.focus();
			return false;
		}else
			return true;
	}else{
		return true;
	}
}

//¿Ü±¹ÀÎ µî·Ï¹øÈ£ °Ë»ç
function check_no(jumin_ymd, jumin_num){
	//¿Ü±¹ÀÎ¹øÈ£ Ã¼Å©
	var fgn_reg_no = jumin_ymd.value + jumin_num.value;
	if ((fgn_reg_no.charAt(6) == "5") || (fgn_reg_no.charAt(6) == "6")) {
		birthYear = "19";
	}else if ((fgn_reg_no.charAt(6) == "7") || (fgn_reg_no.charAt(6) == "8")) {
		birthYear = "20";
	}else if ((fgn_reg_no.charAt(6) == "9") || (fgn_reg_no.charAt(6) == "0")) {
		birthYear = "18";
	}else{
		return false;
	}

	birthYear += fgn_reg_no.substr(0, 2);
	birthMonth = fgn_reg_no.substr(2, 2) - 1;
	birthDate = fgn_reg_no.substr(4, 2);
	birth = new Date(birthYear, birthMonth, birthDate);

	if ( birth.getYear() % 100 != fgn_reg_no.substr(0, 2) ||
		birth.getMonth() != birthMonth ||
		birth.getDate() != birthDate) {
		alert('»ý³â¿ùÀÏ¿¡ ¿À·ù°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã È®ÀÎÇÏ½Ê½Ã¿À.');
		return false;
	}

	if (fgn_no_chksum(fgn_reg_no) == false){
		//alert('¿Ü±¹ÀÎµî·Ï¹øÈ£¿¡ ¿À·ù°¡ ÀÖ½À´Ï´Ù. ´Ù½Ã È®ÀÎÇÏ½Ê½Ã¿À.');
		return false;
	}else {
		return true;
	}
}

function fgn_no_chksum(reg_no) {
	var sum = 0;
	var odd = 0;

	buf = new Array(13);
	for (i = 0; i < 13; i++) buf[i] = parseInt(reg_no.charAt(i));

	odd = buf[7]*10 + buf[8];

	if (odd%2 != 0) {
		return false;
	}

	if ((buf[11] != 6)&&(buf[11] != 7)&&(buf[11] != 8)&&(buf[11] != 9)) {
		return false;
	}

	multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
	for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);

	sum=11-(sum%11);
	if (sum>=10) sum-=10;
	sum += 2;
	if (sum>=10) sum-=10;

	if ( sum != buf[12]) {
		return false;
	}
	else {
		return true;
	}
}

//================================= À¯È¿¼º °Ë»ç E ============================================//

//================================= ±×¿Ü ÀÏ¹ÝÀûÀÎ FUNCTION ============================================//

//ObjectÀÇ ÁÂÇ¥¸¦ ¾Ë¾Æ³»´Â ÇÔ¼ö
function getRects(obj){
	collRect = obj.getClientRects();
	var topPos = collRect[0].top;
	var leftPos = collRect[0].left;
}

// ASPÀÇ replace ÇÔ¼ö¿Í µ¿ÀÏ
function replaceStr(strOriginal, strFind, strChange){
	var position, strOri_Length;
	position = strOriginal.indexOf(strFind);

	while (position != -1){
		strOriginal = strOriginal.replace(strFind, strChange);
		position = strOriginal.indexOf(strFind);
	}

	//strOri_Length = strOriginal.length;
	return strOriginal;
}

// ===¼ýÀÚ¿¡ ÀÚµ¿À¸·Î , Ç¥½Ã=======
var oldv = ""
function formatNumber(s){
	var s1 = ""
	s = s.replace(/\,/g, "");

	if(s.indexOf(".") > -1){
		s1 = s.substr(s.indexOf("."), s.length - s.indexOf("."))
		s = s.substr(0, s.indexOf("."))
	}
	l = s.length - 3;

	while(l > 0) {
		s = s.substr(0,l) + "," + s.substr(l);
		l -= 3;
	}
	if (s1 != ""){
		s = s + s1;
	}
	return s;
}

function formatTextfield(tx){
	if(oldv == tx.value) return;
	oldv = tx.value;
	tx.value = formatNumber(oldv);
}
// ==================================

// µ¸º¸±â - È®´ë
function zoomIn(){
	if(document.body.style.zoom != 0)
		document.body.style.zoom *= 1.2 ;
	else
		document.body.style.zoom = 1.2;
}

// µ¸º¸±â - Ãà¼Ò
function zoomOut(){
	if(document.body.style.zoom != 0)
		document.body.style.zoom /= 1.2 ;
}

// ¸ð´Þ ¶ç¿ö¼­ ³¯Â¥ ¾òÀ½
function getDate(v) {
	var e = document.getElementById(v);
	var x = window.event.screenX;
	var y = window.event.screenY;
	var t = "dialogHeight:226px; dialogWidth:213px; dialogLeft:"+ x +"px; dialogTop:"+ y +"; status:no; help:no; scroll:no";
	var v = showModalDialog("/popup/calendar.htm?v="+ e.value, "", t);

	if (v != null) {
		e.value = v;
	}
}

// ÀÔ·ÂÇÊµå°ª Å¬¸³º¸µå·Î º¹»ç
function copyit(theField) {
	var tempval=eval("document.all."+theField);
	//tempval.focus();
	//tempval.select();
	therange = tempval.createTextRange();
	therange.execCommand("Copy");
}

// ÀÔ·ÂÇÊµå¿¡¼­ Ä¿¼­ ¸Ç ¸¶Áö¸·À¸·Î
function setCursorToEnd(elem) {
	if (elem && getNavigatorType() == 1) {
		if (elem.type && (elem.type == "text" || elem.type == "textarea")) {
			var rng = elem.createTextRange()
			rng.move("textedit")
			rng.select()
		}
	}
}

function showP(obj, num){
	var sno;
	if(document.all[obj].length != undefined){
		for(i = 0; i < document.all[obj].length; i++){
			if(document.all[obj][i].style.display == "")
				sno = i;
		}

		document.all[obj][sno].style.display = "none";

		if(num > 0){
			if(sno == document.all[obj].length - 1){
				document.all[obj][0].style.display = "";
			}else{
				document.all[obj][sno + 1].style.display = "";
			}
		}else{
			if(sno == 0){
				document.all[obj][document.all[obj].length - 1].style.display = "";
			}else{
				document.all[obj][sno - 1].style.display = "";
			}
		}
	}
}

function search_post(zippath1,zippath2,zippath3,focus) {
	window.open ("/popup/search_post.asp?zippath1=" + zippath1 + "&zippath2=" + zippath2 + "&zippath3=" + zippath3 + "&focus=" + focus, "search_post", "width=316,height=233,scrollbars=yes,resizable=no");
}

function open_Idchk(idPath, focus) {
	window.open ("id_check.asp?idPath=" + idPath + "&focus=" + focus, "id_chk", "width=316,height=178,scrollbars=yes,resizable=no,status=yes");
}

function id_cross(obj, ref) {
	var id = eval(obj.userid);

	ref = ref + "?id=" + obj.userid.value;
	var window_left = (screen.width - 640)/2;
	var window_top = (screen.height - 480)/2;

	window.open(ref, "checkIDWin", 'width=340, height=260, status=no, resizable=no, top=' + window_top + ',left=' + window_left + '');
}

function jumin_cross(tJumin1, tJumin2, tCheck){
	var opt = "width=250, height=150, menubar=no, toolbar=no, location=no, status=no, resizable=no";
	window.open("jumin_chk.asp?tjumin1=" + tJumin1 + "&tjumin2=" + tJumin2 + "&tcheck=" + tCheck + "&mode=no", "", opt);
}

function automove(obj, ln, next){
	var str = obj.value.length;
	if(str == ln){
		next.focus();
	}
}

// ================= ¸µÅ© Áßº¹ Å¬¸¯ ¹æÁö ============================
function dbclick() {
	if ( event.button == 1 ) alert("Ã³¸®ÁßÀÔ´Ï´Ù.\n\nÀá½Ã ±â´Ù¸®½Ã±â ¹Ù¶ø´Ï´Ù.");
}


function viewCons(text) {
	show=1;
	str="<table width=300 border=0 cellpadding=0 cellspacing=0 class=View><tr><td bgcolor=#F8E7B1 class='View_Text'>"+text+"</td></tr></table>"
	quick.innerHTML=str;
	quick.style.left=event.clientX + document.body.scrollLeft +10;
	quick.style.top=event.clientY + document.body.scrollTop +15;
	quick.style.visibility='visible';
	quick.filters.item(0).stop();
}

function hiddenCons() {
	quick.filters.item(0).transition = 12;	//filter °¡ blendTrans(duration=0.5) ¸é ÇÊ¿ä¾øÀ½.
	quick.filters.item(0).apply();
	quick.style.visibility='hidden';
	quick.filters.item(0).play();
	quick.style.left=document.body.scrollLeft-event.clientX;
	quick.style.top=document.body.scrollTop-event.clientY;
	//show=0;
}

function movePoint() {
	var scollLeft = event.clientX + document.body.scrollLeft +10;
	var scollTop = event.clientY + document.body.scrollTop +15;
	if(show==1) {
		if(event.clientX + document.body.scrollLeft +10 < 650 || event.clientY + document.body.scrollTop +15 < 450){
			quick.style.left=scollLeft;
			quick.style.top=scollTop;
		}else{
			quick.style.left=document.body.scrollLeft-event.clientX;
			quick.style.top=document.body.scrollTop-event.clientY;
			show=0;
		}
	}
}
//document.onmousemove = movePoint;

function file_browse(){
	all.f_photo.click();
	all.f_photo_text.value=all.f_photo.value;
	document.images["img"].src = all.f_photo_text.value;
	var img_width = document.images["img"].width;
	if(img_width > 141){
		document.images["img"].width = 140;
	}
}

function file_view(tImg,obj){
	if(obj.value == ""){
		document.images[tImg].src = "../images/member/image.gif";
	}else{
		document.images[tImg].src = obj.value;
		var img_width = document.images[tImg].width;
		if(img_width > 141){
			document.images[tImg].width = 140;
		}
	}
}

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
function flashWrite(url, w, h, id, bg, vars, win){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + w + "' height='" + h + "' id='" + id + "' align='middle'>" +
	"<param name='allowScriptAccess' value='sameDomain' />" +
	"<param name='movie' value='" + url + "' />" +
	"<param name='wmode' value='" + win + "' />" +
	"<param name='menu' value='false' />" +
	"<param name='quality' value='high' />" +
	"<param name='bgcolor' value='" + bg + "' />" +
	"<embed src='" + url + "' FlashVars='" + vars + "' wmode='" + win + "' menu='false' quality='high' bgcolor='" + bg + "' width='" + w + "' height='" + h + "' name='" + id + "' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);

}

//================================= ÀÔ·Â¿¡ °üÇÑ FUNCTION ============================================//

function formatDate(date) {
	var mymonth = date.getMonth()+1;
	var myweekday = date.getDate();
	return (mymonth + "/" + myweekday);
}

function printWeek(pWeek) {
	var now = new Date();
	var nowDayOfWeek = now.getDay();
	var nowDay = now.getDate();
	var nowMonth = now.getMonth() + 1;
	var nowYear = now.getYear();
	nowYear += (nowYear < 2000) ? 1900 : 0;

	if(nowMonth + 1 * pWeek == 0){
		var weekStartDate = new Date(nowYear - 1, 13 + 1 * pWeek - 1, 1);
	}else{
		var weekStartDate = new Date(nowYear, nowMonth + 1 * pWeek - 1, 1);
	}
	var weekEndDate = new Date(nowYear, nowMonth + 1 * pWeek, 0);
	//weekEndDate.setMonth(weekEndDate.getMonth() + 1);

	if(("" + (weekStartDate.getMonth() + 1)).length == 1)
		var smon = "0" + (weekStartDate.getMonth() + 1);
	else
		var smon = weekStartDate.getMonth() + 1;

	if(("" + (weekStartDate.getDate() + 1)).length == 1)
		var sdate = "0" + weekStartDate.getDate();
	else
		var sdate = weekStartDate.getDate();


	if(("" + (weekEndDate.getMonth() + 1)).length == 1)
		var emon = "0" + (weekEndDate.getMonth() + 1);
	else
		var emon = weekEndDate.getMonth() + 1;

	if(("" + (weekEndDate.getDate() + 1)).length == 1)
		var edate = "0" + weekEndDate.getDate();
	else
		var edate = weekEndDate.getDate();
	sForm.cal_val1.value = weekStartDate.getYear() + "-" + smon + "-" + sdate;
	sForm.cal_val2.value = weekEndDate.getYear() + "-" + emon + "-" + edate;
}

function printWeek2(pWeek) {
	var now = new Date();
	var nowDayOfWeek = now.getDay();
	var nowDay = now.getDate();
	var nowMonth = now.getMonth() + 1;
	var nowYear = now.getYear();
	nowYear += (nowYear < 2000) ? 1900 : 0;

	var ws = (nowDay + pWeek) - nowDayOfWeek;
	var we = 7 - nowDayOfWeek - 1 + (nowDay + pWeek);

	var weekStartDate = new Date(nowYear, nowMonth, ws);
	var weekEndDate = new Date(nowYear, nowMonth, we);

	if(("" + (weekStartDate.getMonth() + 1)).length == 1)
		var smon = "0" + (weekStartDate.getMonth());
	else
		var smon = weekStartDate.getMonth();

	if(("" + (weekStartDate.getDate() + 1)).length == 1)
		var sdate = "0" + weekStartDate.getDate();
	else
		var sdate = weekStartDate.getDate();


	if(("" + (weekEndDate.getMonth() + 1)).length == 1)
		var emon = "0" + (weekEndDate.getMonth());
	else
		var emon = weekEndDate.getMonth();

	if(("" + (weekEndDate.getDate() + 1)).length == 1)
		var edate = "0" + weekEndDate.getDate();
	else
		var edate = weekEndDate.getDate();
	sForm.cal_val1.value = weekStartDate.getYear() + "-" + smon + "-" + sdate;
	sForm.cal_val2.value = weekEndDate.getYear() + "-" + emon + "-" + edate;
}

//================================= Ä¿¸®¾îÄÉ¾î °ü·Ã ============================================//

// Status Var Text
var hellotext = "Searching People Who Make a Difference - CareerCare";
function hidestatus()	{
	window.status = hellotext;
	return true;
}

document.onmouseover=hidestatus;
hidestatus();

//-->
