/*************************************************************
* 控制控件只能输入数字
**************************************************************/
function funKeyDown( event )
{	
	if((event.keyCode<48 || event.keyCode>57) && event.keyCode!=37 && event.keyCode!=39 && event.keyCode!=46 
		&&event.keyCode!=110 && event.keyCode!=190 && event.keyCode!=8 && event.keyCode!=189 && event.keyCode!=109 &&(event.keyCode<96 || event.keyCode>105))
    {
       return false;
    }
    else
    {		
       return true;
    }
}

/************************************************************/
/* 目的： 测试栏位的长度不能大于指定长度                    */
/* thisfield： document.formname.fieldname                  */
/* thisout： a number                                       */
/************************************************************/
function checkNotHigh(thisfield,thisout)
{
	if ( thisfield.value.length*1 > thisout*1 )
	{
		alert("您输入的字符数必须在1~"+thisout*1+"之间，请重新输入！");
		return false;
	}
	else
	{
		return true;
	}
}

//级联选择触发处理
function switchSub(pSrc, objName,i_cataID,iName,formName,Url)
{
	var strLocation = Url+"?i_ID=" + i_cataID;
		strLocation += "&PObjName=" + pSrc.name;
		strLocation += "&PValue=" + encodeURI(pSrc.value);
		strLocation += "&ObjName=" + objName;
		strLocation += "&formname="+formName;
	eval("var objFrame ="+iName);
	objFrame.location=strLocation;
}

function funLoad( )
{}

//级联选择触发处理
function setDefault(pSrc, objName,defVal,Fsub,i_CataID,formName,Url){
	eval("var FObj = "+Fsub);

	FObj.document.write("<iframe id=FSub"+objName+" width=200 height=200 style=\"display:block\"></iframe>");
	var strLocation = Url +"?i_ID=" + i_CataID;
		strLocation += "&PObjName=" + pSrc.name;
		strLocation += "&PValue=" + encodeURI(pSrc.value);
		strLocation += "&ObjName=" + objName;
		strLocation += "&DefaultValue=" + defVal;
		strLocation += "&formname="+formName;
	var FrameSub = eval(Fsub+".FSub" + objName);	
	FrameSub.location = strLocation;

}
