	function open_comment(uid, file, opt){
		window.open('view_Comment.asp?UID='+uid+'&File='+file,'view_'+uid, opt);
	}


	function confirmComment(comment, txtLength)
	{
		var obj = document.getElementById(comment);

		if (LenH(obj.value) == 0) {
				alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.   ");
				obj.focus();
				return false;
		}

		if (LenH(obj.value) > txtLength) {
				alert("ÀÔ·ÂÇÑ ³»¿ëÀÌ "+txtLength+" ¹ÙÀÌÆ®¸¦ ³Ñ½À´Ï´Ù.   \n´Ù½Ã ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
				obj.focus();
				return false;
		}
		
		if (obj.value.search(/(\<|\>)/) >= 0)
				obj.value = obj.value.replace(/(\<)/g, "&lt;").replace(/(\>)/g, "&gt;");
				
		return true;			
	}
	
	function countComment(comment, txtLength)
	{
		var obj = document.getElementById(comment);
		var strObj = document.getElementById("cmtCount");
		strObj.innerHTML = LenH(obj.value) + "/"+ txtLength+" Byte";		
	}
	
	function LenH(aquery)
	{
		var tmpStr;
		var temp=0;
		var onechar;
		var tcount;
		tcount = 0;
		 
		tmpStr = new String(aquery);
		temp = tmpStr.length;

		for (k=0;k<temp;k++)
		{
			onechar = tmpStr.charAt(k);

			if (escape(onechar).length > 4) {
				tcount += 2;
			}
			else if (onechar!='\r') {
				tcount++;
			}
		}
		return tcount;
	}	
	
	function LeftH(str, cnt) //ÇÑ±ÛÀ» byte´ÜÀ§·Î ÀÚ¸§
	{
		var k = 0;
		var i;
		var ss="";
		
		for(i=1;i<=cnt;i++)
		{
			if(escape(str.charAt(k)).length > 4)
			{
				i = i + 1;
			}
				
			if(i <= cnt)
				ss = ss + str.charAt(k);
			k = k + 1;
		}
		return ss;
	}

	function view_notice(uid){
		window.open('/noticeview.asp?uid='+uid,'notice','width=350, height=400, scrollbars=yes');
	}

	function view_notice_list(){
		window.open('/noticelist.asp','notice','width=350, height=400, scrollbars=yes');
	}

	function image_big(mode,file){
		window.open('/shop/image_view.asp?mode='+mode+'&file='+file,'image_v','width=100, height=100, scrollbars=no');
	}

	function download(uid, sort, file){
		location.href='/common/download.asp?uid='+uid+'&sort='+sort+'&file='+file;
	}


var tID       = null;
var getObj	= null;
var mq = new classMQ();

function classMQ() 
{
} 

classMQ.prototype.set = function( obj )
{
getObj	= obj;
this.BLANK     = "           ";
this.CONTENT = getObj.value;
this.SCROLL    = this.BLANK + this.CONTENT + this.BLANK + this.CONTENT;
}

classMQ.prototype.scroll = function( ) 
{
if (!getObj)	return;	
			
var value = getObj.value;
getObj.value = value.substring(1);
if ("" == getObj.value.length)
{
	getObj.value = this.SCROLL;
}			
}

classMQ.prototype.init = function(  ) 
{
if (!getObj)	return;
getObj.value = this.CONTENT;
}


//¸ÞÀÏ Ã¼Å©
function check_email(this_email){

  var str = this_email;
  var idchar_chk = false;

  if (str != "") {

    if(str.indexOf('@') == -1) {
		return false;
	}
    if(str.indexOf('.') == -1) {
		return false;
	 }
	   else
    {
       var alpha_digit = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@.-_'
       var t = this_email;
       
       for (i=0 ; i < t.length ; i++)
         {
          if (idchar_chk == true) break;
          if (alpha_digit.indexOf(t.substring(i,i+1)) < 0)
             {
				return false;
              }
         }
     }

  }
}
