var n = (document.layers) ? 1 : 0;
var ie = (document.all) ? 1 : 0;
if( n ) document.captureEvents(Event.KEYPRESS);

function checkEnter(e)
{
	if( n )
	{ 
		var nKey = e.which;
	}
	if( ie )
	{
		var ieKey = e.keyCode;
	}
	if( nKey == 13 || ieKey == 13 )
	{
		check_data();
	}
}

function phoneChk_1( data)
{
	var obj = document.myform;
	if( data.length == 3 )
	obj.phone2.focus();
}

function phoneChk_2( data)
{
	var obj = document.myform;
	if( data.length == 4 )
	obj.phone3.focus();
}

function isNotNull(comp, str, gbn)
{
    comp.value = ltrim(comp.value);
    if (comp.value == '')
    {
		if(gbn == 1)
		    alert( str + ' ¼±ÅÃÇÏ½Ê½Ã¿À.');
		else
            alert( str + ' ÀÔ·ÂÇÏ½Ê½Ã¿À.');
        comp.focus();
        return false;
    }else
        return true;
}

function ltrim(para)
{
    while(para.substring(0,1) == ' ')
        para = para.substring(1, para.length);
    return para;
}

