function bluring(){
  if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
//document.onfocusin=bluring;

function checkValid(str, space){

   var retvalue = false;

   for (var i=0; i<str.length; i++)
   {		//StringÀÌ 0("" ÀÌ³ª null)ÀÌ¸é ¹«Á¶°Ç false
      if (space == true)
      {
         if (str.charAt(i) == ' ')
         {			//StringÀÌ 0ÀÌ ¾Æ´Ò¶§ space°¡ ÀÖ¾î¾ß¸¸ true(valid)
            retvalue = true;
            break;
         }
      } else {
         if (str.charAt(i) != ' ')
         {			//stringÀÌ 0ÀÌ ¾Æ´Ò¶§ space°¡ ¾Æ´Ñ ±ÛÀÚ°¡ ÀÖ¾î¾ß¸¸ true(valid)
            retvalue = true;
            break;
         }
      }
   }

   return retvalue;
}

function isEmpty(field, error_msg)
{
	// error_msg°¡ ""ÀÌ¸é alert¿Í focusingÀ» ÇÏÁö ¾Ê´Â´Ù
	if(error_msg == "") {
		if(!checkValid(field.value, false)) {
			return true;
		} else {
			return false;
		}
	} else {
		if(!checkValid(field.value, false)) {
			alert(error_msg);
			field.focus() ;
			return true;
		} else {
			return false;
		}
	}
}

function getByteLength(field){
   var len = 0;
   var s = field.value;
   if ( s == null ) return 0;
   for(var i=0;i<s.length;i++){
      var c = escape(s.charAt(i));
      if ( c.length == 1 ) len ++;
      else if ( c.indexOf("%u") != -1 ) len += 2;
      else if ( c.indexOf("%") != -1 ) len += c.length/3;
   }
   return len;
}

function viewSellerInfoPreViewIframe(seller_no, parent_id){

	if(parent.seller_layer.style.visibility == "visible"){
		parent.seller_layer.style.visibility = "hidden";
		return;
	}

	var e = window.event;

	var parentObj = e.srcElement;

	var offX = e.offsetX;
	var offY = e.offsetY;

	var c_layerX = 0;
	var c_layerY = 0;

	objDataFleid = parent.document.getElementById(parent_id);
	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	var X = e.clientX + c_layerX;
	var Y = e.clientY + c_layerY;

	c_layerX = 0;
	c_layerY = 0;

	var objDataFleid = parentObj;

	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	objDataFleid = parent.document.getElementById(parent_id);
	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	var main_height;
	var main_width;

	var main_obj = parent.document.body;
	main_height = main_obj.scrollHeight + (main_obj.offsetHeight-main_obj.clientHeight);
	main_width = main_obj.scrollWidth + (main_obj.offsetWidth-main_obj.clientWidth);

	if( main_width - X < 575 ){
		X = c_layerX + offX - 575 + 22;
		if(X < 0){
			X = 0;
		}
	}else{
		X = c_layerX + offX;
	}

	if( main_height - Y < 312 ){
		Y = c_layerY + offY - 312;
		if(Y < 0){
			Y = 0;
		}
	}else{
		Y = c_layerY + offY;
	}

	parent.seller_layer.style.posLeft = X;
	parent.seller_layer.style.posTop = Y;

	parent.viewSellerLayerIframe(seller_no);

}

function viewSellerInfoPreViewIframeIframe(seller_no, parent_id){

	if(parent.parent.seller_layer.style.visibility == "visible"){
		parent.parent.seller_layer.style.visibility = "hidden";
		return;
	}

	var e = window.event;

	var parentObj = e.srcElement;

	var offX = e.offsetX;
	var offY = e.offsetY;

	var c_layerX = 0;
	var c_layerY = 0;

	objDataFleid = parent.document.getElementById(parent_id);
	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	objDataFleid = parent.parent.document.getElementById(parent_id);
	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	var X = e.clientX + c_layerX;
	var Y = e.clientY + c_layerY;

	c_layerX = 0;
	c_layerY = 0;

	var objDataFleid = parentObj;

	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	objDataFleid = parent.document.getElementById(parent_id);
	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}
	objDataFleid = parent.parent.document.getElementById(parent_id);
	while (objDataFleid) {
		if(objDataFleid.id == 'main_div'){
			break;
		}
		c_layerX += objDataFleid.offsetLeft;
		c_layerY += objDataFleid.offsetTop;
		objDataFleid = objDataFleid.offsetParent;
	}

	var main_height;
	var main_width;

	var main_obj = parent.parent.document.body;
	main_height = main_obj.scrollHeight + (main_obj.offsetHeight-main_obj.clientHeight);
	main_width = main_obj.scrollWidth + (main_obj.offsetWidth-main_obj.clientWidth);

	if( main_width - X < 575 ){
		X = c_layerX + offX - 575 + 22;
		if(X < 0){
			X = 0;
		}
	}else{
		X = c_layerX + offX;
	}

	if( main_height - Y < 312 ){
		Y = c_layerY + offY - 312;
		if(Y < 0){
			Y = 0;
		}
	}else{
		Y = c_layerY + offY;
	}

	parent.parent.seller_layer.style.posLeft = X;
	parent.parent.seller_layer.style.posTop = Y;

	parent.parent.viewSellerLayerIframe(seller_no);

}

function nset(nation) {
	 var nchk="N";
	 if (document.all.nchk.checked==true) {
	  nchk="Y"
	 }
	 parent.location.href="http://www.cyworld.com/global_locale.jsp?etc="+nation+"&chk="+nchk;
}
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 chkSearchWord(pVal){

	var r_value = pVal;
	var r_space = "";
	var arr_proh_word = new Array("%");
	var check_flag = false;

	for(var j = 0; j < arr_proh_word.length; j++){

		while(r_value.indexOf(arr_proh_word[j]) != -1){

			alert("'"+arr_proh_word[j]+"'(ÀÌ)¶ó´Â °Ë»ö¾î´Â »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù! \n\n´Ù¸¥ ´Ü¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");

			r_space = trim(r_space + r_value.substring(0, r_value.indexOf(arr_proh_word[j])));
			r_value = trim(r_value);
			r_value = r_value.substring(r_value.indexOf(arr_proh_word[j]) + arr_proh_word[j].length);
			check_flag = true;

			break;
		}

		if(check_flag){
			break;
		}
	}

	if(check_flag){
		return false;
	}else{
		return true;
	}
}

function getWinAdjSize()
{
	var agent = window.navigator.userAgent;

	if ( agent.indexOf("MSIE 7.0") != -1) // IE 7.0
		return 32;
	else if ( agent.indexOf("SV1") != -1) // XP SP2
		return 0;

	return 0;
}

function windowResizeToFit() {
	var agent = window.navigator.userAgent;
	var winBody = document.body;

	if ( agent.indexOf("IE") != -1 )
	{
		var marginHeight = parseInt(winBody.topMargin)+parseInt(winBody.bottomMargin);
		var marginWidth = parseInt(winBody.leftMargin)+parseInt(winBody.rightMargin);

		var wid = winBody.scrollWidth + (winBody.offsetWidth - winBody.clientWidth) + marginWidth;
		var hei = winBody.scrollHeight + (winBody.offsetHeight - winBody.clientHeight) + marginHeight + getWinAdjSize() + 20;
		resizeTo(wid, hei);
	} else {
		resizeTo(winBody.offsetWidth+120, winBody.offsetHeight+50);
	}
}

function windowResizeTo( W, H )
{
	try {
		window.resizeTo( W, parseInt(H)+getWinAdjSize() );
	} catch (ex) {
		window.resizeTo( W, H+getWinAdjSize() );
	}
}

  //hasa00 : À©µµ¿ì ÀÚµ¿ ¸®»çÀÌÂ¡. ºê¶ó¿ìÁ® °ü°è¾øÀÌ ÀÚµ¿À¸·Î ¸ÂÃç µ¿ÀÛÇÏ¸ç , ÆÄ¶ó¹ÌÅÍ °ª ÁÖÁö ¾Ê¾Æµµ ÀÚµ¿À¸·Î µÈ´Ù.
  function winResize(set_width, set_height)
  {
    var Dwidth = null;
    var Dheight = null;
  	//alert(document.body.scrollWidth+','+document.body.scrollHeight);
    if(set_width == null ||  set_width == '')
      Dwidth = parseInt(document.body.scrollWidth);
    else
         Dwidth = set_width;

       if(set_height == null ||  set_height == '')
      Dheight = parseInt(document.body.scrollHeight);
    else
         Dheight = set_height;


      var divEl = document.createElement("div");
      divEl.style.position = "absolute";
      divEl.style.left = "0px";
      divEl.style.top = "0px";
      divEl.style.width = "100%";
      divEl.style.height = "100%";

      document.body.appendChild(divEl);

      window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight);
      document.body.removeChild(divEl);
  }

/**
 * iframe »çÀÌÁî Á¶Àý..
 */
function resizeIframe(frmName) {
	var n=navigator.appName;
	var ie=(n=='Microsoft Internet Explorer');
	var ifrmObj = document.getElementById(frmName);

	var innerHeight = 0;
	var innerWidth = 0;
	if (ie) {
		var innerBody = ifrmObj.contentWindow.document.body;

		innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
		innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	} else {
		var innerBody = ifrmObj.contentDocument.body;

		innerHeight	= innerBody.offsetHeight + 100;
		innerWidth	= 668;
	}

	ifrmObj.style.height	= innerHeight + "px";
	ifrmObj.style.width		= innerWidth + "px";
}

function goBannerUrl( url, target )	{
	if ( target == null )	{
		target = self;
	}

	target.location.href = url;
}

function ndrclick(pndrregionid, call_func){
	ndrclick2(pndrregionid)

	eval(call_func);
}

function ndrclick2(pndrregionid){
	i = new Image();
	i.src =  "http://statclick.nate.com/stat/statclick.tiff?cp_url=[click_ndr.nate.com/??ndrpageid=ma1&ndrregionid="+pndrregionid+"]";
}

function ndrclick3(ndrpageid, pndrregionid){
	i = new Image();
	i.src =  "http://statclick.nate.com/stat/statclick.tiff?cp_url=[click_ndr.nate.com/??ndrpageid="+ndrpageid+"&ndrregionid="+pndrregionid+"]";
}

function goUrl(link, param) {
	location.href = link + param;
}

function reloadPage() {
	location.reload();
}

function writeObject(oOjb) {
	document.write(oObj.replace(/\r\n/g, ""));
}

function doInfo() {
	alert('¸¶ÄÏ Á¤½Ä ¿ÀÇÂ ½Ã ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù.');
}

function isNotValidPassword(passField, confirmField) {

	if(isEmpty(passField,"ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(isEmpty(confirmField,"ÆÐ½º¿öµå¸¦ ÀçÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(isOutOfRange(passField, 4, 10, "ºñ¹Ð¹øÈ£´Â 4~10ÀÚ »çÀÌÀÇ ¼ýÀÚ ¹× ¿µ¹® ´ë¼Ò¹®ÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(isOutOfRange(confirmField, 4, 10, "ºñ¹Ð¹øÈ£´Â 4~10ÀÚ »çÀÌÀÇ ¼ýÀÚ ¹× ¿µ¹® ´ë¼Ò¹®ÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(passField.value != confirmField.value) {
		alert("ºñ¹Ð¹øÈ£°¡ ¼­·Î ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.\n ´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		passField.value="";
		confirmField.value="";
		passField.focus();
		passField.select();
		return true;
	}
	return false;
}

function isNotValidPID(pid1, pid2) {

	if(isEmpty(pid1,"ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(isEmpty(pid2,"ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(!isNumber(pid1,"ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â ¼ýÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(!isNumber(pid2,"ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®´Â ¼ýÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(isNotExactLength(pid1, 6, "ÁÖ¹Îµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â 6ÀÚ¸®ÀÔ´Ï´Ù!")) return true;
	if(isNotExactLength(pid2, 7, "ÁÖ¹Îµî·Ï¹øÈ£ µÞÀÚ¸®´Â 7ÀÚ¸®ÀÔ´Ï´Ù!")) return true;
	strchr = form.pid1.value.concat(pid2.value);
	if (strchr.length == 13	) {
		nlength = strchr.length;

		num1 = strchr.charAt(0);
		num2 = strchr.charAt(1);
		num3 = strchr.charAt(2);
		num4 = strchr.charAt(3);
		num5= strchr.charAt(4);
		num6 = strchr.charAt(5);
		num7 = strchr.charAt(6);
		num8 = strchr.charAt(7);
		num9 = strchr.charAt(8);
		num10 = strchr.charAt(9);
		num11 = strchr.charAt(10);
		num12 = strchr.charAt(11);

		var total = (num1*2)+(num2*3)+(num3*4)+(num4*5)+(num5*6)+(num6*7)+(num7*8)+(num8*9)+(num9*2)+(num10*3)+(num11*4)+(num12*5);
		total = (11-(total%11)) % 10;

		if(total != strchr.charAt(12)) {
			alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù. \n´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
			pid1.value="";
			pid2.value="";
			pid1.focus();
			return true;
		}
		return false;
	}	else
		alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù. \n´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		pid1.value="";
		pid2.value="";
		pid1.focus();
		return true;

}

function isNotValidBID(bid1, bid2, bid3) {

	if(isEmpty(bid1,"»ç¾÷ÀÚµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(isEmpty(bid2,"»ç¾÷ÀÚµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(isEmpty(bid3,"»ç¾÷ÀÚµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")) return true;
	if(!isNumber(bid1,"»ç¾÷ÀÚµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â ¼ýÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(!isNumber(bid2,"»ç¾÷ÀÚµî·Ï¹øÈ£ °¡¿îµ¥ÀÚ¸®´Â ¼ýÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(!isNumber(bid3,"»ç¾÷ÀÚµî·Ï¹øÈ£ µÞÀÚ¸®´Â ¼ýÀÚ·Î¸¸ ±âÀÔÇØ ÁÖ¼¼¿ä!")) return true;
	if(isNotExactLength(bid1, 3, "»ç¾÷ÀÚµî·Ï¹øÈ£ ¾ÕÀÚ¸®´Â 3ÀÚ¸®ÀÔ´Ï´Ù!")) return true;
	if(isNotExactLength(bid2, 2, "»ç¾÷ÀÚµî·Ï¹øÈ£ µÞÀÚ¸®´Â 2ÀÚ¸®ÀÔ´Ï´Ù!")) return true;
	if(isNotExactLength(bid3, 5, "»ç¾÷ÀÚµî·Ï¹øÈ£ µÞÀÚ¸®´Â 5ÀÚ¸®ÀÔ´Ï´Ù!")) return true;
	strchr = bid1.value.concat(bid2.value.concat(bid3.value));

	num1 = strchr.charAt(0);
	num2 = strchr.charAt(1);
	num3 = strchr.charAt(2);
	num4 = strchr.charAt(3);
	num5= strchr.charAt(4);
	num6 = strchr.charAt(5);
	num7 = strchr.charAt(6);
	num8 = strchr.charAt(7);
	num9 = strchr.charAt(8);
	num10 = strchr.charAt(9);

	var total = (num1*1)+(num2*3)+(num3*7)+(num4*1)+(num5*3)+(num6*7)+(num7*1)+(num8*3)+(num9*5);
	total = total + parseInt((num9 * 5) / 10);
	var tmp = total % 10;
	if(tmp == 0) {
		var num_chk = 0;
	} else {
		var num_chk = 10 - tmp;
	}

	if(num_chk != num10) {
		alert("»ç¾÷ÀÚµî·Ï¹øÈ£°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù. \n´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		bid1.value="";
		bid2.value="";
		bid3.value="";
		bid1.focus();
		return true;
	}
	return false;
}

function isNotValidEmail(field)
{
   var checkflag = true;
   var retvalue;

   if(field.value == "") {
	   retvalue = true;
   } else {

	   if (window.RegExp) {
		  var tempstring = "a";
		  var exam = new RegExp(tempstring);
		  if (tempstring.match(exam)) {
			 var ret1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
			 var ret2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
			 retvalue = (!ret1.test(field.value) && ret2.test(field.value));
		  } else {
			 checkflag = false;
		  }
	   } else {
		  checkflag = false;
	   }

	   if (!checkflag) {
		  retvalue = ( (field.value != "") && (field.value.indexOf("@")) > 0 && (field.value.index.Of(".") > 0) );
	   }

   }
   if(retvalue) { return false;
   } else {
		alert("ÀÌ¸ÞÀÏ ÁÖ¼Ò°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù. \n´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		field.focus();
		field.select();
		return true;
   }
}

function isNotValidTel(field) {

   var Count;
   var PermitChar =
         "0123456789-";

   for (var i = 0; i < field.value.length; i++) {
      Count = 0;
      for (var j = 0; j < PermitChar.length; j++) {
         if(field.value.charAt(i) == PermitChar.charAt(j)) {
            Count++;
            break;
         }
      }

      if (Count == 0) {
         alert("ÀüÈ­¹øÈ£°¡ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù. \n´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä!")
		 field.focus();
		 field.select();
		 return true;
         break;
      }
   }
   return false;
}

function open_town(tid, catalog_div_no){
	openTownMiniHp(tid, '1', '', '', '', '');
}

function openMiniLoginPop(callbackfn, targetName, openWincloseYn, fromWhere){
	var url  = PATH_BASIC_DOMAIN+"/main.do?method=loginPop";
	openMiniLoginPopBase ( url, callbackfn, targetName, openWincloseYn, fromWhere ) ;
}

function openMiniLoginPopBase(url, callbackfn, targetName, openWincloseYn, fromWhere){
	var width = 410;
	var height = 394;
	var wid = (screen.width)/2 - width/2 ;
	var hei = (screen.height)/2 - height/2;
	var winClose = '';
	var fwhere = '';
	var tn = 'loginpopminihp';
	var forwardUrl = "forwardUrl=opener:"+callbackfn+"?timestamp="
	if(openWincloseYn != null){
		winClose = 'openWincloseYn='+openWincloseYn;
		forwardUrl = forwardUrl + "^"+ winClose;
		url = url  + "&"+ winClose;
	}

	if(fromWhere != null){
		fwhere = 'fromWhere='+fromWhere;
		forwardUrl = forwardUrl + "^"+ fwhere;
		url = url  + "&"+ fwhere;
	}

	if(targetName != null){
		tn = targetName;
	}

	url = url + "&" +forwardUrl;

	var win = window.open(url, tn, "menubar=no, scrollbars=no, resizable=no, width=" + width + ", height=" + height+ ",top=" + hei + ",left=" + wid + "");
	win.focus();
	//return win;
}
function openMiniLoginPopMemberOnly(callbackfn, targetName, openWincloseYn, fromWhere){
	var url  = PATH_BASIC_DOMAIN+"/main.do?method=loginPop&loginTp=MEM";
	openMiniLoginPopBase ( url, callbackfn, targetName, openWincloseYn, fromWhere ) ;
}
function openMiniLoginPopNonMemberApply(callbackfn, targetName, openWincloseYn, fromWhere){
	var url  = PATH_BASIC_DOMAIN+"/main.do?method=loginPop&agrmt=Y";
	openMiniLoginPopBase ( url, callbackfn, targetName, openWincloseYn, fromWhere ) ;
}
function openAdultAuthNonMemeber(callbackfn, targetName, openWincloseYn, fromWhere){
	var url  = PATH_BASIC_DOMAIN+"/main.do?method=adultAuthPop&agrmt=Y";
	openMiniLoginPopBase ( url, callbackfn, targetName, openWincloseYn, fromWhere ) ;
}
function goMiniShop(seller_no, target){
	if ( target == null )	{
		target = self;
	}
	target.location.href = PATH_MINISHOP_DOMAIN+"/minishop/minishop.do?method=initSellerAllItemList&seller_no=" + seller_no;
}
function goMiniShopPop(seller_no){
	window.open(PATH_MINISHOP_DOMAIN+"/minishop/minishop.do?method=initSellerAllItemList&seller_no=" + seller_no);
}
function goBrand(brand_no){
	location.href = PATH_CORNER_DOMAIN+"/corner/brand.do?method=dispBrandSub&brand_no=" + brand_no;
}
function addWishListforPreview(){
	var f = document.cartFormforPreView;

	openNoScrollWin("", "wishResult", "ÂòÇÏ±â °á°ú", "300", "200", "");
	f.target="wishResult";
	f.action = PATH_ORDER_DOMAIN+"/order/cart.do?authorized=true";
	f.method.value = "saveWishList";
	f.submit();
}
function addCartListforPreview(){
	var f = document.cartFormforPreView;

	//openNoScrollWin("", "cartResult", "Àå¹Ù±¸´Ï ´ã±â °á°ú", "300", "200", "");
	//f.target="cartResult";
	f.target = "_self";
	f.action = PATH_ORDER_DOMAIN+"/order/cart.do?authorized=true";
	f.method.value = "saveCartLst";
	f.submit();
}
function addOrderforPreview(){
	var f = document.cartFormforPreView;

	f.imm_buy_yn.value = "Y";
	f.target="_self";
	f.method.value = "initOrder";
	f.submit();
}
function fAddCompListforPreview(){
	var f = document.cartFormforPreView;

	openScrollWin("", "compResult", "»óÇ°ºñ±³ÇÏ±â", "850", "748", "");
	f.target= "compResult";
	f.action = PATH_MARKET_DOMAIN+"/market/concern.do";
	f.method.value = "doInitItemComp";
	f.submit();
}

function goOrderDetailInfo(order_no){
	location.href = PATH_ORDER_DOMAIN+"/order/order.do?method=doSearchOrdDetail&order_no="+order_no;
}

function openOrderDetailInfo(order_no){
	openScrollWin(PATH_ORDER_DOMAIN+"/order/order.do", "orderDetail", "ÁÖ¹®»ó¼¼ÆäÀÌÁö", "1050", "700", "&method=doSearchOrdDetail&order_no="+order_no);
}

var dcCouponShopNo = "";
function openShopDcCouponDown(shop_no) {
	dcCouponShopNo = shop_no;

	if ( !checkLoginOpenShopDcCouponDown() ) return;

	openScrollWin(PATH_PROMOTION_DOMAIN+"/promotion/coupon.do", "DcCoupon", "ÇÒÀÎÄíÆù", "520", "450", "&method=doSearchDcCpnDown&shop_no="+dcCouponShopNo);

}

function shopLocationReload(){
	goPlanMarket(dcCouponShopNo);
	openScrollWin(PATH_PROMOTION_DOMAIN+"/promotion/coupon.do", "DcCoupon", "ÇÒÀÎÄíÆù", "520", "450", "&method=doSearchDcCpnDown&shop_no="+dcCouponShopNo);
}

function checkLoginOpenShopDcCouponDown() {
	try {
		if ( checkIsLogin() == "false" ) {
			openMiniLoginPopMemberOnly("shopLocationReload");
			return false;
		}
		return true;
	} catch (ex) {
		return false;
	}
}
function getStrToday() {
 	 var today=new Date();
 	 var strToDay = today.getYear();
 	 if (today.getMonth()+1 < 10)
 	 	strToDay += "-0"+ (parseInt(today.getMonth())+1);
 	 else
 	 	strToDay += "-" + (parseInt(today.getMonth())+1);

 	 if (today.getDate() < 10)
 	 	strToDay += "-0"+today.getDate();
 	 else
 	 	strToDay += "-" + today.getDate();

 	 return strToDay;
}
function transDateToStr( p_date, p_add_time ){
	var strToDay = "";
	if(p_date != null){

		strToDay = p_date.getYear();

		if (p_date.getMonth()+1 < 10){
			strToDay += "-0"+ (parseInt(p_date.getMonth())+1);
		} else {
			strToDay += "-" + (parseInt(p_date.getMonth())+1);
		}

		if (p_date.getDate() < 10){
			strToDay += "-0"+p_date.getDate();
		} else {
			strToDay += "-" + p_date.getDate();
		}

		if(p_add_time !=null){

			if (p_date.getHours() < 10){
				strToDay += " 0"+p_date.getHours()+ ":";
			} else {
				strToDay += " "+p_date.getHours()+ ":";
			}

			if (p_date.getMinutes() < 10){
			strToDay += "0"+p_date.getMinutes()+ ":";
			} else {
				strToDay += ""+p_date.getMinutes()+ ":";
			}

			if (p_date.getSeconds() < 10){
				strToDay += "0"+p_date.getSeconds();
			} else {
				strToDay += ""+p_date.getSeconds()+".0";
			}
		}
	}
	return strToDay;
}
function dateFormat(source, format)
{
	ret = "";
	delimiter = "";

	if (format.indexOf("-") != -1)
		delimiter = "-";
	else if (format.indexOf("/") != -1)
		delimiter = "/";
	else
	{
		alert("ÀÔ·ÂµÈ ³¯Â¥Æ÷¸ËÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
		return;
	}

	if (source.length == 8)
	{
		ret = source.substring(0, 4) + delimiter + source.substring(4, 6) + delimiter + source.substring(6, 8);
	} else if (source.length == 10)
	{
		ret = source.substring(0, 4) + delimiter + source.substring(5, 7) + delimiter + source.substring(8, 10);
	} else
	{
		alert("ÀÔ·ÂµÈ ³¯Â¥Çü½ÄÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
		return;
	}
	return ret;
}
function blnOkDate(astrValue, astrNotNull)
{
	var arrDate;

	if (astrValue=='')
	{
		if (astrNotNull == "nn")
			return false;
		else
			return true;
	}else{
		if (astrValue.indexOf("-") != -1)
			arrDate = astrValue.split("-");
		else if (astrValue.indexOf("/") != -1)
			arrDate = astrValue.split("/");
		else
		{
			if (astrValue.length != 8) return false;
			astrValue = astrValue.substring(0,4)+"/"+astrValue.substring(4,6)+"/" +astrValue.substring(6,8);
			arrDate = astrValue.split("/");
		}

		if (arrDate.length != 3) return false;

		var chkDate = new Date(arrDate[0] + "/" + arrDate[1] + "/" + arrDate[2]);
		if (isNaN(chkDate) == true ||
			(arrDate[1] != chkDate.getMonth() + 1 || arrDate[2] != chkDate.getDate()))
		{
			return false;
		}
	}
	return true;
}

function openCalendarInGrid(fgName, row, col)
{
	var fg = document.all(fgName);
	if (!blnOkDate(fg.TextMatrix(row, col), "nn"))
	{
		fg.TextMatrix(row, col) = "";
		showDateCalendarGrid(fgName + ", " + row + ", " + col);
	}
	else
		fg.TextMatrix(row, col) = dateFormat(fg.TextMatrix(row, col), "YYYY-MM-DD");

}

function openCalendar(dateField)
{
 var obj = eval("document." + dateField);

 if (obj.value == "")
  return;
 if (!blnOkDate(obj.value, "nn"))
 {
  obj.value = "";
  showDateCalendar(dateField);
 }
 else
  obj.value = dateFormat(obj.value, "YYYY-MM-DD");

}

function addDate(stDate, stType, stValue) {
	var CurYear = stDate.substring(0,4);
	var CurMonth = stDate.substring(5,7);
	var CurDate = stDate.substring(8);

	var TDate = new Date();

	if (stType == 'Year') {
		CurYear = eval(CurYear) + eval(stValue);
		TDate.setFullYear(CurYear);
	} else if (stType == 'Month') {
		CurMonth = eval(CurMonth) + eval(stValue-1);
		TDate.setMonth(CurMonth);
	} else {
		CurDate = eval(CurDate) + eval(stValue);
		TDate.setDate(CurDate);
	}

	CurYear = TDate.getFullYear();
	CurMonth = TDate.getMonth()+1;
	CurDate = TDate.getDate();
	if (CurMonth<10) CurMonth = '0' + CurMonth;
	if (CurDate<10) CurDate = '0' + CurDate;

	return  (CurYear.toString() + '-' + CurMonth.toString() + '-' + CurDate.toString());
}

function getDate(strDate){

	var tokens = strDate.split("-");

	if(strDate != '' && strDate.length > 10){

		strDate = strDate.substring(0, 10);
	}

	var d = new Date( eval(tokens[0]), (eval(tokens[1]) - 1), eval(tokens[2]) );

	return d;
}

function getDateChange(strDate){

	if(strDate == '0001-01-01 00:00:00.0'){
		// ½ÇÁ¦µ¥ÀÌÅ¸´Â null
		return null;
	}else{

		return getDate(strDate);
	}
}

function isNotSelected(field, error_msg) {
	if(field.selectedIndex == 0) {
		alert(error_msg);
		field.focus() ;
		return true;
	} else {
		return false;
	}
}

function uncheckRadio(field) {
	for(i = 0; i < field.length; i++) {
		field[i].checked = false;
	}
}

function getRadioVal(field) {

	if(typeof(field.length) == 'undefined')
	{
		return field.value;
	}
	else
	{
		for(i = 0; i < field.length; i++) {
			if(field[i].checked == true)
				return field[i].value;
		}
	}

	return "";
}

function doInit(frm){
	for (i = 0; i < frm.elements.length; i++){
		if(frm.elements[i].type == 'text'){
			frm.elements[i].value = "";
		}
	}
}

function enterKeyDown(func)
{
	enter = event.keyCode;
	if(enter == 13)
	{
		eval(func);
	}
}
function enterKeyDown(event, func)
{
	enter = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	if(enter == 13)
	{
		eval(func);
	}
}

function tabKeyDown(func)
{
	enter = event.keyCode;
	if(enter == 09)
	{
		eval(func);
	}
}

function setSelectVal ( objFrm, val ) {
    var len = objFrm.options.length;

    if ( !len ) {
        return;
    }

    for ( var n = 0; n < len; n++ ) {

        if ( objFrm.options[n].value == val ) {
	    objFrm.options[n].selected = true;
	}
    }
}

function setRadioVal (objFrm, val) {
	var len = objFrm.length;
	if (!len) {
		objFrm.checked = true;
	} else {
		for (var n = 0; n < len; n++) {
			if (objFrm[n].value == val)
				objFrm[n].checked = true;
		}
	}
}

function isNotCheckedRadio(field, error_msg) {
	if ( field == null ) {
		alert(error_msg);
		return true;
	}

	if ( field.length == null ) {
		if ( field.checked == true ) {
			return false;
		} else {
			alert(error_msg);
			return true;
		}
	}

	for(i = 0; i < field.length; i++) {
		if(field[i].checked == true) {
			return false;
		}
	}
	alert(error_msg);
	return true;
}

function nextFocus(obj, limitLength, nextObj) {
	if(obj.value.length == limitLength) nextObj.focus();
}

function isArray(obj){
	if(obj == null){
		return 0;
	}else {
		//alert(obj.type);
		if(obj.type == 'select-one'){
			return 1;
		}else if(obj.type == 'select-multiple'){
			return 1;
		}else{
			if(obj.length > 1){
				return obj.length;
			}else {
				return 1;
			}
		}
	}
}

function reset(frm){
	frm.reset();
}

function genDomInput(elemName, elemValue){
    var input = document.createElement("input");
    input.setAttribute("type", "hidden");
    input.setAttribute("name", elemName);
    input.setAttribute("value", elemValue);
    return input;
}
function viewVideo2(video_url, width, height, swfid, video_data){
	var str_html = "";
	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' hspace='0' vspace='0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>");
	document.writeln("<param name='autosize' value='true'>");
	document.writeln("<param name='play' value='true'>");
	document.writeln("<param name='loop' value='true'>");
	document.writeln("<param name='quality' value='high'>");
	document.writeln("<param name='movie' value='"+video_url+"'>");
	document.writeln("<param name='flashVars' value='"+video_data+"'>");
	document.writeln("<embed invokeurls=false src = '"+video_url+"' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' play='true' loop='true' quality='high' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>");
  	document.writeln("</embed invokeurls=false>");
	document.writeln("</object>");
	document.write(str_html);
}

function viewVideo3(video_url,width,height,swfid, video_data){
	var str_html = "";
	str_html += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' hspace='0' vspace='0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>";
	str_html += "<param name='allowScriptAccess' value='always'>";
	str_html += "<param name='autosize' value='true'>";
	str_html += "<param name='play' value='true'>";
	str_html += "<param name='loop' value='true'>";
	str_html += "<param name='quality' value='high'>";
 	str_html += "<PARAM NAME='menu' VALUE='false'>";
	str_html += "<param name='movie' value='"+video_url+"'>";
 	str_html += "<PARAM NAME='wmode' VALUE='transparent'>";
 	str_html += "<param name='flashVars' value='"+video_data+"'>";
	str_html += "<embed invokeurls=false src = '"+video_url+"?flashVars="+video_data+"' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' play='true' loop='true' quality='high' allowScriptAccess='always' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>";
  	str_html += "</embed invokeurls=false>";
	str_html += "</object>";
	document.write(str_html);
}

function innerHtmlVideo(video_url,obj,width,height,swfid){
	var str_html = "";
 	str_html += '<DIV style=display:inline>';
	str_html += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' hspace='0' vspace='0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>";
	str_html += "<param name='autosize' value='true'>";
	str_html += "<param name='play' value='true'>";
	str_html += "<param name='loop' value='true'>";
	str_html += "<param name='quality' value='high'>";
 	str_html += "<PARAM NAME='menu' VALUE='false'>";
	str_html += "<param name='movie' value='"+video_url+"'>";
 	str_html += "<PARAM NAME='wmode' VALUE='transparent'>";
	str_html += "<embed invokeurls=false src = '"+video_url+"' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' play='true' loop='true' quality='high' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>";
  	str_html += "</embed invokeurls=false>";
	str_html += "</object>";
 	str_html += "</DIV>";
	obj.innerHTML = str_html;
}

var imgserverdiv = 0;

function imgDomainDevide(img_url) {

	var img_server_url = "http://img.natemall.com/";

	try {
		//	µµ¸ÞÀÎ ºÐ¸®
		var devide_point	= img_url.indexOf("goods_image");
		if ( devide_point == -1 ) {
			return img_url;
		}
		var devide_img_url	= img_url.substring( devide_point );

		//	»óÇ°¹øÈ£ µû¿À±â
		var fn_point	= devide_img_url.lastIndexOf("/");
		var fn_str		= devide_img_url.substring( fn_point + 1 );
		var goods_no	= fn_str.substring(0, fn_str.length-6);

		if (fn_str.indexOf("O20") != -1 || fn_str.indexOf("S20") != -1) {
			goods_no = fn_str.substring(0, fn_str.length-7);
		}

		if (fn_str.indexOf("JPEG") != -1 || fn_str.indexOf("jpeg") != -1) {
			goods_no = fn_str.substring(0, fn_str.length-7);
		}

		if ( goods_no  >= 7000000 ) {
			if ( (imgserverdiv++)%2 == 0 )
				img_server_url = "http://img2.natemall.com/";
			else
				img_server_url = "http://img2-1.natemall.com/";
			img_url		= img_server_url + devide_img_url;
		} else if ( goods_no  >= 4000000 ) {
			img_server_url = "http://img1.natemall.com/";
			img_url		= img_server_url + devide_img_url;
		}

	} catch (e) {
	}

	return img_url;
}

function viewImg(img_url,width,height,nm,class_nm){

	if(img_url != ""){
		var str_html = returnViewImg(img_url,width,height,nm,class_nm);

 		document.write(str_html);
	}
}

function returnViewImg(img_url,width,height,nm,class_nm){
	var ie5			= document.all && !window.opera;
	var img_svr_url = "http://img.natemall.com/natemall/";
	//var img_svr_url = "http://dev2.market.cyworld.com:8084/img1/natemall/";	//Àû¿ë½ÃÁ¡¿¡ º¯°æÇØ¾ßÇÔ!!!

	img_url		= imgDomainDevide(img_url);

	if(img_url != ""){

 		if(img_url.substring(img_url.length-3).toLowerCase() == "swf"){
			var str_html = "";
			if (class_nm == "") class_nm = "prdImg" + width + "v";

		 	str_html += "<DIV class=\"" + class_nm + "\"  style=\"position:relative;width:" + width +"px;height:" + height + "px;\">";

			str_html += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' hspace='0' vspace='0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+nm+"'>";
			str_html += "<param name='autosize' value='true'>";
			str_html += "<param name='play' value='true'>";
			str_html += "<param name='loop' value='true'>";
			str_html += "<param name='quality' value='high'>";
		 	str_html += "<PARAM NAME='menu' VALUE='false'>";
			str_html += "<param name='movie' value='"+img_url+"'>";
		 	str_html += "<PARAM NAME='wmode' VALUE='transparent'>";
			str_html += "<embed invokeurls=false src = '"+img_url+"' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' play='true' loop='true' quality='high' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+nm+"'>";
		  	str_html += "</embed invokeurls=false>";
			str_html += "</object>";

			if (ie5) {
				str_html += "<div style=\"z-index:1;cursor:pointer;background:url('" + img_svr_url+ "goods_image/bg_flash.gif');position:absolute;left:0px;top:0px;width:" + width +"px;height:" + height + "px;\">";
			 	str_html += "</div>";
			} else {
				str_html += "<div style=\"z-index:1;position:absolute;left:0px;top:0px;width:" + width +"px;height:" + height + "px;\">";
				str_html += " <img src=\"" + img_svr_url+ "goods_image/bg_flash.gif\" style=\"cursor:pointer;width:" + width +"px;height:" + height + "px;wrap\" ";
			 	str_html += "</div>";
			}
		 	str_html += "</DIV>";

			return str_html;
 		}else{
			if ( img_url.indexOf( "MM" ) > 0 ) {
				var dateTime = new Date();
				img_url = img_url + "?" + dateTime.getMonth() + dateTime.getDay() + dateTime.getHours();
			}

			var str_html = "";
			str_html += "<img src='" + img_url ;
			if ( width != "" ) {
				str_html += "' width='" + width ;
			}
			if ( height != "" ) {
				str_html += "' height='" + height ;
			}
			if ( nm != "" ) {
				str_html += "' name='" + nm ;
			}
			if ( class_nm != "" ) {
				str_html += "' class='" + class_nm ;
			} else {
				str_html += "' class='prdImg" + width + "v'";
			}

			str_html += "' onerror=";
			if(width == '300'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_300.gif\"'>";
			}else if(width == '250'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_250.gif\"'>";
			}else if(width == '200'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_200.gif\"'>";
			}else if(width == '125'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_125.gif\"'>";
			}else if(width == '98'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_98.gif\"'>";
			}else if(width == '85'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_85.gif\"'>";
			}else if(width == '80'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_85.gif\"'>";
			}else if(width == '65'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_65.gif\"'>";
			}else if(width == '60'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_60.gif\"'>";
			}else if(width == '53'){
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_60.gif\"'>";
			}else{
				str_html += "'this.src=\"" + img_svr_url+ "goods_image/none_img_125.gif\"'>";
			}
			return str_html;
 		}
	}
}

function popularSpecialTown(obj_html){
	document.writeln(obj_html);
}

function detailItemView(site_sale_goods_no, site_no, shop_no, shop_div_no, market_no, market_div_no, catalog_no, catalog_div_no, ctg_no, shop_gb_cd, is_new_window){
	site_no = "2";

	if ( is_new_window == "Y" ) {
		window.open(PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd);
	} else {
		top.location.href = PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd;
	}
}

function detailItemViewGoods(goods_no, site_sale_goods_no, site_no, shop_no, shop_div_no, market_no, market_div_no, catalog_no, catalog_div_no, ctg_no, shop_gb_cd){
	site_no = "2";

	top.location.href = PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&goods_no='+goods_no+'&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd;
}

function detailItemViewGoodsPop(goods_no, site_sale_goods_no, site_no, shop_no, shop_div_no, market_no, market_div_no, catalog_no, catalog_div_no, ctg_no, shop_gb_cd){
	site_no = "2";
	window.open(PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&goods_no='+goods_no+'&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd);
}

function detailItemViewPop(site_sale_goods_no, site_no, shop_no, shop_div_no, market_no, market_div_no, catalog_no, catalog_div_no, ctg_no, shop_gb_cd){
	site_no = "2";

	window.open(PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd);
}

function locationItemView(site_sale_goods_no, site_no, shop_no, shop_div_no, market_no, market_div_no, catalog_no, catalog_div_no, ctg_no, shop_gb_cd){
	site_no = "2";

	top.location.href = PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd;
}

function locationItemViewGoods(goods_no, site_sale_goods_no, site_no, shop_no, shop_div_no, market_no, market_div_no, catalog_no, catalog_div_no, ctg_no, shop_gb_cd){
	site_no = "2";

	top.location.href = PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&goods_no='+goods_no+'&site_sale_goods_no='+site_sale_goods_no+'&site_no='+site_no+'&shop_no='+shop_no+'&shop_div_no='+shop_div_no+'&market_no='+market_no+'&market_div_no='+market_div_no+'&catalog_no='+catalog_no+'&catalog_div_no='+catalog_div_no+'&str_ctg_no='+ctg_no+'&shop_gb_cd='+shop_gb_cd;
}

function viewItem(goods_no){

	var f = document.itemSearch;
	var shop_no = f.shop_no.value;
	var btn_able = f.btn_able.value;
	top.location.href = PATH_ITEM_DOMAIN+'/item/item.do?method=doItemDetailView&site_sale_goods_no=0&goods_no='+goods_no+'&site_no=2&shop_no='+shop_no+'&shop_gb_cd=01&btn_able='+btn_able;
}

function goTodayPage(){
	location.href = PATH_MARKET_DOMAIN+"/market/concern.do?method=doTodayViewGoodsLst";
}

function openTodayPage(){
	openNoScrollWin(PATH_MARKET_DOMAIN+'/market/concern.do', 'todayGoods', '¿À´Ã º» »óÇ°', '930', '640', '&method=doTodayViewGoodsLst');
}

function textCount(field, maxlimit) {
	var charcnt = field.value.length;
	var temp ="";
	var enter_cnt = 0;
	for(i=0;i<charcnt;i++){
		temp = field.value.charAt(i);
		if(temp == '\n'){
				enter_cnt++; // ¿£ÅÍÅ°
		}
	}
	if((charcnt - enter_cnt*2) <= maxlimit){
	} else {
		alert("ÃÖ´ë "+maxlimit+"ÀÚ ÀÌ³»·Î ÀÔ·ÂÇØÁÖ¼¼¿ä");
		field.value = field.value.substring(0, (maxlimit+(enter_cnt*2)));
	}
}

function textCounter(field, maxlimit) {
	var charcnt = field.value.length;
	var temp ="";
	var enter_cnt = 0;
	for(i=0;i<charcnt;i++){
   		temp = field.value.charAt(i);
	   	if(temp == '\n'){
	    		enter_cnt++; // ¿£ÅÍÅ°
	   	}
   	}
	if((charcnt - enter_cnt*2) <= maxlimit){
		setCharProc( field.name+"_cnt", (charcnt - (enter_cnt*2)), maxlimit);
	} else {
		alert("ÃÖ´ë "+maxlimit+"ÀÚ ÀÌ³»·Î ÀÔ·ÂÇØÁÖ¼¼¿ä");
		field.value = field.value.substring(0, (maxlimit+(enter_cnt*2)));
	}
}

function setCharProc(vfield, charcnt, maxlimit){
	ofield = eval("document.getElementById('"+vfield+"')");
	if(ofield !=null){
		ofield.value = charcnt;
	}
}

function eMailCheck(field) {
	var str = field.value;
	var at="@";
	var dot=".";
	var lat=str.indexOf(at);
	var lstr=str.length;
	var ldot=str.indexOf(dot);

	if (str.indexOf(at)==-1){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if (str.indexOf(at,(lat+1))!=-1){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if (str.indexOf(dot,(lat+2))==-1){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if (str.indexOf(" ")!=-1){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if( isSpecialCharChkValue(str.substring(0, str.indexOf(at))) ){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	if( isSpecialCharChkValue(str.substring(str.indexOf(at)+1)) ){
		alert("ÀÌ¸ÞÀÏÀÌ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		field.focus();
		field.select();
		return false;
	}
	return true;
}

function isSpecialCharChkValue(value){
    var special_string = new Array("~","!","@","#","$","%","^","&","*","\'","\"");
    var str = value;

    for(i=0; i<str.length; i++){
        temp = str.charAt(i);
        for(k=0; k<special_string.length; k++){
        	if(temp == special_string[k]){
        		return true;
	        }
        }
    }
    return false;
}

function viewCart(){
	openNoScrollWin(PATH_ORDER_DOMAIN+'/order/cart.do', 'cartView', 'Àå¹Ù±¸´Ï', '930', '675', '&method=initCart');
}

function locationCart(){
	top.location.href = PATH_ORDER_DOMAIN+"/order/cart.do?method=initCart";
}

function doDccouponDown(dccpn_no, commerce_cust_no, login_id_no, cmn, grd_cd, issue_path){
	CouponMgr.updateDccpnDownload(resultDccpnDown, dccpn_no, commerce_cust_no, login_id_no, cmn, grd_cd, issue_path);
}

function resultDccpnDown(return_value){
	if(return_value == "000"){
		alert("ÄíÆùÀÌ ¹ß±ÞµÇ¾ú½À´Ï´Ù.");
	}else if(return_value == "111"){
		alert("ÇØ´ç ÄíÆùÀº ¹ß±Þ¸¸·áÀÌ°Å³ª ´Ù¿î·Îµå°¡ ºÒ°¡´ÉÇÑ ÄíÆùÀÔ´Ï´Ù.");
	}else if(return_value == "222"){
		alert("ÇØ´çÄíÆùÀº ¸ðµÎ ¼ÒÁøµÇ¾ú½À´Ï´Ù.");
	}else if(return_value == "333"){
		alert("ÇØ´ç ÄíÆùÀº ÆÇ¸ÅÀÚÀÇ 1ÃÌ¸¸ ¹ß±Þ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù.");
	}else if(return_value == "444"){
		alert("ÁË¼ÛÇÕ´Ï´Ù. °í°´´ÔÀº ÇØ´ç ÄíÆù ¹ß±Þ´ë»ó ±¸¸Åµî±ÞÀÌ ¾Æ´Õ´Ï´Ù.");
	}else if(return_value == "555"){
		alert("ÁË¼ÛÇÕ´Ï´Ù. °í°´´ÔÀº ÀÌ¹Ì 1ÀÎ´ç ¹ß±Þ°¡´ÉÇÑ ÄíÆù¼ö·®À» ¹ß±Þ¹ÞÀ¸¼Ì½À´Ï´Ù.");
	}else{
		alert("ÄíÆù¹ß±Þ¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù.");
	}
}

function viewSellerItem(seller_no){

	var param = '&method=initSellerAllItemList&seller_no=' + seller_no;
	openNoScrollWin(PATH_MARKET_DOMAIN+'/market/concern.do', 'sellerAllItem', 'ÆÇ¸ÅÀÚ »óÇ° ÀüÃ¼º¸±â', '930', '675', param);
}
function iecompattest(){
	var doc_obj = checkWinIframe() ? (parent.window.name != "" && parent.window.name == "iBest") ? parent.parent.document : parent.document: document;

	return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? doc_obj.documentElement : doc_obj.body;
}
function msgmove(e){
	var msg = document.getElementById("msg");

	var ie5=document.all && !window.opera;
	var ns6=document.getElementById;

	var eventX=ie5? event.clientX : e.clientX;
	var eventY=ie5? event.clientY : e.clientY;

	var pageLeft = ie5? iecompattest().scrollLeft : window.pageXOffset;
	var pageTop = ie5? iecompattest().scrollTop : window.pageYOffset;

	msg.contentwidth = 216; 	//¸Þ½ÃÁö ¿µ¿ª °íÁ¤.

	var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX

	/* right ¿©¹é Ã¼Å© */
	if (rightedge<msg.contentwidth) {
		try {
			msg.style.left = eventX + 10 - msg.contentwidth - document.getElementById("wrap").offsetLeft + "px";
		} catch (ex) {
			msg.style.left = eventX + 10 - msg.contentwidth + "px";
		}
		document.getElementById("msgPoint").style.backgroundPosition = "195px 0";
	} else {
		if (rightedge < eventX) {
			try {
				msg.style.left = eventX + 10 - msg.contentwidth - document.getElementById("wrap").offsetLeft + "px";
			} catch (ex) {
				msg.style.left = eventX + 10 - msg.contentwidth + "px";
			}
			document.getElementById("msgPoint").style.backgroundPosition = "195px 0";
		} else {

			try {
				msg.style.left = eventX - 10 + pageLeft - document.getElementById("wrap").offsetLeft + "px";
			} catch (ex) {
				msg.style.left = eventX - 10 + pageLeft + "px";
			}
		}
	}

	msg.style.top = eventY + 5 + pageTop+ "px";
}

function msgset(x){
	document.getElementById("msgTextArea").innerHTML=x;
	document.getElementById("msg").style.display = "block";
}

function msghide(){
	var msg = document.getElementById("msg");
	document.getElementById("msgTextArea").innerHTML=''
	document.getElementById("msg").style.display = "none";
}
function viewMovie(video_url,width,height){
	var obj_property = "";
	var emb_property = "";
	if(eval(width)>0){
		obj_property += "width:"+width+";";
		emb_property += "width="+width;
	}
	if(eval(height)>0){
		obj_property += "height:"+height+";";
		emb_property += "height="+height;
	}
	document.writeln("<object id=MediaPlayer21 style='"+obj_property+"'>");
	document.writeln("<param name='autosize' value='1'>");
	document.writeln("<param name='autostart' value='1'>");
	document.writeln("<param name='filename' value='"+video_url+"'>");
	document.writeln("<embed src = '"+video_url+"' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' "+emb_property+" autostart='true'>");
  	document.writeln("</embed>");
	document.writeln("</object>");
}
function viewWish(){
	openNoScrollWin(PATH_MARKET_DOMAIN+'/market/concern.do', 'wishView', 'ÂòÇÑ»óÇ°', '930', '675', '&method=doSearchPopMyWishList');
}
function locationWish(){
	location.href = PATH_MARKET_DOMAIN+"/market/concern.do?method=doSearchPopMyWishList";
}
function goPlanMarket(shop_no, target){
	if ( target == null )	{
		target = self;
	}
	target.location.href = PATH_PLANMARKET_DOMAIN+"/planmarket/planmarket.do?method=doPlanShop&shop_no=" + shop_no;
}

function openPlanMarket(shop_no){
	window.open(PATH_PLANMARKET_DOMAIN+"/planmarket/planmarket.do?method=doPlanShop&shop_no=" + shop_no,"","");
}
function reSetCount(name, count){
	if(opener != null && typeof(opener.document) != 'unknown'){
		var cnt_obj = opener.document.getElementById(name);
		if(cnt_obj == null) return;
		cnt_obj.innerHTML = count;
	}
}
function viewHelp(){
	var url = PATH_CS_DOMAIN + '/cs/counsel.do';
	openNoScrollWin(url, 'FAQ', 'FAQ', 550, 545,'&method=doPopHelpCounsel');
}

function viewHelpDetail(gb_cd, faq_no) {
	var url = PATH_CS_DOMAIN + '/cs/counsel.do';
	if (  gb_cd == '' ) {
		openNoScrollWin(url, 'FAQ', 'FAQ', 550, 545,'&method=doPopHelpCounsel');
	} else if ( gb_cd == '1' ) {
		openNoScrollWin(url, 'FAQ', 'FAQ', 550, 545,'&method=doPopHelpCounsel&cs_large_cd=' + faq_no);
	} else if ( gb_cd == '2' ) {
		openNoScrollWin(url, 'FAQ', 'FAQ', 550, 545,'&method=doPopHelpCounsel&cs_middle_cd=' + faq_no);
	} else if ( gb_cd == '3' ) {
		openNoScrollWin(url, 'FAQ', 'FAQ', 550, 545,'&method=doPopHelpCounsel&faq_no=' + faq_no);
	} else if ( gb_cd == '4' ) { //ÀÔ±ÝÈ®ÀÎ °¡±â...
		openNoScrollWin(url, 'FAQ', 'FAQ', 550, 545,'&method=doPopHelpCounsel&pop_type=10');
	}
}
function detailTownEvent(event_no, event_kind_cd, mem_id){
	if ( event_kind_cd > '03' ) {
		openNoScrollWin(PATH_MARKET_DOMAIN+'/market/event.do', 'doPopTownEventDtl', '»ó¼¼º¸±â', '580', '480', '&method=doPopTownEventDtl&event_no='+event_no+'&event_kind_cd='+event_kind_cd);
	} else {
		openTownMiniHp(mem_id, 1, '', '', '', '');
	}
}
function viewTownEvent(domain, event_no, event_kind_cd, town_mng_event_yn, town_event_url){
	if ( town_mng_event_yn == 'Y' ) {
		window.open(domain + town_event_url, "TownMiniHp", "menubar=no, scrollbars=no, resizable=no, location=no, status=no, toolbar=no, width=932, height=538");
	} else {
		openNoScrollWin(PATH_MARKET_DOMAIN+'/market/event.do', 'doPopTownEventDtl', '»ó¼¼º¸±â', '580', '480', '&method=doPopTownEventDtl&event_no='+event_no+'&event_kind_cd='+event_kind_cd);
	}
}
function fCtgLink(ctg_1, ctg_2, ctg_3, ctg_4){
	var link = "?method=";

	if(typeof(eval(ctg_1)) != 'undefined' && typeof(eval(ctg_2)) == 'undefined' && typeof(eval(ctg_3)) == 'undefined' && typeof(eval(ctg_4)) == 'undefined'){

		link += "initCtgLargeDivList&ctg_large_div_no=" + ctg_1;
	}else if(typeof(eval(ctg_1)) != 'undefined' && typeof(eval(ctg_2)) != 'undefined' && typeof(eval(ctg_3)) == 'undefined' && typeof(eval(ctg_4)) == 'undefined'){

		link += "initCtgMiddleDivList&ctg_large_div_no=" + ctg_1 + "&ctg_middle_div_no=" + ctg_2;
	}else if(typeof(eval(ctg_2)) != 'undefined' && typeof(eval(ctg_3)) != 'undefined' && typeof(eval(ctg_4)) == 'undefined'){

		link += "initCtgSmallDivList&ctg_middle_div_no=" + ctg_2 + "&ctg_small_div_no=" + ctg_3;
	}else if(typeof(eval(ctg_2)) != 'undefined' && typeof(eval(ctg_3)) != 'undefined' && typeof(eval(ctg_4)) != 'undefined'){

		link += "initCtgSmallDivList&ctg_middle_div_no=" + ctg_2 + "&ctg_small_div_no=" + ctg_3 + "&ctg_no=" + ctg_4;
	}

	location.href = PATH_MARKET_DOMAIN+"/market/concern.do" + link;
}
function goTalkTalkGoodsPsbbs(){
	location.href = PATH_CS_DOMAIN + "/cs/shoppingtalk.do?method=initGoodsPsBbsMain&vPcateGbn=review&main_gb=psbbs";
}
function goTalkTalkGoodsQabbs(){
	location.href = PATH_CS_DOMAIN + "/cs/shoppingtalk.do?method=initShopTalkMain&vPcateGbn=qna&main_gb=qabbs";
}
function previewItem(e, site_sale_goods_no, order_yn){
	var preview_url = PATH_ITEM_DOMAIN+"/item/item.do?method=doItemPreview";
	if(order_yn != null && order_yn == 'Y')
		preview_url = PATH_ORDER_DOMAIN+"/order/myPage.do?method=doItemPreview";

	var layerObj = document.getElementById("divPreviewItem");
	var ie5=document.all && !window.opera;
	var ns6=document.getElementById;

	// 1. Layer À§Ä¡ Á¶Á¤ ==================================================
	layerObj.contentwidth=645;	//¹Ì¸®º¸±â ¿µ¿ª width °íÁ¤
	layerObj.contentheight=445;	//¹Ì¸®º¸±â ¿µ¿ª height °íÁ¤

	var eventX=ie5? event.clientX : e.clientX;
	var eventY=ie5? event.clientY : e.clientY;

	var pageLeft = ie5? iecompattest().scrollLeft : window.pageXOffset;
	var pageTop = ie5? iecompattest().scrollTop : window.pageYOffset;
	var pageHeight = ie5? iecompattest().clientHeight : window.innerHeight;

	var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
	var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY


	/* right ¿©¹é Ã¼Å© */
	if (rightedge<layerObj.contentwidth) {
		var newPosX = (eventX-layerObj.contentwidth) - document.getElementById("wrap").offsetLeft;

		if (newPosX < document.getElementById("wrap").offsetLeft) {
			layerObj.style.left = document.getElementById("wrap").offsetLeft + "px";
		} else {
			layerObj.style.left = newPosX + "px";
		}
	} else {
		if (rightedge < eventX)
			layerObj.style.left = (eventX-layerObj.contentwidth)-document.getElementById("wrap").offsetLeft+ "px";
		else
			layerObj.style.left = pageLeft+eventX-document.getElementById("wrap").offsetLeft+ "px";
	}

	/* bottom ¿©¹é Ã¼Å© */
	if (bottomedge<layerObj.contentheight) {
		layerObj.style.top = (pageTop+eventY -(layerObj.contentheight-bottomedge)) + "px";
	} else {
		layerObj.style.top = (pageTop+eventY) + "px";
	}
	// ================================================== 1. Layer À§Ä¡ Á¶Á¤

	var ifrmObj = document.getElementById("ifrmPreviewItem");
	ifrmObj.style.visibility = "hidden";

	ifrmPreviewItem.document.location.href = preview_url + "&site_sale_goods_no=" + site_sale_goods_no;
	layerObj.style.width = 0;
	layerObj.style.height = 0;
	layerObj.style.display = "block";
}
function hidePreviewItem() {
	var layerObj = document.getElementById("divPreviewItem");
	layerObj.style.width = 0;
	layerObj.style.height = 0;
	layerObj.style.display = "none";

}
function resizeForItemPreviw() {
	var n=navigator.appName;
	var ie=(n=='Microsoft Internet Explorer');
	var ifrmObj = document.getElementById("ifrmPreviewItem");

	var innerHeight = 0;
	var innerWidth = 0;
	if (ie) {
		var innerBody = ifrmObj.contentWindow.document.body;

		innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
		innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	} else {
		var innerBody = ifrmObj.contentDocument.body;

		innerHeight	= innerBody.offsetHeight + 445;
		innerWidth	= 645;
	}

	ifrmObj.style.height	= innerHeight + "px";
	ifrmObj.style.width		= innerWidth + "px";
	ifrmObj.style.visibility = "visible";

	document.getElementById("divPreviewItem").style.height	= innerHeight + "px";
	document.getElementById("divPreviewItem").style.width	= innerWidth + "px";
	document.getElementById("divPreviewItem").style.display = "block";
}

function checkWinIframe() {
	var thisWinName	= window.name;
	if (thisWinName != "" && thisWinName != "cybody" && thisWinName != "shopping_mall" && thisWinName != "ifrmPreviewItem")
		return true;
	else
		return false;
}
// LayerÀÇ X, Y À§Ä¡ ÁöÁ¤.

var _poss_nm = "";
var _bg_poss = 7;
function setLayerXYPos(e, layerObj, layer_width, layer_height, ypos_type) {
	var doc_obj 	= checkWinIframe() ?  parent.document: document;
	var ie5			= document.all && !window.opera;
	var ns6			= document.getElementById;
	var thisWinName	= window.name;

	var eventX		= ie5? event.clientX : e.clientX;
	var eventY		= ie5? event.clientY : e.clientY;

	var c_layerX	= 0;
	var c_layerY	= 0;
	var pageLeft	= 0;
	var pageTop		= 0;
	var rightedge	= 0;
	var bottomedge	= 0;

	if (checkWinIframe()) {
		var parent_obj = (parent.window.name != "" && parent.window.name == "iBest") ? parent.parent : parent;

		if (parent.window.name != "" && parent.window.name == "iBest") {

			var oIframe	= parent.document.getElementById(thisWinName);

			while (oIframe) {
				c_layerX += oIframe.offsetLeft;
				c_layerY += oIframe.offsetTop;
				oIframe = oIframe.offsetParent;
			}

			oIframe	= parent_obj.document.getElementById("iBest");

			while (oIframe) {
				c_layerX += oIframe.offsetLeft;
				c_layerY += oIframe.offsetTop;
				oIframe = oIframe.offsetParent;
			}

		} else {

			var oIframe	= parent_obj.document.getElementById(thisWinName);

			while (oIframe) {
				c_layerX += oIframe.offsetLeft;
				c_layerY += oIframe.offsetTop;
				oIframe = oIframe.offsetParent;
			}
		}

		pageLeft	= ie5? iecompattest().scrollLeft : parent_obj.window.pageXOffset;
		pageTop		= ie5? iecompattest().scrollTop : parent_obj.window.pageYOffset;
		eventX += c_layerX;
		eventY += c_layerY;

		rightedge	= Math.abs(ie5? iecompattest().clientWidth - (eventX - pageLeft) : parent_obj.window.innerWidth - (eventX - pageLeft));
		bottomedge	= Math.abs(ie5? iecompattest().clientHeight - (eventY - pageTop) : parent_obj.window.innerHeight-(eventY - pageTop));
		rightedge -= 60;

		pageTop = 0;
	} else {
		pageLeft	= ie5? iecompattest().scrollLeft :  window.pageXOffset;
		pageTop		= ie5? iecompattest().scrollTop :  window.pageYOffset;

		rightedge	= ie5? iecompattest().clientWidth - eventX :  window.innerWidth - eventX;
		bottomedge	= ie5? iecompattest().clientHeight - eventY :  window.innerHeight - eventY;
		rightedge -= 60;
	}


	// 1. Layer À§Ä¡ Á¶Á¤ ==================================================
	/* right ¿©¹é Ã¼Å© */
	if (rightedge < layer_width) {
		var newPosX = eventX  - layer_width - ((doc_obj.getElementById("wrap") == null) ? 0 : doc_obj.getElementById("wrap").offsetLeft);

		if (newPosX < 0) {
			layerObj.style.left = (newPosX + rightedge) + "px";
		} else {
			layerObj.style.left = newPosX + "px";
		}

		_bg_poss = 290;
	} else {
		layerObj.style.left = (pageLeft + eventX)-((doc_obj.getElementById("wrap") == null) ? 0 : doc_obj.getElementById("wrap").offsetLeft) + "px";

		_bg_poss = 7;
	}



	/* bottom ¿©¹é Ã¼Å© */
	if (layer_height > 0 &&  bottomedge < layer_height) {
		if (typeof(ypos_type) != "undefined" && ypos_type == "2") {

			layerObj.style.top = (pageTop + eventY - (layer_height - bottomedge)) + "px";
		} else {

			layerObj.style.top = (pageTop + eventY - (layer_height + 5)) + "px";
		}
		_poss_nm = "Bottom";
	} else {
		layerObj.style.top = (pageTop + eventY + (layer_height == 0 ? 5 : 0) ) + "px";
		_poss_nm = "Top";
	}
	// ================================================== 1. Layer À§Ä¡ Á¶Á¤
}
function showSellerGradeMsg(e, grade){
	var doc_obj = checkWinIframe() ?  parent.document: document;
	var layerObj = doc_obj.getElementById("divSellerGradeMsg");
	var ie5=document.all && !window.opera;
	var ns6=document.getElementById;

	// 1. Layer À§Ä¡ Á¶Á¤ ==================================================
	layerObj.contentwidth=307;	//¹Ì¸®º¸±â ¿µ¿ª width °íÁ¤
	layerObj.contentheight=210;	//¹Ì¸®º¸±â ¿µ¿ª height °íÁ¤

	setLayerXYPos(e, layerObj, layerObj.contentwidth, layerObj.contentheight);
	// ================================================== 1. Layer À§Ä¡ Á¶Á¤

	// 2. Msg ¼³Á¤  ==================================================
	var seller_grade_html_top = ""
					+ "<!DOCTYPE HTML PUBLIC\"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/stric.dtd\">\n"
					+ "<html>\n"
					+ "<head>\n"
					+ "<title>_sub</title>\n"
					+ "	<meta http-equiv=\"Content-Type\" content=\"text/html; charset=euc-kr\">\n"
					+ "	<link rel=\"stylesheet\" type=\"text/css\" href=\"/common/css/common.css\" />\n"
					+ "</head>\n"
					+ "<body style=\"margin: 0 0 0 0;\">\n"
					+ "<div id=\"t1\"></div>"
					;

	var seller_grade_html_bottom = "</body>\n"
					+"</html>\n";
	var seller_grade_msg = ""
			+ "<div class=\"layer" + _poss_nm + "\" style=\"width:300px; left:0px; top:0px; background-position:" + _bg_poss + "px " + _poss_nm +";\">"
			+ "	<div class=\"layerBox\" style=\"width:274px; padding:11px 13px 13px 13px;\">"
			+ "		<div class=\"LSellerGradeTit\">ÆÇ¸ÅÀÚÀÇ ÇöÀç, µî±ÞÀ» È®ÀÎÇÏ¼¼¿ä!</div>"
			+ "		<div class=\"LSellerGradeL\">"
			+ "			<div class=\"LSellerGradeLTit\">µî±Þ</div>"
			+ "			<img src=\"http://img.natemall.com/natemall/images/common/seller_grade_1_" + ((grade == "100")? "on" : "off") + ".gif\" alt=\"super\" id=\"grd100\" />"
			+ "			<img src=\"http://img.natemall.com/natemall/images/common/seller_grade_2_" + ((grade == "101")? "on" : "off") + ".gif\" alt=\"best\" id=\"grd101\" />"
			+ "			<img src=\"http://img.natemall.com/natemall/images/common/seller_grade_3_" + ((grade == "102")? "on" : "off") + ".gif\" alt=\"good\" id=\"grd102\" />"
			+ "			<img src=\"http://img.natemall.com/natemall/images/common/seller_grade_4_" + ((grade == "103" || grade == "104" || grade == "105")? "on" : "off") + ".gif\" alt=\"basic\" id=\"grd103\" />"
			+ "			<img src=\"http://img.natemall.com/natemall/images/common/seller_grade_5_" + ((grade == "104")? "off" : "off") + ".gif\" alt=\"yellowcard\" id=\"grd104\" />"
			+ "			<img src=\"http://img.natemall.com/natemall/images/common/seller_grade_6_" + ((grade == "105")? "off" : "off") + ".gif\" alt=\"redcard\" id=\"grd105\" />"
			+ "		</div>"
			+ "		<div class=\"LSellerGradeR\">"
			+ "			<div class=\"LSellerGradeRP\">"
			+ "				ÆÇ¸ÅÀÚ µî±ÞÀº,<br />"
			+ "				<span class=\"LSellerGradeRTxt1\">ÆÇ¸Å±Ý¾×/¼ö·®, °í°´Æò,<br />"
			+ "				¹è¼ÛÁö¿¬/¹ÝÇ°/Ç°ÀýÀ²,<br />"
			+ "				¹¯°í´äÇÏ±â ´äº¯±â°£</span>À»<br />"
			+ "				Á¾ÇÕÀûÀ¸·Î ¹Ý¿µÇÏ¿©,<br />"
			+ "				<span class=\"LSellerGradeRTxt2\">1°³¿ù¿¡ ÇÑ¹ø¾¿</span><br />"
			+ "				»õ·Î ºÎ¿©µË´Ï´Ù."
			+ "			</div>"
			+ "		</div>"
			+ "	</div>"
			+ "</div>";
	// ================================================== 2. Msg ¼³Á¤

	var ifrmObj = doc_obj.getElementById("ifrmSellerGradeMsg");
	try {
		if (doc_obj.ifrmSellerGradeMsg.t1) {
			doc_obj.ifrmSellerGradeMsg.t1.innerHTML = seller_grade_msg;
		} else {
			doc_obj.ifrmSellerGradeMsg.document.write(seller_grade_html_top +seller_grade_html_bottom);
			doc_obj.ifrmSellerGradeMsg.t1.innerHTML = seller_grade_msg;
		}
	} catch(ex) {}

	ifrmObj.style.visibility = "visible";
	layerObj.style.display = "block";
}

function hiddenSellerGradeMsg(){
	(checkWinIframe() ?  parent.document: document).getElementById("divSellerGradeMsg").style.display = "none";
}
function isNumber(field, error_msg){
	var val = field.value;

	if(checkDigitOnly(val, false) ) {
		return true;
	} else {
		if(error_msg.length > 0) {
			alert(error_msg);
			field.focus();
			field.select();
		}
		return false;
	}
}
function isNumberNotNull(field, error_msg){
	var val = field.value;
	val = val.replace(/,/g, '');
	if(checkDigitOnly(val, true) ) {
		return true;
	} else {
		if(error_msg.length > 0) {
			alert(error_msg);
			field.focus();
			field.select();
		}
		return false;
	}
}
function checkDigitOnly( digitChar, space ) {
	if(!space){
		if ( digitChar == null || digitChar=='' ){
    		return false ;
    	}
	}

	for(var i=0;i<digitChar.length;i++){
    	var c=digitChar.charCodeAt(i);
       	if( !(  0x30 <= c && c <= 0x39 ) ) {
       		return false ;
       	}
     }

    return true ;
}
function toCurrency(amount){
var data = amount.split('.');
	var sign = "";

	var firstChar = data[0].substr(0,1);
	if(firstChar == "-"){
		sign = firstChar;
		data[0] = data[0].substring(1, data[0].length);
	}

	data[0] = data[0].replace(/\D/g,"");
	if(data.length > 1){
		data[1] = data[1].replace(/\D/g,"");
	}

	firstChar = data[0].substr(0,1);

	//0À¸·Î ½ÃÀÛÇÏ´Â ¼ýÀÚµé Ã³¸®
	if(firstChar == "0"){
		if(data.length == 1){
			return sign + parseFloat(data[0]);
		}
	}

	var comma = new RegExp('([0-9])([0-9][0-9][0-9][,.])');

	data[0] += '.';
	do {
		data[0] = data[0].replace(comma, '$1,$2');
	} while (comma.test(data[0]));

	if (data.length > 1) {
		return sign + data.join('');
	} else {
		return sign + data[0].split('.')[0];
	}
}
function toCurrencyPositive(amount){
	var firstChar = amount.substr(0,1);
	if(firstChar == "-"){
		amount = amount.substring(1, amount.length);
	}
	return toCurrency(amount);
}
function round(val, num){
	val = val * Math.pow(10, num - 1);
	val = Math.round(val);
	val = val / Math.pow(10, num - 1);
	return val;
}
function toNormalNum( num ) {
    num = num.replace(/,/g, '');
    var args = Number(num);
	return args;
}
function isOutOfNumericRange(field, min, max, error_msg) {
	if(field.value < min || field.value > max) {
		alert(error_msg);
		field.focus();
		field.select();
		return true;
	}
	return false;
}
function inputNumCheck(event) {
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

 	if ( (keyCode<=57 && keyCode>=48) || (keyCode<=105 && keyCode>=96) || keyCode < 33 || keyCode == 46 || keyCode == 37 || keyCode == 39 ) {
    	return true;
    } else {
        return false;
    }
}
function openFlexWin(theURL,winName,winTitle, width, features, param)
{
	var url = '';
	if(theURL != ''){
		url = theURL + "?popupTitle=" + winTitle + "&tableWidth=" + width + param;
	}
	var win = window.open(url,winName,features);
	win.focus();
}
function logout(){
	document.location.replace("http://xso.nate.com/rlogout.jsp?redirect=http://mall.nate.com");
}
function login(){
	document.location.replace(PATH_BASIC_DOMAIN+"/main.do?method=loginPlain&isFirst=true");
}
function nonMemberLogout() {
	document.location.replace("/login.do?method=logOutNonMember");
}
function goMarketAgree() {
	var url = 'http://mall.nate.com/MarketAgree.jsp';
	openNoScrollWin(url, '¸¶ÄÏ¾à°ü', '¸¶ÄÏ¾à°ü', 624, 495+ getWinAdjSize(),'');
}
function openNoScrollWin(theURL, winName, winTitle, width, height, param)
{
	var wid = ( (screen.width) ? (screen.width) : 100 )/2 - width/2 ;
	var hei = ( (screen.height) ? (screen.height) : 100 )/2 - height/2;
	var url = '';
	if(theURL != ''){
		url = theURL + "?popupTitle=" + winTitle + "&tableWidth=" + width + param;
	}

	try {height = parseInt(height);} catch (ex){}

	var win = window.open(url, winName, "menubar=no,scrollbars=no, resizable=no, width=" + width + ", height=" + (height+ getWinAdjSize()) + ",top=" + hei + ",left=" + wid + "");
	win.focus();
	return win;
}
function openScrollWin(theURL, winName, winTitle, width, height, param)
{
	var wid = ( (screen.width) ? (screen.width) : 100 )/2 - width/2 ;
	var hei = ( (screen.height) ? (screen.height) : 100 )/2 - height/2;
	var url = '';
	if(theURL != ''){
		url = theURL + "?popupTitle=" + winTitle + "&tableWidth=" + width + param;
	}

	try {height = parseInt(height);} catch (ex){}
	var win = window.open(url, winName, "menubar=no, scrollbars=yes, resizable=no, width="+width+", height="+(height+getWinAdjSize())+ ",top=" + hei + ",left=" + wid + "");
	win.focus();
	return win;
}
function toValidStr(str){
	re1 = /\'/gi;
	re2 = /\"/gi;
	re3 = /\n/gi;
	re4 = /\r/gi;
	str = str.replace(re1, "\'");
	str = str.replace(re2, "\"");
	str = str.replace(re3, "");
	str = str.replace(re4, "");

	return str;
}

function trim(str) {
	var count = str.length;
	var len = count;
	var st = 0;
	while ((st < len) && (str.charAt(st) <= ' ')) {
		st++;
	}
	while ((st < len) && (str.charAt(len - 1) <= ' ')) {
		len--;
	}
	return ((st > 0) || (len < count)) ? str.substring(st, len) : str ;
}

function replaceStr(originStr, objStr, convStr) {
	var retStr = '';	// ¸®ÅÏÇÒ ½ºÆ®¸µ
	var ch = '';		// °¢ ½ºÆ®¸µ ÀÎÀÚ¸¦ ·çÇÁ µ¹¸é¼­ Ä³¸¯ÅÍ¸¦ ¹Þ´Â ÀÓ½Ã º¯¼ö
	for (i = 0; i < originStr.length; i++) {
		ch = originStr.charAt(i);
		if (ch == objStr) {
			retStr += convStr;
		} else {
			retStr += ch;
		}
	}
	return retStr;
}

function getSplitValue(tokenValue, delimiter, number){
    returnValue = '';
    var tokens = tokenValue.split(delimiter);
    for(i=0;i<tokens.length;i++){
        if(i==eval(number)){
            returnValue = tokens[i];
            break;
        }
    }
    return returnValue;
}

function isOutOfRange(field, min, max, error_msg){
	var len = getByteLength(field);
	if( len < min || len > max)
	{
		alert(error_msg);
		field.focus();
		field.select();
		return true;
	}
	return false;
}

function isNotExactLength(field, len, error_msg) {
	if(getByteLength(field) != len) {
		alert(error_msg);
		field.focus();
		field.select();
		return true;
	}
	return false;
}

function isSpecialCharChk(field, name, edit_yn){
	var special_string = new Array("\'","\"", "<", ">");
    var str = field.value;
    var return_str = new Array();
    var isOk = true;

    for(i=0; i<str.length; i++){
        temp = str.charAt(i);
        for(k=0; k<special_string.length; k++){
        	if(temp == special_string[k]){
        		for(dd=0; dd<return_str.length; dd++){
        			if(return_str[dd] == special_string[k]){
        				isOk = false;
        				break;
        			}else{
        				isOk = true;
        			}
        		}
        		if(isOk){
        			return_str[return_str.length] = special_string[k];
        		}
	        }
        }
    }

    if(return_str.length > 0){
    	var msg_key = "";
    	for(i=0; i<return_str.length; i++){
    		if(i == 0){
    			msg_key += return_str[i];
    		}else{
	    		msg_key += ", " + return_str[i];
	    	}
    	}

    	alert(name + "¿¡´Â " + msg_key + " °°Àº Æ¯¼ö¹®ÀÚ°¡ ¿Ã ¼ö ¾ø½À´Ï´Ù.");

		if(edit_yn !=null && edit_yn =="Y"){

			var isExistIframe = eval("document.getElementById('edit_type2')");

			if(isExistIframe != null){
				if(isExistIframe.value == "1"){
					HTMLEDITOR.focus();
				}else{
					field.focus();
				}
			}else{
				field.focus();
			}
		}else{
			field.focus();
		}

    	return true;
    }
    return false;
}
function getConvertStr(str) {
	var reVal = null;
	if (str == null || str=="" ) {
		return "";
	}

	var ret = "";
	for (var i = 0; i < str.length; i++) {
		if (str.charAt(i) == '\'') {
			ret += "\\\'";
		} else if (str.charAt(i) == '"') {
			ret += "\\\"";
		} else if (str.charAt(i) == '\\') {
			ret += "\\\\";
		} else {
			ret += str.charAt(i);
		}
	}
	return ret;
}
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_showHideLayers() { //v3.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=='block')?'block':(v='none')?'none':v;
		}
	    obj.display=v;
	}
}
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 setPng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter =
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='about:blank';
	return '';
}
function obj(id){
	document.write(id.text);
}
function toggleLayer(id) {
	try {
	var obj = document.getElementById(id);
	obj.style.display = (obj.style.display == "none") ? "block" : "none";
	} catch (e) {

	}
	return true;
}
function showLayer(id) {
	var divObj = document.getElementById(id);

	if (divObj.style.visibility == "hidden")
		divObj.style.visibility="visible" ;
	if (divObj.style.display == "none")
		divObj.style.display = "block";
	return true;
}
function hideLayer(id) {
	var divObj = document.getElementById(id);

	if (divObj.style.visibility == "visible")
		divObj.style.visibility="hidden" ;
	if (divObj.style.display == "" || divObj.style.display == "block")
		divObj.style.display = "none";
	return true;
}

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;




/**
 * author : leeman93
 * <pre>
 *  ³¯Â¥ °ü·Ã ÀÚµ¿ÀÔ·Â
 *
 *  »ç¿ë¹ý :
 *     1. <input name="make_date" type="text" class="form_box1" size="10" value="" maxlength=10  OnKeyUp="getDateCheckFormat(this, event);" >
 * </pre>
 * @param source : obj
 * @return  obj.value
 */
var local_daytab1 = new Array("31","28","31","30","31","30","31","31","30","31","30","31")
var local_daytab2 = new Array("31","29","31","30","31","30","31","31","30","31","30","31")
function checkFormYYYYMMDD(srcObj, event)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

    var val = (srcObj.value).replace(/-/g, '');
    if (val.length < 5) return;
    if (val.length > 8) val = val.substring(0, 8);

    var tmp = "";
    switch(val.length) {
    	case 5:
    	case 6:
    		tmp = val.substr(0,4) + "-" + val.substr(4);
    		break;
    	default:
    		tmp = val.substr(0,4) + "-" + val.substr(4, 2) + "-" + val.substr(6, 2);
			break;
    }
    srcObj.value = tmp;

	year = val.substr( 0, 4 );
	month = val.substr( 4, 2 );

	if (val.length > 5 && (isNaN(month) || (month < 1 || month > 12))) {
		alert("ÀÏÀÚ(¿ù) Çü½ÄÀÌ Æ²¸³´Ï´Ù.");
		srcObj.value = "";
		srcObj.focus();
		return false;
	}

	if (val.length > 6) {
		day = val.substr(6);

		if (get2LeapYear(year) == 2) {
			 if (local_daytab1[month-1] < day){
	            alert("ÀÏÀÚ(ÀÏ) Çü½ÄÀÌ Æ²¸³´Ï´Ù.");
				srcObj.value = "";
				srcObj.focus();
	            return;
	        }
		} else {
			 if (local_daytab2[month-1] < day){
	            alert("ÀÏÀÚ(ÀÏ) Çü½ÄÀÌ Æ²¸³´Ï´Ù.");
				srcObj.value = "";
				srcObj.focus();
	            return;
	        }
		}
	}

	return ;
}
function get2LeapYear(year) {

	if (year % 4 == 0)
		if  (year % 100 == 0)
			if  (year % 400 == 0)
			     return 2;
			else return 1;
		else return 2;
	return 1;
}

/** scroll.js */
	function ScrollArea(instName, areaName, totalCnt, perCnt, dispSize, speed, wait)	{
		this.instName 	= instName;	// ÀÎ½ºÅÏ½º¸í
		this.areaName 	= areaName;	// ÀÌµ¿ÇÒ ¿µ¿ª div id
		this.totalCnt 	= parseInt(totalCnt); 	//ºí·° cnt °¡ ¾Æ´Ñ ÃÑ ³ëÃâ µ¥ÀÌÅÍÀÇ °¹¼ö;
		this.perCnt		= parseInt(perCnt);	//ºí·°´ç  µ¥ÀÌÅÍÀÇ °¹¼ö;
		this.curIndex 	= 0;
		this.destIndex 	= 0;
		this.blockCnt 	= 0;	// ´õ¹Ì¸¦ Á¦¿ÜÇÑ ¼ø¼ö ºí·°ÀÇ ¼ö
		this.dispSize 	= parseInt(dispSize);	// ºí·°ÀÇ ³ôÀÌ/³ÐÀÌ
		this.speed 		= parseInt(speed);		// ÀÌµ¿¼Óµµ : Å¬¼ö·Ï »¡¶óÁü
 		if ( this.speed > this.dispSize ) 	{
			this.speed 	= this.dispSize;
		}
		this.autospeed 	= this.speed ;
		this.wait 		= parseInt(wait);			// ºí·° ÀÌµ¿ ÈÄ ´ë±â ½Ã°£ milsec, 0 ÀÏ °æ¿ì ÀÚµ¿ ½ºÅ©·Ñ ÇÏÁö ¾Ê´Â´Ù.
		this.interval	= 50; 						// ½½¶óÀÌµåÀÌµ¿½Ã setTime Å¸ÀÓ interval/1000 ÃÊ
		this.funcName 	= "scrollInit";
		this.objTimeout	= 0;
		this.firstCall 	= true;
		this.scroll		= true;

		/* Set blockCnt */
		if ( this.totalCnt == 0 || this.perCnt == 0  )		{
			this.blockCnt = 0;
		}	else	{
			this.blockCnt = this.totalCnt/this.perCnt;

			if ( (""+this.blockCnt).indexOf(".") > -1)	{
				this.blockCnt = parseInt( (""+this.blockCnt).substring(0,(""+this.blockCnt).indexOf(".")) ) + 1;
			}
		}

		this.setBlockCnt = function(blockCnt)	{
			this.blockCnt = blockCnt;
		}


		this.getPosition =  function(index)	{
			return -( index * this.dispSize );
		}

		/*	ÃÊ±âÈ­ */
		this.scrollInit = function()	{}

		/* ½ºÅ©·Ñ ÁßÁö */
		this.scrollStop = function()	{
			//this.firstCall = true;
			try	{
				clearTimeout(this.objTimeout);
			}	catch (e)	{}
			this.scroll = false;
		}

		/* ½ºÅ©·Ñ Àç°³ */
		this.scrollContinue = function()	{
			this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			this.scroll = true;
		}


		/* ¾Æ·¡·Î ½ºÅ©·Ñ */
		this.scrollDown = function()	{
			this.funcName = "scrollDown";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt == 0 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == this.blockCnt )	{
					this.curIndex = 0;
					document.getElementById(this.areaName).style.top = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex + 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.top = parseInt(document.getElementById(this.areaName).style.top) - this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.top )  <  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.top = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}
		}



		/* À§·Î ½ºÅ©·Ñ  */

		this.scrollUp = function() {
			this.funcName = "scrollUp";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt == 0 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == 0 )	{
					this.curIndex = this.blockCnt;
					document.getElementById(this.areaName).style.top = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex - 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.top = parseInt(document.getElementById(this.areaName).style.top) + this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.top )  >  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.top = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}

		}


		/* ¿ìÃøÀ¸·Î ½ºÅ©·Ñ */
		this.scrollRight = function()	{
			this.funcName = "scrollRight";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt == 0 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == this.blockCnt )	{
					this.curIndex = 0;
					document.getElementById(this.areaName).style.left = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex + 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.left = parseInt(document.getElementById(this.areaName).style.left) - this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.left )  <  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.left = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}
		}

		/* ÁÂÃøÀ¸·Î ½ºÅ©·Ñ */
		this.scrollLeft = function()	{
			this.funcName = "scrollLeft";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt == 0 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == 0 )	{
					this.curIndex = this.blockCnt;
					document.getElementById(this.areaName).style.left = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex - 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.left = parseInt(document.getElementById(this.areaName).style.left) + this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.left )  >  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.left = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}
		}


		/* ¹öÆ° Å¬¸¯½Ã ¿ÀÅä ½ºÅ©·Ñ°ú ´Ù¸¥ ¼Óµµ·Î ÀÌµ¿ ½ÃÅ³ °æ¿ì */
		this.clickDown = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollDown();
		}

		this.clickUp = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollUp();
		}

		this.clickLeft = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollLeft();
		}

		this.clickRight = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollRight();
		}
	}

	function ScrollArea2(instName, areaName, totalCnt, perCnt, dispSize, speed, wait)	{
		this.instName 	= instName;	// ÀÎ½ºÅÏ½º¸í
		this.areaName 	= areaName;	// ÀÌµ¿ÇÒ ¿µ¿ª div id
		this.totalCnt 	= parseInt(totalCnt); 	//ºí·° cnt °¡ ¾Æ´Ñ ÃÑ ³ëÃâ µ¥ÀÌÅÍÀÇ °¹¼ö;
		this.perCnt		= parseInt(perCnt);	//ºí·°´ç  µ¥ÀÌÅÍÀÇ °¹¼ö;
		this.curIndex 	= 0;
		this.destIndex 	= 0;
		this.blockCnt 	= 0;	// ´õ¹Ì¸¦ Á¦¿ÜÇÑ ¼ø¼ö ºí·°ÀÇ ¼ö
		this.dispSize 	= parseInt(dispSize);	// ºí·°ÀÇ ³ôÀÌ/³ÐÀÌ
		this.speed 		= parseInt(speed);		// ÀÌµ¿¼Óµµ : Å¬¼ö·Ï »¡¶óÁü
 		if ( this.speed > this.dispSize ) 	{
			this.speed 	= this.dispSize;
		}
		this.autospeed 	= this.speed ;
		this.wait 		= parseInt(wait);			// ºí·° ÀÌµ¿ ÈÄ ´ë±â ½Ã°£ milsec, 0 ÀÏ °æ¿ì ÀÚµ¿ ½ºÅ©·Ñ ÇÏÁö ¾Ê´Â´Ù.
		this.interval	= 50; 						// ½½¶óÀÌµåÀÌµ¿½Ã setTime Å¸ÀÓ interval/1000 ÃÊ
		this.funcName 	= "scrollInit";
		this.objTimeout	= 0;
		this.firstCall 	= true;
		this.scroll		= true;

		/* Set blockCnt */
		if ( this.totalCnt == 0 || this.perCnt == 0  )		{
			this.blockCnt = 0;
		}	else	{
			// ºí·° ¼ö·® Á¶Á¤
			// ±âº»ÀûÀ¸·Î ºí··´ç °¹¼ö¿¡ ¸Â°Ô ºí·°À» ¼³Á¤ÇÏµÇ
			// 1set Ç¥½Ã °¹¼ö°¡ ¸ðÀÚ¶õ °æ¿ì ºí·°°¹¼ö´Â 1·Î °íÁ¤ÇÑ´Ù.
			this.blockCnt = Math.floor(this.totalCnt/this.perCnt);
			if (this.blockCnt < 1) {
				this.blockCnt = 1;
			}
		}

		this.setBlockCnt = function(blockCnt)	{
			this.blockCnt = blockCnt;
		}


		this.getPosition =  function(index)	{
			return -( index * this.dispSize );
		}

		/*	ÃÊ±âÈ­ */
		this.scrollInit = function()	{}

		/* ½ºÅ©·Ñ ÁßÁö */
		this.scrollStop = function()	{
			//this.firstCall = true;
			try	{
				clearTimeout(this.objTimeout);
			}	catch (e)	{}
			this.scroll = false;
		}

		/* ½ºÅ©·Ñ Àç°³ */
		this.scrollContinue = function()	{
			this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			this.scroll = true;
		}


		/* ¾Æ·¡·Î ½ºÅ©·Ñ */
		this.scrollDown = function()	{
			this.funcName = "scrollDown";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt < 2 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == this.blockCnt )	{
					this.curIndex = 0;
					document.getElementById(this.areaName).style.top = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex + 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.top = parseInt(document.getElementById(this.areaName).style.top) - this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.top )  <  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.top = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}
		}



		/* À§·Î ½ºÅ©·Ñ  */

		this.scrollUp = function() {
			this.funcName = "scrollUp";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt < 2 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == 0 )	{
					this.curIndex = this.blockCnt;
					document.getElementById(this.areaName).style.top = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex - 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.top = parseInt(document.getElementById(this.areaName).style.top) + this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.top )  >  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.top = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}

		}


		/* ¿ìÃøÀ¸·Î ½ºÅ©·Ñ */
		this.scrollRight = function()	{
			this.funcName = "scrollRight";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt < 2 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == this.blockCnt )	{
					this.curIndex = 0;
					document.getElementById(this.areaName).style.left = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex + 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.left = parseInt(document.getElementById(this.areaName).style.left) - this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.left )  <  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.left = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}
		}

		/* ÁÂÃøÀ¸·Î ½ºÅ©·Ñ */
		this.scrollLeft = function()	{
			this.funcName = "scrollLeft";
			clearTimeout(this.objTimeout);

			if ( this.blockCnt < 2 ) return;

			if ( this.firstCall  )	{
				if ( this.curIndex == 0 )	{
					this.curIndex = this.blockCnt;
					document.getElementById(this.areaName).style.left = this.getPosition( this.curIndex ) ;
				}

				this.destIndex = this.curIndex - 1;
				this.firstCall = false;
			}

			if ( this.scroll )	{
				document.getElementById(this.areaName).style.left = parseInt(document.getElementById(this.areaName).style.left) + this.speed;
			}

			if ( parseInt( document.getElementById(this.areaName).style.left )  >  this.getPosition( this.destIndex  ) )		{

				document.getElementById(this.areaName).style.left = this.getPosition( this.destIndex ) ;
				this.curIndex = this.destIndex;

				this.firstCall = true;

				if ( parseInt(this.wait) > 0 )	{
					this.speed = this.autospeed;
					this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.wait);
				}
			}	else	{
				this.objTimeout = setTimeout(this.instName + "." + this.funcName + "()", this.interval);
			}
		}


		/* ¹öÆ° Å¬¸¯½Ã ¿ÀÅä ½ºÅ©·Ñ°ú ´Ù¸¥ ¼Óµµ·Î ÀÌµ¿ ½ÃÅ³ °æ¿ì */
		this.clickDown = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollDown();
		}

		this.clickUp = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollUp();
		}

		this.clickLeft = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollLeft();
		}

		this.clickRight = function(clickspeed)	{
			this.speed = parseInt(clickspeed);
			this.scrollRight();
		}
	}

/** html.js */

var cnt01 = 1;

function cMenu01() {
	if ( cnt01==1) {
		document.getElementById('cMenu02All_expression').style.display='block';
		document.getElementById('cMenu01_bottom_default').style.display='none';
		document.getElementById('cMenu01_bottom_active').style.display='block';
		cnt01=2;
	} else {
		document.getElementById('cMenu02All_expression').style.display='none';
		document.getElementById('cMenu01_bottom_default').style.display='block';
		document.getElementById('cMenu01_bottom_active').style.display='none';
		cnt01=1;
	}
}


<!--
var random_num = (Math.round((Math.random()*10))%4) + 1;

function getPosition()
{
	var start, end, scale, term;

  start = parseInt (document.getElementById('flyTop').style.top, 10);
  end = document.documentElement.scrollTop;

  if ( end > 131 )	{
  	end = document.documentElement.scrollTop - 131;
  }	else	{
  	end = 0;
  }

  term = 100;
  if ( start != end )
  {
	 	scale = Math.ceil( Math.abs( end - start ) / 3 );
	  if ( end < start )	scale = -scale;
		document.getElementById('flyTop').style.top = parseInt (document.getElementById('flyTop').style.top, 10)+ scale + "px";

    term = 50;
  }
  setTimeout ("getPosition()", term);
}
function moveBanner()
{
	document.getElementById('flyTop').style.top = document.documentElement.scrollTop;
	getPosition();
	return true;
}
//-->


<!--
function toggleLayer2(id) {
 try {
 var obj = document.getElementById(id);
 obj.style.display = (obj.style.display == "block") ? "none" : "block";
 } catch (e) {

 }
 return true;
}
//-->


function open_popup(url, wid, hei, scroll, winName)
{
	var url = url;
	var posi = "width="+ wid +",height="+hei+",toolbar=no,location=no,status=no,menubar=no,top=10,left=50,scrollbars=" + scroll +",resizable=no" ;
	if (winName == "")
	{
		winName = popup;
	}
	window.open(url,winName,posi);
}

function locationbar()
{
	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='523' height='316'>");
	document.writeln("<param name=movie value='http://img.natemall.com/natemall/images/locbar/a_m_menu10.swf'>");
	document.writeln("<param name=wmode value=transparent>");
	document.writeln("<embed src='http://img.natemall.com/natemall/images/locbar/a_m_menu10.swf' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='523' height='316'></object>");
}

function star_top(val01,val02)
{
 document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='739' height='201'>");
 document.writeln("<param name=movie value='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_menu_"+val01+".swf?sub_menu="+val02+"'>");
 document.writeln("<param name=wmode value=transparent>");
 document.writeln("<embed src='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_menu_"+val01+".swf?sub_menu="+val02+"' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='739' height='201'></object>");
}
function star_style(val01)
{
 document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='739' height='793'>");
 document.writeln("<param name=movie value='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_style_"+val01+".swf'>");
 document.writeln("<param name=wmode value=transparent>");
 document.writeln("<embed src='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_style_"+val01+".swf' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='739' height='793'></object>");
}
function star_style_road(val01,val02)
{
 document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='739' height='793'>");
 document.writeln("<param name=movie value='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_style_"+val01+"_"+val02+".swf'>");
 document.writeln("<param name=allowScriptAccess value=always />");
  document.writeln("<param name=wmode value=transparent>");
 document.writeln("<embed src='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_style_"+val01+"_"+val02+".swf' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='739' height='793'></object>");
}
function star_movie(val01)
{
 document.writeln("<object classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codeBase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715' id='MPlay1' width=241 height=226 type=application/x-oleobject standby='Loading Windows Media Player components...'>");
 document.writeln("<param name='FileName' value='http://img.natemall.com/natemall/images/star/star_"+val01+"/star_movie_"+val01+".wmv'>");
 document.writeln("<param NAME='transparentAtStart' VALUE='True'>");
 document.writeln("<param NAME='transparentAtStop' VALUE='True'>");
 document.writeln("<param NAME='AnimationAtStart' VALUE='True'>");
 document.writeln("<param NAME='AutoStart' VALUE='True'>");
 document.writeln("<param NAME='AutoRewind' VALUE='True'>");
 document.writeln("<param NAME='SendMouseClickEvents' VALUE='True'>");
 document.writeln("<param NAME='DisplaySize' VALUE='4'>");
 document.writeln("<param NAME='AutoSize' VALUE='0'>");
 document.writeln("<param NAME='AutoResize' VALUE='0'>");
 document.writeln("<param NAME='ShowDisplay' VALUE='False'>");
 document.writeln("<param NAME='ShowStatusBar' VALUE='False'>");
 document.writeln("<param NAME='ShowControls' VALUE='true'>");
 document.writeln("<param NAME='ShowAudioControls' VALUE='1'>");
 document.writeln("<param NAME='ShowTracker' VALUE='True'>");
 document.writeln("<param NAME='ShowPositionControls' VALUE='1'>");
 document.writeln("<param NAME='Enabled' VALUE='1'>");
 document.writeln("<param NAME='EnableContextMenu' VALUE='0'>");
 document.writeln("<param NAME='EnablePositionControls' VALUE='1'>");
 document.writeln("<param NAME='EnableFullScreenControls' VALUE='0'>");
 document.writeln("<param NAME='StartPosition' VALUE='0'>");
 document.writeln("<param NAME='Mute' VALUE='0'>");
 document.writeln("<param NAME='Rate' VALUE='1'>");
 document.writeln("<param NAME='ClickToPlay' VALUE='1'>");
 document.writeln("<param NAME='CursorType' value='1'>");
 document.writeln("</object>");
}



function viewVideo(video_url,width,height,swfid){
	var str_html = "";
 	str_html += '<DIV style=display:inline>';
	str_html += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' hspace='0' vspace='0' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>";
	str_html += "<param name='autosize' value='true'>";
	str_html += "<param name='play' value='true'>";
	str_html += "<param name='loop' value='true'>";
	str_html += "<param name='quality' value='high'>";
	str_html += "<param name='allowScriptAccess' value='always'>";
 	str_html += "<PARAM NAME='menu' VALUE='false'>";
	str_html += "<param name='movie' value='"+video_url+"'>";
 	str_html += "<PARAM NAME='wmode' VALUE='transparent'>";
	str_html += "<embed invokeurls=false src = '"+video_url+"' menu='false' wmode='transparent' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash' allowScriptAccess='always' play='true' loop='true' quality='high' WIDTH='"+width+"' HEIGHT='"+height+"' id='"+swfid+"'>";
  	str_html += "</embed invokeurls=false>";
	str_html += "</object>";
 	str_html += "</DIV>";
	document.write(str_html);
}
<!--[if IE lt 6.0]> <-->
// JavaScript Document
function fixPNG(obj)
{
var blankImg = 'http://img.natemall.com/natemall/images/common/blank.gif';
var Src, Width, Height;

if ( !(typeof obj.style.filter == 'string' && obj.src.substr(obj.src.lastIndexOf(".")+1).toLowerCase() == 'png') ) return;

Src = obj.src;
Width = obj.width;
Height = obj.height;

obj.src = blankImg;
obj.width = Width;
obj.height = Height;
obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+Src+"', sizingMethod='scale')";
}
<!--> <![endif]-->

<!--[if !IE]> <-->
<!--> <![endif]-->

/** ajax.js */

if (document.all) {
  layerview='document.all'
  styleview='.style.'
} else if (document.layers) {
  layerview='document.layers'
  styleview='.'
}

function requestAndShowToLayer(url,id){
	HttpRequest ( url,id ) ;
	//eval(layerview+'.'+id+styleview+'visibility="visible"');
	showLayer(id) ;

	//alert(divObj.style.visibility) ;
}
function HttpRequest(url, id){
	var pageRequest = false ; // ajax object?? ???? ????.
	/*@cc_on
	   @if (@_jscript_version >= 5)
	      try {
	      	pageRequest = new ActiveXObject("Msxml2.XMLHTTP") ;
	      }
	      catch (e){
	         try {
	        	 pageRequest = new ActiveXObject("Microsoft.XMLHTTP") ;
	         } catch (e2){
	         	pageRequest = false;
	         }
	      }
	   @end
	@*/

	if (!pageRequest && typeof XMLHttpRequest != 'undefined')
	   pageRequest = new XMLHttpRequest();

	if (pageRequest){ // pageRequest?? true?? ??????.
	   pageRequest.open('GET', url, false) ;// synchronously ?????? ????????.
	   pageRequest.send(null);
	   embedpage(pageRequest,id);
	}
}

function embedpage(request,id){

	if (request.status==200 ) {
		var divObj = document.getElementById(id);
   		divObj.innerHTML = request.responseText ;
   	}
}


function createAjaxObj(){

	var httprequest=false;

	if (window.XMLHttpRequest){ // if Mozilla

		httprequest=new XMLHttpRequest() ;

		if (httprequest.overrideMimeType) {
			httprequest.overrideMimeType('text/xml') ;
		}

	} else if (window.ActiveXObject){ // if IE

		try {
			httprequest=new ActiveXObject("Msxml2.XMLHTTP");
		}catch (e){
			try{
				httprequest=new ActiveXObject("Microsoft.XMLHTTP");
			}catch (e){}
		}
	}
	return httprequest;
}

function checkIsLogin() {

	var pageRequest = false ; // ajax object?? ???? ????.
	/*@cc_on
	   @if (@_jscript_version >= 5)
	      try {
	      	pageRequest = new ActiveXObject("Msxml2.XMLHTTP") ;
	      }
	      catch (e){
	         try {
	        	 pageRequest = new ActiveXObject("Microsoft.XMLHTTP") ;
	         } catch (e2){
	         	pageRequest = false;
	         }
	      }
	   @end
	@*/

	if (!pageRequest && typeof XMLHttpRequest != 'undefined')
	   pageRequest = new XMLHttpRequest();

	if (pageRequest){ // pageRequest?? true?? ??????.
	   pageRequest.open('GET', "/main.do?method=isLogin", false) ;// synchronously ?????? ????????.
	   pageRequest.send(null);

	   if ( pageRequest.status == 200 )
	   		return pageRequest.responseText ;
	   else
	   		return false ;
	}
}

function getCookieValue(cookie_nm) {

	var pageRequest = false ; // ajax object?? ???? ????.

	/*@cc_on
	   @if (@_jscript_version >= 5)
	      try {
	      	pageRequest = new ActiveXObject("Msxml2.XMLHTTP") ;
	      }
	      catch (e){
	         try {
	        	 pageRequest = new ActiveXObject("Microsoft.XMLHTTP") ;
	         } catch (e2){
	         	pageRequest = false;
	         }
	      }
	   @end
	@*/

	if (!pageRequest && typeof XMLHttpRequest != 'undefined')
	   pageRequest = new XMLHttpRequest();

	if (pageRequest){ // pageRequest?? true?? ??????.
	   pageRequest.open('GET', "/main.do?method=getCookieValue&cookie_nm="+cookie_nm, false) ;// synchronously ?????? ????????.
	   pageRequest.send(null);

	   if ( pageRequest.status == 200 )
	   		return pageRequest.responseText ;
	   else
	   		return false ;
	}
}

function isFirstConnection() {

	var pageRequest = false ; // ajax object?? ???? ????.

	/*@cc_on
	   @if (@_jscript_version >= 5)
	      try {
	      	pageRequest = new ActiveXObject("Msxml2.XMLHTTP") ;
	      }
	      catch (e){
	         try {
	        	 pageRequest = new ActiveXObject("Microsoft.XMLHTTP") ;
	         } catch (e2){
	         	pageRequest = false;
	         }
	      }
	   @end
	@*/

	if (!pageRequest && typeof XMLHttpRequest != 'undefined')
	   pageRequest = new XMLHttpRequest();

	if (pageRequest){ // pageRequest?? true?? ??????.
	   pageRequest.open('GET', "/main.do?method=isFirstConnection", false) ;// synchronously ?????? ????????.
	   pageRequest.send(null);

	   if ( pageRequest.status == 200 )
	   		return pageRequest.responseText ;
	   else
	   		return "N" ;
	}
}

/** alliance_header.js */

var inFlow = getCookie ( "mareket_inflow" ) ;

if ( inFlow != '' ) {

	//var pathCd 	= getSplitValue ( inFlow, "|", 1 ) ;
	//var subPathCd = getSplitValue ( inFlow, "|", 2 ) ;
	var allianceCd = getSplitValue ( inFlow, "|", 3 ) ;

	if ( allianceCd == '110' ) {
		document.write( "<script language='JavaScript' src='http://www.sajai.co.kr/header3.js'></script>" ) ;
	}
}


/** calendar.js */

/**
 * <pre>
 * ÀÏ¹ÝÆË¾÷ ´Þ·Â
 * ÀÎ¼öÀÎ dateField´Â ¹®ÀÚ¿­ Å¸ÀÔÀÌ¸ç,
 * ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ elementÀÌ¸§À» form¸í°ú °°ÀÌ ¼³Á¤ÇÑ´Ù
 * HTMLÀÌ ¾Æ·¡¿Í °°À» ¶§
 * &lt;form name="form1"&gt;
 * &lt;input type="text" name="startdate"&gt;
 * -> dateField´Â "form1.startdate"
 * </pre>
 * @param dateField string ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ elementÀÌ¸§ (ex)form.startdate
 */
function showDateCalendar(dateField)
{
	var wid = (screen.width)/2 - 560/2 ;
	var hei = (screen.height)/2 - 480/2;
	wCalendar = window.open("/common.do?method=viewCalendar&type=date&dateField=" + dateField, "Calendar", "width=158,height=219,status=no,resizable=no,top=200,left=200");
    wCalendar.focus();
}

 /**
 * <pre>
 * ±×¸®µå¿ë ÀÏ¹ÝÆË¾÷ ´Þ·Â
 * ÀÎ¼öÀÎ dateField´Â ¹®ÀÚ¿­ Å¸ÀÔÀÌ¸ç,
 * ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ ±×¸®µå ¼¿ À§Ä¡¸¦ ³Ñ±ä´Ù
 * dateField = "±×¸®µå Object ID,Row,Colum";
 * ex) if (Row >= 0 && Row < FG1.Rows && FG1.MouseRow != -1){
		if (FG1.MouseCol == GridColIndex(FG1,"ÁÖ¹®Á¢¼öÀÏ")){
			showDateCalendarGrid("FG1," + row + "," + col);
 * </pre>
 * @param dateField string ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ elementÀÌ¸§ (ex)"FG1," + row + "," + col
 */
function showDateCalendarGrid(dateField)
{
	var wid = (screen.width)/2 - 560/2 ;
	var hei = (screen.height)/2 - 480/2;
	window.open("/common.do?method=viewCalendar&type=date&subType=grid&dateField=" + dateField, "Calendar", "width=158,height=219,status=no,resizable=no,top="+hei+",left="+wid+"");
}

/**
 * Layer ´Þ·Â
 * ´Þ·Âiframe ¹× div Á¸Àç¿©ºÎ Ã¼Å©
 * @return boolean
 */
function chkExistCalenderFrame(){
	o_ifcal = eval("document.iframeCalendar");
	if(typeof(o_ifcal) != 'undefined'){
		o_ifc = eval("document.all('CalendarLayer')");
		if(o_ifc !=null){
			return true;
		}else{
			alert("´Þ·Â Layer¸íÀ» È®ÀÎ¹Ù¶ø´Ï´Ù.");
			return false;
		}
	}else{
		alert("´Þ·Â iframe¸íÀÌ Àß¸øµÇ¾ú½À´Ï´Ù.");
		return false;
	}
}

 /**
 * <pre>
 * layer ´Þ·Â call (ÀÏ¹Ý ÇÊµå¿ë), ´Þ·ÂÀÌ LayerÇü½ÄÀ¸·Î ³ªÅ¸³­´Ù.
 * ÀÎ¼öÀÎ dateField´Â ¹®ÀÚ¿­ Å¸ÀÔÀÌ¸ç,
 * ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ elementÀÌ¸§À» form¸í°ú °°ÀÌ ¼³Á¤ÇÑ´Ù
 * HTMLÀÌ ¾Æ·¡¿Í °°À» ¶§
 * <form name="form1">
 * <input type="text" name="startdate">
 * -> dateField´Â "form1.startdate"
 * </pre>
 * @param dateField string ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ elementÀÌ¸§ (ex)form.startdate
 */
function showDateCalendarLayer(dateField)
{
	var url = "/common.do?method=viewCalendar";
	var param = "&type=date&dateField=" + dateField;
	     param+="&openType=layer"; // ÀÌºÎºÐ add
	if(chkExistCalenderFrame()){
		oDataField = eval("document."+dateField);
		if(oDataField != null){
			oDataField.focus();
		}
		iframeCalendar.location.href=url+param;
	}
}

/**
 * <pre>
 * ±×¸®µå¿ë Layer ´Þ·Â
 * ÀÎ¼öÀÎ dateField´Â ¹®ÀÚ¿­ Å¸ÀÔÀÌ¸ç,
 * ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ ±×¸®µå ¼¿ À§Ä¡¸¦ ³Ñ±ä´Ù
 * dateField = "±×¸®µå Object ID,Row,Colum";
 * ex) if (Row >= 0 && Row < FG1.Rows && FG1.MouseRow != -1){
		if (FG1.MouseCol == GridColIndex(FG1,"ÁÖ¹®Á¢¼öÀÏ")){
			showDateCalendarGridLayer("FG1," + row + "," + col);
 * </pre>
 * @param dateField string ´Þ·Â¿¡¼­ ¼±ÅÃÇÑ ³¯Â¥°¡ ¼ÂÆÃµÉ elementÀÌ¸§ (ex)"FG1," + row + "," + col
 */
function showDateCalendarGridLayer(dateField){
	var url = "/common.do?method=viewCalendar";
	var param = "&type=date&subType=grid&dateField=" + dateField;
	     param+="&openType=layer"; // ÀÌºÎºÐ add
	if(chkExistCalenderFrame()){
		iframeCalendar.location.href=url+param;
	}
}

/**
 * layer´Þ·Â ´Ý±â
 */
function closeDateCalendarLayer()
{
	if(chkExistCalenderFrame()){
		CalendarLayer.style.display='none';
	}
}

/**
 * layer´Þ·Â (iframe³»ºÎ)´Ý±â
 */
function closeIfmDateCalendarLayer()
{
	if(chkExistCalenderFrame()){
		if( iframeCalendar.getLayerBodyClickVal() =="N" ){
			CalendarLayer.style.display='none';
		}else{
			CalendarLayer.style.display='block';
		}
	}
}

/*****************************
 *
 * ¿©±âºÎÅÍ ½ÎÀÌ¿ùµå ´Þ·Â ½ºÅ©¸³Æ®
 *
 ****************************/
// JavaScript Calendar
  var cal_frm = "";
  var cal_fld = "";
  var cal_idx = "";
  var cal_display = "0";

  function initialize()
  {
//    document.body.innerHTML += "<DIV id='cal' style='position:absolute;width:206;top:150;left:200;display:none;'></DIV>";
  }
  function setObj(formName,fieldName,index,e)
  {
  	cal_display = "1"; // ¹Ù´ÚÂïÀ¸¸é ´Þ·ÂÃ¢ ¾ø¾îÁö±â À§ÇÔ
    cal_frm = formName;
    cal_fld = fieldName;
    cal_idx = index || "";

	var add_y = 5;
	/*
	if (document.form.group_type[1].checked){
		add_y = 35;
	}

	if(document.form.group_type_sub.checked){
		add_y = add_y - 30;
	}

	if(document.form.type_code.selectedIndex !==0){
		add_y = add_y + 30;
	}
	*/

    evt = e || event;

	if (cal_fld == "start_tm") {
	    _x = 440;
	    _y = add_y + 625;
	} else if (cal_fld == "end_tm") {
	    _x = 545;
	    _y = add_y + 625;
	} else {
	    _y = evt.y + 10;
	}

    _x = evt.x - 10;

    var oObj	= document.getElementById(fieldName);
	var c_layerX = 0;
	var c_layerY = 0;


	while (oObj) {
		c_layerX += oObj.offsetLeft;
		c_layerY += oObj.offsetTop;
		oObj = oObj.offsetParent;
	}

	_x = c_layerX - 38;
	_y = c_layerY + 15;

    document.all["cal"].style.posLeft = _x;
    document.all["cal"].style.posTop = _y;

    cal();
  }

  function setObjEdit(formName,fieldName,index,e)
  {
	cal_display = "1"; // ¹Ù´ÚÂïÀ¸¸é ´Þ·ÂÃ¢ ¾ø¾îÁö±â À§ÇÔ
    cal_frm = formName;
    cal_fld = fieldName;
    cal_idx = index || "";

	var add_y = 0;

/*
	if (cal_fld == "start_tm") {
	    _x = 440;
	    _y = add_y + 577;
	} else if (cal_fld == "end_tm") {
	    _x = 545;
	    _y = add_y + 577;
	} else {
	    evt = e || event;
	    _x = evt.x - 10;
	    _y = evt.y + 10;
	}
*/

	evt = e || event;

/*
	 if (cal_fld == "start_tm") {
		 _x = 440;
		 _y = add_y + 642;
	 } else if (cal_fld == "end_tm") {
		 _x = 545;
		 _y = add_y + 642;
	 } else {
		 _y = evt.y + 10;
	 }

    _x = evt.x - 78;
*/


    document.all["cal"].style.posLeft = _x;
    document.all["cal"].style.posTop = _y;
    cal();
  }

	function setDate(y, m, d)
	{
		var date = new Date();
		var date_addYear = new Date(date.getYear()+1,date.getMonth()+1, date.getDate());

//		if ( (y <= date.getYear()) && (m <= date.getMonth()+1) && (d < date.getDate()) ) {
//			elert_msg();
//			return false;
//		}


	    m = (m.toString().length==1)? "0"+m : m;
	    d = (d.toString().length==1)? "0"+d : d;
	    var date = y + "." + m + "." + d;
	    var ele = eval("document."+cal_frm+"."+cal_fld)
	    var cnt = ele.length;

		inDate=new Date(y,m,d).getTime();
		if ( inDate > date_addYear.getTime() )
		{
			alert("Èñ¸Á±â°£Àº ÇöÀç¿ù±âÁØ 1³â ³»·Î ¼³Á¤ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù");
			return false;
		}

		//ºÀ»ç±â°£ ¼³Á¤ check begin ==========
		if (cal_fld == "start_tm") {
			if (form.end_tm.value != "") {
				f=form.end_tm.value;
				v1=f.split(".");

				a1=new Date(y,m,d).getTime();
				a2=new Date(v1[0],v1[1],v1[2]).getTime();

				if ( a1 > a2 ) {
					alert("Á¾·áÀÏÀÌ ½ÃÀÛÀÏº¸´Ù ºü¸¨´Ï´Ù");
					return false;
				}

			}


		} else if (cal_fld == "end_tm") {
			if (form.start_tm.value != "") {
				f=form.start_tm.value;
				v1=f.split(".");

				a1=new Date(v1[0],v1[1],v1[2]).getTime();
				a2=new Date(y,m,d).getTime();

				if ( a1 > a2 ) {
					alert("Á¾·áÀÏÀÌ ½ÃÀÛÀÏº¸´Ù ºü¸¨´Ï´Ù");
					return false;
				}
			}
		}
		//ºÀ»ç±â°£ ¼³Á¤ check end ==========

	    if(typeof(cnt)=="undefined" || cnt < 2)
	    {
	      ele.value = date;
	    }
	    else
	    {
	      for(var i =0;i<cnt;i++)
	      {
	        var tmpEle = eval("document."+cal_frm+"."+cal_fld);
	        if(tmpEle[i].cal_idx==cal_idx)
	        {
	          tmpEle[i].value = date;
	        }
	      }
	    }
	    document.all["cal"].style.display="none";
	}

  function elert_msg()
  {
  	alert("ÇöÀçÀÏ ÀÌÀü³¯Â¥´Â ¼±ÅÃÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
  }

  function cal(year, month)
  {

    var date = new Date();//Date°´Ã¼ ¹Þ¾Æ¿À±â
    var curYear = year || date.getYear();//¼±ÅÃ³âµµ¿¡ °ªÀÌÀÖÀ¸¸é ±×°ªÀ¸·Î, ¾Æ´Ï¸é Date°´Ã¼ÀÇ ³âµµ
    var curMonth = month || date.getMonth()+1;//¼±ÅÃ¿ù ¾øÀ¸¸é Date°´Ã¼ÀÇ ¿ù
    var curDate = date.getDate();//ÀÏÀº ¹«Á¶°Ç ÇöÀçÀÏ
    // 2¿ù À±³âÀÎÁö ºñ±³ . À±³âÀº ³âµµ¸¦ 4·Î³ª´²¼­ 0ÀÌ¸é À±³â, ±×·±µ¥ 100À¸·Î ³ª´²¼­ 0ÀÌ¸é ¾Æ´Ô
    // 400À¸·Î ³ª´²¼­ 0ÀÌ¸é ±×³É À±³â. À±³âÀº 29ÀÏ±îÁ¤..
    var february = ((0 == curYear % 4) && (0 != (curYear % 100))) ||
         (0 == curYear % 400) ? 29 : 28;
    var arrMonth = new Array("1","2","3","4","5","6","7","8","9","10","11","12")//¿ù
    var arrLastDate = new Array(31, february, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);//ÇØ´ç¿ùÀÇ ¸¶Áö¸·ÀÏ
    //³âµµ ¾ÕÀ¸·ÎÀÌµ¿ ¼±ÅÃÇÏ´Â ¸µÅ©
    var link_year_prev = "<A href='javascript:void(0)' onClick='cal("+(curYear-1)+","+curMonth+");'>";
    //³âµµ µÚ·ÎÀÌµ¿ ¼±ÅÃÇÏ´Â ¸µÅ©
    var link_year_next = "<A href='javascript:void(0)' onClick='cal("+(curYear+1)+","+curMonth+");'>";
    // ¿ù ¾Õ, µÚ·Î ÀÌµ¿ÇÏ´Â ¸µÅ©.
    // ¾ÕÀ¸·ÎÀÌµ¿½Ã 1¿ùÀÏ °æ¿ì´Â 12¿ù·Î ÇÏ°í ³âµµµµ º¯°æÇÑ´Ù.
    var prev_year = (curMonth == 1)? curYear - 1:curYear;
    var prev_month = (curMonth == 1)? 12 : curMonth - 1;
    // µÚ·Î ÀÌµ¿½Ã 12¿ùÀÏ °æ¿ì 1¿ù·Î ÇÏ°í ³âµµµµ º¯°æÇÑ´Ù.
    var next_year = (curMonth == 12)? curYear+1:curYear;
    var next_month = (curMonth == 12)? 1 : curMonth + 1;
    // ¿ù ¾Õ, µÚ·Î ÀÌµ¿ÇÏ´Â ¸µÅ©
    var link_month_prev
//    if ( (prev_year <= date.getYear() && prev_month < date.getMonth()+1) || (prev_year < date.getYear()) ) {
//    	link_month_prev= "<A href='javascript:elert_msg()';>";
//	} else {
    	link_month_prev= "<A href='javascript:void(0)' onClick='cal("+prev_year+","+prev_month+")'>";
//    }
    var link_month_next = "<A href='javascript:void(0)' onClick='cal("+next_year+","+next_month+")'>";

    var arrDate = new Array("&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;")
    var tmpDate = new Date(curYear, curMonth-1, 1)
    var startPos = tmpDate.getDay();

    var j = 1;
    for(var i = startPos; i<arrLastDate[curMonth-1]+startPos; i++)
    {
      arrDate[i] = "<A href='javascript:void(0);' onClick='return setDate("+curYear+","+curMonth+",\""+j+"\")'>"+j+"</A>";
      j++;
    }

    tmpCurMonth = (curMonth.toString().length==1)? "0"+curMonth : curMonth;
///////////////////////////// HTML »ý¼º ºÎºÐ //////////////////////////////
	var str2 = "<table cellspacing='0' cellpadding='0' width='144' height='130' style='border: solid 1px #AAAAAA'><tr><td align=center bgcolor=ffffff>";
//// ³â ¿ù Ç¥½Ã¹× ¼±ÅÃ
	str2 += "<table border='0' cellspacing='0' cellpadding='0' width='134'>";
    str2 += "<tr><td height='20' align='center' bgcolor='#ffffff'>";
    str2 += "<td height='20' align='center' bgcolor='#FFFFFF'>" + link_month_prev + "<img src='http://img.cyworld.com/img/townhp/icon_cal_arrow01.gif' width='10' height='10' border='0' align='absmiddle' style='margin:0 0 1 0;'></a>";
    str2 += "<b class='px11'>" + curYear + "." + tmpCurMonth + "</b> ";
    str2 += link_month_next + "<img src='http://img.cyworld.com/img/townhp/icon_cal_arrow02.gif' width='10' height='10' border='0' align='absmiddle' style='margin:0 0 1 0;'></a>";
    str2 += "</td></tr>";
    str2 += "<tr><td height='1' bgcolor='#CCCCCC'></td></tr></table>";
//// ³â ¿ù Ç¥½Ã¹× ¼±ÅÃ ¸¶Ä§

//// ´Þ·Â Å×ÀÌºí Ãâ·Â ºÎºÐ
	str2 += "<table border='0' cellspacing='1' cellpadding='0' width='134' bgcolor='#FFFFFF'>";
	str2 += "<tr>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#DD0000'>S</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>M</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>T</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>W</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>T</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>F</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#3399CC'>S</font></b></td>";
	str2 += "</tr>";
	str2 += "</table>";

	str2 += "<table border='0' cellspacing='1' cellpadding='0' width='134' bgcolor='#CCCCCC'>";

    for(var i =0; i<arrDate.length;i+=7)
    {
      if(i!=35 || arrDate[35]!="&nbsp;")//ÃÖ´ë 6ÁÖ°¡ »ý±æ¼öÀÖÀ½. ¸¶Áö¸· 6ÁÖ°¡ ¾øÀ¸¸é ¾È³ª¿À°ÔÇÔ
      {
		str2 += "<tr height='15'>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='padding:1 0 0 0; color:#FF6600;'>" + arrDate[i] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+1] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+2] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+3] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+4] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+5] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#33AABB;'>" + arrDate[i+6] + "</td>";
		str2 += "</tr>";

      }
    }
	str2 += "</table>";
//// ´Þ·Â Å×ÀÌºí Ãâ·Â ºÎºÐ ¸¶Ä§
	str2 += "</td></tr></table>";
///////////////////////////// HTML »ý¼º ºÎºÐ ¸¶Ä§ //////////////////////////////
    document.all["cal"].innerHTML = str2;
    document.all["cal"].style.display = "block";
  }

  function displayNone(){
	if (document.getElementById("cal") && cal_display == "0")
		document.getElementById("cal").style.display="none";
	cal_display = "0";
}


////////////////////////////////////////////////////////////

function setObj_section(formName,fieldName,index,e)
  {
  	cal_display = "1"; // ¹Ù´ÚÂïÀ¸¸é ´Þ·ÂÃ¢ ¾ø¾îÁö±â À§ÇÔ
    cal_frm = formName;
    cal_fld = fieldName;
    cal_idx = index || "";

	var add_y = 5;
/*
	if (cal_fld == "start_tm") {
	    _x = 306;
	    _y = add_y + 295;
	} else if (cal_fld == "end_tm") {
	    _x = 410;
	    _y = add_y + 295;
	} else if (cal_fld == "search_end_date") {
	    _x = 648;
	    _y = add_y + 232;
	} else {
	    evt = e || event;
	    _x = 686;
	    _y = 364;
	}
*/
	evt = e || event;

/*
	 if (cal_fld == "start_tm") {
		 _x = 440;
		 _y = add_y + 625;
	 } else if (cal_fld == "end_tm") {
		 _x = 545;
		 _y = add_y + 625;
	 } else {
		 _y = evt.y + 10;
	 }
*/
	var oObj	= document.getElementById(fieldName);
	var c_layerX = 0;
	var c_layerY = 0;


	while (oObj) {
		c_layerX += oObj.offsetLeft;
		c_layerY += oObj.offsetTop;
		oObj = oObj.offsetParent;
	}

	_x = c_layerX - 38;
	_y = c_layerY + 15;

    document.all["cal"].style.posLeft = _x;
    document.all["cal"].style.posTop = _y;
    cal_section();
  }


  function cal_section(year, month)
  {
    var date = new Date();//Date°´Ã¼ ¹Þ¾Æ¿À±â
    var curYear = year || date.getYear();//¼±ÅÃ³âµµ¿¡ °ªÀÌÀÖÀ¸¸é ±×°ªÀ¸·Î, ¾Æ´Ï¸é Date°´Ã¼ÀÇ ³âµµ
    var curMonth = month || date.getMonth()+1;//¼±ÅÃ¿ù ¾øÀ¸¸é Date°´Ã¼ÀÇ ¿ù
    var curDate = date.getDate();//ÀÏÀº ¹«Á¶°Ç ÇöÀçÀÏ
    // 2¿ù À±³âÀÎÁö ºñ±³ . À±³âÀº ³âµµ¸¦ 4·Î³ª´²¼­ 0ÀÌ¸é À±³â, ±×·±µ¥ 100À¸·Î ³ª´²¼­ 0ÀÌ¸é ¾Æ´Ô
    // 400À¸·Î ³ª´²¼­ 0ÀÌ¸é ±×³É À±³â. À±³âÀº 29ÀÏ±îÁ¤..
    var february = ((0 == curYear % 4) && (0 != (curYear % 100))) ||
         (0 == curYear % 400) ? 29 : 28;
    var arrMonth = new Array("1","2","3","4","5","6","7","8","9","10","11","12")//¿ù
    var arrLastDate = new Array(31, february, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);//ÇØ´ç¿ùÀÇ ¸¶Áö¸·ÀÏ
    //³âµµ ¾ÕÀ¸·ÎÀÌµ¿ ¼±ÅÃÇÏ´Â ¸µÅ©
    var link_year_prev = "<A href='javascript:void(0)' onClick='cal_section("+(curYear-1)+","+curMonth+");'>";
    //³âµµ µÚ·ÎÀÌµ¿ ¼±ÅÃÇÏ´Â ¸µÅ©
    var link_year_next = "<A href='javascript:void(0)' onClick='cal_section("+(curYear+1)+","+curMonth+");'>";
    // ¿ù ¾Õ, µÚ·Î ÀÌµ¿ÇÏ´Â ¸µÅ©.
    // ¾ÕÀ¸·ÎÀÌµ¿½Ã 1¿ùÀÏ °æ¿ì´Â 12¿ù·Î ÇÏ°í ³âµµµµ º¯°æÇÑ´Ù.
    var prev_year = (curMonth == 1)? curYear - 1:curYear;
    var prev_month = (curMonth == 1)? 12 : curMonth - 1;
    // µÚ·Î ÀÌµ¿½Ã 12¿ùÀÏ °æ¿ì 1¿ù·Î ÇÏ°í ³âµµµµ º¯°æÇÑ´Ù.
    var next_year = (curMonth == 12)? curYear+1:curYear;
    var next_month = (curMonth == 12)? 1 : curMonth + 1;
    // ¿ù ¾Õ, µÚ·Î ÀÌµ¿ÇÏ´Â ¸µÅ©
    var link_month_prev
 //   if ( (prev_year <= date.getYear() && prev_month < date.getMonth()+1) || (prev_year < date.getYear()) ) {
   // 	link_month_prev= "<A href='javascript:elert_msg()';>";
	//} else {
    	link_month_prev= "<A href='javascript:void(0)' onClick='parent.cal_section("+prev_year+","+prev_month+")'>";
  //  }
    var link_month_next = "<A href='javascript:void(0)' onClick='parent.cal_section("+next_year+","+next_month+")'>";

    var arrDate = new Array("&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;","&nbsp;")
    var tmpDate = new Date(curYear, curMonth-1, 1)
    var startPos = tmpDate.getDay();

    var j = 1;
    for(var i = startPos; i<arrLastDate[curMonth-1]+startPos; i++)
    {
      arrDate[i] = "<A href='javascript:void(0);' onClick='return parent.setDate_section("+curYear+","+curMonth+",\""+j+"\")'>"+j+"</A>";
      j++;
    }

    tmpCurMonth = (curMonth.toString().length==1)? "0"+curMonth : curMonth;
///////////////////////////// HTML »ý¼º ºÎºÐ //////////////////////////////
	var str2 = "<body topmargin=0 leftmargin=0><table cellspacing='0' cellpadding='0' width='144' height='140' style='border: solid 1px #AAAAAA'><tr><td align=center bgcolor=ffffff>";
//// ³â ¿ù Ç¥½Ã¹× ¼±ÅÃ
	str2 += "<table border='0' cellspacing='0' cellpadding='0' width='134'>";
    str2 += "<tr><td height='20' align='center' bgcolor='#ffffff'>";
    str2 += "<td height='20' align='center' bgcolor='#FFFFFF'>" + link_month_prev + "<img src='http://img.cyworld.com/img/townhp/icon_cal_arrow01.gif' width='10' height='10' border='0' align='absmiddle' style='margin:0 0 1 0;'></a>";
    str2 += "<b class='px11'>" + curYear + "." + tmpCurMonth + "</b> ";
    str2 += link_month_next + "<img src='http://img.cyworld.com/img/townhp/icon_cal_arrow02.gif' width='10' height='10' border='0' align='absmiddle' style='margin:0 0 1 0;'></a>";
    str2 += "</td></tr>";
    str2 += "<tr><td height='1' bgcolor='#CCCCCC'></td></tr></table>";
//// ³â ¿ù Ç¥½Ã¹× ¼±ÅÃ ¸¶Ä§

//// ´Þ·Â Å×ÀÌºí Ãâ·Â ºÎºÐ
	str2 += "<table border='0' cellspacing='1' cellpadding='0' width='134' bgcolor='#FFFFFF'>";
	str2 += "<tr>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#DD0000'>S</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>M</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>T</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>W</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>T</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#555555'>F</font></b></td>";
	str2 += "<td width='18' align='center' bgcolor='#E5E5E5' class='tah' style='padding:1 0 0 0;'><b><font color='#3399CC'>S</font></b></td>";
	str2 += "</tr>";
	str2 += "</table>";

	str2 += "<table border='0' cellspacing='1' cellpadding='0' width='134' bgcolor='#CCCCCC'>";

    for(var i =0; i<arrDate.length;i+=7)
    {
      if(i!=35 || arrDate[35]!="&nbsp;")//ÃÖ´ë 6ÁÖ°¡ »ý±æ¼öÀÖÀ½. ¸¶Áö¸· 6ÁÖ°¡ ¾øÀ¸¸é ¾È³ª¿À°ÔÇÔ
      {
		str2 += "<tr height='15'>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='padding:1 0 0 0; color:#FF6600;'>" + arrDate[i] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+1] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+2] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+3] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+4] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#555555;'>" + arrDate[i+5] + "</td>";
		str2 += "<td width='18' align='center' bgcolor='#FFFFFF' class='tah' style='cursor:hand; padding:1 0 0 0; color:#33AABB;'>" + arrDate[i+6] + "</td>";
		str2 += "</tr>";

      }
    }
	str2 += "</table>";
//// ´Þ·Â Å×ÀÌºí Ãâ·Â ºÎºÐ ¸¶Ä§
	str2 += "</td></tr></table></body>";
///////////////////////////// HTML »ý¼º ºÎºÐ ¸¶Ä§ //////////////////////////////
	//	2006.05.03	by krovere	iframe Àû¿ë.
	var kro_str	= "<iframe id='kro_id' scrolling='no' width='144' height='140' frameborder='0'></iframe>";
	var kro_str2	= "";
	kro_str2	+= "<style>";
	kro_str2	+= "body, td, select, input, textarea {";
	kro_str2	+= "font-family:µ¸¿ò, seoul, arial, verdana;";
	kro_str2	+= "font-size:12px;	color:#666666;	line-height:1.3;";
	kro_str2	+= "scrollbar-face-color:#DDDDDD;scrollbar-highlight-color:#CCCCCC;scrollbar-shadow-color:#CCCCCC;scrollbar-3dlight-color:#F5F5F5;";
	kro_str2	+= "scrollbar-darkshadow-color:#F5F5F5;scrollbar-track-color:#F0F0F0;scrollbar-arrow-color:#FFFFFF;}";
	kro_str2	+= "/* ¸ðµç ÀÌ¹ÌÁö¿¡ border°ª 0 Àû¿ë */img {border:0;}";
	kro_str2	+= "a:link, a:active, a:visited { color:#666666; text-decoration:none; }a:hover { color:#3872B2; text-decoration:underline; }";
	kro_str2	+= ".input {border: solid 1px #333333;}";
	kro_str2	+= "/* µ¸À½ 11px */.px11 {font-size:11px;}";
	kro_str2	+= "/* ¿µ¹® ÆùÆ® */.tah {font-family:Tahoma; font-size:9px;}";
	kro_str2	+= "</style>";

    document.all["cal"].innerHTML = kro_str;
	kro_id.document.write(kro_str2);
	kro_id.document.write(str2);
    document.all["cal"].style.display = "block";
  }

  function setDate_section(y, m, d)
	{
		var date = new Date();
		var date_addYear = new Date(date.getYear()+1,date.getMonth()+1, date.getDate());

	//	if ( (y <= date.getYear()) && (m <= date.getMonth()+1) && (d < date.getDate()) ) {
	//		elert_msg();
	//		return false;
	//	}


	    m = (m.toString().length==1)? "0"+m : m;
	    d = (d.toString().length==1)? "0"+d : d;
	    var date = y + "." + m + "." + d;
	    var ele = eval("document."+cal_frm+"."+cal_fld)
	    var cnt = ele.length;

		inDate=new Date(y,m,d).getTime();
		if ( inDate > date_addYear.getTime() )
		{
			alert("Èñ¸Á±â°£Àº ÇöÀç¿ù±âÁØ 1³â ³»·Î ¼³Á¤ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù");
			return false;
		}

		//ºÀ»ç±â°£ ¼³Á¤ check begin ==========
		if (cal_fld == "start_tm") {
			if (parent.form.end_tm.value != "") {
				f=parent.form.end_tm.value;
				v1=f.split(".");

				a1=new Date(y,m,d).getTime();
				a2=new Date(v1[0],v1[1],v1[2]).getTime();

				if ( a1 > a2 ) {
					alert("Á¾·áÀÏÀÌ ½ÃÀÛÀÏº¸´Ù ºü¸¨´Ï´Ù");
					return false;
				}

			}


		} else if (cal_fld == "end_tm") {
			if (parent.form.start_tm.value != "") {
				f=parent.form.start_tm.value;
				v1=f.split(".");

				a1=new Date(v1[0],v1[1],v1[2]).getTime();
				a2=new Date(y,m,d).getTime();

				if ( a1 > a2 ) {
					alert("Á¾·áÀÏÀÌ ½ÃÀÛÀÏº¸´Ù ºü¸¨´Ï´Ù");
					return false;
				}
			}
		}
		//ºÀ»ç±â°£ ¼³Á¤ check end ==========

	    if(typeof(cnt)=="undefined" || cnt < 2)
	    {
	      ele.value = date;
	    }
	    else
	    {
	      for(var i =0;i<cnt;i++)
	      {
	        var tmpEle = eval("document."+cal_frm+"."+cal_fld);
	        if(tmpEle[i].cal_idx==cal_idx)
	        {
	          tmpEle[i].value = date;
	        }
	      }
	    }
	    document.all["cal"].style.display="none";
	}

	function syncHeight(el) {
		el = typeof el == 'string' ? document.getElementById(el) : el;
		el.setExpression('height','contentWindow.document.body.scrollHeight+5');
	}


