/****************************************************************
**		说明：  使用前在页面上构造好要检查的页面元素及要求即可
**		作者：	Cloud
**		时间：	2005-03-07 16:21:00
**		版权：  本程序所有权Cloud所有，
**				请随意使用，如果修改，请Copy一份给作者cloudrose@vip.sina.com
**				All rights reserved。
**		
**		function DispDetail(strDetailURL,WindName,intWidth,intHeight)
			弹出新窗口：
				输入：URL，窗口名，窗口长宽
**		function changeImageByID(ObjName,picName)
			变换图片：
				输入：对象名，新图片
**		function changeImageByObj(objName,picName)
			变换图片：
				输入：对象，新图片
**		function ctlent(eventobject)
			按Ctrl+回车的时候Submit
				输入：事件
****************************************************************/

function DispDetail(strDetailURL,WindName,intWidth,intHeight) {
	strWindowPara = "width="+intWidth+",height="+intHeight+",menubar=no,toolbar=no,scrollbars=1,resizable=no,status=no";
//	alert(strDetailURL);
	var windDetail=open(strDetailURL,WindName,strWindowPara);
	windDetail.focus();
}

function changeImageById(ObjName,picName) {
	var strObjImage="";
	strObjImage="document.getElementByID(\""+ObjName+"\").src";
	strObjImage=strObjImage+"='"+picName+"'";
//	alert(strObjImage);
	eval(strObjImage);
}
function changeImageByObj(objImage,picName) {
	objImage.src=picName;
}

function ctlent(eventobject) {
	if(window.event.keyCode==13) {
//		document.eventobject.submit();
		eval("document."+eventobject+".submit()");
	}
}

function bbimg(objImg){
	var zoom=parseInt(objImg.style.zoom,10)||100;
	zoom+=event.wheelDelta/12;
	if (zoom>0) objImg.style.zoom=zoom+'%';
	return false;
}

function SelectDateByCal(obj,tagGet){
	dRes=showModalDialog('script/calendar.htm', null, 'dialogWidth: 200px; dialogHeight: 220px; center: yes; resizable: no; scroll: yes; status: no;')
//	dRes=showModalDialog('../calendar.html', null, 'dialogWidth: 200px; dialogHeight: 220px; center: yes; resizable: no; scroll: yes; status: no;')
	if(dRes){
		if(tagGet==1) obj.value=dRes;
		if(tagGet==2) obj.value=obj.value+dRes;
	}
}

function GetBit1(intOriginalInt, intBit){
	return((intOriginalInt>>(intBit-1))%2==1);
}
function SwopInt(intA,intB){
	intA+=intB;
	intB=intA-intB;
	intA-=intB;
}
 
