
//'******************************************************************************************************************
//'Project Name : BNBC Web Site
//'******************************************************************************************************************
//'File Name : JAVAScriptFunc.js
//'Developer : Taejin Kwon
//'Date : 7/26/2004
//'******************************************************************************************************************

function funcPopup(file_path, windowName, WindWidth, WindHeight, isScroll)
	{
		myWindow = window.open(file_path, windowName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+isScroll+',resizable=0, copyhistory=0, width='+WindWidth+',height='+WindHeight+',left='+"100"+',top='+"50"+"'");
		myWindow.opener = self;
	}  

function funcPopupResizable(file_path, windowName, WindWidth, WindHeight, isScroll)
	{
		myWindow = window.open(file_path, windowName, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+isScroll+',resizable=1, copyhistory=0, width='+WindWidth+',height='+WindHeight+',left='+"100"+',top='+"50"+"'");
		myWindow.opener = self;
	}  

function funcPopupDownLoad(file_path, windowName, WindWidth, WindHeight, isScroll)
	{
		myWindow = window.open(file_path, windowName, 'toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars='+isScroll+',resizable=1, copyhistory=0, width='+WindWidth+',height='+WindHeight+',left='+"100"+',top='+"50"+"'");
		myWindow.opener = self;
	}

//ÇöÀç ÆäÀÌÁö ÀÎ¼â
function funcPrint()
	{
		window.print();
	}

	
//Value Check =============================================================================================================
function funcValidLength(item, len)
		{
			return(item.length >= len);
		}

function funcError(text) 
		{
			alert(text);
		}

function funcCheckVal(strFormParam, strMessage) //String Check
	{
		
		if (!funcValidLength(strFormParam.value,0)) {
					funcError(strMessage);
					strFormParam.focus();
					return;
				}
	}

function funcCheckValList(strFormParam, strMessage) //List Box Check
	{
		if (strFormParam.options[strFormParam.selectedIndex].value == 0)
			   {
					funcError(strMessage);
					strFormParam.focus();
					return;
				}
	}

function funcCheckValRadio(strFormParam, strMessage) //Radio Button Check
	{
		
		var num = strFormParam.length - 1
		var count = 0
		for (i = 0; i <= num; i++) 
				{ 
					if (strFormParam[i].checked == true) { 
						count = count + 1
					}
				}
		
		if (count == 0)
			   {
					funcError(strMessage);
					strFormParam.focus();
					return;
				}
		
	}

function funcSubmit(strFormParam)
	{
	strFormParam.submit();
	}
				
//==========================================================================================================================


function funcOnlyNumber(keycode)
{
	if(keycode != 46 && keycode != 8 && keycode != 9 && (keycode < 48 || keycode > 57)){ 
		return false;
	}
	return true;
}