if( this._JLHsJSFIsLoaded != true ) {
	var orgbgcolor="";
	var focusbgcolor="#ffeeee";
	var bolCanReBgColor=true;
	var bolShowDBar = false;
	var offsettimezone = ( 1000 * 60 * ( (new Date( )).getTimezoneOffset() ) );

	/* ----- Object Start ----- */
	// 物件, 淡出=true 淡入=false, 100 或 0, 每次異動量, 毫秒
	function alpha ( obj , hide , opacity , step , msec ) {
		obj.style.overflow = "hidden";
		obj.style.position = "absolute";
		obj.style.zIndex = "999";

		obj.hide = hide;
		obj.opacity = opacity;
		obj.step = step;
		obj.msec = msec;

		obj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + opacity.toString() + ")";
		if ( hide ) {
			if ( opacity > 0 ) {
				if ( (opacity-step) <= 0 ) opacity = step;
				obj.opacity = (opacity-step);
				setTimeout( "alpha2( " + obj.id + " )", 1 );
			}
		}else{
			if ( opacity < 100 ) {
				if ( (opacity+step) >= 100 ) opacity = 100-step;
				obj.opacity = (opacity+step);
				setTimeout( "alpha2( " + obj.id + " )", 1 );
			}
		}
	}

	function alpha2 ( obj ) {
		hide = obj.hide;
		opacity = obj.opacity;
		step = obj.step;
		msec = obj.msec;

		obj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + opacity.toString() + ")";
		if ( hide ) {
			if ( opacity > 0 ) {
				if ( (opacity-step) <= 0 ) opacity = step;
				opacity = (opacity-step);
				//setTimeout( "alpha( " + obj.id + " , true , " + (opacity-step).toString() + " , " + step + " , " + msec + " )", msec );
				setTimeout( "alpha2( " + obj.id + " )", msec );
			}else{
				obj.style.display = "none";
			}
		}else{
			obj.style.display = "inline";
			if ( opacity < 100 ) {
				if ( (opacity+step) >= 100 ) opacity = 100-step;
				opacity = (opacity+step);
				//setTimeout( "alpha( " + obj.id + " , false , " + (opacity+step).toString() + " , " + step + " , " + msec + " )", msec );
				setTimeout( "alpha2( " + obj.id + " )", msec );
			}else{
			}
		}
		
		obj.hide = hide;
		obj.opacity = opacity;
		obj.step = step;
		obj.msec = msec;
	}
	/* ----- Object End   ----- */
	
	/* ----- Date Object Start ----- */
	Date.prototype.addyears = function ( incyear ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year + incyear, tmpd.month - 1, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
		
	/*	
		tmpd.year += incyear;
		
		try{
			return (new Date(tmpd.year, tmpd.month - 1, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec));
		}catch(e){
			return this;
		}
	*/
	}

	Date.prototype.addmonths = function ( incmonth ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month - 1 + incmonth, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
		
	/*	
		var tmpof = 0;
		
		tmpd.month += incmonth;
		
		if ( tmpd.month > 12 ){
			tmpof = (tmpd.month % 12 == 0) ? Math.floor(tmpd.month / 12)-1 : Math.floor(tmpd.month / 12);
			tmpd.month = (tmpd.month % 12 == 0) ? 11 : (tmpd.month % 12)-1;
			try{
				return ( (new Date(tmpd.year, tmpd.month, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec)).addyears( tmpof ) );
			}catch(e){
			}
		}else{
			try{
				return (new Date(tmpd.year, tmpd.month, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec));
			}catch(e){
			}
		}
	*/
	}

	Date.prototype.adddays = function ( incday ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month - 1, tmpd.day + incday, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.addhours = function ( inchour ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month - 1, tmpd.day, tmpd.hour + inchour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.addmins = function ( incmin ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month - 1, tmpd.day, tmpd.hour, tmpd.min + incmin, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.addsecs = function ( incsec ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month - 1, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec + incsec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.add = function ( unit, inc ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			switch ( unit ) {
				case "yyyy" :
					tmpd.year += inc;
					break;
				case "MM" :
					tmpd.month += inc;
					break;
				case "dd" :
					tmpd.day += inc;
					break;
				case "hh" :
					tmpd.hour += inc;
					break;
				case "mm" :
					tmpd.min += inc;
					break;
				case "ss" :
					tmpd.sec += inc;
					break;
			}
			return ( new Date(tmpd.year, tmpd.month - 1, tmpd.day, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.differ = function ( subtrahend ) {
		var bolminus = false;
		var rtimespan = new TimeSpan();
		
		var sdate = new Date( this );
		var edate = new Date( subtrahend );
		/*
		var tss = sdate.getTime() - offsettimezone;
		var tse = edate.getTime() - offsettimezone;
		*/
		var tss = sdate.valueOf();
		var tse = edate.valueOf();
		var tsminus = 0;
		
		if ( tss >= tse ){
			tsminus = tss - tse;
			bolminus = false;
		}else{
			tsminus = tse - tss;
			bolminus = true;
		}
		
		rtimespan = new TimeSpan( tsminus );
		rtimespan.bolminus = bolminus
		
		return rtimespan;
	/*	
		if ( ( ( new Date( this ) ).getTime() - offsettimezone ) >= ( ( new Date( subtrahend ) ).getTime() - offsettimezone ) ){
			var tssdate = new TimeSpan( new Date( this ) );
			var tsedate = new TimeSpan( new Date( subtrahend ) );
			bolminus = false;
		}else{
			var tssdate = new TimeSpan( new Date( subtrahend ) );
			var tsedate = new TimeSpan( new Date( this ) );
			bolminus = true;
		}

		alert( sdate.getTime() - offsettimezone );
		var tt = new TimeSpan( sdate.getTime() - offsettimezone );
		alert( tt.toString() );
	*/
	}

	Date.prototype.startdate = function ( ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month - 1, 1, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.tilldate = function ( ) {
		var tmpd = new JDate( new Date( this ) );

		try{
			return ( new Date(tmpd.year, tmpd.month, 1, tmpd.hour, tmpd.min, tmpd.sec, tmpd.msec) );
		}catch(e){
			return ( new Date( this ) );
		}
	}	

	Date.prototype.dateserial = function ( d_symbol ) {
		var tmpd = new JDate( new Date( this ) );

		if ( d_symbol == undefined || d_symbol == null ) d_symbol = "";
		try{
			return ( tmpd.year.toString().JFormatNum( 4 ) + d_symbol + tmpd.month.toString().JFormatNum( 2 ) + d_symbol + tmpd.day.toString().JFormatNum( 2 ) );
		}catch(e){
			return "";
		}
	}	
	
	// 2005 11 29 add by kai
	Date.prototype.format = function ( f ) {
		if (!this.valueOf())
			return '&nbsp;';

		var d = this;

		return f.replace(/(chy|yyyy|mmmm|mmm|mm|dddd|ddd|dd|上\/下|hh|24hh|nn|ss|mss|a\/p)/gi,
			function($1)
			{
				switch ($1.toLowerCase())
				{
				case "chy"		:	return (d.getFullYear()-1911).toString().JFormatNum( 3 );
				case "yyyy"		:	return d.getFullYear();
				case "mmmm"		:	return gsMonthNames[d.getMonth()];
				case "mmm"		:	return gsMonthNames[d.getMonth()].substr(0, 3);
				case "mm"		:	return (d.getMonth() + 1).toString().JFormatNum(2);
				case "dddd"		:	return gsDayNames[d.getDay()];
				case "ddd"		:	return gsDayNames[d.getDay()].substr(0, 3);
				case "dd"		:	return d.getDate().toString().JFormatNum(2);
				case "hh"		:	return ((h = d.getHours() % 12) ? h : 12).toString().JFormatNum(2);
				case "24hh"		:	return h = (d.getHours()).toString().JFormatNum(2);
				case "nn"		:	return d.getMinutes().toString().JFormatNum(2);
				case "ss"		:	return d.getSeconds().toString().JFormatNum(2);
				case "mss"		:	return d.getMilliseconds().toString().JFormatNum(3);
				case "上/下"	:	return d.getHours() < 12 ? '上午' : '下午';
				}
			}
		);
	}

	TimeSpan.prototype.toString = function () {
		try{
			var rtvalue = ( (this.bolminus) ? "-" : "" ) + this.d.toString() + " " + this.hh.toString().JFormatNum( 2 ) + ":" + this.mm.toString().JFormatNum( 2 ) + ":" + this.ss.toString().JFormatNum( 2 ) + "." + this.ff.toString().JFormatNum( 3 );
			return rtvalue;
		}catch(e){
			return "0 00:00:00.000";
		}
	}

	function JDate( sourcedate ){
		var sourcedate = new Date( sourcedate );
		this.year = sourcedate.getFullYear();
		this.chtyear = sourcedate.getFullYear() - 1911;
		this.month = sourcedate.getMonth() + 1;
		this.day = sourcedate.getDate();
		this.hour = sourcedate.getHours();
		this.min = sourcedate.getMinutes();
		this.sec = sourcedate.getSeconds();
		this.msec = sourcedate.getMilliseconds();

		this.weekday = sourcedate.getDay();
		
		// 旗標
		this.bolusecht = false;
		this.bolshortname = false;
		
		// 方法
		this.weekdayname = _weekdayname;
		this.monthname = _monthname;
		this.format = _format;
		
		function _weekdayname(){
			if ( this.bolshortname ) {
				// 短名
				return ( ( this.bolusecht ) ? ChtWeekDayShortNames[ this.weekday ] : WeekDayShortNames[ this.weekday ] );
			}else{
				// 完整名
				return ( ( this.bolusecht ) ? ChtWeekDayNames[ this.weekday ] : WeekDayNames[ this.weekday ] );
			}
		}
		
		function _monthname(){
			if ( this.bolshortname ) {
				// 短名
				return ( ( this.bolusecht ) ? ChtMonthNames[ this.month ] : MonthShortNames[ this.month ] );
			}else{
				// 完整名
				return ( ( this.bolusecht ) ? ChtMonthNames[ this.month ] : MonthNames[ this.month ] );
			}
		}
		
		function _format( f ){
			try{
				return sourcedate.format( f );
			}catch(e){
			}
		}
	}

	var ChtMonthNames = new Array( "", "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" );
	var MonthNames = new Array( "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" );
	var MonthShortNames = new Array( "", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" );
	
	var WeekDayNames = new Array( "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" );
	var WeekDayShortNames = new Array( "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" );
	var ChtWeekDayNames = new Array( "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" );
	var ChtWeekDayShortNames = new Array( "日", "一", "二", "三", "四", "五", "六" );

	function TimeSpan( tsserial ){
		// d hh:mm:ss.ff
		// 1 d = 1000 ff * 60 ss * 60 mm * 24 hh
		var onesecff = 1000;
		var oneminff = onesecff * 60;
		var onehourff = oneminff * 60;
		var onedayff = onehourff * 24;
		
		this.bolminus = false;
		this.ts = 0;
		this.d = 0;
		this.hh = 0;
		this.mm = 0;
		this.ss = 0;
		this.ff = 0;
		
		var dff = 0;
		var hhff = 0;
		var mmff = 0;
		var ssff = 0;

		this.ts = tsserial = ( tsserial == null ) ? 0 : tsserial;
		/* ----- 計算天數 Start ----- */
		this.d = Math.round(tsserial / onedayff);
		dff = this.d * onedayff;
		/* ----- 計算天數 End -------*/
		
		/* ----- 計算時數 Start ----- */
		if ( (tsserial - dff) >= onehourff ) {
			this.hh = Math.round( (tsserial - dff) / onehourff);
			hhff = this.hh * onehourff;
		}
		/* ----- 計算時數 End -------*/

		/* ----- 計算分數 Start ----- */
		if ( (tsserial - dff - hhff) >= oneminff ) {
			this.mm = Math.round( (tsserial - dff - hhff) / oneminff);
			mmff = this.mm * oneminff;
		}
		/* ----- 計算分數 End -------*/

		/* ----- 計算分數 Start ----- */
		if ( (tsserial - dff - hhff - mmff) >= onesecff ) {
			this.ss = Math.round( (tsserial - dff - hhff - mmff) / onesecff);
			ssff = this.ss * onesecff;
		}
		/* ----- 計算分數 End -------*/
		
		this.ff = tsserial - dff - hhff - mmff - ssff;
	}
	/* ----- Date Object End ------- */

	/* ----- String Object Start ----- */
	String.prototype.toDateIndex = function ( f ) {
		if (!this.valueOf())
			return '';

		var s = this;
		
		f = f.replace(/[^(chy|yyyy|mmm|mm|dd|hh|24hh|nn|ss|mss)]/gi,
			function($1)
			{
				return "";
			}
		);
		
		s = s.replace(/\D/gi,
			function($1)
			{
				return "";
			}
		);

		return f.replace(/(chy|yyyy|mmm|mm|dd|hh|24hh|nn|ss|mss)/gi,
			function($1)
			{
				switch ($1.toLowerCase())
				{
				case "chy"		:	return "chy=" + s.substr( f.indexOf( $1.toLowerCase() ), 3) + ";";
				case "yyyy"		:	return "yyyy=" + s.substr( f.indexOf( $1.toLowerCase() ), 4) + ";";
				case "mmm"		:	return "mmm=" + s.substr( f.indexOf( $1.toLowerCase() ), 3) + ";";
				case "mm"		:	return "mm=" + s.substr( f.indexOf( $1.toLowerCase() ), 2) + ";";
				case "dd"		:	return "dd=" + s.substr( f.indexOf( $1.toLowerCase() ), 2) + ";";
				case "hh"		:	return "hh=" + s.substr( f.indexOf( $1.toLowerCase() ), 2) + ";";
				case "24hh"		:	return "24hh=" + s.substr( f.indexOf( $1.toLowerCase() ), 2) + ";";
				case "nn"		:	return "nn=" + s.substr( f.indexOf( $1.toLowerCase() ), 2) + ";";
				case "ss"		:	return "ss=" + s.substr( f.indexOf( $1.toLowerCase() ), 2) + ";";
				case "mss"		:	return "mss=" + s.substr( f.indexOf( $1.toLowerCase() ), 3) + ";";
				}
			}
		);
	}
	
	String.prototype.jsTrim = function () {
		if ( this.length > 0) {
			return this.replace(/(^\s+)|(\s+$)/g, "");
		}else{
			return "";
		}
	}

	String.prototype.JFormatNum = function (StrLength) {
		try{
			var tmp = this.valueOf();
			while (tmp.length < StrLength)
				tmp = "0" + tmp;

			return tmp;
		}catch(e){}
		
		/*
		var intReFormat = this;
		var deccount = intStrLength - intReFormat.toString().length;
		var tmpstring = "";
		for(tmpiii = 0 ; tmpiii < deccount ; tmpiii++)
		{
			tmpstring += "0";
		}
		tmpstring += intReFormat.toString();
		return tmpstring;
		*/
	}
	/* ----- String Object End ------- */

	/* ----- Array Object Start ----- */
	Array.prototype.RemoveAt = function (strValue) {
		var orgactions = this;
		var orgactioncount = orgactions.length;
		var newactions = new Array();
		var newactioncount = newactions.length;
		
		if ( orgactioncount > 0 ) {
			for ( tmpiii = 0 ; tmpiii < orgactioncount ; tmpiii++ ) {
				if ( orgactions[tmpiii] != strValue ) {
					newactions.push( orgactions[tmpiii] );
				}
			}
			clearar( orgactions );
			
			cp2orgactions();
			orgactioncount = orgactions.length;
		}else{
			
		}
		
		function cp2orgactions(){
			for ( tmpiii = 0 ; tmpiii < newactions.length ; tmpiii++ ) {
				orgactions.push( newactions[tmpiii] );
			}
			clearar( newactions );
		}
		
		function clearar( obj ){
			while ( obj.length > 0 ) {
				tmp = obj.pop();
			}
		}
	}

	Array.prototype.InsertInto = function (intIndex, strValue) {
		try
		{
			var orgactions = this;
			var orgactioncount = orgactions.length;
			var newactions = new Array();
			var newactioncount = newactions.length;

			cp2newactions();
			newactioncount = newactions.length;
			
			cp2orgactions();
			orgactioncount = orgactions.length;
		}
		catch(e)
		{
		}
		
		function cp2newactions(){
			for ( tmpiii = 0 ; tmpiii < orgactioncount ; tmpiii++ ) {
				if ( intIndex == tmpiii ) newactions.push( strValue );
				newactions.push( orgactions[tmpiii] );
			}
			clearar( orgactions );
		}
		
		function cp2orgactions(){
			for ( tmpiii = 0 ; tmpiii < newactioncount ; tmpiii++ ) {
				orgactions.push( newactions[tmpiii] );
			}
			clearar( newactions );
		}
		
		function clearar( obj ){
			while ( obj.length > 0 ) {
				tmp = obj.pop();
			}
		}
	}

	Array.prototype.SortAction = function (OrderActions) {
		var orgactions = this;
		var orgactioncount = orgactions.length;
		var newactions = new Array();
		var newactioncount = newactions.length;
		var setidnexnum = new Array();
		
		if (OrderActions.length > 0) {
			var orders = "_" + OrderActions.join("_") + "_";

			for (tmpjjj = 0; tmpjjj < orgactioncount ; tmpjjj++) {
				if ( orders.indexOf("_" + orgactions[tmpjjj] + "_") > -1 ) {
					setidnexnum.push( OrderActions.GetIndex( orgactions[tmpjjj] ) );
				}else{
					newactions.push( orgactions[tmpjjj] );
				}
			}
			
			if (setidnexnum.length > 0){
				setidnexnum.sort(JLH459sSort);
				for (tmpooo = setidnexnum.length-1 ; tmpooo > -1 ; tmpooo--) {
					newactions.InsertInto(0, OrderActions[ parseInt(setidnexnum[tmpooo]) ]);
				}
			}
			
			while ( orgactions.length > 0 ) {
				tmp = orgactions.pop();
			}
			
			for (tmpooo = 0 ; tmpooo < newactions.length ; tmpooo++) {
				orgactions.push( newactions[tmpooo] );
			}
		}
	}

	Array.prototype.GetIndex = function ( str ) {
		var AtNum = -1;
		var orgactions = this;
		var orgactioncount = orgactions.length;
		
		for ( tmpkkk = 0 ; tmpkkk < orgactioncount ; tmpkkk++ ) {
			if ( orgactions[tmpkkk] == str ) {
				return tmpkkk;
			}
		}
		
		return AtNum;
	}

	function Jobject( info  ){
		var tmppara;
		var tmpkey_value;
		this.para = new Array();

		if ( info == null || info == undefined || info == "" ) {
			this.para = null;
		}else{
			tmppara = info.split(":;:");
			for ( tmpjjj = 0 ; tmpjjj < tmppara.length ; tmpjjj++ ) {
				tmpkey_value = tmppara[ tmpjjj ].split(":=:");
				this.para[ tmpkey_value[0] ] = tmpkey_value[1];
			}		
			tmppara = null;
		}
	}

	function JLH459sSort(arg1,arg2){
		return (arg1 > arg2) ? 1 : -1;
	}
	/* ----- Array Object End ------- */

	function stat(){
		var a = pageYOffset + window.innerHeight - document.bar.document.height - 15;
		document.bar.top = a;
		setTimeout('stat()',2);
	}

	function fix(){
		nome=navigator.appName;
		if(nome=='Netscape'){
			stat();
		}else{
			var a= document.body.scrollTop + document.body.clientHeight - document.all.bar.offsetHeight + 15;
			a = document.body.scrollTop + 48;
			bar.style.left = document.body.clientWidth - (118+ (document.body.clientWidth-850));
			bar.style.top = a;
			if(bolShowDBar)
				bar.style.display = "";
			else
				bar.style.display = "none";
		}
	}

	function setfocusbgcolor(obj){
		orgbgcolor = obj.style.backgroundColor;
		obj.style.backgroundColor=focusbgcolor;
	}

	function rebgcolor(obj){
		obj.style.backgroundColor=orgbgcolor;
		orgbgcolor = "";
	}

	function choosedate(objname){
		chdate.style.Top = document.body.scrollTop;
		ifrchdate.location.href = "cal.php?sleft=70&sstop=30&objname=" + objname;
		chdate.style.visibility = "visible";
		chdate.style.display = "";
	}

	function pagenow_onkeypress(){
		if ((parseInt(frmjumppage.pagenow.value) <= parseInt(frmjumppage.totalpage.value)) && (parseInt(frmjumppage.pagenow.value) >= 1)) {
			frmjumppage.submit();
		}else{
		
		}

		if (parseInt(frmjumppage.pagenow.value) > parseInt(frmjumppage.totalpage.value)) {
			frmjumppage.pagenow.value = frmjumppage.totalpage.value;
			//frmjumppage.submit();
		}

		if (parseInt(frmjumppage.pagenow.value) < 1) {
			frmjumppage.pagenow.value = 1;
			//frmjumppage.submit();
		}
	}

	function backpage_onclick(){
		if (frmjumppage.pagenow.value.length == 0) { frmjumppage.pagenow.value = 1; }
		if (parseInt(frmjumppage.pagenow.value) > 1) {
			frmjumppage.pagenow.value = parseInt(frmjumppage.pagenow.value) - 1;
			frmjumppage.submit();
		}
	}

	function nextpage_onclick(){
		if (frmjumppage.pagenow.value.length == 0) { frmjumppage.pagenow.value = 1; }
		if (parseInt(frmjumppage.pagenow.value) < parseInt(frmjumppage.totalpage.value)) {
			frmjumppage.pagenow.value = parseInt(frmjumppage.pagenow.value) + 1;
			frmjumppage.submit();
		}
	}

	if ( this.NumericBoxKeyPressControl == undefined || this.NumericBoxKeyPressControl == null ) {
		function NumericBoxKeyPressControl( ctrl )
		{
			if (event.keyCode == 13)
				return true;
			if (event.keyCode < 48 || event.keyCode > 57)
				return false;
			else
				return true;
		}

		function NumericBoxKeyPressControlNoPostBack( ctrl )
		{
			if (event.keyCode == 13)
				return false;
			if (event.keyCode < 48 || event.keyCode > 57)
				return false;
			else
				return true;
		}
	}
	
	function ROC_Person_ID_Checker( pid ){
		var m = new Array();
		var error;
		var msg = pid;
		for( i = 0 ; i <= 9 ; i++)
			m[i+1] = msg.substr(i,1);

		switch(m[1]){
			case "A":	m[1]=1  ;	break;
			case "B":	m[1]=10 ;	break;
			case "C":	m[1]=19 ;	break;
			case "D":	m[1]=28 ;	break;
			case "E":	m[1]=37 ;	break;
			case "F":	m[1]=46 ;	break;
			case "G":	m[1]=55 ;	break;
			case "H":	m[1]=64 ;	break;			
			case "I":	m[1]=39 ;	break;
			case "J":	m[1]=73 ;	break;
			case "K":	m[1]=82 ;	break;
			case "L":	m[1]=2  ;	break;
			case "M":	m[1]=11 ;	break;
			case "N":	m[1]=20 ;	break;
			case "O":	m[1]=48 ;	break;
			case "P":	m[1]=29 ;	break;	
			case "Q":	m[1]=38 ;	break;
			case "R":	m[1]=47 ;	break;
			case "S":	m[1]=56 ;	break;
			case "T":	m[1]=65 ;	break;
			case "U":	m[1]=74 ;	break;
			case "V":	m[1]=83 ;	break;
			case "W":	m[1]=21 ;	break;
			case "X":	m[1]=3  ;	break;
			case "Y":	m[1]=12 ;	break;
			case "Z":	m[1]=30 ;	break;					
			default :   error=0 ;
		}
		
		if(m[2] > 2 || m[2] < 1)
			error = 0;
		if(error == 0){
			alert("身份証號碼錯誤!");
			return false;
		}
		var sum=m[1]+m[2]*8+m[3]*7+m[4]*6+m[5]*5+m[6]*4+m[7]*3+m[8]*2+parseInt(m[9])+parseInt(m[10]);
		if(sum%10 == 0){
			return true;
		}else{
			alert("身份証號碼錯誤!");
			return false;
		}
	}

	function JHtmlDecode( _source )   
	{   
		return _source.replace(/&amp;/g, '&').replace(/&quot;/g, '\"').replace(/&lt;/g, '<').replace(/&gt;/g, '>');   
	}
	
	function funcs_init(  ){
		
		var js_html, js_func_cname, js_func_fname;

		if ( ddl_func == undefined || ddl_func == null || ddl_func.length == 0 ) return;
		
		js_html = "";
		for( var tmpiii = 0 ; tmpiii < ddl_func.length ; tmpiii++ ){
		
			var js_ooo = ddl_func[ ddl_func[ tmpiii ] ];			
			if ( js_ooo == undefined || js_ooo == null ) continue;
			if ( js_ooo.func_show_in_menu != "TRUE" ) continue;
			
			if ( js_ooo.func_supid == "" ) {
			
				// 第一層
				if ( js_ooo.func_fname.length > 0 ) {
				
					js_html = "<div id='funcs_" + js_ooo.func_id + "'><a href='" + js_ooo.func_fname + "'>" + js_ooo.func_cname + "</a></div>";
					
				}else{
				
					js_html = "<div id='funcs_" + js_ooo.func_id + "'>" + js_ooo.func_cname + "</div>";
				
				}
					
				$( js_html ).addClass( "left-but" ).appendTo( "#span_funcs" );
				
				if ( js_ooo.childs.length > 0 ) {
				
					for( var tmpjjj = 0 ; tmpjjj < js_ooo.childs.length ; tmpjjj++ ){
					
						var js_ooo2 = ddl_func[ js_ooo.childs[ tmpjjj ] ];
						if ( js_ooo2 == undefined || js_ooo2 == null ) continue;
						if ( js_ooo2.func_show_in_menu != "TRUE" ) continue;
						
						// 第二層
						if ( js_ooo2.func_fname.length > 0 ) {
						
							js_html = "<div id='funcs_" + js_ooo2.func_id + "'><a href='" + js_ooo2.func_fname + "'>" + js_ooo2.func_cname + "</a></div>";
						
						}else{
						
							js_html = "<div id='funcs_" + js_ooo2.func_id + "'>" + js_ooo2.func_cname + "</div>";
						
						}
						//$( js_html ).addClass( "left-secondtext" ).appendTo( "#funcs_" + js_ooo.func_id );
						$( js_html ).addClass( "left-secondtext" ).appendTo( "#span_funcs" );

						if ( js_ooo2.childs.length > 0 ) {
						
							for( var tmpooo = 0 ; tmpooo < js_ooo2.childs.length ; tmpooo++ ){
							
								var js_ooo3 = ddl_func[ js_ooo2.childs[ tmpooo ] ];
								if ( js_ooo3 == undefined || js_ooo3 == null ) continue;
								if ( js_ooo3.func_show_in_menu != "TRUE" ) continue;
								
								// 第三層
								if ( js_ooo3.func_fname.length > 0 ) {
								
									js_html = "<div id='funcs_" + js_ooo3.func_id + "'><a href='" + js_ooo3.func_fname + "'>" + js_ooo3.func_cname + "</a></div>";
								
								}else{
								
									js_html = "<div id='funcs_" + js_ooo3.func_id + "'>" + js_ooo3.func_cname + "</div>";
								
								}
								//$( js_html ).addClass( "left-thirdtext" ).appendTo( "#funcs_" + js_ooo2.func_id );
								$( js_html ).addClass( "left-thirdtext" ).appendTo( "#span_funcs" );
								
							}
							
						}

						
					}
					
				}
				
			}else{
				
				
			}
			
		}
		
		$("#aaaaaaaa").val( $("#span_funcs").html() );
		
	}
	
	this._JLHsJSFIsLoaded = true;
}

