﻿function DOM(){}
DOM.D=document;
DOM.IE=navigator.appName.indexOf("Microsoft")!=-1;
DOM._E=function(t){
if(t==null||!Util.isString(t)||t.length==0){return null;}
var e=DOM.D.createElement(t),p,i=1;
for(;i<arguments.length;i++){
p=arguments[i];
if(p instanceof Array&&p.length>1){
if(typeof p[0]!="string"){p[0]=new String(p[0]);}
DOM._A(e,p[0],p[1]);}else if(typeof p=="string"){
e.appendChild(DOM._T(p));}else if(typeof p=="object"){
if(typeof p.nodeName=="string"){
try{e.appendChild(p);}catch(ex){}}else{
for(var j in p){DOM._A(e,j,p[j]);}}}}
return e;}
DOM._T=function(t){return DOM.D.createTextNode(t);}
DOM._A=function(e,n){
if(e==null||n==null){return;}
e=DOM.E(e);
if(Util.isString(n)&&arguments.length>2){
e.setAttribute(n,arguments[2]);}else if(n instanceof Array){
for(var i=0;i<n.length;i++){
if(n[i]instanceof Array&&n[i].length>1){
DOM._A(e,n[i][0],n[i][1]);}}}}
DOM.A=function(e,n){
if(e==null||n==null||!Util.isString(n)){return "";}
if(typeof e=="string"){e=DOM.E(e);}
var a=e.getAttribute(n);
return a!=null?a:"";}
DOM.bodyScroll=function(a){
var d=DOM.D,e;
if(typeof d.compatMode!='undefined'&&d.compatMode!='BackCompat'){
e=d.documentElement;}else if(typeof d.body!='undefined'){
e=d.body;}
if(e&&a){
if(a.left){e.scrollLeft=a.left;}
if(a.top){e.scrollTop=a.top;}}
return{left:e?e.scrollLeft:0,top:e?e.scrollTop:0};}
DOM.viewpos=function(e){
var i=e&&(e==window||e==DOM.D||!e.tagName)&&("innerHeight" in window),w=window,d=DOM.D.documentElement;
return{width:i?w.inenrWidth:d.offsetWidth,height:i?w.innerHeight:d.offsetHeight};}
DOM.E=function(id){return typeof id=="object"?id:DOM.D.getElementById(id);}
DOM.EwithA=function(a,v,n){
if(!n){node=DOM.D.body;}
var rs=[],r=new RegExp('\\b'+n+'\\b'),es=node.getElementsByTagName("*"),i=0,j=es.length,attr;
for(;i<j;i++){
attr=es[i].getAttribute(a);
if(attr&&attr.indexOf(v)>=0){rs.push(es[i]);}}
return rs;}
DOM.EPos=function(e,c){
var r=[0,0];
if(Util.isString(e)){e=DOM.E(e);}
if(e!=null){
if(c==null){c=DOM.D.body;}
do{
if(typeof e!="object"||e.offsetTop==null||e.offsetLeft==null||e==c){
break;}
r[0]+=e.offsetLeft;
r[1]+=e.offsetTop;}while((e=e.offsetParent)!=null);}
return r;}
DOM.isOver=function(pos,e){
if(e==null||!(pos instanceof Array)||pos.length<2){
return false;}
var sl=DOM.D.body.scrollLeft,
st=DOM.D.body.scrollTop,
p=[sl+e.offsetLeft,sl+e.offsetLeft+e.offsetWidth,
st+e.offsetTop,st+e.offsetTop+e.offsetHeight];
return(pos[0]>p[0]&&pos[0]<p[1])&&(pos[1]>p[2]&&pos[1]<p[3]);}
DOM.doNothing=function(){return false;}
DOM.setEHTML=function(id,h){
var e=typeof id=="string"?DOM.E(id):id;
if(e!=null){e.innerHTML=h;}}
DOM.scroll2E=function(e,c,ivo,twoBars){
e=DOM.E(e);
if(e==null){return;}
if(c==null){c=DOM.D.body;}
var i=c==DOM.D.body,p=DOM.EPos(e,c),
sp=i?DOM.bodyScroll():{left:c.scrollLeft,top:c.scrollTop};
if(twoBars&&(!ivo||(p[0]<sp.left||p[0]>sp.left+c.offsetWidth))){
if(i){
DOM.bodyScroll({left:p[0]});}else{
c.scrollLeft=p[0];}}
if(!ivo||(p[1]<sp.top||p[1]>sp.top+c.offsetHeight)){
if(i){
DOM.bodyScroll({top:p[1]});}else{
c.scrollTop=p[1];}}}
DOM.setDefaultPage=function(e,url){
e.style.behavior='url(#default#homepage)';
e.setHomePage(url);}
DOM.isDisplay=function(e){
e=DOM.E(e);
return e!=null&&e.style.display!="none";}
DOM.INLINE_ELEMENTS="a b button em i input select strong textarea u ";
DOM.setDisplay=function(e,v){
e=DOM.E(e);
if(e==null){return;}
if(arguments.length==1){v=e.style.display=="none";}
if(v){
if(typeof v!="string"){
var nn=e.nodeName.toLowerCase();
v=DOM.INLINE_ELEMENTS.indexOf(nn+" ")>=0?"inline":"block";}}else{
v="none";}
e.style.display=v;}
DOM.switchDisplay=function(e){
e=DOM.E(e);
if(e!=null){DOM.setDisplay(e,e.style.display=="none");}}
DOM.style=function(e,s,v){
e=DOM.E(e);
if(e==null){return null;}
if(arguments.length==2){return e.style[s];}
else{e.style[s]=v;}}
DOM.setStyle=function(e,s,v){
e=DOM.E(e);
if(e!=null){
try{
eval("e.style."+s+" = "+(typeof v=="string"?"'"+v+"'":v)+";");}catch(ee){alert("e.style."+s+" = "+(typeof v=="string"?"'"+v+"'":v)+";");}}}
DOM.switchVisible=function(e){
e=DOM.E(e);
if(e!=null){DOM.setVisible(e,e.style.visibility=="hidden");}}
DOM.setVisible=function(e,v){
e=DOM.E(e);
if(e!=null){
if(arguments.length==1){v=e.style.visibility=="hidden";}
e.style.visibility=v?"visible":"hidden";}}
DOM.objectDump=function(e,c){
if(e==null||typeof e!="object"){
return e;}
var s="["+(typeof e.nodeName=="string"?e.nodeName:""),j=0,i;
for(i in e){
try{
if(typeof e[i]=="object"){
s+=DOM.objectDump(e[i]);}else{
s+=" "+i+"=\"" + e[i] + "\"";}}catch(ex){
s+=" {"+i+"}";}
if(childs>0&&j>=c){
s+="...";
break;}}
return s+"]";}
var Flash={
classid:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
codebase:"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0",
dom:function(src,w,h,t,p){
var o=null;
if(DOM.IE&&false){
o=DOM._E("object");
DOM._A(o,p);
DOM._A(o,"classid",this.classid);
DOM._A(o,"codebase",this.codebase);
o.style.width=w;
o.style.height=h;
if(t){
o.appendChild(DOM._E("param",["name","wmode"],["value","transparent"]));}
o.appendChild(DOM._E("param",["name","Movie"],["value",src]));
o.appendChild(DOM._E("param",["name","Src"],["value",src]));
o.appendChild(DOM._E("param",["name","Menu"],["value","false"]));
o.appendChild(DOM._E("param",["name","Quality"],["value","high"]));}else{
o=DOM._E("embed",["src",src],["width",w],["height",h],["quality","high"],["pluginspage","http://www.macromedia.com/go/getflashplayer"],["type","application/x-shockwave-flash"]);
DOM._A(o,p);
if(t){
DOM._A(o,"wmode","transparent");}}
return o;},
html:function(src,w,h,t,p){
var h='<object classid="'+this.classid+'"\n'+
' codebase="'+this.codebase+'"\n'+
' style="width:'+w+'; height:'+h+'"'+(p?p:"")+'>\n';
if(t){h+='<param name="wmode" value="transparent"/>\n';}
h+='<param name="Movie" value="'+src+'"/>\n<param name="quality" value="high"/>\n'+
'<param name="Menu" value="false"/>\n'+
'<embed src="'+src+'" width="'+w+'" height="'+h+'" quality="high"'+
' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"';
if(t){h+=' wmode="transparent"';}
h+=(p?p:"")+'></embed></object>\n';
return h;}}
function Img(u,s,c){
if(typeof u=="string"){
this.url=u;
this.cls=c;
this.style=s;
this.alt=null;}else if(typeof u=="object"){
this.url=u.url;
this.cls=u.className;
this.style=url.style;
this.alt=u.alt;}
var i=this.url.lastIndexOf(".");
this.ext=(i>0?this.url.substring(i+1):"").toLowerCase();
this.isIEPNG=DOM.IE&&this.ext=="png";
this.toElement=function(){
var e=DOM._E("img");
e.src=(this.isIEPNG?Img.PNG_IE_SRC:this.url);
if(this.isIEPNG||this.style!=""){
e.style.cssText=(this.isIEPNG?'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+
this.url+');':'')+this.style;}
if(this.cls!=null){e.className=this.cls;}
if(this.alt!=null){e.alt=this.alt;}
return e;}
this.write=function(r){
var s='<img src="'+(this.isIEPNG?Img.PNG_IE_SRC:this.url)+'"';
if(this.isIEPNG||this.style!=""){
s+='" style="'+(this.isIEPNG?'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+
this.url+');':'')+this.style+'"';}
if(this.cls!=null){s+=' class="'+this.cls+'"';}
if(this.alt!=null){s+=' alt="'+this.alt.replace("\"", "'") + '"';}
s+="/>";
if(r){return s;}
DOM.D.write(s);}
this.load=function(){
var i=new Image();
if(this.w!=null){i.width=this.w;}
if(this.h!=null){i.height=this.h;}
if(this.cls!=null){i.className=this.cls;}
if(this.isIEPNG){
i.src=Img.PNG_IE_SRC;
i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+
this.url+")";}else{
i.src=this.url;}
return i;}}
Img.PNG_IE_SRC=(location.href.substring(0,4)=="http"?"/":"")+
"images/pixel.gif";
function HTML(){}
HTML.C=function(n,nu){
var v="",ck=DOM.D.cookie,p=ck.indexOf(n+"="),p2;
if(p>=0){
p+=n.length+1;
p2=ck.indexOf(";",p);
v=ck.substring(p,p2>0?p2:ck.length);}
return nu?v:unescape(v);}
HTML.Cs=function(n){
var cksN=DOM.D.cookie.split(";"),cks=[],k,v,p,i;
for(i=0;i<cksN.length;i++){
p=cksN[i].indexOf("=");
k=Util.trim(cksN[i].substring(0,p));
if(typeof n=="string"){
if(n!=k.substring(0,n.length)){continue;}
k=k.substring(n.length);}
v=unescape(cksN[i].substring(p+1));
cks[k]=v;}
return cks;}
HTML._C=function(n,v,t,dom,p,s){
var d=new Date();
if(t!=null){d.setTime(d.getTime()+parseFloat(t)*1000*60);}
DOM.D.cookie=n+"="+v+";expires="+d.toGMTString()+(dom?";domain="+dom:"")+(p?";path="+p:"")+(s?";secure":"");}
HTML.V=function(e){
e=DOM.E(e);
return e!=null&&typeof e.value=="string"?e.value:"";}
HTML._V=function(e,v){
e=DOM.E(e);
if(e!=null){e.value=v;}}
HTML.getRadioChecked=function(r){
if(typeof r=="string"){r=DOM.E(r);}
if(r!=null&&r.length==null){
return r.checked?r:null;}
if(r!=null&&r.length>0){
for(var i=0;i<r.length;i++){
if(r.item(i).checked){
return r.item(i);}}}
return null;}
HTML.getRadioCheckedValue=function(r){
r=HTML.getRadioChecked(r);
return r!=null?r.value:"";}
HTML.getSelectValue=function(s){
if(typeof s=="string"){s=DOM.E(s);}
if(s!=null&&s.options.length>0&&s.selectedIndex>=0){
return s.options[s.selectedIndex].value;}
return "";}
HTML.checkRadio=function(r,v){
if(r==null||r.length==0||v==null||v.length==0){return;}
for(var i=0;i<r.length;i++){
if(r.item(i).value==v){
r.item(i).checked=true;
break;}}}
HTML.checkSelect=function(s,v){
if(s==null||s.options.length==0||v==null||v.length==0){return;}
for(var i=0;i<s.length;i++){
if(s.options[i].value==v){
s.options[i].selected=true;
break;}}}
HTML.clearSelect=function(s,f){
f=parseInt(f);
if(isNaN(f)||f<0){f=0;}
if(s==null||s.options.length<=f){return;}
for(;s.options.length>f;){s.remove(f);}}
HTML.clearForm=function(f,ex){
f=DOM.E(f);
var e,i=0;
for(;i<f.elements.length;i++){
e=f.elements[i];
if(!e||(ex instanceof Array&&Util.find(ex,e))){continue;}
if((e.nodeName.toLowerCase()=="input"&&(e.type=="text"||e.type=="password"))||
e.nodeName.toLowerCase()=="textarea"){
e.value="";}}}
HTML.eventSource=function(e){
if(e==null){return null;}
return DOM.IE?e.srcElement:e.target;}
HTML.searchVar=function(t){
var qs=location.search,i=0,j,r=t=="array"?[]:"",k,v;
qs=qs.substring(1,qs.length)
if(qs.length==0){return false;}
qs=qs.split("&");
for(;qs.length;i++){
v=qs[i];
if(!v){break;}
j=v.indexOf("=");
k=qs[i].substring(0,j);
v=qs[i].substring(j+1,qs[i].length);
if(t==null){
r+="var "+k+'="'+v+'";';}else if(t=="array"){
r[k]=v;}}
return r;}
HTML.setBookmark=function(t,u){
if(window.sidebar){
window.sidebar.addPanel(t,u,"");}else if(window.external){
window.external.AddFevorite(t,u);}else if(window.opera&&window.print){
var e=DOM._E("a",{href:u,title:t,rel:"sidebar"});
e.click();}}
HTML.setClipboard=function(d){
var c=window.clipboardData;
if(c){c.setData("text",d);}
return c?true:false;}
HTML.onkeypress_numberOnly=function(e){
if(!e){
e=window.event;}
var c=e.keyCode;
return c==46||(c>=48&&c<=57);}
HTML.getScrollBarSize=function(o){
o=DOM.E(o);
if(o==null){return 0;}
var s=o.offsetWidth-o.clientWidth;
if(s==0){s=o.offsetHeight-o.clientHeight;}
return s;}
HTML.dragScroll=function(e,c,s){
var ec=DOM.E(c);
if(ec!=null&&ec.id==""){
ec.id="DragContainer"+Math.ceil(Math.random()*1000);}
e.dragContainerId=ec==null?"":ec.id;
e.dragSpeed=typeof s=="number"?s:1;
e.ondrag=function(){return false;}
e.onmousedown=function(evt){
evt=evt?evt:window.event;
if(evt.preventDefault){
evt.preventDefault();}
this.ox=evt.clientX;
this.oy=evt.clientY;
this.mouseDown=true;
this.style.cursor="move";}
e.onmousemove=function(e){
e=e?e:window.event;
if(this.mouseDown){
if(this.mouseDraging){
var s=this.dragSpeed,cid=this.dragContainerId,
c=cid?DOM.E(cid):DOM.D.documentElement;
c.scrollLeft+=(this.ox-e.clientX)*s;
c.scrollTop+=(this.oy-e.clientY)*s;
this.ox=e.clientX;
this.oy=e.clientY;}else{
this.mouseDraging=true;}}}
e.onmouseup=e.onmouseout=e.onmouseover=function(){
this.mouseDown=this.mouseDrag=false;
this.style.cursor="default";}}
HTML.addScript=function(s,e){
var a=DOM._E("script");a.src=s;
if(!e){e=DOM.D.getElementsByTagName("head")[0];}
e.insertBefore(a,e.firstChild);}
function Util(){}
Util.isEmpty=function(){
var o,i=0,a=arguments;
for(;i<a.length;i++){
o=a[i];
if(o==null){return true;}
if((Util.isString(o)||o instanceof Array)&&o.length==0){return true;}}
return false;}
Util.isString=function(){
var a=arguments,i=0;
for(;i<a.length;i++){
if(typeof a[i]!="string"){return false;}}
return true;}
Util.find=function(o,n){
if(Util.isEmpty(o)){
return !Util.isEmpty(n);}
var r,i;
if(typeof o=="string"){
r=o.indexOf(n);
return r>=0?r:false;}else if(o instanceof Array){
for(i in o){
if(o[i]==n){return i;}}}
return false;}
Util.getZeroDigit=function(n,d){
var r="",l=new String(n).length,i;
if(l<d){
for(i=l;i<d;i++){r+="0";}}
return r+n;}
Util.parseQueryString=function(q){
q=q.split("&");
var r=[],i=0;
for(;i<q.length;i++){
if(q[i].indexOf("=")>0){
q[i]=q[i].split("=");
r[q[i][0]]=q[i][1];}}
return r;}
Util.push=function(o,n){
if(n==null){return o;}
if(Util.isString(o)){return o+n;}
else if(o instanceof Array){
o[o.length]=n;
return o;}}
Util.replace=function(o,f,to){
if(Util.isString(o)){
return Util.strReplace(o,f,to);}else if(o instanceof Array){
for(var i in o){
if(i==f){o[i]=to;}}
return o;}}
Util.remove=function(o,v,t){
if(Util.isEmpty(o)||Util.isEmpty(v)){
return o;}
if(typeof t=="undefined"||t<1){t=1;}
var p,i;
if(typeof o=="string"){
if(typeof v!="string"){v=new String(v);}
while((p=o.indexOf(v))>=0&&t>=1){
o=(p>0?o.substring(0,p):"")+(p<o.length-v.length?o.substring(p+v.length):"");
t--;}}else if(o instanceof Array){
for(i in o){
if(t<1){continue;}
if(o[i]==v){delete o[i];}
t--;}}
return o;}
Util.replaceAll=function(o,frs){
if(!Util.isEmpty(frs)&&frs instanceof Array){
for(var i in frs){
if(typeof i=="function"){continue;}
o=Util.replace(o,i,frs[i]);}}
return o;}
Util.trim=function(o){
if(Util.isString(o)){
return Util.strTrim(o);}else if(o instanceof Array){
var begin=0,end=o.length,i;
for(i=0;i<end;i++){
if(o[i]!=null){
begin=i;
break;}}
for(i=end;i>=0;i--){
if(o[i]!=null){
end=i;
break;}}
return o.slice(begin,end);}}
Util.TRIMS=" \r\n\t";
Util.strTrim=function(s){
if(Util.isEmpty(s)||!Util.isString(s)){
return "";}
var begin=0,end=s.length,c,r,i;
for(i=0;i<end;i++){
c=s.charAt(i);
if(Util.TRIMS.indexOf(c)<0||i==end -1){
begin=i;
break;}}
for(i=s.length;i>=0;i--){
c=s.charAt(i);
if(Util.TRIMS.indexOf(c)<0){
end=i+1;
break;}else if(i==0){
end=i;}}
if(!(begin<end)){
r="";}else if(begin==0&&end==s.length){
r=s;}else{
r=s.substring(begin,end);}
return r;}
Util.strMask=function(s,m){
if(Util.isEmpty(s,m)){
return 0;}
var r=0,i;
for(i=0,j;i<s.length;i++){
if(m.indexOf(s.charAt(i))>=0){
r++;}}
return r;}
Util.strReplace=function(s,f,re){
if(Util.isEmpty(s,find)){return "";}
if(re==null){re="";}
if(f==re){return s;}
if(typeof String.prototype.replace=="function"){
while(s.indexOf(f)>=0){
s=s.replace(f,re);}
return s;}
var r="",p=-1,c;
for(c=0;c<s.length;c++){
if(f==s.substring(c,c+f.length)){
if(p<c){
r+=s.substring(p,c)+re;
p=c+f.length;}}}
return r+s.substring(p,s.length);}
function JSON(){}
JSON.toString=function(o){
var s,c,a,l,v,i;
switch(typeof o){
case "number":s=isFinite(o)?String(o):"null";break;
case "boolean":s=String(o);break;
case "string":
if(/["\\\x00-\x1f]/.test(this)){
s='"'+o.replace(/([\x00-\x1f\\"])/g,function(a,b){
c=m[b];
if(c){return c;}
c=b.charCodeAt();
return '\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}else{
s='"'+o+'"';}
break;
case "object":
if(o==null){
s="null";}else if(o instanceof Array){
a=[];
l=o.length;
for(i=0;i<l;i+=1){
a.push(JSON.toString(o[i]));}
s='['+a.join(',')+']';}else if(o instanceof Date){
function f(n){return n<10?'0'+n:n;}
s='"'+this.getFullYear()+'-'+f(this.getMonth()+1)+'-'+f(this.getDate())+'T'+
f(this.getHours())+':'+f(this.getMinutes())+':'+f(this.getSeconds())+'"';}else{
a=[];
for(i in o){
if(typeof i!="function"){
a.push(JSON.toString(i)+":"+JSON.toString(o[i]));}}
s='{'+a.join(',')+'}';}
break;
default:s=String(o);}
return s;}
var gno={
init:function(o){
if(typeof o!="object"||!this.hasChild(o)){
return;}
var os;
for(var i in o.__childs){
os=o.__childs[i];
os.__parent=o;
if(this.hasChild(os)){this.init(os);}}},
hasChild:function(o){
return o.__childs instanceof Array&&o.__childs.length>0;},
o:function(op){
if(typeof op!="object"||!op.o){
return null;}
var r=null,a,n,i;
switch(op.by){
case "attr":
for(i in op.o.__childs){
n=op.o.__childs[i];
if(op.a==n[op.n]){
r=n;
break;}}
break;
case "attrPath":
a=op.a;
if(typeof a=="string"){a=a.split("/");}
n=op.o;
for(i=0;i<a.length;i++){
if(a[i].length==0){continue;}
n=this.o({by:"attr",o:n,n:op.n,a:a[i]});
if(n==null){r=null;break;}}
r=n;
break;}
return r;},
a:function(op){
if(typeof op!="object"||!op.o){
return null;}
var r=null,n;
switch(op.from){
case "family":
n=op.o;
do{
if(n[op.n]){r=n[op.n];break;}
n=n.__parent;}while(n!=null);
break;}
return r;}};
﻿if(!Util){
document.write("<script language='JavaScript' src='/scms/js/util/Util.js'></script>");}
function XML(content,sync,onload,data){
this.path="";
this.request=null;
this.doc=null;
this.onload=onload;
this.onerror=null;
this.notified=false;
this.data=data;
this.planeText=false;
this.message="";
this.encode=null;
this.post=null;
this.load=function(path,sync,isPlaneText){
this.planeText=isPlaneText==true;
this.request=XML.createRequest();
if(XML.IE){
this.request.onreadystatechange=XMLLoader.notifyAll;}else if(document.implementation&&document.implementation.createDocument){
this.request.onload=XMLLoader.notifyAll;}
XMLLoader.add(this);
this.notified=false;
this.path=path;
this.request.open(this.post==null?"GET":"POST",path,!sync);
if(!XML.IE&&isPlaneText&&this.encode!=null){
this.request.overrideMimeType("text/html;charset="+this.encode);}
if(this.post!=null){
this.request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");}
try{
this.request.send(this.post==null?"":this.post);}catch(e){
this.message=e.message;
if(this.onerror!=null&&typeof this.onerror=="function"){
this.onerror();}}}
this.getDocumentElement=function(){
return XML.getElement(this.doc,0);}
this.toString=function(){
return this.path+"\n"+this.data;}
if(arguments.length>=2){
this.load(content,sync);}else if(arguments.length>=1){
this.doc=XML.loadXML(content);}}
XML.IE=navigator.appName.indexOf("Microsoft")!=-1;
XML.ACTIVEX_REQUEST=["Msxml2.XMLHTTP.5.0","Microsoft.XMLHTTP"];
XML.ACTIVEX_DOCUMENT="Microsoft.XMLDOM";
XML.DEFAULT_DOCUMENT=null;
XML.TYPE_ELEMENT=1;
XML.TYPE_ATTRIBUTE=2;
XML.TYPE_TEXT=3;
XML.TYPE_CDATA_SECTION=4;
XML.TYPE_ENTITY_REFRENCE=5;
XML.TYPE_ENTITY=6;
XML.TYPE_PROCESSING_INSTRUCTION=7;
XML.TYPE_COMMENT=8;
XML.TYPE_DOCUMENT=9;
XML.TYPE_DOCUMENT_TYPE=10;
XML.TYPE_DOCUMENT_FRAGMENT=11;
XML.TYPE_NOTATION=12;
XML.createRequest=function(){
if(XML.IE){
return new ActiveXObject(XML.ACTIVEX_REQUEST[
parseInt(navigator.appVersion.split(" ")[3])==6?0:1]);}else if(XMLHttpRequest){
return new XMLHttpRequest();}
return null;}
XML.createDocument=function(){
if(XML.IE){
return new ActiveXObject(XML.ACTIVEX_DOCUMENT);}else if(document.implementation&&document.implementation.createDocument){
return document.implementation.createDocument("","",null);}
return null;}
XML.load=function(p,a){
var x=new XML(),s=false,pl=false;
if(a){
if(typeof a.onload=="function"){
x.onload=a.onload;}
if(typeof a.post=="string"){
x.post=a.post;}
if(typeof a.sync=="boolean"){
s=a.sync;}
if(typeof a.plain=="boolean"){
pl=a.plain;}
if(typeof a.data!="undefined"){
x.data=a.data;}}
x.load(p,s,pl);
return x;}
XML.loadFile=function(p,a,f){
var x=new XML();
x.onload=f;
x.load(p,a,true);}
XML.loadXML=function(s){
var doc=null;
if(XML.IE){
doc=XML.createDocument();
doc.loadXML(s);}else{
doc=new DOMParser().parseFromString(s,"text/xml");}
return doc;}
XML.getDefaultDocument=function(){
var d=XML.DEFAULT_DOCUMENT;
if(d==null){
d=XML.DEFAULT_DOCUMENT=XML.createDocument();}
return d;}
XML.E=
XML.getElement=function(node,index,i2){
if(arguments.length<2||node==null){
return null;}
if(node instanceof XML){
node=node.doc;}
if(node==null||node.childNodes==null){
return null;}
var n,it,i,j;
if(typeof index=="number"){
if(index>node.childNodes.length){
index=0;}else if(index<0){
index=Math.floor(Math.random()*node.childNodes.length);}
for(i=0,j=0;i<node.childNodes.length;i++){
n=node.childNodes.item(i);
if(n.nodeType==1){
if(j==index){
return n;}else{
j++;}}}}else if(typeof index=="string"){
if(typeof i2!="number"||i2>node.childNodes.length){
i2=0;}else if(i2<0){
i2=Math.floor(Math.random()*node.childNodes.length);}
if(XML.IE){
return node.selectNodes(index)[i2];}else{
it=XML.iterator(node),j=0;
while(it.hasNext()){
n=it.next();
if(n.nodeName==index){
if(j==i2){
return n;}else{
j++;}}}}}
return null;}
XML.getElements=function(n,nn){
var r=[],i;
if(n==null){
return result;}
if(n instanceof XML){
n=n.doc;}
for(i=0;i<n.childNodes.length;i++){
if(n.childNodes.item(i).nodeType==1){
if(nn!=null&&nn.length>0){
if(n.childNodes.item(i).nodeName!=nn){
continue;}}
r.push(n.childNodes.item(i));}}
return r;}
XML.getNodeByAttr=function(node,nn,a){
if(node==null){
return null;}
if(node instanceof XML){
node=node.doc;}
var n=null;
for(var i=0;i<node.childNodes.length;i++){
if(a==XML.getAttr(node.childNodes.item(i),nn)){
n=node.childNodes.item(i);
break;}}
return n;}
XML.getNodeByAttrs=function(node,a){
if(node==null||a==null||typeof a!="object"){
return null;}
if(node instanceof XML){
node=node.doc;}
var ns=[],n,i,j;
for(var i=0;i<node.childNodes.length;i++){
n=node.childNodes.item(i);
if(n.nodeType==1){
ns.push(n);}}
for(i in a){
if(typeof a[i]=="function"){
continue;}
for(j=0;j<ns.length;j++){
if(a[i]!=XML.getAttr(ns[j],i)){
ns.splice(j--,1);}}}
return ns;}
XML.getNodeByAttrPath=function(node,nn,a){
if(typeof a=="string"){
a=a.split("/");}
var n=node instanceof XML?node.doc:node,i;
for(i=0;i<a.length;i++){
if(a[i].length==0){
continue;}
n=XML.getNodeByAttr(n,nn,a[i]);
if(n==null){
return null;}}
return n;}
XML.getNodeByAttrInTree=function(node,nn,a){
if(node==null){
return null;}
if(node instanceof XML){
node=node.doc;}
var n,nok,i;
for(i=0;i<node.childNodes.length;i++){
n=node.childNodes.item(i);
if(!XML.isElement(n)){
continue;}
if(XML.getAttr(n,nn)==a){
nok=n;
break;}
if(n.childNodes.length>0){
nok=XML.getNodeByAttrInTree(n,nn,a);
if(nok!=null){
break;}}}
return nok;}
XML.getNodesByTagName=function(node,t,limit){
if(node==null){
return null;}
if(node instanceof XML){
node=node.doc;}
if(!limit||limit<0||isNaN(parseInt(limit))){
limit=node.childNodes.length;}
var r=[],ns=node.childNodes,i;
for(i=0;i<ns.length&&r.length<limit;i++){
if(ns.item(i).nodeName==t){
r.push(ns.item(i));}}
return r;}
XML.hasNodeByTagName=function(n,t){
if(n==null){
return false;}
if(n instanceof XML){
n=n.doc;}
for(var i=0;i<n.childNodes.length;i++){
if(n.childNodes.item(i).nodeName==t){
return true;}}
return false;}
XML.getNodePosition=function(n){
if(n.parentNode==null){
return 0;}
if(n!=null&&node instanceof XML){
n=n.doc;}
for(var i=0;i<n.parent.childNodes.length;i++){
if(n.parent.childNodes.item(i)==n){
return i;}}}
XML.getNodeSameName=function(n,p){
var r=p?n.previousSibling:n.nextSibling;
while(r!=null&&r.nodeName!=n.nodeName){
r=p?n.previousSibling:n.nextSibling;}
return r;}
XML.getNodeSameNameFromEnd=function(n,f){
var r=f?n.parentNode.firstChild:n.parentNode.lastChild;
return XML.getNodeSameName(r,!f);}
XML.getNodeNameArray=function(n,noRoot){
var r=[],i=0;
if(n!=null&&n instanceof XML){
n=n.doc;}
while(n!=null){
if(noRoot&&!XML.isElement(n.parentNode)){
break;}
r[i++]=n.nodeName;
n=n.parentNode;}
if(r.length>1){
var t;
for(var i=0;i<r.length/2;i++){
t=r[i];
r[i]=r[r.length-1-i];
r[r.length-1-i]=t;}}
return r;}
XML.V=
XML.getNodeValue=function(n,childtag){
if(n==null||typeof n!="object"){
return "";}
if(n instanceof XML){
n=n.doc;}else if(n instanceof XMLIterator){
n=n.current();}
var ns,t=null;
if(childtag!=null&&typeof childtag=="string"&&childtag.length>0){
ns=XML.getNodesByTagName(n,childtag,1);
if(ns.length>0){
n=ns[0];}else{
n=null;}}
if(n!=null){
if(n.nodeValue!=null){
t=n.nodeValue;}else if(n.childNodes.item(0)!=null){
t=n.childNodes.item(0).nodeValue;}}
return t!=null?t:""}
XML.getNodeValues=function(node){
if(node==null){
return "";}
if(node instanceof XML){
node=node.doc;}else if(node instanceof XMLIterator){
node=node.current();}
var n,r="",i;
for(i=0;i<node.childNodes.length;i++){
n=node.childNodes.item(i);
if(n.nodeType==3){
r+=XML.getNodeValue(n);}}
return r;}
XML.getParent=function(n){
if(n!=null&&n instanceof XML){
n=n.doc;}
if(n!=null&&XML.isElement(n)&&XML.isElement(n.parentNode)){
return n.parentNode;}
return null;}
XML.getNodeFamily=function(n,noRoot){
if(n!=null&&n instanceof XML){
n=n.doc;}
var nodeP=null,r=[];
while(n!=null){
nodeP=XML.getParent(n);
if(noRoot&&!XML.isElement(nodeP)){
break;}
r.push(n);
n=nodeP;}
if(r.length>1){
var t;
for(var i=0;i<r.length/2;i++){
t=r[i];
r[i]=r[r.length-1-i];
r[r.length-1-i]=t;}}
return r;}
XML.createAttr=function(m,v){
var d=XML.getDefaultDocument(),a=d.createAttribute(m);
if(arguments.length>1&&v!=null){
if(XML.IE){
a.text=v;}else{
a.value=v;}}
return a;}
XML.getAttrTree=function(n,nn,s,noRoot){
if(n==null){
return "";}
var r=XML.getAttrArray(n,n,noRoot);
return s+r.join(s);}
XML.getAttrArray=function(n,nn,noRoot){
var r=XML.getNodeFamily(n,noRoot);
for(var i=0;i<r.length;i++){
r[i]=XML.getAttr(r[i],nn);}
return r;}
XML.A=
XML.getAttr=function(n,nn,allowNull){
if(n==null||Util.isEmpty(nn)){
return "";}
var v=null,a;
if(n instanceof XML){
n=n.doc;}
if(n instanceof XMLIterator){
n=n.current();}
if(n.attributes!=null&&typeof nn=="string"){
a=n.attributes.getNamedItem(nn);
if(a!=null){
v=XML.IE?a.text:a.value;}}
return v==null?(allowNull?null:""):v;}
XML.getAttrFromFamily=function(n,nn){
var v="";
do{
if(XML.hasAttr(n,nn,true)){
v=XML.getAttr(n,nn);
break;}
n=XML.getParent(n);}while(XML.isElement(n));
return v;}
XML.setAttr=function(n,nn,v){
if(n==null){
return;}
if(n instanceof XML){
n=n.doc;}
var a=null;
if(XML.hasAttr(n,nn)){
a=n.attributes.getNamedItem(nn);
if(XML.IE){
a.text=v;}else{
a.value=v;}}else{
a=XML.createAttr(nn,v);
n.attributes.setNamedItem(a);}}
XML.removeAttr=function(n,nn){
if(n!=null&&n instanceof XML){
n=n.doc;}
if(n!=null){
return n.attributes.removeNamedItem(nn);}
return null;}
XML.hasAttr=function(n,nn,notempty){
var v=XML.getAttr(n,nn,true);
return v==null?false:(notempty?v.length>0:true);}
XML.hasElementChild=function(node){
if(node==null){
return false;}
if(node instanceof XML){
node=node.doc;}
if(node.childNodes.length==0){
return false;}
var n=node.firstChild;
while(n!=null){
if(n.nodeType==1){
return true;}
n=n.nextSibling;}
return false;}
XML.PATTERN_HTML_SPACE=/\u00A0/g;
XML.toXML=function(node,op){
if(node==null){
return "";}else if(typeof node=="string"){
return node;}
if(node instanceof XML){
node=node.doc;}
if(typeof op!="object"||!(op instanceof XML.Option)||op==null){
var opn=new XML.Option();
opn.newlineAfterTag=op?true:false;
if(arguments.length>=3){
opn.withoutSelf=arguments[2];}
op=opn;}
var nno=node.nodeName,nn=nno.toLowerCase(),
isScript=nn=="script"||nn=="style",
v,nodeSub,
r="",a,
withoutSelf=op.withoutSelf,
c="";
if(op.xhtml){
v=nno.length==0?0:nno.charCodeAt(0);
if(v<65||(v>90&&v<97)||v>120){
return "";}}
op.withoutSelf=false;
if(!withoutSelf){
if(XML.isElement(node)){
r="<"+(op.xhtml?nn:nno);
for(var i=0;i<node.attributes.length;i++){
a=node.attributes.item(i);
v=a.nodeValue;
if(op.xhtml){
if(typeof v!="string"||Util.isEmpty(v)||
v=="inherit"||a.nodeName.indexOf("_moz")==0||(a.nodeName=="type"&&v=="_moz")||((nn=="img"||nn=="input")&&a.nodeName=="start"&&v=="fileopen")){
continue;}}
r+=" "+a.nodeName+'="'+XML.filterChar(v,false,"'")+'"';}
if(op.xhtml){
v=node.style==null?"":node.style.cssText;
if(v.length>0){
r+=' style="'+v+'"';}
if(nn=="td"){
r+=(node.rowSpan>1?' rowspan="'+node.rowSpan+'"':"")+(node.colSpan>1?' colspan="'+node.colSpan+'"':"")+(node.noWrap?' nowrap="nowrap"':"");}else if(nn=="img"){
r+=(node.hspace>0?' hspace="'+node.hspace+'\"':"")+(node.vspace>0?' vspace="'+node.vspace+'"':"");}
if(!XML.XHTML.hasChild(nn)){
r+="/";}}else if(node.childNodes.length==0){
r+="/";}
r+=">";
if(op.xhtml){
if(isScript){
r+="\n"+Util.strTrim(node.innerHTML);}}}else if(node.nodeType==7){
r+="<?"+nno+" "+node.nodeValue+"?>\n";}}
if(node.childNodes!=null){
for(var i=0;i<node.childNodes.length;i++){
nodeSub=node.childNodes.item(i);
switch(nodeSub.nodeType){
case 1:
v=XML.toXML(nodeSub,op);
break;
case 3:
v=XML.getNodeValue(nodeSub);
if(op.xhtml){
v=Util.strTrim(v).replace(XML.PATTERN_HTML_SPACE,"&nbsp;");}
break;
case 4:
v="<![CDATA["+XML.getNodeValue(nodeSub)+"]]>"+(op.newlineAfterTag?"\n":"");
break;
case 8:
v="<!--"+XML.getNodeValue(nodeSub)+"-->"+(op.newlineAfterTag?"\n":"");
break;}
c+=v;}}
if(op.xhtml&&!op.isXHTMLEmpty(nn)&&!isScript&&c.length==0&&node.childNodes.length==0){
c="&nbsp;";}
r+=c;
if(!withoutSelf){
if(XML.isElement(node)&&
node.childNodes.length>0&&
XML.isElement(node)||(op.xhtml&&XML.XHTML.hasChild(nn))){
r+="</"+(op.xhtml?nn:nno)+">";}}
if(op.newlineAfterTag&&op.hasXHTMLNewline(nn)){
r+="\n";}
return r;}
XML.getNodeDeep=function(node){
if(node!=null&&node instanceof XML){
node=node.doc;}
var i=0,p=node;
while(p!=null){
if(p.parentNode==null){
break;}
i++;
p=p.parentNode;}
return i;}
XML.getPreviousSibling=function(n,parentNodeOnly,incParent,returnParent){
if(n!=null&&n instanceof XML){
n=n.doc;}
if(n.parentNode==null||n.parentNode.nodeType!=1){
return incParent?n:null;}
var np=XML.getPreviousElementSibling(n);
if(np!=null){
return np;}else{
if(parentNodeOnly){
return incParent?n:null;}else if(returnParent){
return n.parentNode;}else{
return XML.getPreviousSibling(n.parentNode,parentNodeOnly,incParent,returnParent);}}}
XML.getNextSibling=function(n,parentNodeOnly,returnChild){
if(n!=null&&n instanceof XML){
n=n.doc;}
if(returnChild&&XML.hasElementChild(n)){
return XML.getElement(n,0);}
if(n.parentNode==null||n.parentNode.nodeType!=1){
return null;}
var nn=XML.getNextElementSibling(n);
if(nn!=null){
return nn;}else{
if(parentNodeOnly){
return null;}else{
return XML.getNextSibling(n.parentNode,parentNodeOnly,false);}}}
XML.getPreviousElementSibling=function(n){
if(n!=null&&n instanceof XML){
n=n.doc;}
n=n.previousSibling;
while(n!=null){
if(n.nodeType==1){
break;}
n=n.previousSibling;}
return n;}
XML.getNextElementSibling=function(n){
if(n!=null&&n instanceof XML){
n=n.doc;}
n=n.nextSibling;
while(n!=null){
if(n.nodeType==1){
break;}
n=n.nextSibling;}
return n;}
XML.isA=function(o,i){
try{
if(o.nodeType==i){
return true;}}catch(e){}
return false;}
XML.isComment=function(o){
return XML.isA(o,XML.TYPE_COMMENT);}
XML.isElement=function(o){
return XML.isA(o,XML.TYPE_ELEMENT);}
XML.isText=function(o){
return XML.isA(o,XML.TYPE_TEXT);}
XML.isParentNode=function(n,np){
if(n!=null&&n instanceof XML){
n=n.doc;}
while(n.parentNode!=null){
if(n.parentNode==np){
return true;}
n=n.parentNode;}
return false;}
XML.iterator=function(m){
return new XMLIterator(m);}
XML.removeComment=function(node,d){
if(node!=null&&node instanceof XML){
node=node.getDocumentElement();}
if(node==null){
return;}
var need,run,n=null,it=XML.iterator(node);
while(it.hasNext()){
n=it.current();
run=XML.isElement(n)&&d&&n.childNodes.length>0;
if(run){
XML.removeSpaceOnlyText(n,d);}
need=XML.isComment(n);
if(need){
it.remove();}else{
it.next();}}}
XML.removeSpaceOnlyText=function(node,d){
if(node!=null&&node instanceof XML){
node=node.getDocumentElement();}
if(node==null){
return;}
var need,run,n=null,it=XML.iterator(node);
while(it.hasNext(true)){
n=it.current();
run=XML.isElement(n)&&d&&n.childNodes.length>0;
if(run){
XML.removeSpaceOnlyText(n,d);}
need=XML.isText(n)&&Util.trim(XML.getNodeValue(n)).length==0;
if(need){
it.remove();}else{
it.next(true);}}}
XML.SPECIAL_CHARS={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&apos;",'"':"&quot;"};
XML.filterChar=function(s,d,kcs){
if(typeof s!="string"||s.length==0){
return "";}
for(var i in XML.SPECIAL_CHARS){
if(!Util.isEmpty(kcs)&&kcs.indexOf(i)>=0){
continue;}
s=s.replace(i,d?"":XML.SPECIAL_CHARS[i]);}
return s;}
XML.Option=function(xh,nat,ws){
this.xhtml=xh?true:false;
this.newlineAfterTag=nat?true:false;
this.withoutSelf=ws?true:false;
this.hasXHTMLNewline=function(nn){
if(this.xhtml){
return Util.find(XML.Option.newlineElements,nn)!==false;}
return true;}
this.isXHTMLEmpty=function(nn){
if(this.xhtml){
return Util.find(XML.Option.emptyElements,nn)!==false;}
return false;}
this.toString=function(){
return "XHTML: "+this.xhtml+
"\nWithoutSelf: "+this.withoutSelf+
"\nNewlineAfterTag: "+this.newlineAfterTag;}}
XML.Option.newlineElements="div p br td tr tbody table center object embed h1 h2 h3 h4 li ul dl dd form textarea script style".split(" ");
XML.Option.emptyElements="br hr img embed input link meta".split(" ");
XML.XHTML=function(){}
XML.XHTML.hasChild=function(nn){
if(typeof nn!="string"||nn.length==0){
return false;}
return Util.find(XML.Option.emptyElements,nn)===false;}
function XMLLoader(){}
XMLLoader.documents=new Array();
XMLLoader.onreadystatechange=function(){
XMLLoader.notifyAll();}
XMLLoader.add=function(x){
if(x instanceof XML){
XMLLoader.documents[XMLLoader.documents.length]=x;}}
XMLLoader.get=function(i){
if(arguments.length==0){
return XMLLoader.documents;}else if(i>=0&&i<XMLLoader.documents.length){
return XMLLoader.documents[i];}
return null;}
XMLLoader.remove=function(index){
if(typeof index=="number"){
var x=XMLLoader.documents[index];
if(Array.prototype.splice){
XMLLoader.documents.splice(index,1);}else{
XMLLoader.documents[index]=null;}
return x;}else if(typeof index=="object"&&index instanceof XML){
for(var i=0;i<XMLLoader.documents.length;i++){
if(XMLLoader.documents[i]==index){
return XMLLoader.remove(i);}}}
return null;}
XMLLoader.notifyAll=function(){
var x;
for(var i=0;i<XMLLoader.documents.length;i++){
x=XMLLoader.get(i);
if(x!=null&&x.request!=null&&!x.notified&&(x.request.readyState==4||x.request.onload!=null)){
XMLLoader.remove(i);
if(x.planeText){
if(XML.IE&&x.encode!=null){
x.doc=gb2utf8(x.request.responseBody);}else{
x.doc=x.request.responseText;}}else{
x.doc=x.request.responseXML;
if(x.doc==null||x.doc.childNodes.length==0){
x.doc=XML.loadXML(x.request.responseText);}}
if(x.onload!=null){
if(typeof x.onload=="function"){
x.onload(x.doc,x.data,x);}else{
if(typeof x.onload=="string"){
x.onload=document.getElementById(x.onload);}
try{
x.onload.innerHTML=x.request.responseText;}catch(e){}}}
x.notified=true;
return;}}}
function XMLIterator(n){
this.node=null;
this.nodes=null;
this.pos=-1;
this.init=function(n){
if(n!=null){
if(n instanceof XML){
n=n.getDocumentElement();}
this.node=n;}
this.nodes=n==null?null:n.childNodes;
this.pos=0;}
this.get=function(i){
if(isNaN(i)||i<0||i>=this.size()){
return null;}
return this.nodes.item(i);}
this.size=function(){
return this.nodes!=null?this.nodes.length:0;}
this.hasNext=function(itn){
var l=this.nodes==null?0:this.size();
return this.getNextPos(itn?true:false)<=l;}
this.getNextPos=function(itn){
var next=this.pos+1;
if(this.nodes!=null&&next<this.size()){
if(itn){
next;}else{
while(this.get(next)!=null&&XML.isText(this.get(next))){
next++;}}}
return next;}
this.current=function(itn){
var e=this.get(this.pos);
if(XML.isText(e)&&!itn){
this.pos=this.getNextPos();
e=this.pos>this.size()?null:this.get(this.pos);}
return e;}
this.next=function(itn){
var e=this.current();
this.pos=this.getNextPos(itn?true:false);
return e;}
this.remove=function(){
var e=this.current();
if(this.node!=null){
this.node.removeChild(e);}
return e;}
this.move=function(d){
if(typeof d!="number"){
d=parseInt(d);
if(isNaN(d)){
return;}}
this.pos+=d;
if(this.pos>=this.size()){
this.pos=this.size()-1;}
if(this.pos<0){
this.pos=0;}
return this.current(true);}
this.init(n);}
function gb2utf8(d){
if(!XML.IE){
return d;}
var rec=new ActiveXObject("ADODB.RecordSet"),v;
rec.Fields.Append("DDD",201,1);
rec.Open();
rec.AddNew();
rec(0).AppendChunk(d);
rec.Update();
v=rec(0).Value;
rec.Close();
return v;}
﻿function DateFormater(){}
DateFormater.DAY_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31];
DateFormater.ORDINAL_SUFFIX=["st","nd","rd","th"];
DateFormater.DAY_NAME_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
DateFormater.DAY_NAME_FULL=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
DateFormater.MONTH_NAME_SHORT=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Oct","Nov","Dec"];
DateFormater.MONTH_NAME_FULL=["January","February","March","April","May","June","July","August","September","October","November","December"];
DateFormater.format=function(d,f){
var s="";
if(f==null&&typeof d=="string"){
f=d;
d=new Date();}else{
if(d==null){
d=new Date();}
if(f==null||f.length==0){
f="Ymd";}}
var v;
for(var i=0;i<f.length;i++){
switch(f.charAt(i)){
case 'a':
case 'A':
v=d.getHours()>12?"AM":"PM";
s+=f.charAt(i)=='a'?v.toLowerCase():v;
break;
case 'B':
break;
case 'd':
s+=Util.getZeroDigit(d.getDate(),2);
break;
case 'D':
s+=DateFormater.DAY_NAME_SHORT[d.getDay()];
break;
case 'F':
s+=DateFormater.MONTH_NAME_FULL[d.getMonth()];
break;
case 'g':
v=d.getHours();
s+=v>12?v-12:v;
break;
case 'G':
s+=d.getHours();
break;
case 'h':
v=d.getHours();
s+=Util.getZeroDigit(v>12?v-12:v,2);
break;
case 'H':
s+=Util.getZeroDigit(d.getHours(),2);
break;
case 'i':
s+=Util.getZeroDigit(d.getMinutes(),2);
break;
case 'I':
break;
case 'j':
s+=d.getDate();
break;
case 'l':
s+=DateFormater.DAY_NAME_FULL[d.getDay()];
break;
case 'L':
s+=isLeapYear(d.getYear())?1:0;
break;
case 'm':
s+=Util.getZeroDigit(d.getMonth()+1,2);
break;
case 'M':
s+=DateFormater.MONTH_NAME_SHORT[d.getMonth()];
break;
case 'n':
s+=d.getMonth()+1;
break;
case 'O':
s+=d.getTimezoneOffset();
break;
case 'r':
s+=d;
break;
case 's':
s+=Util.getZeroDigit(d.getSeconds()+1,2);
break;
case 'S':
v=d.getDate();
s+=DateFormater.ORDINAL_SUFFIX[v<4?v-1:3];
break;
case 't':
s+=DateFormater.DAY_IN_MONTH[d.getMonth()];
break;
case 'T':
break;
case 'U':
s+=d.getTime();
break;
case 'w':
s+=d.getDay();
break;
case 'Y':
s+=d.getFullYear();
break;
case 'y':
s+=(String.valueOf(d.getFullYear()).substring(2));
break;
case 'z':
break;
case 'Z':
s+=d.getTimezoneOffset()*3600;
break;
default:
s+=f.charAt(i);}}
return s;}
DateFormater.isLeapYear=function(y){
return y%400==0||(y%4==0&&y%100!=0);}
DateFormater.parseTimestamp=function(s){
if(s==null||s.length==0){
return new Date();}
var ss=s.split(" "),d=ss[0].split("-"),t=ss[1].split(":");
return new Date(d[0],d[1]-1,d[2],
t[0],t[1],parseInt(t[2]),t[2]-parseInt(t[2]));}
function FormTip(f){
this.newline="<br/>";
this.form=f;
this.formElements=[];
if(f!=null){
var e;
for(var i=0;i<f.elements.length;i++){
e=f.elements[i];
this.formElements[e.name]=e;}}
this.fieldNames=[];
this.checkers=[];
this.eTips=[];
this.getChecker=function(fn){
return this.checkers[fn];}
this.setChecker=function(fn,name,eTip,fh){
if(!Util.isString(fn)){
return;}
var e=this.form[fn];
if(e==null){
return;}
e.onkeyup=e.onfocus=e.onblur=FormTip.check;
if(typeof fh=="function"){
this.checkers[fn]=fh;}
if(eTip!=null){
this.eTips[fn]=eTip;}
this.fieldNames[fn]=name;
e.onblur();}}
FormTip.instances=[];
FormTip.getInstance=function(f){
if(f!=null&&FormTip.instances[f]==null){
FormTip.instances[f]=new FormTip(f);}
return FormTip.instances[f];}
FormTip.check=function(){
if(typeof this.value=="undefined"){
return;}
var tip=FormTip.getInstance(this.form);
var fn=this.name;
var fh=tip.getChecker(fn);
var m="";
if(fh!=null){
m=fh(this);}else if(this.value.length==0){
m=tip.fieldNames[fn]+" must fill"+tip.newline;}
FormTip.tip(tip.eTips[fn],m);}
FormTip.tip=function(e,m){
e=DOM.E(e);
DOM.setEHTML(e,m);
e.className=m.length>0?"formTip_failed":"formTip_success";}
function FormMessage(){
this.msg=[];
this.errorFields=[];
this.count=0;
this.append=function(s,c,b){
if(s==null||(typeof s=="string"&&s.length==0)){
return;}
if(arguments.length>=2){
if(arguments.length==2){
b=c.value;}
if(this.checkAppendSkip(b)){
return;}
if(c!=null){
this.errorFields[this.count]=c;}}
this.msg[this.count]=s;
this.count++;}
this.checkAppendSkip=function(b){
return b==true||(typeof b=="number"&&b>0)||(typeof b=="string"&&b.length>0);}
this.focus=function(){
if(this.errorFields.length>0){
var c=this.errorFields[0];
if(c!=null){
if(c.length!=null){
c=c.item(0);}
try{
c.focus();}catch(e){}}}}
this.judgement=function(){
if(this.length()>0){
alert(this);
this.focus();
return false;}
return true;}
this.length=function(){
return this.msg.length;}
this.toString=function(){
return this.msg.join("\n");}}

