//Æ¯¼ö¹®ÀÚ Â÷´ÜÇÏ±â melsiria_2006_9_8 O#update
function search_form(textform) {
	var count = textform.value.length;
	var textvalue = textform.value;

	if (textform.value == ""){
		alert("°Ë»öÇÒ ´Ü¾î¸¦ Àû¾îÁÖ½Ê½Ã¿ä.");
		textform.focus();
		return false;
	}

	if (Check(textvalue) < 1)
	{
		alert("°Ë»ö¾î´Â ÇÑÀÚºÎÅÍ °¡´ÉÇÕ´Ï´Ù.");
		textform.focus();
		textform.value = "";
		return (false);
	}

	for (i=0;i<count ;i++ ){

		temp_value = textvalue.charAt(i);
		ch = temp_value.charCodeAt();

			if( (ch >= 34 && ch <= 36) || (ch >= 38 && ch <= 47) || (ch >= 58 && ch <= 64) || (ch >= 91 && ch <= 96) || (ch >= 123 && ch <= 125) ) {

				alert("¹®ÀÚ " +temp_value+ " ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.\nÆ¯¼ö¹®ÀÚ('@#$^&*_=|<,>.?/{}[]:)µî ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù..");
				textform.value = "";
				textform.focus();
				return false;
			}
	}
}

function search_form1(textform) {
/*	°ü¸®ÀÚÂÊ °Ë»ö¿¡¼­ Æ¯¼ö¹®ÀÚ Á¦¾îÀÌÁö¸¸ Æ¯º°È÷ ¹®Á¦°¡ ¾ø´Ù¸é ÁÖ¼®Ã³¸® lhw1117 2007-02-13
	var count = textform.value.length;
	var textvalue = textform.value;

	for (i=0;i<count ;i++ ){
		temp_value = textvalue.charAt(i);
		ch = temp_value.charCodeAt();

		if( (ch >= 33 && ch <= 47) || (ch >= 58 && ch <= 64) || (ch >= 91 && ch <= 96) || (ch >= 123 && ch <= 126) ) {
			alert("¹®ÀÚ " +temp_value+ " ¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù  \n Æ¯¼ö¹®ÀÚ(~'!@#$%^&*_=|<,>.?/{}[]:)µî  ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù..");
			textform.value = "";
			textform.focus();
			return false;
		}
	}
*/
}

function Check(keyword)
{
	var st_num, key_len;
	st_num = keyword.indexOf(" ");
	while (st_num != -1)
	{
		keyword = keyword.replace(" ", "");
		st_num  = keyword.indexOf(" ");
	}
	key_len=keyword.length;
	return key_len;
}

//Æ¯¼ö¹®ÀÚ Â÷´ÜÇÏ±â melsiria_2006_9_8 O#update END




//topmenu »ïÅÍ±âÈ¹Àü Srolling
function HMSrolling(){
	// ¼öÁ¤°¡´ÉÇÑ º¯¼ö
	this.name = "HMSrolling";
	this.lineHeight = 24;		// ÁÙ°£°Ý(¼ýÀÚ°¡ Å¬¼ö·Ï ¸Ö¸® ¶³¾îÁü)
	this.showLines = 3;			// ÇÑ¹ø¿¡ º¸¿©ÁÙ ÁÙÀÇ °³¼ö(È­¸é¿£ Ç×»ó ¿©±â¼­ ÁöÁ¤ÇÑ ¼ö¸¸Å­ÀÇ ÁÙ¸¸ º¸ÀÎ´Ù. (ÀÌ°ªÀ» º¯°æÇÏ¸é ¾Æ·¡¿¡ ÀÖ´Â <div id='scr' style="width:500px; height:40px ¿¡¼­ height °ªÀ» Àû´çÈ÷ º¯°æÇØ¾ß º¸ÀÓ
	this.delayNum = 20;			// ½ºÅ©·Ñ ¼Óµµ : 1 ~ 1000 (1 ÀÌ Á¦ÀÏ ºü¸£°í 1000 ÀÌ Á¦ÀÏ ´À¸²)
	this.sleepCnt = 3;			// ½ºÅ©·ÑÀÌ ¸ØÃçÀÖ´Â½Ã°£ (´ÜÀ§ : ÃÊ) -> ¸¹À»¼ö·Ï ¸ØÃçÀÖ´Â½Ã°£ÀÌ ±æ¾îÁü
	this.divName = "scr_";

	// ¼öÁ¤ºÒ°¡´ÉÇÑ º¯¼ö
	this.resetSleepCnt = this.sleepCnt;
	this.isMove = true;			// ½ºÅ©·ÑÀÌ ÁøÇàÀÌ µÇ´ÂÁö¿©ºÎ (true : ÁøÇà, false : ¸ØÃã)
	this.aryText = new Array();	// ½ºÅ©·ÑÀÌ µÉ ¹®ÀåµéÀÌ ´ã±æ º¯¼ö
	this.aryLen = 0;			// ½ºÅ©·Ñ¸µµÇ´Â ¹®ÀåÀÇ °³¼ö
	this.aryDiv = new Array();	// °¢°¢ÀÇ Div ¸¦ ´ã´Â ¹è¿­
	this.html = "";				
	this.moveTimer = null;
	this.moveLen = 0;
	this.isFirstDiv = 0;		// ÇöÀç °¡Àå À§¿¡ ÀÖ´Â div ¸¦ ¾Ë¾Æº¸±âÀ§ÇÑ º¯¼ö

	this.add = function(){
		var text = arguments[0];
		this.aryText[this.aryLen] = text;
		this.aryLen = this.aryLen + 1;
	}//add

	// ½ºÅ©·Ñ¸µ º¸¿©ÁÜ
	this.setScrl = function(){
		if (this.aryLen > 0) {
			for (var i = 0;i < this.aryLen ; i++) {
					html = "";
					html = "<div id='"+this.divName+i+"' style='position:absolute;top:"+(this.lineHeight*i)+"px;left:0; visibility:visible;padding-top:2;padding-left:5'>\n";
					html = html + this.aryText[i]+"\n";
					html = html + "</div>";

				document.write(html);		// ÀúÀåµÈ ³»¿ëÀ» È­¸é¿¡ Ãâ·Â
				this.aryDiv[i] = eval("document.all."+this.divName+i);
			}
			
			if (this.aryLen > this.showLines) {
				// ÀÚµ¿½ºÅ©·Ñ ½ÃÀÛ
				this.startScrl();
			}

		} else {
			html = "<table width='100%' align='center' border='0'><tr><td align='center'><BR>³»¿ëÀÌ ¾ø½À´Ï´Ù.</td></tr></table>";
			document.write(html);
		}
	}//setScrl

	// ½ºÅ©·Ñ¸µ ½ÃÀÛ
	this.startScrl = function(){
		if (this.isMove) {
			for (var i = 0;i < this.aryLen;i++) {
				this.aryDiv[i].style.pixelTop -= 1;						
			}
			this.moveLen++;
			if (this.moveLen >= this.lineHeight) {
				this.moveLen = 0;
				this.aryDiv[this.isFirstDiv].style.pixelTop += this.lineHeight*this.aryLen;
					if (this.isFirstDiv != (this.aryLen-1)) {
						this.isFirstDiv++;
					} else {
						this.isFirstDiv = 0;
					}		
				this.sleepTimer();
				return;
			}
		} 
		//window.status = isFirstDiv;
		moveTimer = setTimeout(this.name+".startScrl()",this.delayNum);
	}//startScrl

	this.sleepTimer = function(){
		this.moveTimer = null;
		this.sleepCnt--;
		if (this.sleepCnt == 0) {
			this.moveTimer = setTimeout(this.name+".startScrl()",this.delayNum);		
			this.sleepCnt = this.resetSleepCnt;
			return;
		}
		setTimeout(this.name+".sleepTimer()",1000);
	}//sleepTimer
} //HMSrolling()



function copyToClipboard(val) { 
	window.clipboardData.setData("Text", val); 
	alert("ÀÌ »óÇ°ÀÇ ÁÖ¼Ò°¡ º¹»ç µÇ¾ú½À´Ï´Ù.\n\n°Ô½ÃÆÇÀÌ³ª ¸Þ½ÅÀú Ã¢¿¡¼­ ÀÌ »óÇ°ÀÇ ¸µÅ©¸¦ Ctrl+V ¶Ç´Â ºÙ¿©³Ö±â ÇÏ¼¼¿ä^^");
}


