// JavaScript Document

/*
마우스 오버했을때.. 
URL, 배경색, 폰트색깔..
*/

function TmOvr(src,clrOver,clrfont) {
	//src.style.cursor = 'pointer';
	src.bgColor = clrOver;
	src.style.color = clrfont;
}

 
/*
마우스 아웃했을때..
URL, 배경색, 폰트색깔..
*/

function TmOut(src,clrIn,clrfont) { 
  //src.style.cursor = 'pointer';
  src.bgColor = clrIn;
  src.style.color = clrfont
}



/*
마우스 클릭했을때..
URL, 배경색, 폰트색깔..
*/

function TmClk(src) {
   if(event.srcElement.tagName=='TD') {
   src.children.tags('A')[0].click();
   }
}

/*
삭제확인
*/
function displaywindowinfo() {
 return confirm("삭제 하시겠습니까 ?")
}



// 채크박스
function allcheck(theform, no)
{
	for( var i=0; i<theform.elements.length; i++) {
		var ele = theform.elements[i];
		if(ele.name == no)
			ele.checked = true;
	}
	return;
}


function revcheck(theform, no)
{
	
	for( var i=0; i<theform.elements.length; i++) {
		var ele = theform.elements[i];
		if(ele.name == no)
			ele.checked = !ele.checked;
	}
	return;
}

function discheck(theform, no)
{
	for( var i=0; i<theform.elements.length; i++) {
		var ele = theform.elements[i];
		if(ele.name == no)
			ele.checked = false;
	}
	return;
}

function Ischecked(form, msg){
	var flag = 0;
	with (form) {
		var L=length;
		for(var i=0; i<L; i++) {
			if (elements[i].type=="checkbox" && elements[i].checked) {
				flag = 1;
				break;
			}
		}
	}
	if (!flag){
		alert(msg);
		return true;
	} else {
		return false;
	}
}


// JavaScript Document



	function resize_it(f_height){

		var bb = document.getElementById("win_Memo");

		if (bb) {
			if (document.all) {
			bb.style.height= f_height + 50;
				alert();
			}
			else if (document.layers)
				bb.height=f_height + 50;
		}

	}


	function ReSizeIframe(iframeObj) { 
	
		var innerBody = iframeObj.contentWindow.document.body;

		var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
		var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
		
		innerHeight = innerHeight + 50;
		innerWidth = innerWidth + 50;

			//iframeObj.style.width = innerWidth + "px";
			iframeObj.style.height = innerHeight + "px";

	} 

	// ************************************************
	// 이미지 업로드..
	// ************************************************
	function uploadFile(BBID, seq, page, FNO) {
	
			var sReturn = window.showModalDialog("_FPREEDIT.asp?BBID=" + BBID + "&seq=" + seq + "&page=" + page + "&FNO=" + FNO, self, "dialogHeight: 340px; dialogWidth: 506px; edge: Raised; center: Yes; help: no; resizable: no; status: no; scroll: no; unadorned: no;");
			// window.open("_FPREEDIT.asp?BBID=" + BBID + "&seq=" + seq + "&page=" + page + "&FNO=" + FNO,'','scrollbars=auto, width=600,height=500,top=10,left=10');
	
	}	



