


/////////////////////////////// 后台列表用到的函数 //////////////////////////////////////
function blRdoChecked(form,sDspStr)		//是否有选择记录
{
	//		sDspStr:	CheckBox的name  局限于某一部分的CheckBox,不至于影响到其他的CheckBox
	
	var bl=false;
	items=form.all.tags("input");  //检查input输入
	for (i=0;i<items.length;i++)					
		if (items(i).type=="checkbox"&&items(i).name.toUpperCase()==sDspStr.toUpperCase())
			if (items(i).checked)bl=true;
	//
	return bl;
}
function allRdoIDChecked(form,blRadioAllChecked,sDspStr)			//全选-取消函数
{
	//		sDspStr:	CheckBox的name  局限于某一部分的CheckBox,不至于影响到其他的CheckBox
	
			items=form.all.tags("input");  		//取消
			if(blRadioAllChecked)
			{
				for (i=0;i<items.length;i++)
				if (items(i).type=="checkbox"&&items(i).name.toUpperCase()==sDspStr.toUpperCase())
						items(i).checked=false;
						return false;
			}
			else
			{
				for (i=0;i<items.length;i++)	//全选	
				if (items(i).type=="checkbox"&&items(i).name.toUpperCase()==sDspStr.toUpperCase())
						items(i).checked=true;
						return true;
			}
}

/////////////////////////////// 共用函数 //////////////////////////////////////
	//  获取随机数
		function getRndNum(Tm)
		{
			// Tm: 倍数
			return	parseInt(Math.random().toString().substr(3,1))*Tm;
		}
	// 只允许输入数字
		function IsDigit()
		{
		  return ((event.keyCode >= 48) && (event.keyCode <= 57));
		}
	///	获取参数URLParams['style']
		function getRq()
		{
			var URLParams = new Object() ;
			
			var aParams = document.location.search.substr(1).split('&') ;
			for (i=0 ; i < aParams.length ; i++)
			{
				var aParam = aParams[i].split('=') ;
				URLParams[aParam[0]] = aParam[1] ;
			}
			return URLParams;
		}
	
	///设置首页<a style="behavior:url(#default#homepage)" href="JavaScript:sh.sethomepage(location.href)" id="sh">设为首页</a>
	///添加收藏夹
	///<a href="#" onclick=window.external.AddFavorite("Http://www.Sina.com.cn",document.title)>

	///显示或隐藏元素
		function ShowHide(el)
		{			
			el.style.display=(el.style.display=="none")?"":"none";	
		}

	///得到元素高宽绝对值		
		function getPos(el,ePro)
		{
			var ePos=0;
			while(el!=null)
			{		
				ePos+=el["offset"+ePro];
				el=el.offsetParent;
			}
			return ePos;
		}
	///保存页面
		function Save(title)
		{
			document.execCommand("SaveAs", true, title);
		}
		
	///Open Windows
		function openBrWindow(theURL,the,theFeatures,sTag)
		{
			switch(sTag)
			{
				case 1:
					var xWin=window.open(theURL,the,theFeatures);
					break;
				case 2:
					var xWin=window.open(theURL,the,theFeatures);
					break;
				case 3:
					var xWin=window.open(theURL,the,theFeatures);
					break;
				default:
					var xWin=window.open(theURL,the,theFeatures);
			}
			xWin.focus();
			return xWin;
		}
