<!--
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");

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;
}

function hide_shield()
{
	//var sure = confirm("Ã¢À» ´ÝÀ¸½Ã°Ú½À´Ï±î?\r\nÃ¢À»´ÝÀ¸¸é ÇöÀçÆäÀÌÁö´Â ´ÝÈü´Ï´Ù.");

	//if(sure)
	//{
		parent.location.reload();
	//}
}

//==================================== ±â¾÷ ·Î°í ¸¶¿ì½º ¿À¹ö ==============================================
function viewCName(comp_name) {
	if(!document.getElementById("cName")){
		newDIV = document.createElement("DIV");
		document.body.appendChild(newDIV);
		newDIV.id = "cName";
		newDIV.style.position = "absolute";
		newDIV.style.zindex = "100";
		newDIV.style.visibility = "hidden";
	}

	show = 1;

	str = "<table border='0' cellspacing='0' cellpadding='0' bgcolor='#ffffff'><tr><td><img src='/image/c_name_left_bg.gif'></td><td style='border-top:#e3e3e3 solid 1px;border-bottom:#e3e3e3 solid 1px;'>" + comp_name + "</td><td><img src='/image/c_name_right_bg.gif'></td></tr></table>"

	cName.innerHTML = str;
	cName.style.left = event.clientX + document.body.scrollLeft + 3;
	cName.style.top = event.clientY + document.body.scrollTop + 2;
	cName.style.visibility = 'visible';
	//cName.filters.item(0).stop();
}

function hideCName() {
	//cName.filters.item(0).transition = 12;	//filter °¡ blendTrans(duration=0.5) ¸é ÇÊ¿ä¾øÀ½.
	//cName.filters.item(0).apply();
	cName.style.visibility = 'hidden';
	//cName.filters.item(0).play();
	cName.style.left = document.body.scrollLeft - event.clientX;
	cName.style.top = document.body.scrollTop - event.clientY;
	//show=0;
}


//==================================== °Ô½Ã¹° ¿­¶÷ ·¹ÀÌ¾î Ã¢ ==============================================

var wx = 0, wy = 0;
var obj;

function viewReview(n)
{
	obj = document.getElementById('recDiv_' + n);

	if(obj.style.visibility != "hidden")
	{
		return;
	}
	else
	{
		moveBox();
		obj.style.visibility = 'visible';	
	}
}

function moveBox()
{
	obj.style.pixelLeft = wx + 20;
	obj.style.pixelTop  = wy - 110;

	obj.style.pixelLeft += document.body.scrollLeft;
	obj.style.pixelTop  += document.body.scrollTop;
}

function hideBox(n)
{
	obj = document.getElementById('recDiv_' + n);
	obj.style.visibility = 'hidden';
}

function dragIt()
{
	wx = event.x;
	wy = event.y;

	if(obj.style.visibility == "visible")
	{
		moveBox();
	}

	document.onmousemove = dragIt;
}


function hideReadCheck()
{
	objRead = document.getElementById('viewCheckBox');
	if(objRead.style.visibility == "visible")
	{
		objRead.style.visibility = 'hidden';
	}
}

function CloseReadCheckMsg()
{
	if(document.all.alertToday.checked)
	{
		setCookie("viewPop", "done" , 1);
	}
}

function setCookie(name, value, expiredays)
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
//========================================================================================================


//==================================== °Ô½Ã¹° ÄÚ¸àÆ® ¼öÁ¤ ¸ðµâ ==============================================

var selCommentIdx = "";

function editComment(mode, cIdx, tUrl)
{
	var orgCmt = document.getElementById("commentDiv_" + cIdx).innerHTML.replace(/\s/g,"&nbsp;");

	var editFrmStr = "<table width=\"670\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
	editFrmStr += "<form name=\"commentForm\" method=\"post\" action=" + tUrl + "?vm=commentModify onsubmit=\"return chkEditComment();\">";
	editFrmStr += "<input type=\"hidden\" name=\"idx\" value=" + usefulnessForm.idx.value + ">";

	if(mode == "review" || mode == "guide")
	{
		editFrmStr += "<input type=\"hidden\" name=\"comp_code\" value=" + usefulnessForm.comp_code.value + ">";
	}
	else if(mode == "talk" || mode == "cafeteria")
	{
		editFrmStr += "<input type=\"hidden\" name=\"root\" value=" + usefulnessForm.root.value + ">";
		editFrmStr += "<input type=\"hidden\" name=\"page\" value=" + usefulnessForm.page.value + ">";
	}
	else if(mode == "i_hrtrand")
	{
		editFrmStr += "<input type=\"hidden\" name=\"page\" value=" + usefulnessForm.page.value + ">";
	}

	editFrmStr += "<input type=\"hidden\" name=\"cIdx\" value=" + cIdx + ">";
	editFrmStr += "<tr><td><input type=\"text\" name=\"newComment\" size=\"90\" class=\"box1\" value=" + orgCmt + ">&nbsp;";
	editFrmStr += "<input type=\"image\" src=\"/image/report/work_review/modi_input_but.gif\" border=\"0\" align=\"absmiddle\">&nbsp;";
	editFrmStr += "<a href=\"javascript:editComment('" + mode + "', '" + cIdx + "', '" + tUrl + "');\"><img src=\"/image/report/work_review/cancel_input_but.gif\" border=\"0\" align=\"absmiddle\"></a>";
	editFrmStr += "</td></tr></form></table>";

	if(selCommentIdx == "")//Ã³À½Å¬¸¯
	{
		if(document.getElementById("commentDiv_" + cIdx).style.display == "")
		{
			document.getElementById("commentDiv_" + cIdx).innerHTML = editFrmStr;
		}
		selCommentIdx = cIdx;
	}
	else if(selCommentIdx == cIdx)//°°ÀºÄÚ¸àÆ®Å¬¸¯
	{
		if(selCommentIdx == "")
		{
			if(document.getElementById("commentDiv_" + cIdx).style.display == "")
			{
				document.getElementById("commentDiv_" + cIdx).innerHTML = editFrmStr;
			}
			selCommentIdx = cIdx;
		}
		else
		{
			var inputStr = document.all.newComment.value;
			document.getElementById("commentDiv_" + cIdx).innerHTML = inputStr;

			selCommentIdx = "";
		}
	}
	else//´Ù¸¥ÄÚ¸àÆ®Å¬¸¯
	{
		if(selCommentIdx == "")
		{
			if(document.getElementById("commentDiv_" + cIdx).style.display == "")
			{
				var newStr = document.getElementById("commentDiv_" + cIdx).innerHTML;
				document.getElementById("commentDiv_" + cIdx).innerHTML = editFrmStr;
				document.all.newComment.value = newStr;  
			}
			selCommentIdx = cIdx;
		}
		else
		{
			var refStr = document.all.newComment.value;
			document.getElementById("commentDiv_" + selCommentIdx).innerHTML = refStr;
			var newStr = document.getElementById("commentDiv_" + cIdx).innerHTML;
			document.getElementById("commentDiv_" + cIdx).innerHTML = editFrmStr;
			document.all.newComment.value = newStr; 

			selCommentIdx = cIdx;
		}
	}
}

function chkEditComment()
{
	if(!document.all.newComment.value)
	{
		alert("ÇÑÁÙÀÇ°ßÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		document.all.newComment.focus();
		return false;
	}
	return true;
}
//--ÇÑÁÙÀÇ°ß°ü·Ã--//


function dpWriteView(mode, dIdx)
{
	var trObjMainReply = eval("document.all.trMainReply.style");
	var trObjMainComment = eval("document.all.trMainComment.style");

	if(mode == "reply")
	{
		if(trObjMainReply.display == "")
		{
			trObjMainReply.display = "none";
		}
		else
		{
			trObjMainReply.display = "";
		}
		trObjMainComment.display = "none";
	}
	else if(mode == "replyMod")
	{
		var trObjModReply = eval("document.all.trReply_" + dIdx + ".style");
		if(trObjModReply.display == "")
		{
			trObjModReply.display = "none";
		}
		else
		{
			trObjModReply.display = "";
		}
	}
	else if(mode == "comment")
	{
		if(trObjMainComment.display == "")
		{
			trObjMainComment.display = "none";
		}
		else
		{
			trObjMainComment.display = "";
		}
		trObjMainReply.display = "none";
	}
	else if(mode == "subComment")
	{
		var trObjSubComment = eval("document.all.trSubComment_" + dIdx + ".style");
		if(trObjSubComment.display == "")
		{
			trObjSubComment.display = "none";
		}
		else
		{
			trObjSubComment.display = "";
		}
	}
}

function chkMainWrite(mode, dIdx)
{
	if(mode == "reply")
	{
		if(!mainReplyForm.rTitle.value)
		{
			alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			mainReplyForm.rTitle.focus();
			return false;
		}
		if(!mainReplyForm.rContent.value)
		{
			alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			mainReplyForm.rContent.focus();
			return false;
		}
		return true;
	}
	else if(mode == "replyMod")
	{
		var modReplyTitleObj = eval("modReplyForm_" + dIdx + ".rTitle_" + dIdx);
		var modReplyContentObj = eval("modReplyForm_" + dIdx + ".rContent_" + dIdx);
		if(!modReplyTitleObj.value)
		{
			alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			modReplyTitleObj.focus();
			return false;
		}
		if(!modReplyContentObj.value)
		{
			alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			modReplyContentObj.focus();
			return false;
		}
		return true;
	}
	else if(mode == "comment")
	{
		if(!mainCommentForm.mainComment.value)
		{
			alert("ÇÑÁÙÀÇ°ßÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			mainCommentForm.mainComment.focus();
			return false;
		}
		return true;
	}
	else if(mode == "subComment")
	{
		var subCommentObj = eval("subCommentForm_" + dIdx + ".subComment_" + dIdx);
		if(!subCommentObj.value)
		{
			alert("ÇÑÁÙÀÇ°ßÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
			subCommentObj.focus();
			return false;
		}
		return true;
	}
}

function delComment(idx)
{
	var sure = confirm("ÇÑÁÙÀÇ°ßÀ»»èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?");
	if(sure)
	{
		delCommentForm.cIdx.value = idx;
		delCommentForm.submit();
	}
}

function faceS(n)
{
	mainReplyForm.face.value = n;
	document.images["faceImg"].src = "/image/inside_talk/face/" + n +  ".gif";
}
//========================================================================================================

//-->