//法?連接
//澳門基本法   
var macaulaw1="http://www.imprensa.macau.gov.mo/bo/i/1999/leibasica/index_cn.asp";

//民事法律
//第39/99/M法令 《民法典》
 var macaulaw2="http://www.imprensa.macau.gov.mo/bo/i/99/31/codcivcn/declei39.asp";
//第59/99/M法令《民事訴訟法典》（第9/2004?法律《司法組?綱要法》及《民事訴訟法典》條文的?改及附加）
var macaulaw3="http://www.imprensa.macau.gov.mo/bo/i/99/40/codprocivcn/declei55.asp";

//刑事法律
//第58/95/M法令 《刑事典》
var macaulaw4="http://www.imprensa.macau.gov.mo/bo/i/95/46/codpenpt/declei58_cn.asp";
//第17/96/M法令 《刑事訴訟法典》
var macaulaw5="http://www.imprensa.macau.gov.mo/bo/i/96/36/codpropencn/lei17.asp";
//《單性刑事法律》
var macaulaw6="http://www.imprensa.macau.gov.mo/edicoes/cn/al/legpenal/";
//因利用不可歸?者犯罪情?的刑罰加重 (第6/2001?法律)
var macaulaw7="http://www.imprensa.macau.gov.mo/bo/i/2001/22/lei06_cn.asp";

//行政法律
//第57/99/M?法令：《行政程序法典》 
var macaulaw8="http://www.imprensa.macau.gov.mo/bo/i/99/41/codpacn/declei57.asp";
//第110/99/M?法令：《行政訴訟法典》 
var macaulaw9="http://www.imprensa.macau.gov.mo/bo/i/99/50/codpaccn/declei110.asp";
//第8/1999?法律：澳門特別行政區永久性居民及居留權法律 
var macaulaw10="http://www.imprensa.macau.gov.mo/bo/i/1999/01/lei08_cn.asp";
//第55/95/M?法令：??入境逗留及在澳門地區之定居 
var macaulaw11="http://www.imprensa.macau.gov.mo/bo/i/95/44/declei55_cn.asp";
//第11/1999?行政法?：入境、逗留及定居的一般制度的若干修改 
var macaulaw12="http://www.imprensa.macau.gov.mo/bo/i/1999/01/regadm11_cn.asp";
//第27/2000?行政法?：修改入境、逗留及定居的一般制度 
var macaulaw13="http://www.imprensa.macau.gov.mo/bo/i/2000/31/regadm27_cn.asp";
//第6/2001?行政法?：修改入境、逗留及定居的一般制度 
var macaulaw14="http://www.imprensa.macau.gov.mo/bo/i/2001/15/regadm06_cn.asp";
//第4/2003?法律：入境、逗留及居留許可制度的一般原則
//第5/2003?行政法?：入境、逗留及居留許可?章 
var macaulaw15="http://www.imprensa.macau.gov.mo/bo/i/2003/11/lei04_cn.asp";

//商法
//《商法典》-第40/99/M?法令 (第6/2000?法律　－　修改第40/99/M?法令及《商法典》)
var macaulaw16="http://www.imprensa.macau.gov.mo/bo/i/99/31/codcomcn/declei40.asp";


//檢察院相關司法製度
 //司法組?綱要法-第9/1999?法律（第9/2004?法律《司法組?綱要法》及《民事訴訟法典》條文的修改及附加） 
var macaulaw17="http://www.imprensa.macau.gov.mo/bo/i/1999/01/lei09_cn.asp";
 //檢察長辦公室組?與運作-第13/1999?行政法? 
var macaulaw18="http://www.imprensa.macau.gov.mo/bo/i/2000/01/regadm13_cn.asp";
 //司法官通則-第10/1999?法律 
var macaulaw19="http://www.imprensa.macau.gov.mo/bo/i/1999/01/lei10_cn.asp";
 //司法人員通則-第53/97/M?法令（第7/2004?法律-?定司法輔助人員通則 ） 
var macaulaw20="http://www.imprensa.macau.gov.mo/bo/i/97/47/declei53_cn.asp";
 //檢察官委員會內部?章 
var macaulaw21="http://www.imprensa.macau.gov.mo/bo/ii/2000/24/regul01_cn.asp";
 //檢察院司法官及司法輔助人員查核?章 
var macaulaw22="http://www.imprensa.macau.gov.mo/bo/ii/2000/24/regul02_cn.asp";
 //司法人員以及登?局及公證署人員之?位及?程制度與報酬通則之大綱（第7/97/M?法律） 
var macaulaw23="http://www.imprensa.macau.gov.mo/bo/i/97/31/lei07_cn.asp";
 //司法人員?程的入???，司法人員?程的晉升及法院書?長?位任用培?課程?章（第15/GM/98批示）
var macaulaw24="http://www.imprensa.macau.gov.mo/bo/i/98/10/desp15_cn.asp";


//廉政公署
//第10/2000?法律：特別行政區廉政公署組?法 
var macaulaw25="http://www.imprensa.macau.gov.mo/bo/i/2000/33/lei10_cn.asp";
//第31/2000?行政法?：廉政公署部門的組?及運作 
var macaulaw26="http://www.imprensa.macau.gov.mo/bo/i/2000/34/regadm31_cn.asp";
//第217/2000?行政長官批示：廉政公署人員持有、使用及攜帶工作用武器的口徑及種? 
var macaulaw27="http://www.imprensa.macau.gov.mo/bo/i/2000/48/despce_cn.asp#217";
//第86/2000廉政專員批示：核准《廉政公署?械使用?章》 
var macaulaw28="http://www.imprensa.macau.gov.mo/bo/ii/2000/48/despccc_cn.asp#86";
//第164/2001?行政長官批示：廉政公署人員紀律監察委員會 
var macaulaw29="http://www.imprensa.macau.gov.mo/bo/i/2001/31/despce_cn.asp#164";
//第3/98/M?法律：收益及?產利益的?明與公?監察 
var macaulaw30="http://www.imprensa.macau.gov.mo/bo/i/98/26/lei03_cn.asp";
//第11/2003?法律：?產申報
var macaulaw31="http://www.imprensa.macau.gov.mo/bo/i/2003/30/lei11_cn.asp";







//警察?局
 //第1/2001?法律：澳門特別行政區警察?局組?法 
var macaulaw32="http://www.imprensa.macau.gov.mo/bo/i/2001/06/resolu01_cn.asp";
 //第5/2001?法律：?定警察?局??內之刑事警察?局 
var macaulaw33="http://www.imprensa.macau.gov.mo/bo/i/2001/18/lei05_cn.asp";
 //第2/2001?行政法?：警察?局的組?與運作 
var macaulaw34="http://www.imprensa.macau.gov.mo/bo/i/2001/13/regadm02_cn.asp";
 //第3/2001?行政法?：修改第6/1999?行政法?（?定政府部門及?體的組?、?權與運作） 
var macaulaw35="http://www.imprensa.macau.gov.mo/bo/i/2001/14/regadm03_cn.asp";
 //第17/2003?行政法?：修改第2/2001?行政法?
var macaulaw36="http://www.imprensa.macau.gov.mo/bo/i/2003/27/regadm17_cn.asp";


//海關
 //第11/2001法律：澳門特別行政區海關組?法 
var macaulaw37="http://www.imprensa.macau.gov.mo/bo/i/2001/32/lei11_cn.asp";
 //第21/2001行政法?：海關的組?及運作 
var macaulaw38="http://www.imprensa.macau.gov.mo/bo/i/2001/43/regadm21_cn.asp";
 //第1/2002法律：?定海關人員的刑事警察?局身份 
var macaulaw39="http://www.imprensa.macau.gov.mo/bo/i/2002/05/lei01_cn.asp";
 //第15/2003行政命令：廢止第45/2001?行政命令
var macaulaw40="http://www.imprensa.macau.gov.mo/bo/i/2003/22/ordem15_cn.asp";


//治安警察局
 //第3/95/M?法令：?修改的澳門治安警察廳?章 
var macaulaw41="http://www.imprensa.macau.gov.mo/bo/i/95/05/declei03_cn.asp";
 //第9/97/M?法令：因《刑事訴訟法典》開始生效而對司法警察司（第61/90/M?法令）以及治安警察廳（第3/95/M?法令）之組?法引入?別修改 
var macaulaw42="http://www.imprensa.macau.gov.mo/bo/i/97/13/declei09_cn.asp";
 //第22/2001行政法?：治安警察局的組?與運作 
var macaulaw43="http://www.imprensa.macau.gov.mo/bo/i/2001/43/regadm22_cn.asp";
// 第67/2001保安司司長批示：將若干權限轉授予治安警察局代局長
var macaulaw44="http://www.imprensa.macau.gov.mo/bo/ii/2001/39/despseg_cn.asp#67";


//澳門保安協調辦公室
//第33/2002?行政法?：核准安全委員會及保安協調辦公室的運作?定
var macaulaw45="http://www.imprensa.macau.gov.mo/bo/i/2002/50/regadm33_cn.asp";




//澳門監獄
 //第25/2000?行政法?：澳門監獄組?架? 
var macaulaw46="http://www.imprensa.macau.gov.mo/bo/i/2000/27/regadm25_cn.asp";
 //第8/GM/96?批示：路環監獄?章
var macaulaw47="http://www.imprensa.macau.gov.mo/bo/i/96/06/desp08_cn.asp";

//澳門保安部?事務局
 //第76/90/M法令：?定及制定?部保安政策及有關目的措施，以及有關機關及部?之參與
var macaulaw48="http://www.imprensa.macau.gov.mo/bo/i/90/52/declei76_cn.asp";
 //第26/98/M?法令：修改第76/90/M?法令 
var macaulaw49="http://www.imprensa.macau.gov.mo/bo/i/98/25/declei26_cn.asp";
 //第9/2002法律：澳門特別行政區?部保安綱要法（廢止第76/90/M?法令及第26/98/M?法令） 
var macaulaw50="http://www.imprensa.macau.gov.mo/bo/i/2002/49/lei09_cn.asp";
 //第66/94/M?法令：澳門保安部??事化人員通則 
var macaulaw51="http://www.imprensa.macau.gov.mo/bo/i/94/52/declei66_cn.asp";
 //第51/97/M?法令：修改第66/94/M?法令 
var macaulaw52="http://www.imprensa.macau.gov.mo/bo/i/97/47/declei51_cn.asp";
 //第7/94/M?法律：澳門保安部??事化人員及消防?人員?程之重新調整 
var macaulaw53="http://www.imprensa.macau.gov.mo/bo/i/94/51/lei07_cn.asp";
 //第9/2002?行政法?：澳門保安部?事務局的組?與運作
var macaulaw54="http://www.imprensa.macau.gov.mo/bo/i/2002/17/regadm09_cn.asp";


//澳門保安部?高等學校
 //第5/95/M?法令：澳門保安部?高等學校通則 
var macaulaw55="http://www.imprensa.macau.gov.mo/bo/i/95/05/declei05_cn.asp";
 //第93/96/M??令：核准《澳門保安部?高等學校?章》
var macaulaw56="http://www.imprensa.macau.gov.mo/bo/i/96/16/port93_cn.asp";


//司法協助
//第 3/2002?法律：?定澳門特區與外地?局司法互助?求的通報程序法 
var macaulaw57="http://www.imprensa.macau.gov.mo/bo/i/2002/09/lei03_cn.asp";
//第19/2002?行政長官公告：關於司法互助?求的通報程序法中所指澳門特別行政區行政長官接收中央人民政府書面知會的時限 
var macaulaw58="http://www.imprensa.macau.gov.mo/bo/i/2002/09/aviso19_cn.asp";
//第 4/2002?法律：關於遵守若干國際法文書的法律 
var macaulaw59="http://www.imprensa.macau.gov.mo/bo/i/2002/15/lei04_cn.asp";
//第 39/2001 ?行政長官公告：命令公佈「關於內地與澳門特別行政區法院就民商事案件相互委托送達司法文書和調取證據的安排」 
var macaulaw60="http://www.imprensa.macau.gov.mo/bo/ii/2001/35/aviso39_cn.asp";
//第 113/99/M?法令：核准葡萄牙政府與澳門政府?結之《關於轉移被判刑者之協定》
var macaulaw61="http://www.imprensa.macau.gov.mo/bo/i/99/50/declei113_cn.asp";
//第 24/2001?行政長官公告：有關葡萄牙政府與澳門政府於一九九九年十二月七日在里斯本?結的《關於轉移被判刑者之協定》繼續在澳門特別行政區適用 
var macaulaw62="http://www.imprensa.macau.gov.mo/bo/ii/2001/13/aviso24_cn.asp";


//其他
//第11/96/M?法律：宣告為行政公益法人 
var macaulaw63="http://www.imprensa.macau.gov.mo/bo/i/96/33/lei11_cn.asp";
 //第 6/98/M?法律：??對暴力罪行受害人的保障 
var macaulaw64="http://www.imprensa.macau.gov.mo/bo/i/98/33/lei06_cn.asp";
 //第 2/99/M?法律：設立結社權之一般制度 
var macaulaw65="http://www.imprensa.macau.gov.mo/bo/i/99/32/lei02_cn.asp";
 //第28/91/M?法令：?定本地區行政?局、公共法人其權利人及公共管理代理人之合約外民事?任制度 
var macaulaw66="http://www.imprensa.macau.gov.mo/bo/i/91/16/declei28_cn.asp";
 //法令第110/99/M?：修改第28/91/M?法令 
var macaulaw67="http://www.imprensa.macau.gov.mo/bo/i/99/50/codpaccn/declei110.asp";
 //第257/2001?行政長官批示：受預先許可制度約束之?物 
var macaulaw68="http://www.imprensa.macau.gov.mo/bo/ii/2001/51/despce_cn.asp#257";
 //第153/2002?行政長官批示：修改第257/2001?行政長官批示
var macaulaw69="http://www.imprensa.macau.gov.mo/bo/ii/2002/27/despce_cn.asp#153";
 // 第34/99/M?法令：??麻醉品及精神科物質之買賣及合法使用 
var macaulaw70="http://www.imprensa.macau.gov.mo/bo/i/99/29/declei34_cn.asp";
 //第77/99/M?法令：核准《武器及???章》 
var macaulaw71="http://www.imprensa.macau.gov.mo/bo/i/99/45/declei77_cn.asp";

 //第87/99/M?法令：修改?立刑事紀?制度及查?刑事資?的條件  
var macaulaw72="http://www.imprensa.macau.gov.mo/bo/i/99/47/declei87_cn.asp";

 //第 109/2003 //?行政長官批示：核准關於預防或消除可能危及或損害?人或集體健康的因素或情況的措施、啟動民防架?的措施、例外性措施等的?定 
var macaulaw73="http://www.imprensa.macau.gov.mo/bo/i/2003/17/despce_cn.asp#109";

 //第86/99/M?法令（已修改，?查?第9/1999?法律） 
 //第87/99/M?法令（修改第27/96/M?法令） 
 //第4/96/M?法律：屍體解剖 
var macaulaw74="http://www.imprensa.macau.gov.mo/bo/i/96/28/lei04_cn.asp";


//司法警察
//第27/98/M?法令：司法警察司組?法 
var macaulaw75="http://www.imprensa.macau.gov.mo/bo/i/98/26/declei27_cn.asp";
//第23/2001/行政法?：修改核准司法警察局組?之六月二十九日第27/98/M?法令 
var macaulaw76="http://www.imprensa.macau.gov.mo/bo/i/2001/43/regadm23_cn.asp";
//第32/98/M?法令：司法警察學校 
var macaulaw77="http://www.imprensa.macau.gov.mo/bo/i/98/30/declei32_cn.asp";
//第26/99/M?法令：司法警察局人員特別制度?程之若干調整 
var macaulaw78="http://www.imprensa.macau.gov.mo/bo/i/99/26/declei26_cn.asp";

var macaulaw79="http://www.imprensa.macau.gov.mo/bo/i/89/51/estatuto_cn.asp";

var ptmacaulaw1="http://www.imprensa.macau.gov.mo/bo/i/1999/leibasica/index.asp";
var ptmacaulaw2="http://www.imprensa.macau.gov.mo/bo/i/99/31/codcivpt/";
var ptmacaulaw3="http://www.imprensa.macau.gov.mo/bo/i/99/40/codprocivcn/defaultr.asp";
var ptmacaulaw4="http://www.imprensa.macau.gov.mo/bo/i/95/46/codpencn/defaultr.asp";
var ptmacaulaw5="http://www.imprensa.macau.gov.mo/bo/i/2001/22/lei06.asp";
var ptmacaulaw6="http://www.imprensa.macau.gov.mo/bo/i/96/36/codpropencn/defaultr.asp";
var ptmacaulaw7="http://www.imprensa.macau.gov.mo/bo/i/99/31/codcomcn/defaultr.asp";
var ptmacaulaw8="";
var ptmacaulaw9="http://www.imprensa.macau.gov.mo/bo/i/99/41/codpacn/defaultr.asp";
var ptmacaulaw10="http://www.imprensa.macau.gov.mo/bo/i/99/50/codpacpt/declei110.asp#110";
var ptmacaulaw11="http://www.imprensa.macau.gov.mo/bo/i/1999/01/lei09.asp";
var ptmacaulaw12="http://www.imprensa.macau.gov.mo/bo/i/2000/01/regadm13.asp";
var ptmacaulaw13="http://www.imprensa.macau.gov.mo/bo/i/1999/01/lei10.asp";
var ptmacaulaw14="http://www.imprensa.macau.gov.mo/bo/i/2004/31/lei07.asp";
var ptmacaulaw15="http://www.imprensa.macau.gov.mo/bo/ii/2000/24/regul01.asp";
var ptmacaulaw16="http://www.imprensa.macau.gov.mo/bo/ii/2000/24/regul02.asp";
var ptmacaulaw17="http://www.imprensa.macau.gov.mo/bo/i/97/31/lei07.asp";
var ptmacaulaw18="http://www.imprensa.macau.gov.mo/bo/i/98/10/desp15.asp";

var ptlawother1="http://www.imprensa.macau.gov.mo/bo/i/78/27/lei10.asp";
var ptlawother2 ="http://www.imprensa.macau.gov.mo/bo/i/90/18/lei02.asp";
var ptlawother3 ="http://www.imprensa.macau.gov.mo/bo/i/96/29/lei06.asp";
var ptlawother4 ="http://www.imprensa.macau.gov.mo/bo/i/96/30/lei08.asp";
var ptlawother5 ="http://www.imprensa.macau.gov.mo/bo/i/96/30/lei09.asp";
var ptlawother6 ="http://www.imprensa.macau.gov.mo/bo/i/97/30/lei06.asp";
var ptlawother7 ="http://www.imprensa.macau.gov.mo/bo/i/98/33/lei06.asp";
var ptlawother8 ="http://www.imprensa.macau.gov.mo/bo/i/91/04/declei05.asp";
var ptlawother9 ="http://www.imprensa.macau.gov.mo/bo/i/2001/18/lei04.asp";
var ptlawother10 ="http://www.imprensa.macau.gov.mo/bo/i/92/25/declei30.asp";
var ptlawother11="http://www.imprensa.macau.gov.mo/bo/i/93/11/declei11.asp";
var ptlawother12="http://www.imprensa.macau.gov.mo/bo/i/94/30/declei40.asp";
var ptlawother13="http://www.imprensa.macau.gov.mo/bo/i/95/48/declei59.asp";
var ptlawother14="http://www.imprensa.macau.gov.mo/bo/i/96/23/declei27.asp";
var ptlawother15="http://www.imprensa.macau.gov.mo/bo/i/98/22/declei24.asp";
var ptlawother16="http://www.imprensa.macau.gov.mo/bo/i/99/47/declei86.asp";
var ptlawother17="http://www.imprensa.macau.gov.mo/bo/i/99/50/declei113.asp";
var ptlawother18="http://www.imprensa.macau.gov.mo/bo/i/98/18/declei17.asp";

var ptlawother19="http://www.imprensa.macau.gov.mo/bo/i/90/32/lei07.asp";
var ptlawother20="http://www.imprensa.macau.gov.mo/bo/i/92/25/declei30.asp";
var ptlawother21="http://www.imprensa.macau.gov.mo/bo/i/92/39/lei16.asp";
var ptlawother22="http://www.imprensa.macau.gov.mo/bo/i/93/17/declei16.asp#ce";
var ptlawother23="http://www.imprensa.macau.gov.mo/bo/i/99/43/declei65.asp";
var ptbook6a="http://bo.io.gov.mo/bo/i/1999/01/lei10.asp#10";
var ptbook6b="http://bo.io.gov.mo/bo/i/2004/31/lei07.asp#7";
var ptbook6c="http://www.imprensa.macau.gov.mo/bo/i/89/51/estatuto.asp";

var ptbook7a="http://www.imprensa.macau.gov.mo/bo/ii/2000/24/regul01.asp";
var ptbook7b="http://www.imprensa.macau.gov.mo/bo/ii/2000/24/regul02.asp";

function openwinx(url,name,w,h) { 
	window.open (url,name,"width=" + w + ",height=" + h + ",toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes")
}

function openwinx2(url,name,w,h) { 
	window.open (url,name,"width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no")
}


function move(div) {
div.style.visibility = "visible"
};


function remove(div) {
div.style.visibility = "hidden"
}
 
 
function returnEditingPage(strNotice){
        alert("数据保存失败!");
        history.back(1);
    }

function go_choose(){
		window.form1.submit();
	}
 

 
    function returnEditingPage(strNotice){
        alert("数据保存失败!");
        history.back(1);
        history.back(1);
    }
	function go_choose(){
		window.form1.submit();
	}

	/**************************************
	函数名称:chekIPForm(obj)
	函数功能:检测文本框的值(IP地址)是否符合IP地址的格式.
	函数参数:obj  类型是object 为文本框对象.
	返回值:boolean 类型.IP格式正确返回"TRUE",IP格式不正确返回"FALSE".
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.12
	**************************************/
	function chekIPForm(obj){
	var strIP=obj.value;
	var IPAddress = strIP.split('.'); 
	var pattern=new RegExp("[0-9]{1,3}\.[0-9]{1,3}+\.[0-9]{1,3}\.[0-9]{1,3}"); 
	if (pattern.test(strIP))
	{		
		for (i=0; i<=3; i++)
		{
			if(IPAddress[i]>255)
			{
			alert(" IP地址格式不正确.");
			obj.focus();
			obj.select();
			return false;
			}
		}
		return true;
	}
	else
	{
		alert(" IP地址格式不正确");
		obj.SetFocus;
		return false;
	}	
}




/**************************************
	函数名称:getYMD()
	函数功能:取得年月日.
	函数参数:无.
	返回值:string 类型.例如:2004年3月14日.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function getYMD(){
var theDate=new Date();
var thisDate=theDate.getDate();
if (thisDate < 10)
{
	thisDate="0"+thisDate;
}
var thisMonth=theDate.getMonth()+1;
if (thisMonth < 10)
{
	thisMonth="0"+thisMonth;
}
var thisYear=theDate.getYear();
var strYMD=thisYear+"-"+thisMonth +"-"+thisDate;
return strYMD;
}

/**************************************
	函数名称:getTimes()
	函数功能:取得时间.
	函数参数:无.
	返回值:string 类型.例如: (14:23:00) .
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function getTimes(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
if (hours<10)
hours="0"+hours;
if(mins<10)
mins="0"+mins;
if (secs<10)
secs="0"+secs;
return hours+":"+mins+":"+secs
}

/**************************************
	函数名称:AddTime()
	函数功能:取得时间相加后的时间.
	函数参数:无.
	返回值:string 类型.例如: (14:23:00) .
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function AddTime(strTime,M){

var time= new Date();
var lenT=strTime.split(":");

time.setHours(lenT[0]);
time.setMinutes(lenT[1]);
time.setTime(time.getTime() + M*60*1000);
var hours;
var mins;
hours= time.getHours();
mins= time.getMinutes();
if (hours<10)
hours="0"+hours;
if (mins<10)
mins="0"+mins;
return hours+":"+mins;
}

/**************************************
	函数名称:DiffTime(strBeginTime,strEndTime)
	函数功能:两个的时间间隔.
	函数参数:无.
	返回值:long 类型 时间间隔分钟数.
	例如: DiffTime("08:00","09:00")=60(分钟) .
	例如: DiffTime("23:00","01:00")=120(分钟) .
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.8.15
**************************************/
function DiffTime(strBeginTime,strEndTime){
var BeginTime= new Date("12/25/2004");
var EndTime
EndTime= new Date("12/25/2004");
var lenT=strBeginTime.split(":");
BeginTime.setHours(lenT[0]);
BeginTime.setMinutes(lenT[1]);
//
lenT=strEndTime.split(":");
EndTime.setHours(lenT[0]);
EndTime.setMinutes(lenT[1]);
var diff=(EndTime-BeginTime)/(1000*60);
if(diff<0){
EndTime= new Date("12/26/2004");
EndTime.setHours(lenT[0]);
EndTime.setMinutes(lenT[1]);
diff=(EndTime-BeginTime)/(1000*60);
}
return diff;
}



/**************************************
	函数名称:DiffDate(strBeginDate,strEndDate)
	函数功能:取得时间相加后的时间.
	函数参数:无.
	返回值:int 类型 相差天数.例如: (14:23:00) .
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.8.15
**************************************/
function DiffDate(strBeginDate,strEndDate){
var bDate= parseDate(strBeginDate);
var eDate= parseDate(strEndDate);
var bT=bDate.getTime();
var eT=eDate.getTime();
var n=(eT-bT)/(24*60*60*1000);
return n;
}

/**************************************
	函数名称:checkworkid()
	函数功能:校验工作组编号.
	函数参数:obgI.
	返回值:boolean 类型.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function checkworkid(obgI){
var i;
var m=0;
i=obgI;
if(i>=0 || i<16)
{
for(j=0;j<16;j++)
{
if(i==j)
{
m=1;
}
}
if(m==1)
return true;
else
return false; 
}
else
return false;
}

/**************************************
	函数名称:parseDate()
	函数功能:字符串转换Date类型.
	函数参数:s.
	返回值:Date 类型.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function parseDate(s)
{
	var reg=new RegExp("[^0-9-]","")
	if(s.search(reg)>=0)return today;
	var ss=s.split("-");
	if(ss.length!=3)return today;
	if(isNaN(ss[0])||isNaN(ss[1])||isNaN(ss[2]))return today;	
	return new Date(ss[0]*1,ss[1]*1-1,ss[2]*1);

}

function splitIP(strIP,i)
{		
	var ss=strIP.split(".");
	if(ss.length!=4)return "";
	if(isNaN(ss[0])||isNaN(ss[1])||isNaN(ss[2]))return "";	
	return ss[i];
}

/**************************************
	函数名称:getStrDate()
	函数功能:得到当前日期的字符串.
	函数参数:.
	返回值:String类型.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function getStrDate()
{
	var today=new Date();
	var Y=today.getFullYear();
	var M=today.getMonth()+1;
	var D=today.getDate();
	return Y+"-"+M+"-"+D+"";
}


document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { font-family: Verdana, Tahoma; background-color: #DDEEFF; border: 1px #666666 solid; font-size: 11px; padding-right: 6px; padding-left: 6px; Height: 20px; padding-top: 4px; padding-bottom: 3px; filter: Alpha(Opacity=0)}");
document.write("</style>");

function disableselect(e){
return false
}

function reEnable(){
return true
}

/*
//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, 
///////////////////////////////////

function clickIE4(){
if (event.button==2){
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("return false")

*/


/**************************************
	函数名称:checkStringLen()
	函数功能:校验给定字符串长度是否超过指定长度.
	函数参数:strInput 给定字符串 ,intLen 指定长度.
	返回值:boolean类型.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function checkStringLen(strInput,intLen)
{
	var i=strInput.length;
	if(i>intLen)
		return false;
	else
		return true;
}
String.prototype.trim=trim;

/**************************************
	函数名称:checkTime2H2M(obj)
	函数功能:校验文本框的内容是不是HH:MM格式的时间.
	函数参数:obj.
	返回值:boolean类型.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004.3.15
**************************************/
function checkTime2H2M(obg)
{
	var reflg=true;
	var strI=obg.value;
	var len=strI.length;
	if(len==5){
		var flg=new RegExp('[0-9]{2}:[0-9]{2}', 'm').test(strI);
		if(flg){
			var spt=strI.split(":");
			if(spt[0]*1>=24){
				//alert("小时数只能小于24.");
				reflg= false;
			}else if(spt[1]*1>=60){
				//alert("分钟数只能小于60.");
				reflg= false;
			}else{
			reflg= true;
			}
		}else{
			reflg= false;
		}
	}else{
	reflg= false;
	}	
	return reflg;
}
/**************************************
	函数名称:trim()
	函数功能: 去掉字符串两端的空格
	函数参数:obj.
	返回值:boolean类型.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004-07-20
**************************************/
function trim() {    
	re = /^[ ]+|[ ]+$/g; 
	return this.replace(re, ""); 
}

/**************************************
	函数名称:popUpWindow()
	函数功能: 弹出窗口
	函数参数:窗口显示内容页面的地址以及传递给该窗体的参数.
	返回值:无.
	WRITER:SUNXIAO
	版本号:V1.0
	修改日期:2004-08-20
**************************************/
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  //alert("2"+URLStr);
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function mask(obj,qz){
obj.value=obj.value.replace(/[^\d]/g,'')
key1=event.keyCode
if (key1==37 || key1==39)
{ obj.blur();
nextip=parseInt(obj.name.substr(4,1))
nextip=key1==37?nextip-1:nextip+1;
nextip=nextip>=5?1:nextip
nextip=nextip<=0?4:nextip
eval(qz+nextip+".focus()")
} 
if(obj.value.length>=3) 
if(parseInt(obj.value)>=256 || parseInt(obj.value)<=0)
{
//alert(parseInt(obj.value)+"IP地址错误！")
obj.value=""
obj.focus()
return false;
}
else 
{ obj.blur();
nextip=parseInt(obj.name.substr(4,1))+1
nextip=nextip>=5?1:nextip
nextip=nextip<=0?4:nextip
eval(qz+nextip+".focus()")
}
}
function mask_c(obj)
{
clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))
}


function checkIPAddress (ipAddressString) {
var reSpaceCheck = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
var passedTest = false;
if (reSpaceCheck.test(ipAddressString)) {
	ipAddressString.match(reSpaceCheck);	
	if (RegExp.$1 <= 255 && RegExp.$1 >= 0 
		&& RegExp.$2 <= 255 && RegExp.$2 >= 0 
		&& RegExp.$3 <= 255 && RegExp.$3 >= 0 
		&& RegExp.$4 <= 255 && RegExp.$4 >= 0) {
		passedTest = true;
	}
	
}
return passedTest;
}

function paibanwindow(strurl,p_width,p_height){
var URLStr=strurl;
var left=265;
var top=215;
var width=p_width||350;
var height=p_height||370;
//alert(width+"+"+height);
popUpWindow(URLStr, left, top, width, height);
}


function lawwindow(strurl,p_width,p_height,p_left,p_top){
var URLStr=strurl;
var sWidth = (screen.width/3)*2;
var sheight = (screen.height/3)*2;
var left=p_left||((screen.width/6));
var top=p_top||(screen.height/6);
var width=p_width||sWidth;
var height=p_height||sheight;
if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
 
 popUpWin =window.open(URLStr, 'popUpWin', 'scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menub ar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

//用by替换fullString中的text.
	function replaceAll(fullString,text,by) {
    var strLength = fullString.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return fullString;

    var i = fullString.indexOf(text);
    if ((!i) && (text != fullString.substring(0,txtLength))) return fullString;
    if (i == -1) return fullString;

    var newstr = fullString.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replaceAll(fullString.substring(i+txtLength,strLength),text,by);

    return newstr;
}

function switchlangpt(filen) {
	location=filen	
}

var fterrorpage="/main.htm";
var gberrorpage="/gb/main.htm";
var enerrorpage="/en/main.htm";
//葡文菜单字体大小
var ptmuenfontsize=12
//最后更新时间
var updatetime_gb="更新时间:2005-06-22"
var updatetime_big5="更新時間:2005-06-22"
var updatetime_pt="Atualizar Data:2005-06-22"


  
 
  
 






