var code,version,platform,blurOnClick,dom,op,bw,IE4,IE5,IE6,NS5,NS6,NS7,bVer,bAgent,bMinor,bMajor,bDOM,bOpera,bIE,bGecko,bIe4,bIE4up,bIE5,bIE5up,bIE5_5,bIE5_5up,bIE6,bIE6_up,bMac;
var bInBlur,bObj;
var valid=new Object();
    valid.fZIP5 = /\d{5}(-\d{4})?/;
    valid.fZIP4 = /\d{4}(-\d{3})?/;
    valid.fFloat = /\d{1,3}(.\d{3})*\,\d{2}/;
    valid.fDate = /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/;
    valid.fTime = /^([1-9]|1[0-2]):[0-5]\d$/;
    valid.fEMail = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;
    valid.fIP = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
function getBrowseInf() { this.code='unknown'; this.version= 0; this.platform='Win'; this.blurOnClick=''; this.dom=(document.getElementById); this.op=(navigator.userAgent.indexOf("Opera")>-1); this.ie4=(document.all && !this.dom && !this.op); this.ie5=(document.all && this.dom && !this.op); this.ie6=(this.ie5); this.ns5=(!document.all && this.dom && !this.op); this.ns6=(this.ns5); this.ns7=(this.ns6); var ua=navigator.userAgent; var i=ua.indexOf('MSIE'); if (i>=0) { this.code='MSIE'; this.blurOnClick='onClick="this.blur();" '; this.version=parseFloat(ua.substring(i+5, i+9)); this.ie6=(this.code=='MSIE' && this.version==6); } else { i=ua.indexOf('Mozilla/'); if (i>=0) { this.code='NS'; this.version=parseFloat(ua.substring(i+8,i+12)); } this.ns7=(this.code=='NS' && this.version==7); } this.bw=(this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op); if (ua.indexOf('Mac')>=0) { this.platform='Mac'; } if (ua.indexOf('OS/2')>=0) { this.platform='OS/2'; } if (ua.indexOf('X11')>=0) { this.platform='UNIX'; } }
function Hover(obj,cls) { if (obj.id) { var oid=obj.id; var x=ie4?document.all[oid]:ns4?document[oid]:document.getElementById(oid); x.className=cls; } else { obj.className=cls; } return true; }
getBrowseInf();
function F(o) { if (!bInBlur) { bObj=o; } else { bFailObj=o; bObj.focus(); bInBlur=false; } return true; }
function B(o) { if (!bInBlur) { bInBlur=!C(o); } return true; }
function C(o) { var f,i; var r=true; var v=o.value; if (o.tag) { var tagList=o.tag.split(','); } else { var tagList="cOL,0,0".split(','); } if (tagList.length>2) { var bOpt=(tagList[0].substring(2,1)=='O'||parseInt(tagList[1])>0); if (!v&&!bOpt) { r=false; } if (v==''&&!bOpt) { r=false; } if (v!='') { f = parseInt(tagList[2]); if (f>0&&tagList.length>f+1) { for(i=1;i<=f;i++){ var cP=valid[tagList[i+2]]; r=r&&cP.test(v); } } } o.className=r?tagList[0]:bOpt?tagList[0].substring(2,1)=='O'?tagList[0]:tagList[0]+'e':tagList[0]+'e'; } return r; }
function FormVal(f)  { var gP=new Array(0,0,0,0,0,0,0,0,0,0); var gF=new Array(0,0,0,0,0,0,0,0,0,0); var j,r,f,v,i,g,fElem=f.elements; for (i=0;i<fElem.length;i++) { r=true; if (fElem[i].tag) { var tagList=fElem[i].tag.split(','); } else { var tagList="cOL,0,0".split(','); } g=parseInt(tagList[1]); v=fElem[i].value; if (!g) g=0; var bOpt=(tagList[0].substring(2,1)=='O'); if (!v&&!bOpt) { r=false; } if (v==''&&!bOpt) { r=false; } if (v!='') { f = parseInt(tagList[2]); if (f>0&&tagList.length>f+1) { for(j=1;j<=f;j++){ var cP=valid[tagList[j+2]]; r=r&&cP.test(v); } } } fElem[i].className=r?tagList[0]:bOpt?tagList[0].substring(2,1)=='O'?tagList[0]:tagList[0]+'e':tagList[0]+'e'; if (r) { gP[g]++; } else { gF[g]++; } } if (gF[0]!=0) { return false; } else { for (i=1;i<9;i++) { if ((gP[i]!=0)&&(gF[i]!=0)) { return false; } } } return true; }
function FormInit(f) { var fItm=f.elements; var i,r; for(i=0;i<fItm.length;i++){ r=C(fItm[i]); } }

