﻿function ResizeDocument()
{

}

function CheckEnterKeyValue()
{
	var objBox = document.getElementById("btn_search");
	
	if(objBox == "[object]" &&  event.keyCode == 13)
	{
		objBox.click();
		return false;
	}
	
	return true;
}

function OpenWindow(width, height, url, scroll)
{
	var style, url;

	var tpos = (screen.height)?(screen.height-height)/2:100;
	var lpos = (screen.width)?(screen.width-width)/2:100;
	style = "resizable=no, menubar=no, scrollbars="+scroll+", toolbar=no, location=no, directories=no, status=no, width="+width+", height="+height+", top="+tpos+", left="+lpos;
	window.open(url, "", style);
}

function CheckCrossSiteScript(form)
{
	if(form.tbox_sstring.value.indexOf("<") > -1)
	{
		alert("검색어에 스크립트를 사용할수 없습니다.");
		return false;
	}
	
	if(form.tbox_sstring.value.indexOf(">") > -1)
	{
		alert("검색어에 스크립트를 사용할수 없습니다.");
		return false;
	}
	
	if(form.tbox_sstring.value.indexOf("<script") > -1)
	{
		alert("검색어에 스크립트를 사용할수 없습니다.");
		return false;
	}
	
	return true;
}
		
function OpeninquiryInsert(strUrl)
{
	var tpos = (screen.height)?(screen.height-500)/2:100;
	var lpos = (screen.width)?(screen.width-600)/2:100;
	var style = "resizable=no, menubar=no, scrollbars=no, toolbar=no, location=no, directories=no, status=no, width=600, height=500, top="+tpos+", left="+lpos;
	window.open(strUrl, "", style);
}

function OpenHelpDoc(strUrl)
{
	var tpos = (screen.height)?(screen.height-650)/2:100;
	var lpos = (screen.width)?(screen.width-800)/2:100;
	var style = "resizable=yes, menubar=no, scrollbars=auto, toolbar=no, location=no, directories=no, status=no, width=800, height=600, top="+tpos+", left="+lpos;
	window.open(strUrl, "", style);
}

function onlyNumCheck(el) 
{
	if(isNaN(el.value)==true) 
	{
		alert("숫자만 입력하세요"); 
		el.value = "";
		el.focus();
		
		return;
	} 
}
