<!--
/**********************************/
/*	ÃÖÁ¾¼öÁ¤ÀÏ : 2005-01-11
/*	ÃÖÁ¾¼öÁ¤ÀÚ : ÀÌÈ£Ã¶
/**********************************/

// È®ÀÎ ¹öÆ°À» ´©¸¦ °æ¿ì ¿øÇÏ´Â ÆäÀÌÁö·Î 
function LA_confirmUrl(str,url){
	if(confirm(str)){
		location.href = url;
		return;
	} else {
		return;
	}
}

// ¸¶¿ì½º ¿À¸¥ÂÊÅ°, ¼±ÅÃ ±ÝÁö <body>ÅÂ±×¾È¿¡
//<body  oncontextmenu="return false" onselectstart="return false" ondragstart="return false">


// Å×ÀÌºí ¸¶¿ì½º¸¦ ¿Ã¸®¸é º¸´õ td ¼Ó¼º ¹Ù²Ù±ë
// ¿ø·¡µ¥·Î
function defaultStatus(obj,border_style){
	obj.style.border = border_style;
	obj.style.backgroundColor = "";
}
// ¸¶¿ì½º ¿Ã¸±¶§
function mouseOnTD(obj,border_style,back_style)
{
	obj.style.border = border_style;
	obj.style.backgroundColor = back_style;
	obj.style.cursor = "hand";
}
// Å¬¸¯ÇßÀ»¶§
function ClickOnTD(obj,border_style,back_style, page){
	obj.style.border = border_style;
	obj.style.backgroundColor = back_style;
	obj.style.cursor = "hand";
	//ÇÁ·¹ÀÓÀÏ¶§
	//parent.info.location.href= page;
	location.href= page;
}
/* ¿¹)
<?
$bg_color = '#EFEFEF';
$border_style = '1 solid gray';
$event_bg_color = 'white';
?>

<SCRIPT LANGUAGE="JavaScript" src='../include/script_function.js'></SCRIPT>
<style>
.border_td {
	padding-left:50;
	border: 1 solid <?=$bg_color?>;
}
</style>
<TABLE  width="100%" height="100%" align=center cellpadding=3 cellspacing=0 border=0 bgcolor='<?=$bg_color?>'>
	<TR>
		<td id="board" class='border_td' onmouseover="mouseOnTD(this,'<?=$border_style?>','<?=$event_bg_color?>');" onmouseout="defaultStatus(this,'1 solid <?=$bg_color?>');" onClick="ClickOnTD(this,'<?=$border_style?>','<?=$event_bg_color?>','../sboard/slist.rsdb?sboard_id=notice');">¢¹ °øÁö»çÇ×</td>
	</TR>
	<TR>
		<td id="board" class='border_td' onmouseover="mouseOnTD(this,'<?=$border_style?>','<?=$event_bg_color?>');" onmouseout="defaultStatus(this,'1 solid <?=$bg_color?>');" onClick="ClickOnTD(this,'<?=$border_style?>','<?=$event_bg_color?>','../board/list.rsdb?board_id=free');">¢¹ ÀÚÀ¯°Ô½ÃÆÇ</td>
	</TR>
	<TR>
		<td id="board" class='border_td' onmouseover="mouseOnTD(this,'<?=$border_style?>','<?=$event_bg_color?>');" onmouseout="defaultStatus(this,'1 solid <?=$bg_color?>');" onClick="ClickOnTD(this,'<?=$border_style?>','<?=$event_bg_color?>','../board/list.rsdb?board_id=guest');">¢¹ ¹æ¹®ÈÄ±â</td>
	</TR>
	

	<tr height="100%"><td></td></tr>
</TABLE>

*/

// ¼ýÀÚ¸¦ ÅëÈ­´ÜÀ§·Î
function LA_numberFormat(str) {
	var str;
	if(!str){
		return false;
	}
	
	var Re = /[^0-9]/g;
	var ReN = /(-?[0-9]+)([0-9]{3})/;
	str = str.replace(Re,'');              
	while (ReN.test(str)) { 
		  str = str.replace(ReN, "$1,$2"); 
		  }
	return str;
}
// ´ÙÀ½ ÆûÀ¸·Î ¼öÁ¤ 2005-01-06 (ÀÎÀÚ ÁÙÀÌ±â)
function LA_passNext(field,cnt){
	var form = field.form;
	if(field.value.length >= cnt){
		for(i=0;form.elements.length;i++){
			if(field == form.elements[i]){
				form.elements[i+1].select();
				form.elements[i+1].focus();
				break;
			}
		}
		return;
	}
	return;
}

// ¼Ò½ºº¸±â ¸·±â
//<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false"> 


// °´Ã¼ ÁÂÇ¥±¸ÇÏ±â
function LA_getObjTop(obj){
	
	
	if (obj.offsetParent == document.body){
		return obj.offsetTop;
	} else{
		return obj.offsetTop + LA_getObjTop(obj.offsetParent);
	}
}

function LA_getObjLeft(obj){
	
	
	if (obj.offsetParent == document.body){
		return obj.offsetLeft;
	} else{
		return obj.offsetLeft + LA_getObjLeft(obj.offsetParent);
	}
}

// textarea row ¼ö º¯°æ 2005-01-04 Ãß°¡
function LA_updateRows(obj,mode,size){
	var eleObj	=	obj.form.elements;
	
	for(i=0;i<eleObj.length;i++){
		if(eleObj[i] == obj)	break;
	}
	for(j=i;j>=0;j--){
		if(eleObj[j].type.toLowerCase() == 'textarea')	break;
	}
	
	var fieldObj	=	eleObj[j];

	if(mode == 'up'){
		if(fieldObj.rows > size)		fieldObj.rows -= size;
	} else if(mode == 'down'){
		fieldObj.rows += size;
	}
}

/*
<TABLE cellpadding=0 cellspacing=0 border=0>
	<TR>
		<TD><textarea name='txtarea_equipment' rows='3' cols='60'></textarea></TD>
		<TD>
			<INPUT TYPE="button" value='¡â' onclick="LA_updateRows(this.form,'up',2)" style='border:0;background-color:#FFFFFF;'><BR>
			<INPUT TYPE="button" value='¡ä' onclick="LA_updateRows(this.form,'down',2)" style='border:0;background-color:#FFFFFF;'>
		</TD>
	</TR>
</TABLE>
*/

// trim
String.prototype.trim = function() {
    return this.replace(/(^ *)|( *$)/g, "");
}
String.prototype.ltrim = function() {
    return this.replace(/(^ *)/g, "");
}
String.prototype.rtrim = function() {
    return this.replace(/( *$)/g, "");
}


// À©µµ¿ìÃ¢ ¸®»çÀÌÁî 2005-01-04 Ãß°¡ LA_resize(obj,maxW,maxY) 2005-01-11 ¼öÁ¤
function LA_resize(){

	var obj			=	arguments[0];
	var objBody		=	obj.document.body;
	
	if(!arguments[1])	var maxWidth	=	0;
	else				var maxWidth	=	arguments[1];

	if(!arguments[2])	var maxHeight	=	0;
	else				var maxHeight	=	arguments[2];

	var bodyWidth	=	objBody.scrollWidth + (objBody.offsetWidth - objBody.clientWidth)+4;
	var bodyHeight	=	objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight)+10;
	
	//objBody.scroll = 'no';

	if(bodyHeight>maxHeight && maxHeight>0){	
		bodyHeight	= maxHeight;
		if(objBody.scroll == 'no')	bodyWidth	+= 20;
		objBody.scroll = 'yes';
	} 
	if(bodyWidth>maxWidth && maxWidth>0){	
		bodyWidth	= maxWidth;
		if(objBody.scroll == 'no')	bodyHeight	+= 20;
		objBody.scroll = 'yes';
	}
	
	if((bodyHeight<maxHeight && bodyWidth<maxWidth) || (!maxWidth && !maxHeight)){
		if(objBody.scroll == 'yes'){	
			bodyWidth	-= 20;
			bodyHeight	-= 20;
		}
		objBody.scroll = 'no';
	}

	obj.resizeTo(bodyWidth,bodyHeight);
}
function resize(){
	var selfBody = document.body;
	var objBody = target_iframe.document.body;
	var objFrame = document.getElementById("target_iframe");
							
	ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
//	ifrmWidth = objBody.scrollWidth + (objBody.offsetWidth - objBody.clientWidth);
 
	var arrTmp	=	String(target_iframe.location).split('?');
	var pattern =  /write.html/;
	// ±Û¾²±â ÀÏ°æ¿ì ¾ÆÀÌÇÁ·¹ÀÓ ³ôÀÌ¸¦ ´õ ´Ã·ÁÁÖÀÚ...
	if(pattern.test(arrTmp))	objFrame.setExpression('height', ifrmHeight+0);
	else						objFrame.setExpression('height', ifrmHeight+0);

}

// ·¹ÀÌ¾î º¸ÀÌ°í °¨Ãß±â 2007-10-26
// ShowHideLayer(¼±ÅÃµÈ ¾ÆÀÌÅÛ ¹øÈ£, ¾ÆÀÌÅÛ ÃÑ°¹¼ö, ·¹ÀÌ¾îÀÌ¸§)
// »ç¿ë½Ã ·¹ÀÌ¾îÀÌ¸§¿¡ ¹øÈ£¸¦ ¸ÔÀÏ¶§´Â 0ºÎÅÍ ½ÃÀÛÇÑ´Ù.
function ShowHideLayer(selecteditem, totalitem, layername) {
	for(i=0; i < totalitem; i++){
		document.getElementById(layername+i).style.display = "none";
	}
	document.getElementById(layername+selecteditem).style.display = "inline";
}


//-->