var W3C = (document.getElementById) ? true : false; var IEX = typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE'; var IE4 = (document.all && !W3C) ? true : false; var IE5 = (document.all && W3C) ? true : false; var NS4 = (document.layers) ? true : false; var NS6 = (W3C && navigator.appName.indexOf("Netscape")>=0) ? true : false; function call(mC,bL){ var D = null; if(mC && typeof mC == 'object' && typeof bL == 'function'){ var KB = []; var XB = arguments.length; for(var X = 2; X < XB; X++){ KB[X - 2] = arguments[X]; } D = bL.apply(mC,KB); } return D; } function fixMethod(UB,cL,V){ if(UB && typeof UB == 'object' && cL && typeof(cL) == 'string' && V && typeof(V) == 'function' && typeof UB[cL] == 'undefined'){ UB[cL] = V; } } function fixEvent(UB){ fixMethod(UB,'addEventListener',dL); fixMethod(UB,'removeEventListener',fL); return; function dL(U,V,MB){ if(U && V){ if(typeof V != 'function'){ V = V.handleEvent; } if(typeof V != 'function') return; if(this.attachEvent){ this.attachEvent('on' + U,V); } else { var eL = this['on' + U]; if (typeof this['on' + U] != 'function'){ this['on' + U] = V; } else { this['on' + U] = function(){ eL(); V(); }; } } } }; function fL(U,V,MB){ if(U && V){ if(typeof V != 'function'){ V = V.handleEvent; } if(typeof V != 'function') return; if(this.detachEvent){ this.detachEvent('on' + U,V); } } }; } fixEvent(window); fixEvent(document); function fixContains(UB){ fixMethod(UB,'contains',gL); function gL(hL){ if (hL == null) { return false; } else if ( hL == this) { return true; } else { return this.contains(hL.parentNode); } } } function getElementById(A){ var D = null; if(document.getElementById){ D = document.getElementById(A); } else if(document.layers){ D = document.layers[A]; } else if(document.all) { D = document.all[A]; } return D; }; if (!window.getComputedStyle){ window.getComputedStyle = function(UB,p_psd){ return UB ? UB.currentStyle : null; } } var SYS = { SDE: {}, GUI: {}, DOM: {}, UTL: {}, CNV: {}, CHK: {}, PAG: {}, ENV: { ico: '/_ico/', lib: '/_lib/' }, get: function(AK,Z){ return getVar(this,AK,Z); }, set: function(H){ setVar(this,H); }, sde: function(){ var KB = arguments[0]; switch(typeof(KB)){ case 'string': return this.get('SDE' + (KB != '' ? '.' + KB : ''),arguments[1]); break; case 'object': this.set({SDE:KB}); break; } }, sys: function() { var KB = arguments[0]; switch(typeof(KB)){ case 'string': return this.get('SDE.sys' + (KB != '' ? '.' + KB : ''),arguments[1]); break; case 'object': this.set({SDE:{sys:KB}}); break; } }, app: function(){ var KB = arguments[0]; switch(typeof(KB)){ case 'string': return this.get('SDE.app' + (KB != '' ? '.' + KB : ''),arguments[1]); break; case 'object': this.set({SDE:{app:KB}}); break; } }, cki: function(p_cki,H,Z){ var D = null; if(p_cki){ p_cki = join('_',this.sys('sys'),this.sys('sid'),this.sys('web'),p_cki); var PB = str2dat(unescape(get_cookie(p_cki,'{}'))); if(H==null || typeof(H)=='string'){ D = getVar(PB,H,Z); } else if(typeof(H)=='object') { if(typeof(PB)=='object'){ setVar(PB,H); } else { PB = H } set_cookie(p_cki,dat2str(PB),'y',Z); } } return D; }, evt: function(mC,U){ return window.event ? window.event : U; }, str: function(MB){ return dat2str(this.SDE,MB); }, sts: function(){ return this.IB; }, etc: function(AK,P,MB){ var PB = {}; PB[AK] = P; this.cki('ETC',PB,1); if(MB){ window.location = self.location; } }, end: function(){ window.close(); }, prn: function(RB){ if(this.AH){ this.AH.close(); } this.AH = open('about:blank','SYSPRN','menubar=yes,resizable=yes,scrollbars=yes,fullscreen=no',true); var wD = this.AH.document; wD.open(); wD.write(RB); wD.close(); }, out: function(RB,A,MB){ if(RB){ if(this.sts()){ cD(RB,A,MB); } else { if(A){ this.dep({ dep: [{tod:'elm',elm:A}], cbf: function(){ cD(RB,A,MB); } }); } else { document.write(RB); } } } function cD(RB,A,MB){ var _ = getElementById(A); if(_){ var N = _.innerHTML; _.innerHTML = MB < 0 ? (RB + N) : (MB > 0 ? N + RB : RB); } else if(A == '_BODY_' && RB){ var cK = document.body || document.getElementsByTagName('body')[0]; if(cK){ cK.insertAdjacentHTML('beforeEnd', RB); } } } }, dep: function(H){ if(H && typeof H.cbf == 'function'){ var fB = true; var iL = H.dep; for(var X in iL){ var F = iL[X] || {}; switch(F.tod){ case 'id': case 'iid': case 'elm': fB = document.getElementById(F.elm); break; case 'cbf': if(typeof F.cbf == 'function'){ fB = F.cbf(F.arg); } break; } if (!fB) break; } if(fB || SYS.sts()){ H.cbf(fB,H.arg); } else { setTimeout(function(){SYS.dep(H)},H.tmo || 50); } } }, reg: function(bL){ this.dep({cbf:bL}); }, run: function(H){ if(H){ switch(H.flg){ case 4: window.open(H.dat,H.dst ? H.dst : '_blank'); break; case 5: eval(H.dat); break; case 3: default: doAct(str2dat(H.dat),null,null,null,H.dst); break; } } }, dtm: { fmt: function(BH,MB,p_his){ var uL = SYS.sys('fmt.dtm','d-m-y'); p_his = p_his ? ' h:i:s' : ''; if(MB){ return dtm2str(BH,'y-m-d' + p_his,uL); } else { return dtm2str(BH,uL + p_his,'y-m-d'); } }, cmp: function(FH,GH){ return cmp2dtm(FH,GH,SYS.sys('fmt.dtm','d-m-y')); }, chk: function(BH){ return chk_date_time(BH,SYS.sys('fmt.dtm','d-m-y')); } }, IB: false, AH: null }; window.addEventListener('load',function(){SYS.IB = true;},false); SYS.CNV = { str2dat: function (QB){ try { eval('var D=' + QB); return D; } catch(e){ return null; } }, js2perl: function (RB){ return this.dat2str(RB); }, dat2str: function (RB,MB){ var D = null; switch(typeof(RB)){ case 'function': break; case 'string': D = "'" + this.str2str(RB.toString()) + "'"; break; case 'boolean': D = RB ? 1 : 0; break; case 'number': D = RB; break; case 'object': if(RB){ D = ''; if(typeof(RB.length) == 'undefined'){ for(var b in RB){ var P = tbis.dat2str(RB[b],MB); if(P != null){ D += (D ? "," : "") + ("'" + b + "'") + (MB ? "=>" : ":") + P; } } D = "{" + D + "}"; } else { for(var SB = 0; SB < RB.length; SB++){ var P = this.dat2str(RB[SB],MB); if(P != null) D += (D ? "," : "") + P; } D = "[" + D + "]"; } } break; } return D; }, dat2xml: function (RB){ var D = null; if(RB != null){ switch(typeof(RB)){ case 'object': D = ''; if(typeof(RB.length) == 'undefined'){ for(var $ in RB){ D += '<' + $; var TB = null; var N = RB[$]; if(N != null){ var a = null; if(typeof(N) == 'object'){ if(N.length && typeof(N[0]) == 'object'){ a = N.shift(); } else { a = N; N = null; } } for(var b in a){ var PB = a[b]; switch(typeof(PB)){ case 'boolean': PB = PB ? b : null; break; case 'object': if(PB){ var c = ''; for(var F in PB){ if(PB[F] != null){ c += F + ':' + PB[F] + ';'; } } PB = c; } break; } if(PB != null){ D += ' ' + b.toLowerCase() + '="' + PB.toString().replace(/\"/g,'&quot;') + '"'; } } TB = this.dat2xml(N); } D += (TB != null) ? ('>' + TB + '</' + $ + '>') : ' />'; } } else { for(var X = 0; X < RB.length; X++){ var PB = this.dat2xml(RB[X]); if(PB){ D += PB; } } } break; case 'function': D = RB(); break; case 'boolean': case 'string': case 'number': case 'undefined': default: D = RB.toString(); break; } } return D; }, dat2dat: function (RB){ var D; if(RB && typeof(RB) == 'object'){ D = RB.length ? [] : {}; for(var b in RB){ D[b] = this.dat2dat(RB[b]); } } else { D = RB; } return D; }, dtm2dat: function (BH,kB){ var D = null; if(BH){ BH = BH.toString().split(' '); var N = BH[0]; var CH = BH[1] ? BH[1] : '00:00:00'; N = N.replace(/\//g,'-'); N = N.split('-'); CH = CH.split(':'); if(N.length == 3){ if(kB){ kB = kB.toLowerCase(); kB = kB.replace(/[^ymd]/gi,''); } kB = (kB && kB.match(/^dmy|mdy|ymd|myd|ydm|dym$/i))? kB : 'ymd'; var NH = parseInt(N[kB.indexOf('y')],10); var gH = parseInt(N[kB.indexOf('m')],10); var hH = parseInt(N[kB.indexOf('d')],10); var YL = parseInt(CH[0],10) || 0; var v_min = parseInt(CH[1],10) || 0; var ZL = parseInt(CH[2],10) || 0; if(NH > 0 && gH > 0 && gH < 13 && hH > 0 && hH < 32 && YL > -1 && YL < 25 && v_min > -1 && v_min < 60 && ZL > -1 && ZL < 60){ D = {y:NH,m:gH,d:hH,h:YL,i:v_min,s:ZL}; } } } return D; }, dtm2str: function (BH,kB,$H){ var D = ''; if(typeof(BH) == 'string'){ BH = dtm2dat(BH,$H); } if(BH && typeof(BH) == 'object'){ D = kB ? kB : 'y-m-d h:i:s'; var zG = ['y','m','d','h','i','s']; for(var X in zG){ var b = zG[X]; var PB = BH[b] ? BH[b] : ''; if(b != 'y'){ PB = PB.toString().padLeft('0',2); } D = D.replace(new RegExp(b,"g"),PB); } for(var X in zG){ var b = zG[X]; var PB = BH[b] ? BH[b] : ''; D = D.replace(new RegExp(b,"g"),PB); } } return D; }, str2dtm: function (BH,kB){ var D = null; BH = this.dtm2dat(BH,kB); if(BH){ D = new Date(BH.y,BH.m,BH.d - 1,BH.h,BH.i,BH.s); } return D; }, _END_: true }; SYS.CHK = { chkall: function(Z){ var iB = ''; for(var X in Z){ var g = Z[X]; var _ = document.getElementById(g.iid || ''); if(_){ g.val = _.value; } var PB = g.val; var gB = g.tof || 'str'; var hB = g.req || false; var fB = true; switch(gB.toLowerCase()){ case 'dtm': fB = !(hB || PB) || (PB && this.chkdtm(PB) && this.chkfnc(g.fnc,g)); break; case 'num': fB = !(hB || PB) || (PB && this.chknum(PB) && this.chkfnc(g.fnc,g)); break; case 'eml': fB = !(hB || PB) || (PB && this.chkeml(PB) && this.chkfnc(g.fnc,g)); break; case 'rex': fB = !(hB || PB) || (PB && this.chkrex(g) && this.chkfnc(g.fnc,g)); break; case 'two': fB = !(hB || PB) || (PB && this.chkcmp(g) && this.chkfnc(g.fnc,g)); break; case 'cmp': fB = !(hB || PB) || (PB && this.chkcmp(g) && this.chkfnc(g.fnc,g)); break; case 'rng': fB = !(hB || PB) || (PB && this.chkrng(g) && this.chkfnc(g.fnc,g)); break; case 'str': case 'fnc': default: fB = !(hB || PB) || (PB && this.chkfnc(g.fnc,g)); break; } if(!fB){ iB += (iB ? '\n' : '') + (g.msg || 'Invalid value!'); } } if(iB != ''){ this.notify(iB); } return iB == ''; }, chkdtm: function(BH){ var D = false; BH = this.dtmdat(BH); if(BH){ var $B = new Date(BH.y,BH.m - 1,BH.d); if(!isNaN($B) && $B.getDate() == BH.d && $B.getMonth() == BH.m - 1){ var NH = $B.getYear(); NH += NH < 2000 ? 1900 : 0; D = (NH == BH.y); } } return D; }, chknum: function(H){ return !isNaN(H); }, chkeml: function(p_eml){ return this.chkrex({val:p_eml,rex:"^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",flg:"i"}); }, chkfnc: function(bL,H){ var D = true; if(typeof(bL) == 'function'){ D = bL(H); } return D; }, chkrex: function(H){ var D = false; if(H && H.val != null && H.rex != null){ var ZB = new RegExp(H.rex,H.flg); D = ZB.test(H.val); } return D; }, chkcmp: function(H){ H = H || {}; var PB = this.fixval(H.val); var D = PB != null; if(D){ var tM = this.fixval(H.cmp); switch(H.tod){ case 'dtm': D = this.cmpdtm(PB,tM); break; default : D = (PB < tM ? -1 : (PB > tM ? 1 : 0)) } switch(H.ope){ case '<': D = D < 0; break; case '<=': D = D <= 0; break; case '>=': D = D >= 0; break; case '>': D = D > 0; break; case '!=': D = D != 0; break; case '==': default: D = D == 0; } } return D; }, chkrng: function(H){ H = H || {}; var PB = this.fixval(H.val); var D = PB != null; if(D){ var v_min = this.fixval(H.min); var oB = this.fixval(H.max); switch(KB.tod){ case 'dtm': if(D && v_min != null){ D = this.cmpdtm(v_min,PB) <= 0; } if(D && oB != null){ D = this.cmpdtm(PB,oB) <= 0; } break; case 'str': case 'num': default : if(D && v_min != null){ D = v_min <= PB; } if(D && oB != null){ D = PB <= oB; } } } return KB.flg ? !D : D; }, fixval: function(H){ var D = H; if(D && D.match(/^\{(.*)\}$/)){ var _ = document.getElementById(RegExp.$1); D = _ ? _.value : null; } return D; }, dtmdat: function(BH){ var D = null; if(BH){ BH = BH.toString().split(' '); var N = BH[0]; var CH = BH[1] ? BH[1] : '00:00:00'; N = N.replace(/\//g,'-'); N = N.split('-'); CH = CH.split(':'); if(N.length == 3){ var uL = this.format.date; if(uL){ uL = uL.toLowerCase(); uL = uL.replace(/[^ymd]/gi,''); } uL = (uL && uL.match(/^dmy|mdy|ymd|myd|ydm|dym$/i))? uL : 'ymd'; var NH = parseInt(N[uL.indexOf('y')],10); var gH = parseInt(N[uL.indexOf('m')],10); var hH = parseInt(N[uL.indexOf('d')],10); var YL = parseInt(CH[0],10) || 0; var v_min = parseInt(CH[1],10) || 0; var ZL = parseInt(CH[2],10) || 0; if(NH > 0 && gH > 0 && gH < 13 && hH > 0 && hH < 32 && YL > -1 && YL < 25 && v_min > -1 && v_min < 60 && ZL > -1 && ZL < 60){ D = {y:NH,m:gH,d:hH,h:YL,i:v_min,s:ZL}; } } } return D; }, cmpdtm: function(FH,GH){ var D = 0; FH = this.dtmdat(FH); GH = this.dtmdat(GH); if(FH || GH){ if(!FH){ D = 1; } else if(!GH){ D = -1; } else { D = FH.y - GH.y; if(D == 0){ D = FH.m - GH.m; if(D == 0){ D = FH.d - GH.d; if(D == 0){ D = FH.h - GH.h; if(D == 0){ D = FH.i - GH.i; if(D == 0){ D = FH.s - GH.s; } } } } } } } return D; }, notify: function(p_msg){ alert(p_msg); }, confirm: function(p_msg){ return confirm(p_msg); }, popdate: function($H,eB,bL){ try { eB = document.getElementById(eB); popUpCalendar($H,eB,this.format.date,bL); } catch(e){} return false; }, __END__: true }; SYS.UTL = { fullDir: function (EC,FC){ var D = ''; EC = EC ? EC : ''; FC = FC ? FC : ''; EC = EC.replace(/\\/g,'/'); FC = FC.replace(/\\/g,'/'); if(!FC) { D = EC; } else if(FC.match(/^\//)){ D = FC; } else { var GC = ''; if(FC.match(/^([^\?]*)(\?.*)$/)){ FC = RegExp.$1; GC = RegExp.$2; } var TB = 0; FC = FC.split('/'); EC = EC.split('/'); for(; TB < FC.length; TB++){ if(FC[TB] != '..') break; } var XB = EC.length - TB - 1; if(XB > 0){ D = EC[0] ? EC[0] : '/'; for(var X = 1; X < XB; X++){ D += (D != '/' ? '/' : '') + EC[X]; } } for(; TB < FC.length; TB++){ D += (D ? '/' : '') + FC[TB]; } D += GC; } return D; }, fullURL: function (FC){ var D = ''; FC = this.parseURL(FC); D += (FC.protocol || location.protocol) + '//'; D += (FC.hostname || location.hostname); D += ':' + (FC.port || location.port || '80'); D += this.fullDir(location.pathname,FC.pathname); if(FC.search) D += FC.search; if(FC.hash) D += FC.hash; return D; }, parseURL: function(FC){ var D = {}; FC = FC || location.href; if(FC && FC.match(/^([^:]*:)(\/\/.*)/)){ D.protocol = RegExp.$1; FC = RegExp.$2; } if(FC && FC.match(/^\/\/([^\/]*)(.*)/)){ var NB = RegExp.$1; FC = RegExp.$2; if(NB.match(/^([^:]*)(:.*)/)){ D.hostname = RegExp.$1; D.port = RegExp.$2; } else { D.hostname = NB; } } if(FC){ if(FC.match(/^([^\?]*)(\?.*)/)){ D.pathname = RegExp.$1; FC = RegExp.$2; } else { D.pathname = FC; FC = null; } } if(FC){ if(FC.match(/^([^#]*)(#.*)/)){ D.search = RegExp.$1; D.hash = RegExp.$2; } else { D.search = FC; } } return D; }, findTLS: function (p_tls,P,AK){ var D = null; AK = AK || 'iid'; for(var X in p_tls){ var F = p_tls[X]; if(F[AK] == P){ D = F; break; } D = this.findTLS(F.sub,P,AK); if(D) break; } return D; } }; function join(aD){ var D = ''; var XB = arguments.length; for(var X = 1; X < XB; X++){ var PB = arguments[X]; if(PB != null && PB != ''){ D += (D ? aD : '') + PB; } } return D; }; function parse_int(P,Z){ var D = parseInt(P); Z = parseInt(Z); if(isNaN(D)) D = isNaN(Z) ? 0 : Z; return D; }; function rightVal(P,Z){ return P != null ? P : (Z != null ? Z : ''); }; function rightNum(P,Z){ if(P == null || isNaN(P)){ P = (Z == null) || isNaN(Z) ? 0 : Z; } return P; }; function str2str(QB){ var D = QB || ''; D = D.replace(/\\/g,"\\\\"); D = D.replace(/\'/g,"\\\'"); D = D.replace(/\"/g,"\\\""); return D; }; function str2dat(QB){ try { eval('var D=' + QB); return D; } catch(e){ return null; } }; function js2perl(RB){ return dat2str(RB); }; function dat2str(RB,MB){ var D = null; switch(typeof(RB)){ case 'function': break; case 'string': D = "'" + str2str(RB.toString()) + "'"; break; case 'boolean': D = RB ? 1 : 0; break; case 'number': D = RB; break; case 'object': if(RB){ D = ''; if(typeof(RB.length) == 'undefined'){ for(var b in RB){ var P = dat2str(RB[b],MB); if(P != null){ D += (D ? "," : "") + ("'" + b + "'") + (MB ? "=>" : ":") + P; } } D = "{" + D + "}"; } else { for(var SB = 0; SB < RB.length; SB++){ var P = dat2str(RB[SB],MB); if(P != null) D += (D ? "," : "") + P; } D = "[" + D + "]"; } } break; } return D; }; function dat2xml(RB){ var D = null; if(RB != null){ switch(typeof(RB)){ case 'object': D = ''; if(typeof(RB.length) == 'undefined'){ for(var $ in RB){ D += '<' + $; var TB = null; var N = RB[$]; if(N != null){ var a = null; if(typeof(N) == 'object'){ if(N.length && typeof(N[0]) == 'object'){ a = N.shift(); } else { a = N; N = null; } } for(var b in a){ var PB = a[b]; switch(typeof(PB)){ case 'boolean': PB = PB ? b : null; break; case 'object': if(PB){ var c = ''; for(var F in PB){ if(PB[F] != null){ c += F + ':' + PB[F] + ';'; } } PB = c; } break; } if(PB != null){ D += ' ' + b.toLowerCase() + '="' + PB.toString().replace(/\"/g,'&quot;') + '"'; } } TB = dat2xml(N); } D += (TB != null) ? ('>' + TB + '</' + $ + '>') : ' />'; } } else { for(var X = 0; X < RB.length; X++){ var PB = dat2xml(RB[X]); if(PB){ D += PB; } } } break; case 'function': D = RB(); break; case 'boolean': case 'string': case 'number': case 'undefined': default: D = RB.toString(); break; } } return D; }; function dat_xml(RB){ return dat2xml(RB); }; function dat2dat(RB){ var D; if(RB && typeof(RB) == 'object'){ D = RB.length ? [] : {}; for(var b in RB){ D[b] = dat2dat(RB[b]); } } else { D = RB; } return D; }; function dtm2dat(BH,kB){ var D = null; if(BH){ BH = BH.toString().split(' '); var N = BH[0]; var CH = BH[1] ? BH[1] : '00:00:00'; N = N.replace(/\//g,'-'); N = N.split('-'); CH = CH.split(':'); if(N.length == 3){ if(kB){ kB = kB.toLowerCase(); kB = kB.replace(/[^ymd]/gi,''); } kB = (kB && kB.match(/^dmy|mdy|ymd|myd|ydm|dym$/i))? kB : 'ymd'; var NH = parseInt(N[kB.indexOf('y')],10); var gH = parseInt(N[kB.indexOf('m')],10); var hH = parseInt(N[kB.indexOf('d')],10); var YL = parseInt(CH[0],10) || 0; var v_min = parseInt(CH[1],10) || 0; var ZL = parseInt(CH[2],10) || 0; if(NH > 0 && gH > 0 && gH < 13 && hH > 0 && hH < 32 && YL > -1 && YL < 25 && v_min > -1 && v_min < 60 && ZL > -1 && ZL < 60){ D = {y:NH,m:gH,d:hH,h:YL,i:v_min,s:ZL}; } } } return D; }; function dtm2str(BH,kB,$H){ var D = ''; if(typeof(BH) == 'string'){ BH = dtm2dat(BH,$H); } if(BH && typeof(BH) == 'object'){ D = kB ? kB : 'y-m-d h:i:s'; var zG = ['y','m','d','h','i','s']; for(var X in zG){ var b = zG[X]; var PB = BH[b] ? BH[b] : ''; if(b != 'y'){ PB = PB.toString().padLeft('0',2); } D = D.replace(new RegExp(b,"g"),PB); } for(var X in zG){ var b = zG[X]; var PB = BH[b] ? BH[b] : ''; D = D.replace(new RegExp(b,"g"),PB); } } return D; }; function str2dtm(BH,kB){ var D = null; BH = dtm2dat(BH,kB); if(BH){ D = new Date(BH.y,BH.m,BH.d - 1,BH.h,BH.i,BH.s); } return D; }; function filltmp(RB,DC){ var D = DC; if(D){ for(var b in RB){ var PB = RB[b]; if(PB != null){ var zB = new RegExp('<!--%' + b + '%-->','ig'); D = D.replace(zB,PB); } } } return D; } function createElement(H){ var D = null; if(H != null){ var NB = H.toString(); switch(typeof(H)){ case 'object': if(typeof(H.length) == 'undefined'){ var $ = H.tag ? H.tag : 'div'; var a = H.att; var N = H.dat; if(NS6){ D = document.createElement($); if(D){ for(var b in a){ D.setAttribute(b,a[b]); } } } else if(IE4 || IE5){ var BB = '<' + $; for(var b in a){ var PB = a[b]; if(PB != null){ switch(typeof(PB)){ case 'undefined': break; case 'boolean': if(PB){ BB += ' ' + b; } break; default: BB += ' ' + b + '="' + PB + '"'; } } } BB += '>'; D = document.createElement(BB); } if(D && N){ if(typeof(N) == 'object' && N.length){ for(var X = 0; X < N.length; X++){ try { var _ = createElement(N[X]); if(_) D.appendChild(_); } catch(e){} } } else { try { var _ = createElement(N); if(_) D.appendChild(_); } catch(e){} } } } else { D = document.createTextNode(NB); } break; default: D = document.createTextNode(NB); } } return D; }; function removeElement(UB){ try { if(typeof(UB) != 'object') UB = getElementById(UB); if(UB){ var VB = UB.parentNode; if(VB) VB.removeChild(UB); else UB = null; } } catch(e){} }; function attachElement(UB,WB){ try { if(typeof(WB) == 'string'){ WB = getElementById(WB); } if(!WB) WB = document.body; WB.appendChild(UB); } catch(e){} }; function createTag(){ var D = ''; var XB = arguments.length; if(XB){ var $ = arguments[0]; var KB = {}; KB[$] = []; var X = 1; if(typeof(arguments[1]) == 'object'){ KB[$].push(arguments[1]); X = 2; } for(;X < XB; X++){ KB[$].push(arguments[X]); } D = dat2xml(KB); } return D; }; function load_resource(RB){ for(var b in RB){ var F = RB[b]; if(F.url){ switch(F.toi){ case 'img': var YB = new Image(); YB.src = F.url; break; } } } }; function get_cookie(A,Z){ var D = ''; var PB = document.cookie; var ZB = new RegExp('\\b' + A + '=([^;]*)(;|$)',"i"); if(PB.match(ZB)){ D = unescape(RegExp.$1); } return (D != '' ? D : Z); } function set_cookie(A,P,B,C){ var _B = ''; if(C){ var $B = new Date(); switch(B){ case 'y': $B.setYear($B.getYear() + C); break; case 'm': $B.setMonth($B.getMonth() + C); break; case 'd': $B.setDate($B.getDate() + C); break; case 'h': $B.setHours($B.getHours() + C); break; case 'n': $B.setMinutes($B.getMinutes() + C); break; case 's': $B.setSeconds($B.getSeconds() + C); break; } _B = 'expires=' + $B.toGMTString(); } document.cookie = A + '=' + P + ';' + _B; } function del_cookie(A){ set_cookie(A,'','s',-1); } function doAct(H,bB,cB,dB,eB){ var D = false; var IC = getElementById('APP_FRM'); if(!IC){ IC = createElement({ tag:'FORM', att:{id:'APP_FRM',method:'POST'} }); document.body.appendChild(IC); } if(IC){ if(typeof(H) == 'string'){ window.open(H,eB ? eB : '_self'); } else { if(SYS && SYS.str){ H['sde'] = SYS.str(1); } for(var b in H){ if(H[b] != null){ if(!IC[b]){ var O = createElement({ tag:'input', att:{type:'hidden',name:b} }); if(O){ IC.appendChild(O); } } IC[b].value = H[b]; } } if((!cB || cB(IC)) && (!bB || chk_form(IC,bB)) && (!dB || dB(IC))){ if(eB) IC.target = eB; IC.submit(); D = true; } } } return D; } function chk_data(RB,bB){ var fB = true; if(bB != null){ for(var X = 0; X < bB.length && fB; X++){ var PB = getVar(RB,bB[X].f); var gB = bB[X].t; var hB = bB[X].r; var iB = bB[X].m; var jB = bB[X].o; gB = gB ? gB : ''; iB = iB ? iB : 'Invalid value !'; switch(gB.toLowerCase()){ case 'str': fB = (!hB || PB); break; case 'dtm': fB = !(hB || PB) || (PB && SYS.dtm.chk(PB)); break; case 'num': fB = !(hB || PB) || (PB && !isNaN(PB)); break; case 'eml': fB = !(hB || PB) || (PB && chk_mail(PB)); break; case 'cbf': fB = !(hB || PB) || (PB && (!jB || jB(PB))); break; } if(!fB){ alert(iB); break; } } } return fB; } function chk_form(aB,bB){ var fB = true; if(bB != null){ for(var SB = 0; SB < bB.length && fB; SB++){ if(!bB[SB].f) continue; var O = aB[bB[SB].f]; if(O != null){ var PB = O.value; var gB = bB[SB].t; var hB = bB[SB].r; var iB = bB[SB].m; var jB = bB[SB].o; gB = gB ? gB : ''; iB = iB ? iB : 'Gia tri khong hop le !'; switch(gB.toLowerCase()){ case 'str': fB = (!hB || PB); break; case 'dtm': fB = !(hB || PB) || (PB && SYS.dtm.chk(PB)); break; case 'num': fB = !(hB || PB) || (PB && !isNaN(PB)); break; case 'eml': fB = !(hB || PB) || (PB && chk_mail(PB)); break; case 'cbf': fB = !(hB || PB) || (PB && (!jB || jB(PB))); break; } if(!fB){ alert(iB); try { O.focus(); } catch (x){} break; } } } } return fB; } function chk_date_time(P,kB){ if(P == null || P == '') return false; P = P.split(' '); var XB = P.length; if(XB < 1 || XB > 2) return false; if(!chk_date(P[0],kB)) return false; if(XB == 2 && !chk_time(P[1])) return false; return true; } function chk_date(BH,kB){ var D = false; BH = dtm2dat(BH,kB); if(BH){ var $B = new Date(BH.y,BH.m - 1,BH.d); if(!isNaN($B) && $B.getDate() == BH.d && $B.getMonth() == BH.m - 1){ var NH = $B.getYear(); NH += NH < 2000 ? 1900 : 0; D = (NH == BH.y); } } return D; } function chk_time(P){ if(P == null || P == '') return false; var oB = [24,60,60]; var pB = P.split(':'); var XB = pB.length; if(XB < 1 || XB > 3) return false; for(var SB = 0; SB < XB; SB++){ P = arr[SB]; if(P=='' || isNaN(P)) return false; P = parseInt(P); if(P < 0 || P > oB[SB]) return false; } return true; } function chk_mail(P){ P = P.match(/^(.+)@(.+)$/); if(P == null) return false; var qB = P[1]; var rB = P[2]; for(var SB=0; SB < qB.length; SB++) { if(qB.charCodeAt(SB)>127) return false; } for(var SB=0; SB < rB.length; SB++) { if(rB.charCodeAt(SB)>127) return false; } var sB = "\\(\\)><@,;:\\\\\\\"\\.\\[\\]"; var tB = "\[^\\s" + sB + "\]"; var uB = "(\"[^\"]*\")"; var vB = tB + '+'; var wB = "(" + vB + "|" + uB + ")"; var xB = new RegExp("^" + wB + "(\\." + wB + ")*$"); var yB = new RegExp("^" + vB + "(\\." + vB +")+$"); if(qB.match(xB) == null) return false; if(rB.match(yB) == null) return false; return true; } function chk_eml(P){ var zB = /^\w(\.?[\w-])*@\w(\.?[-\w])*\.[a-z]{2,4}$/i; var D = reg.test(P); return D; } function cmp2dtm(FH,GH,kB){ var D = 0; FH = dtm2dat(FH,kB); GH = dtm2dat(GH,kB); if(FH || GH){ if(!FH){ D = 1; } else if(!GH){ D = -1; } else { D = GH.y - FH.y; if(D == 0){ D = GH.m - FH.m; if(D == 0){ D = GH.d - FH.d; } } } } return D; } function cboBox(H){ var NL = []; H = H || {}; if(H.flg){ NL.push({ option: [{value:''},''] }); } for(var X in H.dat){ var F = H.dat[X]; NL.push({ option: [{ value:F.iid, selected:F.iid==H.def },(H.inc ? F.iid + ' ' : '') + (F.ttl || '')] }); } return dat2xml({ select: [H.att,NL] }); }; function num2str(eD,IK,JK,aD) { var D = ''; aD = aD ? aD : ','; JK = JK ? JK : '.'; eD = eD != null ? eD.toString() : ''; if(eD.match(/^([+-]?[0-9]*)(.([0-9]*))?$/)){ var v_int = RegExp.$1; var KK = RegExp.$3; D = int2str(v_int,JK); if(IK > 0){ D = (D != '') ? D : '0'; D += aD + KK.padRight('0',IK).substr(0,IK); } } return D; }; function int2str(eD,aD) { aD = aD ? aD : '.'; var D = ''; eD = eD.toString(); if(eD.match(/^([+-]?)([0-9.]*)$/)){ var BK = RegExp.$1; eD = RegExp.$2; while(eD) { if(eD.match(/^(.*?)(\d{3})$/)){ D = RegExp.$2 + (D ? aD : '') + D; eD = RegExp.$1; } else { D = eD + (D ? aD : '') + D; eD = ''; } } D = BK + D; } return D; }; String.prototype.padLeft = function(jF,d){ var PB = this.toString(); if(jF){ jF = jF.substr(0,1); var XB = this.length; for(; d > XB; d--){ PB = jF + PB; } } return PB; }; String.prototype.padRight = function(jF,d){ var PB = this.toString(); if(jF){ jF = jF.substr(0,1); var XB = this.length; for(; d > XB; d--){ PB += jF; } } return PB; }; SYS.DOM.ELM = { inithover: function(UB,H){ if(UB){ H = H || {}; var h = H.cls || 'hover'; fixEvent(UB); UB.removeEventListener('mouseover',SYS.DOM.ELM.inithover,true); UB.addEventListener('mouseover',uM,true); UB.addEventListener('mouseout',vM,true); } function uM(){ UB.className += ' ' + h; } function vM(){ UB.className = UB.className.replace(' ' + h,''); } }, _END_: true }; SYS.GUI.MNU = { reg: function(H){ return new CMNU(H); }, obj: function(A,mC){ if(mC){ this.G[A] = mC; } return this.G[A]; }, G: {} }; function CMNU(H){ this.I = 'MNU' + (new Date()).getTime() + Math.floor(1000 * Math.random()); this.L = H.ico; this.LC = H.cls ? H.cls : ['mnu']; this.QC = null; this.PC = ''; this.LD = H.win || '_BODY_'; return SYS.GUI.MNU.obj(this.I,this); }; CMNU.prototype.draw = function(H){ if(H && H.iid){ var jL = this.make(H); SYS.out(jL.pop(),H.iid); SYS.out(jL.join(''),this.LD,1); } }; CMNU.prototype.make = function(H){ var D = []; if(H && typeof(H) == 'object'){ this.SC = H.lng; this.XC(D,0,'',H.dat,H.bar); delete this.SC; } return D; }; CMNU.prototype.hide = function(){ var pB = this.PC.split('_'); var WC = pB[0]; for(var X = 1; X < pB.length; X++){ WC += '_' + pB[X]; var F = getElementById('i_' + WC); F.className = F.className.replace(/hilite/,'normal'); var VC = getElementById('m_' + WC); if(VC){ VC.style.display = "none"; var tJ = getElementById('f_' + WC); if(tJ){ tJ.style.display = "none"; } } else { break; } } this.PC = ''; }; CMNU.prototype.XC = function(kL,HE,A,RB){ if(!RB) return ''; var D = ''; var IE = false; var h = this.ID(HE); for(var X = 0; X < RB.length; X++){ var F = RB[X]; var YC = (A ? A + '_' : '') + X; if(F.flg == 0){ IE = true; } else { if(F.flg == 1){ F = this.jC(h,F); } else { this.XC(kL,HE + 1,YC,F.sub); F = this.cC(h,YC,F); } if(F && IE){ D += this.kC(h); } D += F; IE = false; } } if(D){ var YC = this.I + (A ? '_' + A : ''); D = dat2xml([{ div: [{ id: 'm_' + YC, CLASS: h, style: { position: HE < 1 ? null : 'absolute', display: HE < 1 ? null : 'none', 'z-index': 1000 } },D] }, HE < 1 ? null : { iframe: [{ id: 'f_' + YC, style: { position:'absolute', display: 'none', width:0,height:0, left:0,top:0, border:0 } },''] }]); kL.push(D); } }; CMNU.prototype.jC = function(CE,JD){ var D = { div: [{ CLASS: 'entry static', onmouseout:'SYS.GUI.MNU.obj(\'' + this.I + '\').rL(true)', onmouseover:'SYS.GUI.MNU.obj(\'' + this.I + '\').rL(false)' }, JD.ico ? this.AF(JD.ico) : null, this.sH(JD.ttl)] }; return dat2xml(D); }; CMNU.prototype.kC = function(CE){ return ''; return dat2xml({ div: [null,{ hr: {CLASS: 'entry spacer'} }] }); }; CMNU.prototype.cC = function(CE,A,JD){ var D = ''; var bD = this.I; var aC = null; if(JD.lnk){ var bC = JD.dst ? '\'' + str2str(JD.dst) + '\'' : 'null'; aC = 'SYS.GUI.MNU.obj(\'' + bD + '\').HD({flg:' + JD.flg + ',dat:\'' + str2str(JD.lnk) + '\',dst:' + bC + '})'; } var ZC = this.AF(JD.ico); D = dat2xml({ div: [{ id:'i_' + bD + '_' + A, CLASS: 'entry normal', onmouseout: 'SYS.GUI.MNU.obj(\'' + bD + '\').rL(true)', onmouseover: 'SYS.GUI.MNU.obj(\'' + bD + '\').lC(this)', onclick: aC }, ZC, this.sH(JD.ttl)] }); return D; }; CMNU.prototype.lC = function(JD){ this.rL(false); JD.className = JD.className.replace(/normal/,'hilite'); var YC = JD.id.substr(2); var qC = YC.split('_'); var nC = this.PC; if(nC){ var pC = nC.split('_'); var X = 1; var WC = qC[0]; for(; X < pC.length; X++){ if(pC[X] != qC[X]) break; WC += '_' + pC[X]; } for(; X < pC.length; X++){ WC += '_' + pC[X]; var F = getElementById('i_' + WC); F.className = F.className.replace(/hilite/,'normal'); var VC = getElementById('m_' + WC); if(VC){ VC.style.display = "none"; var tJ = getElementById('f_' + WC); if(tJ){ tJ.style.display = "none"; } } else { break; } } } this.PC = YC; var VC = getElementById('m_' + YC); if(VC && VC.style.display == 'none'){ var VB = JD.parentNode; var v_win = this.sL(); VC.style.display = 'block'; VC.style.zIndex = VB.style.zIndex + 1; var DD = VC.offsetWidth; var ED = VC.offsetHeight; var c = this.tL(JD); var lL = c.left; var mL = c.top; c = this.tL(VB); var AD = c.left; var zC = c.top; var BD = VB.offsetWidth; var CD = VB.offsetHeight; var nL = v_win.scrollLeft; var oL = v_win.scrollTop; var pL = v_win.clientWidth; var qL = v_win.clientHeight; var tC,uC; var DK = getComputedStyle(JD,''); if(DK.display == 'inline'){ tC = lL; uC = mL + JD.offsetHeight; if(tC + DD > nL + pL){ tC = nL + pL - DD; } if(uC + ED > oL + qL){ if((qL - CD)/2 < zC - oL) uC = zC - ED; else uC = oL + qL - ED; } } else { tC = AD + VB.offsetWidth; uC = mL; if(tC + DD > nL + pL){ if((pL - BD)/2 < AD - nL) tC = AD - DD; else tC = nL + pL - DD; } if(uC + ED > oL + qL){ uC = oL + qL - ED; } } VC.style.left = tC < nL ? nL : tC; VC.style.top = uC < oL ? oL : uC; var tJ = getElementById('f_' + YC); if(tJ){ tJ.style.top = VC.offsetTop; tJ.style.left = VC.offsetLeft; tJ.style.width = VC.offsetWidth; tJ.style.height = VC.offsetHeight; tJ.style.zIndex = VC.style.zIndex - 1; tJ.style.display = 'block'; } } }; CMNU.prototype.rL = function(MB){ clearTimeout(this.QC); this.QC = null; if(MB && this.PC){ this.QC = setTimeout('SYS.GUI.MNU.obj(\''+ this.I + '\').hide()',500); } }; CMNU.prototype.HD = function(H){ if(H){ this.hide(); SYS.run(H); } }; CMNU.prototype.AF = function(eC){ var D = null; if(this.L && eC){ D = dat2xml({ img: { src:fullDir(SYS.ENV.ico,eC), align:'absbottom', width:this.L.wid, height:this.L.hei } }); } return D; }; CMNU.prototype.sH = function(fC){ if(this.SC){ fC = this.SC[fC]; } return fC || ''; }; CMNU.prototype.sL = function(){ var D = this.LD; if(!D || typeof D == 'string'){ D = getElementById(D) || document.body || document.getElementsByTagName('body')[0]; this.LD = D; } return D; }; CMNU.prototype.ID = function(HE){ if(HE >= this.LC.length){ HE = this.LC.length - 1; } var D = this.LC[HE]; for(var X = 1; X < arguments.length; X++){ D += '_' + arguments[X]; } return D; }; CMNU.prototype.tL = function (UB){ var D = {left: 0, top: 0}; var v_win = this.sL(); while (UB != null){ D.left += UB.offsetLeft; D.top += UB.offsetTop; UB = UB.offsetParent; if(UB == v_win) break; } return D; }; var APP = { pH: {}, init: function(H){ if(H){ SYS.sde(H.sde); delete H.sde; this.msg(H.msg); delete H.msg; this.set(H); } this.pH.app = this.pH.app ? this.pH.app : 'APP'; if(typeof(this.beg) == 'function'){ this.beg(); } if(typeof(this.run) == 'function'){ var LK = this; SYS.dep({cbf:function(){LK.run()}}); } }, get: function(AK,Z){ return getVar(this.pH,AK,Z); }, set: function(H){ setVar(this.pH,H); }, sts: function(p_msg){ if(p_msg != null){ window.status = p_msg; } }, msg: function(p_msg){ if(p_msg != null){ alert(p_msg); } }, etc: function(AK,P){ if(AK && P){ SYS.etc(AK,P,true); } }, lng: function(p_lng){ if(!p_lng) return false; var zG = SYS.sys('lng.usr') || []; if(p_lng != (SYS.cki('ETC','lng') || zG[0])){ for(var X in zG){ if(p_lng == zG[X]){ this.etc('lng',p_lng,true); break; } } } }, end: function(){ SYS.end(); }, dlg: function(H,p_win){ if(H){ H.tpl = 'dlg'; window.open(this.$url(H),p_win || 'APP_DLG', "width=640,height=460,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no" ); } }, win: function(FC,p_wid,p_hei){ window.open(FC,'APP_WIN', "location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=" + p_wid + ",height=" + p_hei ); }, prn: function(H){ if(H){ window.open(this.$url(H),"APP_PRN"); } }, gui: function(H){ if(CMNU && H.iid && H.dat){ var O = new CMNU({cls:H.cls,ico:H.ico}); O.draw({iid:H.iid,dat:H.dat}); } }, fmt: function(BH,MB,p_his){ return SYS.dtm.fmt(BH,MB,p_his); }, out: function(H,MB){ var NL = null; switch(H.toc){ case 'btn': NL = YF(H); break; case 'adv': NL = vL(H); break; case 'grp': NL = jC(H); break; case 'rel': NL = zL(H); break; case 'ols': NL = wL(H); break; case 'lst': case 'uls': NL = xL(H); break; case 'itm': case 'mix': case 'dls': NL = yL(H); break; case 'rol': NL = cM(H); break; case 'aux': NL = bM(H); break; case 'spc': NL = fM(H); break; } if(NL){ NL = H.cls ? {div: [{CLASS: H.cls},NL]} : NL; if(MB){ SYS.out(dat2xml(NL),H.elm); } } return NL; function YF(H){ var N = H ? H.dat : null; return !N ? null : { button: [{ title: N.tip, onclick: N.lnk },!N.ico ? null : { img: {src: N.ico,align:'absbottom'} },N.ttl] }; } function vL(H){ var D = []; H = H || {}; var N = H.dat || []; if(!(N instanceof Array)){ N = [N]; } for(var X in N){ var F = N[X]; if(!F.src) continue; if(D.length && H.spc){ D.push(fM()); } var CF = F.src; if(F.lnk){ CF = {a: [{href:F.lnk,target:'_blank'},CF]}; } D.push({ div: [{ CLASS: 'entry', title: F.ttl },CF] }); } return D.length ? D : null; } function wL(H){ var NL = []; var uL = H.fmt; var N = H.dat || []; for(var X in N){ var F = N[X]; var jL = AM(F,uL); if(!jL) continue; var a = F._at || {}; a.CLASS = a.CLASS ? 'entry ' + a.CLASS : 'entry'; NL.push({li: [a,jL]}); } return NL.length ? {ol:[{start:H.off},NL]} : null; } function xL(H){ var NL = []; var uL = H.fmt; var N = H.dat || []; for(var X in N){ var F = N[X]; var jL = AM(F,uL); if(!jL) continue; var a = F._at || {}; a.CLASS = a.CLASS ? 'entry ' + a.CLASS : 'entry'; NL.push({li: [a,jL]}); } return NL.length ? {ul:[null,NL]} : null; } function yL(H){ var NL = []; var uL = H.fmt; var N = H.dat || []; if(!(N instanceof Array)){ N = [N]; } for(var X in N){ var F = N[X]; var jL = AM(F,uL); if(!jL) continue; if(NL.length && H.spc){ NL.push(fM()); } var a = F._at || {}; a.CLASS = a.CLASS ? 'entry ' + a.CLASS : 'entry'; NL.push({div: [a,jL]}); } return NL.length ? NL : null; } function zL(H){ var D = null; if(H){ D = xL({dat:H.dat || H.lst,fmt:'Z'});; if(D){ var _C = DM(H.ttl,H.lnk); D = [dM(),_C,D,dM()]; } } return D; } function jC(H){ var D = []; var N = H ? H.dat : null; if(N){ for(var X in N){ var F = N[X]; var c = yL({dat: F.itm}); if(c){ if(D.length){ D.push(fM()); } var aC = F.lnk; if(aC){ D.push({ div: [{ CLASS: 'topic', onclick: aC, onmouseover: "this.className += ' hover';", onmouseout: "this.className=this.className.replace(/\\s*hover/,'');" },F.ttl] }); } else { D.push({ div: [{ CLASS: 'topic' },N.ttl] }); } D.push(c); var c = APP.out({toc:'rel',dat:F.rel,cls:'rlist'}); if(c){ D.push(c); } } } } return D.length ? D : null; } function bM(H){ var D = []; var N = H.dat; var NB = ''; for(var X in N){ var XH = []; var f = N[X]; var PB = f.val.split(/\r/); for(var WG in PB){ var ZH = $M('td',PB[WG]); if(ZH){ XH.push(ZH); } } if(XH.length){ if(D.length && H.spc){ D.push(fM()); } D.push({ table:[{CLASS:'table'},$M('th',f.hdr),XH] }); } } return D; function $M(p,WH){ var D = []; if(!WH.match(/^\s*$/)){ var MD = WH.split(/#/); for(var X in MD){ var aM = {}; aM[p] = [{CLASS:'col_' + X},MD[X]]; D.push(aM); } } return D.length ? {tr:[null,D]} : null; } } function cM(H){ var D = null; if(H.dat){ D = { marquee: [{ scrollamount: H.rol || 3, onmouseover: 'this.stop();', onmouseout: 'this.start();' },H.dat] }; } return D; } function fM(){ return {div:[{CLASS:'space'},'']}; } function AM(JD,kB,BM){ var D = []; var CM = null; kB = (kB || 'tdiac').split(''); for(var X in kB){ var $ = null; var vJ = kB[X]; if(vJ.match(/T|Z|I|F/)){ CM = (JD.abs || '').replace(/<[^>]*>/g,''); var XB = CM.length; if(XB > 80){ for(var X = 70; X < XB; X++){ if(CM.substr(X,1).match(/[\s\.,:;]/)){ CM = CM.substr(0,X) + '...'; break; } } } } switch(vJ.toLowerCase()){ case 't': case 'z': var _C = JD.ttl; if(_C){ if(vJ.match(/z/i)){ var $B = JD.dtm; _C += $B ? ' (' + $B + ')' : ''; } $ = DM(_C,JD.lnk,CM); } break; case 'd': $ = FM(JD.dtm); break; case 'f': case 'i': case 'j': if(JD.img || vJ.match(/f/i)){ $ = GM(JD.img || '/_ico/ico_spacer.gif',JD.des,JD.lnk,CM); } break; case 'a': $ = IM(JD.abs); break; case 'c': $ = JM(JD.cnt); break; } if($){ D.push($); } } if(D.length && BM){ D.push(dM()); } return D.length ? D : null; } function DM(fC,hC,EM){ var D = null; if(fC){ var a = {CLASS: 'title'}; if(hC){ a = { CLASS: 'title', title: EM, onclick : hC, onmouseover: "this.className += ' hover';", onmouseout: "this.className=this.className.replace(/\\s*hover/,'');" }; } D = {div: [a, fC]}; } return D; } function FM(BH){ var D = null; if(BH){ D = { div: [{ CLASS: 'pdate' }, BH] }; } return D; } function GM($H,HM,hC,EM){ var D = null; if($H){ var zE = {img: {src: $H,title: EM}}; if(HM){ D = { table: [hC ? { CLASS: 'image', onclick : hC, onmouseout: "this.className=this.className.replace(/\\s*hover/,'');", onmouseover: "this.className+=' hover'" } : {CLASS:'image'},{ tr: [null,{ td: [null,zE,{div: [{CLASS:'itext'},HM]}] }] }] }; } else { D = { div: [hC ? { CLASS: 'image', onclick : hC, onmouseout: "this.className=this.className.replace(/\\s*hover/,'');", onmouseover: "this.className+=' hover'" }: {CLASS: 'image'},zE] }; } } return D; } function IM(tE){ var D = null; if(tE){ D = { div: [{ CLASS: 'brief' },tE] }; } return D; } function JM(ZF){ var D = null; if(ZF){ D = { div: [{ CLASS: 'ctext' }, ZF] }; } return D; } function dM(){ return {div:[{CLASS:'clear'},'']}; } }, $url: function(H){ var GC = this.$qry(H); return this.get('cgi') + (GC ? '?' + GC : ''); }, $qry: function(H){ var D = ''; for(var b in H){ var PB = H[b]; if(PB){ D += (D ? '&' : '') + escape(b) + '=' + escape(PB); } } return D; } }; function CVAR(){ this.pH = {}; } CVAR.prototype.get = function(AK,Z){ return getVar(this.pH,AK,Z); }; CVAR.prototype.set = function(P){ setVar(this.pH,P); }; function getVar(OB,AK,Z){ var D = null; if(OB && typeof(OB) == 'object'){ D = OB; if(AK){ AK = AK.split('.'); for(var X = 0; D && X < AK.length; X++){ var b = AK[X]; var R = ''; if(b.match(/^([^\[]+)\[([^\]]*)\]/)){ b = RegExp.$1; R = RegExp.$2; } D = D[b]; if(D && R != ''){ D = D[R]; } } } } return D != null ? D : Z; }; function setVar(OB,P){ if(typeof(OB) == 'object'){ if(typeof(P) == 'function'){ P = new P(); } if(typeof(P) == 'object'){ for(var b in P){ if(b.match(/^\//)) continue; var PB = P[b]; if(PB && PB.toString() == '[object Object]'){ if(PB.length){ OB[b] = []; for(var X in PB){ var c = PB[X]; if(c && c.toString() == '[object Object]'){ OB[b][X] = {}; setVar(OB[b][X],c); } else { OB[b][X] = c; } } } else { if(!OB[b]){ OB[b] = {}; } setVar(OB[b],PB); } } else { OB[b] = PB; } } } } }; function fullDir(EC,FC){ return SYS.UTL.fullDir(EC,FC); }; function fullURL(FC){ return SYS.UTL.fullURL(FC); }; function parseURL(FC){ return SYS.UTL.parseURL(FC); }; 
