function fValConfig(){
this.code="alt";
this.emsg="emsg";
this.pattern="pattern";
this.errorClass="errHilite";
this.useSingleClassNames=false;
this.clearEvent="change";
this.eventOverride=false;
this.confirmMsg=fvalidate.i18n.config.confirmMsg;
this.confirmAbortMsg=fvalidate.i18n.config.confirmAbortMsg;
this.submitButton=["Submit","Submit2"];
this.resetButton="Reset";
this.ccType="Credit_Card_Type";
this.ccTypeObj="form1.Credit_Card_Type";
this.boxError="errors";
this.boxErrorPrefix="fv_error_";
}
if(typeof fvalidate=="undefined"){
var fvalidate=new Object();
}
fvalidate.addEvent=function(_1,_2,fn,_4){
if(typeof _1.attachEvent!="undefined"){
_1.attachEvent("on"+_2,fn);
}else{
if(typeof _1.attachEventListener!="undefined"){
_1.addEventListener(_2,fn,Boolean(_4));
}
}
};
fvalidate.addEvents=function(_5,_6,fn,_8){
var i=0,_a;
while(_a=_6[i++]){
this.addEvent(_5,_a,fn,Boolean(_8));
}
};
function validateForm(f,_c,_d,_e,_f,_10){
_c=Boolean(_c);
_d=Boolean(_d);
_e=Boolean(_e);
_f=Boolean(_f);
_10=(typeof _10!="undefined")?parseInt(_10,10):0;
var _11,_12,_13;
if(typeof f.fv=="undefined"){
f.fv=new fValidate(f,_10,_f);
}else{
f.fv._reset();
f.fv.errorMode=_10;
}
var _14,i=0,_16=f.fv.config.code;
while(_14=f.elements[i++]){
if(_14.nodeName=="FIELDSET"){
continue;
}
_12=(_14[_16])?_14[_16]:_14.getAttribute(_16);
if(!(typeof _12=="undefined"||_12==null||_12=="")){
_11=_12.split("|");
_13=_11[0];
_14.validated=true;
if(typeof f.fv[_13]=="undefined"){
f.fv.devError([_13,_14.name],"notFound");
return false;
}
switch(_11.last()){
case "bok":
_11=_11.reduce(1,1);
_14.bok=true;
break;
case "if":
_11=_11.reduce(1,1);
_14._if_=true;
break;
case "then":
_11=_11.reduce(1,1);
_14._then_=true;
break;
default:
_11=_11.reduce(1,0);
}
if(/radio|checkbox/.test(_14.type)){
_14.group=f.elements[_14.name];
}
if(typeof _14.fName=="undefined"){
if(typeof _14.group!="undefined"){
for(var j=0;j<_14.group.length;j++){
if(f.fv.config.clearEvent!=null){
addEvent(_14.group.item(j),f.fv.config.clearEvent,f.fv,"revertError",false);
}
}
}else{
addEvent(_14,f.fv.config.clearEvent,f.fv,"revertError",false);
}
}
_14.fName=_14.name.format();
f.fv.elem=_14;
f.fv.type=_13;
var _18=new Function("obj","method","obj[method]( "+_11.toArgString()+" );");
_18(f.fv,_13);
if(_14.validated==false&&_f==false){
return false;
}
if(_14.validated==true){
f.fv.revertError();
}
}
}
if(_f){
f.fv.showGroupError();
}
if(f.fv.errors.length>0){
return false;
}
if(_c&&!confirm(f.fv.config.confirmMsg)){
if(f.fv.config.confirmAbortMsg!=""){
alert(f.fv.config.confirmAbortMsg);
}
return false;
}
if(_d){
if(typeof f.fv.config.submitButton=="object"){
var sb,j=0;
while(sb=f.fv.config.submitButton[j++]){
if(f.fv.elementExists(sb)){
f.elements[sb].disabled=true;
}
}
}else{
if(f.fv.elementExists(f.fv.config.submitButton)){
f.elements[f.fv.config.submitButton].disabled=true;
}
}
}
if(_e&&f.fv.elementExists(f.fv.config.resetButton)){
f.elements[f.fv.config.resetButton].disabled=true;
}
return true;
function addEvent(_1a,evt,obj,_1d,_1e){
var _1f=_1a;
if(typeof _1a.attachEvent!="undefined"){
_1a.attachEvent("on"+evt,function(){
obj[_1d](_1f);
});
}else{
if(typeof _1a.addEventListener!="undefined"){
_1a.addEventListener(evt,function(){
obj[_1d](_1f);
},_1e);
}else{
if(f.fv.config.eventOverride){
eleme["on"+evt]=function(){
obj[_1d](_1f);
};
}
}
}
}
}
function fValidate(f,_21,_22){
var _23=this;
this.form=f;
this.errorMode=_21;
this.groupError=_22;
this.errors=new Array();
this.validated=true;
this.config=new fValConfig();
this.i18n=fvalidate.i18n;
f.onreset=function(){
var _24,i=0;
while(_24=this.elements[i++]){
_23.revertError(_24);
}
};
addLabelProperties();
function addLabelProperties(){
if(typeof f.getElementsByTagName=="undefined"){
return;
}
var _26=f.getElementsByTagName("label");
var _27,i=j=0;
var _29;
while(_27=_26[i++]){
if(typeof _27.htmlFor=="undefined"){
return;
}
_29=f.elements[_27.htmlFor];
if(typeof _29=="undefined"){
_23.devError([_27.htmlFor],"noLabel");
}else{
if(typeof _29.label!="undefined"){
continue;
}else{
if(typeof _29.length!="undefined"&&_29.length>1&&_29.nodeName!="SELECT"){
for(j=0;j<_29.length;j++){
_29.item(j).label=_27;
}
}
}
}
_29.label=_27;
}
}
}
fValidate.prototype._reset=function(){
this.errors=new Array();
this.showErrors=new Array();
};
fValidate.prototype.elementExists=function(_2a){
return Boolean(typeof this.form.elements[_2a]!="undefined");
};
fValidate.prototype.throwError=function(_2b,_2c){
var _2d=this.elem;
if(typeof _2d.name=="undefined"){
_2d=_2d[0];
}
if(_2d.bok&&this.isBlank()){
_2d.validated=true;
return;
}
if(_2d.cv){
return;
}
_2d.validated=false;
_2c=this.setArg(_2c,0);
_2b=this.setArg(_2b,[]);
emsgElem=(typeof this.elem.getAttribute=="undefined")?this.elem[0]:this.elem;
if(emsgElem.getAttribute(this.config.emsg)){
var _2e=emsgElem.getAttribute(this.config.emsg);
}
var _2e=this.translateMessage(_2b,this.i18n.errors[this.type][_2c]);
if(this.groupError){
this.errors.push({"elem":_2d,"msg":_2e});
}else{
this.showError(_2e,false,emsgElem);
var _2f=(typeof _2d.fields!="undefined")?_2d.fields[0]:_2d;
this.selectFocus(_2f);
}
};
fValidate.prototype.showError=function(_30,_31,_32){
var _33=this,_32=this.setArg(_32,this.elem),_34=Boolean(_32.type=="hidden"),_35=(_34)?null:_32.label||null,_30=(_32.getAttribute(this.config.emsg))?_32.getAttribute(this.config.emsg).replace(/\\n/g,"\n"):_30,_36=this.config.errorClass,_37=this.config.useSingleClassNames;
if(typeof this.showErrors=="undefined"){
this.showErrors=new Array();
}
switch(this.errorMode){
case 0:
alertError();
break;
case 1:
inputError();
break;
case 2:
labelError();
break;
case 3:
appendError();
break;
case 4:
boxError();
break;
case 5:
inputError();
labelError();
break;
case 6:
inputError();
appendError();
break;
case 7:
inputError();
boxError();
break;
case 8:
inputError();
alertError();
break;
case 9:
labelError();
appendError();
break;
case 10:
labelError();
boxError();
break;
case 11:
labelError();
alertError();
break;
case 12:
appendError();
boxError();
break;
case 13:
appendError();
alertError();
break;
case 14:
boxError();
alertError();
break;
case 15:
inputError();
labelError();
appendError();
break;
case 16:
inputError();
labelError();
boxError();
break;
case 17:
inputError();
labelError();
alertError();
break;
case 18:
inputError();
appendError();
boxError();
break;
case 19:
inputError();
appendError();
alertError();
break;
case 20:
inputError();
boxError();
alertError();
break;
case 21:
labelError();
appendError();
boxError();
break;
case 22:
labelError();
appendError();
alertError();
break;
case 23:
appendError();
boxError();
alertError();
break;
case 24:
inputError();
labelError();
appendError();
boxError();
break;
case 25:
inputError();
labelError();
appendError();
alertError();
break;
case 26:
inputError();
appendError();
boxError();
alertError();
break;
case 27:
labelError();
appendError();
boxError();
alertError();
break;
case 28:
inputError();
labelError();
appendError();
boxError();
alertError();
break;
}
function alertError(){
if(_33.groupError){
_33.showErrors.push(_30);
}else{
alert(_30);
}
if(_31){
alert(_33.i18n.groupAlert+_33.showErrors.join("\n\n- "));
}
}
function inputError(){
if((typeof _32.length!="undefined"&&_32.length>1&&_32.nodeName!="SELECT")||_34){
var _38,i=0;
while(_38=(_34)?_32.fields[i++]:_32.item(i++)){
if(_38.className!=""&&_37){
_38.revertClass=_38.className;
_38.className=_36;
}else{
_33.addCSSClass(_38,_36);
}
}
}else{
if(_37){
_32.revertClass=_32.className;
_32.className=_36;
}else{
_33.addCSSClass(_32,_36);
}
}
}
function labelError(){
if(_35==null){
return;
}
if(_33.config.useSingleClassNames){
_35.className=_36;
}else{
_33.addCSSClass(_35,_36);
}
}
function appendError(){
if(_35==null||typeof _35.innerHTML=="undefined"){
return;
}
if(typeof _35.original=="undefined"){
_35.original=_35.innerHTML;
}
_35.innerHTML=_35.original+" - "+_30.toHTML();
}
function boxError(){
if(typeof _33.boxError=="undefined"){
_33.boxError=document.getElementById(_33.config.boxError);
}
if(_33.boxError==null){
_33.devError([_33.config.boxError],"noBox");
return;
}
if(typeof _33.elem.name=="undefined"||_33.elem.name==""){
_33.devError([_33.elem[_33.config.code]],"missingName");
return;
}
var _3a=_33.config.boxErrorPrefix+_33.elem.name,_3b;
if(_3b=document.getElementById(_3a)){
_3b.firstChild.nodeValue=_30.toHTML();
}else{
_3b=document.createHTMLElement("li",{id:_3a,"innerHTML":_30.toHTML(),title:_33.i18n.boxToolTip});
_33.boxError.appendChild(_3b);
_3b.onclick=function(){
var _3c=_33.form.elements[this.id.replace(_33.config.boxErrorPrefix,"")];
if(typeof _3c.fields!="undefined"){
_3c=_3c.fields[0];
}
if(typeof _3c.select!="undefined"){
_3c.select();
}
if(typeof _3c.focus!="undefined"){
_3c.focus();
}
};
}
_33.boxError.style.display="block";
}
};
fValidate.prototype.removeCSSClass=function(_3d,_3e){
_3d.className=_3d.className.replace(_3e,"").trim();
};
fValidate.prototype.addCSSClass=function(_3f,_40){
this.removeCSSClass(_3f,_40);
_3f.className=(_3f.className+" "+_40).trim();
};
fValidate.prototype.showGroupError=function(){
for(var _41,_42,i=0;(_41=this.errors[i]);i++){
if(i==0){
_42=_41.elem;
}
this.elem=_41.elem;
this.showError(_41.msg,Boolean(i==(this.errors.length-1)));
}
var _44=(typeof _42.fields!="undefined")?_42.fields[0]:_42;
this.selectFocus(_44);
};
fValidate.prototype.revertError=function(_45){
_45=this.setArg(_45,this.elem);
var _46=Boolean(_45.type=="hidden"),_47=this.config.errorClass,i=0,_49,_4a;
if((typeof _45.length!="undefined"&&_45.length>1&&_45.nodeName!="SELECT")||_46){
if(_46&&typeof _45.fields!="undefined"){
while(_4a=(_46)?_45.fields[i++]:_45.item(i++)){
if(typeof _4a.revertClass!="undefined"){
_4a.className=_4a.revertClass;
}
}
}
}else{
if(this.config.useSingleClassNames){
if(typeof subElement.revertClass!="undefined"){
_45.className=_45.revertClass;
}
}else{
this.removeCSSClass(_45,_47);
}
}
if(typeof _45.label!="undefined"){
if(this.config.useSingleClassNames){
_45.label.className="";
}else{
this.removeCSSClass(_45.label,_47);
}
_45.label.innerHTML=(_45.label.original||_45.label.innerHTML);
}
if(typeof this.boxError!="undefined"){
if(typeof this.boxError.normalize!="undefined"){
this.boxError.normalize();
}
if(_49=document.getElementById(this.config.boxErrorPrefix+_45.name)){
this.boxError.removeChild(_49);
}
if(this.boxError.childNodes.length==0){
this.boxError.style.display="none";
}
}
};
fValidate.prototype.selectFocus=function(_4b){
if(typeof _4b.select!="undefined"){
_4b.select();
}
if(typeof _4b.focus!="undefined"){
_4b.focus();
}
};
fValidate.prototype.typeMismatch=function(){
var _4c={"text":"text|password|textarea","ta":"textarea","hidden":"hidden","s1":"select-one","sm":"select-multiple","select":"select-one|select-multiple","rg":"radio","radio":"radio","cb":"checkbox","file":"file"};
var _4d=false,_4e=new Array(),_4f=key=type=regex="";
for(var i=0;i<arguments.length;i++){
type=_4c[arguments[i]];
regex=new RegExp(type);
_4f+=(regex.test(this.elem.type))?"1":"0";
key+="0";
_4e.push(type);
}
if(key^_4f==0){
this.devError([this.elem.fName,this.elem.type,_4e.join("|").replace(/\|/g,this.i18n.or)],"mismatch");
this.elem.validated=false;
return true;
}
return false;
};
fValidate.prototype.getValue=function(_51){
switch(_51.type){
case "text":
case "password":
case "textarea":
case "hidden":
case "file":
return _51.value;
case "radio":
case "select-single":
if(typeof _51.length=="undefined"){
return _51.value;
}else{
for(var i=0;i<_51.length;i++){
choice=(_51.type=="radio")?"checked":"selected";
if(_51[i][choice]){
return _51[i].value;
}
}
}
case "select-multiple":
case "checkbox":
if(typeof _51.length=="undefined"){
return _51.value;
}else{
var _53=new Array();
for(var i=0;i<_51.length;i++){
choice=(_51.type=="checkbox")?"checked":"selected";
if(_51[i][choice]){
_53.push(_51[i].value);
}
}
return _53;
}
default:
return null;
}
};
fValidate.prototype.setArg=function(arg,def){
return (typeof arg=="undefined"||arg==""||arg==null)?def:arg;
};
fValidate.prototype.isBlank=function(el){
var _57=this.form.elements[el]||this.elem;
return Boolean(/^\s*$/.test(_57.value));
};
fValidate.prototype.translateMessage=function(_58,_59){
var msg="";
for(var i=0;i<_59.length;i++){
msg+=(typeof _59[i]=="number")?_58[_59[i]]:_59[i];
}
return msg;
};
fValidate.prototype.devError=function(_5c,_5d){
if(typeof _5c=="string"){
_5d=_5c;
_5c=[];
}
_5d=this.setArg(_5d,this.type);
var _5e=this.i18n.devErrors[_5d];
var a=[this.i18n.devErrors.lines[0],"----------------------------------------------------------------------------------------------",this.translateMessage(_5c,_5e),"----------------------------------------------------------------------------------------------",this.i18n.devErrors.lines[1]];
alert(a.join("\n"));
};
fValidate.prototype.paramError=function(_60,_61){
_61=this.setArg(_61,this.elem.name);
this.devError([_60,this.type,_61],"paramError");
};
document.createHTMLElement=function(_62,_63){
if(typeof document.createElement=="undefined"){
return;
}
var _64=document.createElement(_62);
if(typeof _63!="undefined"){
for(var i in _63){
switch(true){
case (i=="text"):
_64.appendChild(document.createTextNode(_63[i]));
break;
case (i=="class"):
_64.className=_63[i];
break;
default:
_64.setAttribute(i,"");
_64[i]=_63[i];
}
}
}
return _64;
};
Array.prototype.reduce=function(b,e){
var a=new Array();
var _69=0;
for(var i=b;i<this.length-e;i++){
a[_69++]=this[i];
}
return a;
};
Array.prototype.toArgString=function(){
var a=new Array();
for(var i=0;i<this.length;i++){
a.push("'"+this[i]+"'");
}
return a.toString();
};
if(typeof Array.push=="undefined"){
Array.prototype.push=function(){
var arg,i=0;
while(arg=arguments[i++]){
this[this.length]=arg;
}
return this.length;
};
}
Array.prototype.last=function(){
return this[this.length-1];
};
String.prototype.format=function(){
return this.replace(/\_/g," ").replace(/\[|\]/g,"");
};
String.prototype.toHTML=function(){
return this.replace(/\n/g,"<br />").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;");
};
String.prototype.trim=function(){
return this.replace(/^\s+|\s+$/,"");
};
String.prototype.toPattern=function(){
return this.replace(/([\.\*\+\{\}\(\)\<\>\^\$\\])/g,"\\$1");
};
fValidate.prototype.select=function(){
if(this.typeMismatch("s1")){
return;
}
if(this.elem.selectedIndex==0){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.selectm=function(_6f,_70){
if(this.typeMismatch("sm")){
return;
}
if(typeof _6f=="undefined"){
this.paramError("minS");
}
if(_70==999||_70=="*"||typeof _70=="undefined"||_70>this.elem.length){
_70=this.elem.length;
}
var _71=0;
for(var opt,i=0;(opt=this.elem.options[i]);i++){
if(opt.selected){
_71++;
}
}
if(_71<_6f||_71>_70){
this.throwError([_6f,_70,this.elem.fName,_71]);
}
};
fValidate.prototype.selecti=function(_74){
if(this.typeMismatch("s1")){
return;
}
if(typeof _74=="undefined"){
this.paramError("indexes");
return;
}
_74=_74.split(",");
var _75=true;
for(var i=0;i<_74.length;i++){
if(this.elem.options[_74[i]].selected){
_75=false;
break;
}
}
if(!_75){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.checkbox=function(_77,_78){
if(this.typeMismatch("cb")){
return;
}
if(typeof _77=="undefined"){
this.paramError("minC");
return;
}
if(this.elem==this.form.elements[this.elem.name]&&!this.elem.checked){
this.throwError([this.elem.fName]);
}else{
this.elem=this.form.elements[this.elem.name];
var len=this.elem.length;
var _7a=0;
if(_78==999||_78=="*"||typeof _78=="undefined"||_78>this.elem.length){
_78==len;
}
var i=len;
while(i-->0){
if(this.elem[i].checked){
_7a++;
}
}
if(_7a<_77||_7a>_78){
this.throwError([_77,_78,this.elem[0].fName,_7a]);
}
}
};
fValidate.prototype.radio=function(){
if(this.typeMismatch("rg")){
return;
}
if(this.elem==this.form.elements[this.elem.name]&&!this.elem.checked){
this.throwError([this.elem.fName]);
}else{
this.elem=this.form.elements[this.elem.name];
for(var i=0;i<this.elem.length;i++){
if(this.elem.item(i).checked){
return;
}
}
this.throwError([this.elem[0].fName]);
}
};
fValidate.prototype.file=function(_7d,_7e){
if(this.typeMismatch("file")){
return;
}
if(typeof _7d=="undefined"){
this.paramError("extensions");
return;
}
_7e=Boolean(_7e)?"":"i";
var _7f=new RegExp("^.+\\.("+_7d.replace(/,/g,"|")+")$",_7e);
if(!_7f.test(this.elem.value)){
this.throwError([_7d.replace(/,/g,"\n")]);
}
};
if(typeof fvalidate=="undefined"){
var fvalidate=new Object();
}
fvalidate.i18n={errors:{blank:[["Please enter ",0]],length:[[0," must be at least ",1," characters long"],[0," must be no more than ",1," characters long.\nThe current text is ",2," characters long."]],equalto:[[0," must be equal to ",1]],number:[["The number you entered for ",0," is not valid"]],numeric:[["Only numeric values are valid for the ",0],["A minimum of ",0," numeric values are required for the ",1]],alnum:[["The data you entered, \"",0,"\", does not match the requested format for ",1,"\nMinimum Length: ",2,"\nCase: ",3,"\nNumbers allowed: ",4,"\nSpaces allowed: ",5,"\nPunctuation characters allowed: ",6,"\n"]],decimal:[["The data you entered,",0," is not valid.  Please re-enter the ",1]],decimalr:[[0," is not a valid. Please re-enter."]],ip:[["Please enter a valid IP"],["The port number you specified, ",0,",  is out of range.\nIt must be between ",1," and ",2]],ssn:[["You need to enter a valid Social Security Number.\nYour SSN must be entered in 'XXX-XX-XXXX' format."]],money:[[0," does not match the required format of ",1]],cc:[["The ",0," you entered is not valid. Please check again and re-enter."]],ccDate:[["You credit card has expired! Please use a different card."]],zip:[["Please enter a valid 5 or 9 digit Zip code."]],phone:[["Please enter a valid phone number plus Area Code."],["Please enter a valid phone number - seven or ten digits."]],email:[["Please enter a valid email address"]],url:[[0," is not a valid domain"]],date:[["The data entered for ",0," is not a valid date\nPlease enter a date using the following format: ",1],["Date must be before ",0],["Date must be on or before ",0],["Date must be after ",0],["Date must be on or after ",0]],select:[["Please select a valid option for ",0]],selectm:[["Please select between ",0," and ",1," options for ",2,".\nYou currently have ",3," selected"]],selecti:[["Please select a valid option for ",0]],checkbox:[["Please check ",0," before continuing"],["Please select between ",0," and ",1," options for ",2,".\nYou currently have ",3," selected"]],radio:[["Please check ",0," before continuing"],["Please select an option for ",0]],comparison:[[0," must be ",1," ",2]],eitheror:[["One and only one of the following fields must be entered:\n\t-",0,"\n"]],atleast:[["At least ",0," of the following fields must be entered:\n\t-",1,"\n\nYou have only ",2," filled in.\n"]],allornone:[["All or none of the following fields must be entered and accurate:\n\t-",0,"\nYou have only ",1," accurate field entered.\n"]],file:[["The file must be one of the following types:\n",0,"\nNote: File extension may be case-sensitive."]],custom:[[0," is invalid."]],cazip:[["Please enter a valid postal code."]],ukpost:[["Please enter a valid postcode."]],germanpost:[["Please enter a valid postcode."]],swisspost:[["Please enter a valid postcode."]]},comparison:{gt:"greater than",lt:"less than",gte:"greater than or equal to",lte:"less than or equal to",eq:"equal to",neq:"not equal to"},devErrors:{number:["The lower-bound (",0,") is greater than the upper-bound (",1,") on this element: ",2],length:["The minimum length (",0,") is greater than the maxiumum legnth (",1,") on this element: ",2],cc:["Credit Card type (",0,") not found."],lines:["! WARNING ! -- fValidate developer-assist error\n","\nIf you are not the developer, please contact the website administrator regarding this error."],paramError:["You must include the '",0,"' parameter for the '",1,"' validator type on this field: ",2],notFound:["The validator '",0,"' was not found.\nRequested by: ",1],noLabel:["No element found for label: ",0],noBox:["An element with the requested id '",0,"' was not found for the 'boxError' config value."],missingName:["The hidden input calling the following logical validator must have a valid name\nattribute when used in conjunction with the 'box' error-type.\n\t",0],mismatch:["Validator/Element type mismatch.\n\nElement: ",0,"\nElement type: ",1,"\nType required by validator: ",2],noCCType:["You must include a SELECT item with Credit Card type choices!"]},config:{confirmMsg:"Your data is about to be sent.\nPlease click 'Ok' to proceed or 'Cancel' to abort.",confirmAbortMsg:"Submission cancelled.  Data has not been sent."},boxToolTip:"Click to target field",groupAlert:"The following errors occured:\n\n- ",or:" or "};
fValidate.prototype.blank=function(){
if(this.typeMismatch("text")){
return;
}
if(this.isBlank()){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.number=function(_80,lb,ub){
if(this.typeMismatch("text")){
return;
}
var num=(_80==0)?parseInt(this.elem.value,10):parseFloat(this.elem.value);
lb=this.setArg(lb,0);
ub=this.setArg(ub,Number.infinity);
if(lb>ub){
this.devError([lb,ub,this.elem.name]);
return;
}
var _84=Boolean(isNaN(num)||num!=this.elem.value);
if(!_84){
switch(true){
case (lb!=false&&ub!=false):
_84=!Boolean(lb<=num&&num<=ub);
break;
case (lb!=false):
_84=Boolean(num<lb);
break;
case (ub!=false):
_84=Boolean(num>ub);
break;
}
}
if(_84){
this.throwError([this.elem.fName]);
return;
}
this.elemPass=true;
};
fValidate.prototype.numeric=function(len){
if(this.typeMismatch("text")){
return;
}
len=this.setArg(len,"*");
var _86=new RegExp((len=="*")?"^\\d+$":"^\\d{"+parseInt(len,10)+"}\\d*$");
if(!_86.test(this.elem.value)){
if(len=="*"){
this.throwError([this.elem.fName]);
}else{
this.throwError([len,this.elem.fName],1);
}
}
};
fValidate.prototype.length=function(len,_88){
if(this.typeMismatch("text")){
return;
}
var _89=this.elem.value.length;
len=Math.abs(len);
_88=Math.abs(this.setArg(_88,Number.infinity));
if(len>_88){
this.devError([len,_88,this.elem.name]);
return;
}
if(len>parseInt(_89,10)){
this.throwError([this.elem.fName,len]);
}
if(_89>_88){
this.throwError([this.elem.fName,_88,_89],1);
}
};
fValidate.prototype.alnum=function(_8a,_8b,_8c,_8d,_8e){
if(this.typeMismatch("text")){
return;
}
_8b=this.setArg(_8b,"a");
_8c=(_8c=="true"||_8c=="1");
_8d=(_8d=="true"||_8d=="1");
var _8f="",_90=["None","Any","No","No","Any"];
if(_8a!="*"){
_8a=parseInt(_8a,10);
_90[0]=_8a;
}else{
_8a=0;
}
switch(_8b.toUpperCase()){
case "U":
_8f+="A-Z";
_90[1]="UPPER";
break;
case "L":
_8f+="a-z";
_90[1]="lower";
break;
case "C":
_8f+="A-Z][a-z";
_90[1]="Intial capital";
_8a--;
break;
default:
_8f+="a-zA-Z";
break;
}
if(_8c==true){
_8f+="0-9";
_90[2]="Yes";
}
if(_8d==true){
_8f+=" ";
_90[3]="Yes";
}
if(_8e=="any"){
_90[4]="Any";
}else{
if(_8e=="none"){
_90[4]="None";
}else{
_8e=_8e.replace(/pipe/g,"|");
_8f+=_8e;
_90[4]=_8e;
}
}
var _91=(_8a!="*")?"{"+_8a+",}":"+";
var _92=(_8e=="any")?new RegExp("^(["+_8f+"]|[^a-zA-Z0-9\\s])"+_91+"$"):new RegExp("^["+_8f+"]"+_91+"$");
if(!_92.test(this.elem.value)){
this.throwError([this.elem.value,this.elem.fName,_90[0],_90[1],_90[2],_90[3],_90[4]]);
}
};
fValidate.prototype.equalto=function(_93){
if(this.typeMismatch("text")){
return;
}
if(typeof _93=="undefined"){
this.paramError("oName");
}
var _94=this.form.elements[_93];
if(this.elem.value!=_94.value){
this.throwError([this.elem.fName,_94.fName]);
}
};
fValidate.prototype.ssn=function(){
if(this.typeMismatch("text")){
return;
}
if(!(/^\d{3}\-\d{2}\-\d{4}$/.test(this.elem.value))){
this.throwError();
}
};
fValidate.prototype.select=function(){
if(this.typeMismatch("s1")){
return;
}
if(this.elem.selectedIndex==0){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.selectm=function(_95,_96){
if(this.typeMismatch("sm")){
return;
}
if(typeof _95=="undefined"){
this.paramError("minS");
}
if(_96==999||_96=="*"||typeof _96=="undefined"||_96>this.elem.length){
_96=this.elem.length;
}
var _97=0;
for(var opt,i=0;(opt=this.elem.options[i]);i++){
if(opt.selected){
_97++;
}
}
if(_97<_95||_97>_96){
this.throwError([_95,_96,this.elem.fName,_97]);
}
};
fValidate.prototype.selecti=function(_9a){
if(this.typeMismatch("s1")){
return;
}
if(typeof _9a=="undefined"){
this.paramError("indexes");
return;
}
_9a=_9a.split(",");
var _9b=true;
for(var i=0;i<_9a.length;i++){
if(this.elem.options[_9a[i]].selected){
_9b=false;
break;
}
}
if(!_9b){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.cazip=function(){
var _9d=this.elem;
if(this.typeMismatch("text")){
return;
}
_9d.value=_9d.value.toUpperCase();
if(!(/^[A-Z][0-9][A-Z] [0-9][A-Z][0-9]$/.test(_9d.value))){
this.throwError();
}
};
fValidate.prototype.capost=fValidate.prototype.cazip;
fValidate.prototype.ukpost=function(){
var _9e=this.elem;
if(this.typeMismatch("text")){
return;
}
_9e.value=_9e.value.toUpperCase();
if(!(/^[A-Z]{1,2}\d[\dA-Z] ?\d[A-Z]{2}$/.test(_9e.value))){
this.throwError();
}
};
fValidate.prototype.germanpost=function(){
var _9f=this.elem;
if(this.typeMismatch("text")){
return;
}
_9f.value=_9f.value.toUpperCase();
if(!(/^(?:CH\-)\d{4}$/.test(_9f.value))){
this.throwError();
}
};
fValidate.prototype.swisspost=function(){
var _a0=this.elem;
if(this.typeMismatch("text")){
return;
}
_a0.value=_a0.value.toUpperCase();
if(!(/^(?:D\-)\d{5}$/.test(this.elem.value))){
this.throwError();
}
};
fValidate.prototype.email=function(_a1){
if(this.typeMismatch("text")){
return;
}
if(typeof _a1=="undefined"){
_a1=0;
}
var _a2=[/.+@.+\..+$/i,/^\w.+@\w.+\.[a-z]+$/i,/^\w[-_a-z~.]+@\w[-_a-z~.]+\.[a-z]{2}[a-z]*$/i,/^\w[\w\d]+(\.[\w\d]+)*@\w[\w\d]+(\.[\w\d]+)*\.[a-z]{2,7}$/i];
if(!_a2[_a1].test(this.elem.value)){
this.throwError();
}
};
fValidate.prototype.url=function(_a3,_a4,_a5){
if(this.typeMismatch("text")){
return;
}
this.setArg(_a3,"http");
var _a6="^(?:("+_a3.replace(/\,/g,"|")+")\\:\\/\\/)";
var end=(Boolean(_a5)==true)?"(\\?.*)?$":"$";
if(Boolean(_a4)==true){
_a6+="?";
}
var _a8=new RegExp(_a6+"([\\w\\d-]+\\.?)+"+end);
if(!_a8.test(this.elem.value)){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.ip=function(_a9,_aa){
if(this.typeMismatch("text")){
return;
}
_a9=this.setArg(_a9,0);
_aa=this.setArg(_aa,99999);
if(!(/^\d{1,3}(\.\d{1,3}){3}(:\d+)?$/.test(this.elem.value))){
this.throwError();
}else{
var _ab,i=0,_ad=this.elem.value.split(/[.:]/);
while(_ab=_ad[i++]){
if(i==5){
if(_ab<_a9||_ab>_aa){
this.throwError([_ab,_a9,_aa],1);
}
}else{
if(_ab<0||_ab>255){
this.throwError();
}
}
}
}
};
fValidate.prototype.decimal=function(_ae,_af){
if(this.typeMismatch("text")){
return;
}
var _b0="",_b1=this.elem;
if(_ae!="*"){
_ae=parseInt(_ae,10);
}
if(_af!="*"){
_af=parseInt(_af,10);
}
if(_ae==0){
_b0="^\\.[0-9]{"+_af+"}$";
}else{
if(_ae=="*"){
_b0="^[0-9]*\\.[0-9]{"+_af+"}$";
}else{
if(_af=="*"){
_b0="^[0-9]{"+_ae+"}\\.[0-9]+$";
}else{
_b0="^[0-9]{"+_ae+"}\\.[0-9]{"+_af+"}$";
}
}
}
_b0=new RegExp(_b0);
if(!_b0.test(_b1.value)){
this.throwError([_b1.value,_b1.fName]);
}
};
fValidate.prototype.decimalr=function(_b2,_b3,_b4,_b5){
if(this.typeMismatch("text")){
return;
}
_b2=(_b2=="*")?0:parseInt(_b2,10);
_b3=(_b3=="*")?"":parseInt(_b3,10);
_b4=(_b4=="*")?0:parseInt(_b4,10);
_b5=(_b5=="*")?"":parseInt(_b5,10);
var _b6="^[0-9]{"+_b2+","+_b3+"}\\.[0-9]{"+_b4+","+_b5+"}$";
var _b7=new RegExp(_b6);
if(!_b7.test(this.elem.value)){
this.throwError([this.elem.fName]);
}
return true;
};
fValidate.prototype.zip=function(sep){
if(this.typeMismatch("text")){
return;
}
sep=this.setArg(sep,"- ");
var _b9=new RegExp("^[0-9]{5}(|["+sep.toPattern()+"][0-9]{4})?$");
if(!_b9.test(this.elem.value)){
this.throwError();
}
};
fValidate.prototype.phone=function(_ba){
if(this.typeMismatch("text")){
return;
}
_ba=this.setArg(_ba,0);
var _bb=[/^(\(?\d\d\d\)?)?[ -]?\d\d\d[ -]?\d\d\d\d$/,/^(\(\d\d\d\) )?\d\d\d[ -]\d\d\d\d$/];
if(!_bb[_ba].test(this.elem.value)){
if(_ba==1){
this.throwError();
}else{
this.throwError([],1);
}
}
};
fValidate.prototype.date=function(_bc,_bd,_be,_bf){
if(this.typeMismatch("text")){
return;
}
if(typeof _bc=="undefined"){
this.paramError("formatStr");
return;
}
_bd=this.setArg(_bd,"/");
var _c0=[this.elem.fName,_bc.replace(/\//g,_bd)];
var _c1=_bc.split("/");
var _c2=this.elem.value.split(_bd);
var _c3=new Object();
for(var i=0;i<_c1.length;i++){
switch(_c1[i].charAt(0).toLowerCase()){
case "m":
_c3.months=i;
break;
case "d":
_c3.days=i;
break;
case "y":
_c3.years=i;
break;
}
}
var _c5=new Date(_c2[_c3.years],_c2[_c3.months]-1,_c2[_c3.days]);
if(isNaN(_c5)||_c5.getDate()!=_c2[_c3.days]||_c5.getMonth()!=_c2[_c3.months]-1||_c5.getFullYear().toString().length!=_bc.match(/y/g).length){
this.throwError(_c0);
return;
}
var _c6=this.form.elements[_bf];
if(typeof _c6!="undefined"){
_bf=_c6.validDate||_c6.value;
}
var _c7=(_bf=="today")?new Date():new Date(_bf);
_c7.setHours(0);
_c7.setMinutes(0);
_c7.setSeconds(0);
_c7.setMilliseconds(0);
var _c8=_c7.getTime()-_c5.getTime();
var _c9=false;
switch(parseInt(_be)){
case 1:
_c9=Boolean(_c8>0);
_c0=1;
break;
case 2:
_c9=Boolean((_c8+86400000)>0);
_c0=2;
break;
case 3:
_c9=Boolean(_c8<0);
_c0=3;
break;
case 4:
_c9=Boolean((_c8-86400000)<0);
_c0=4;
break;
default:
_c9=true;
}
if(!_c9){
this.throwError([_bf],_c0);
}
this.elem.validDate=_c5.toString();
};
fValidate.prototype.money=function(ds,grp,dml){
if(this.typeMismatch("text")){
return;
}
ds=(ds==" ")?false:ds.toPattern();
grp=(grp==" ")?false:grp.toPattern();
dml=(dml==" ")?false:dml.toPattern();
var _cd,_ce;
switch(true){
case Boolean(ds&&grp&&dml):
_ce="^"+ds+"(?:(?:[0-9]{1,3}"+grp+")(?:[0-9]{3}"+grp+")*[0-9]{3}|[0-9]{1,3})("+dml+"[0-9]{2})$";
_cd=ds+"XX"+grp+"XXX"+dml+"XX";
break;
case Boolean(ds&&grp&&!dml):
_ce="^"+ds+"(?:(?:[0-9]{1,3}"+grp+")(?:[0-9]{3}"+grp+")*[0-9]{3}|[0-9]{1,3})$";
_cd=""+ds+"XX"+grp+"XXX";
break;
case Boolean(ds&&!grp&&dml):
_ce="^"+ds+"[0-9]*(\\.[0-9]{2})$";
_cd=""+ds+"XXXXX"+dml+"XX";
break;
case Boolean(!ds&&grp&&dml):
_ce="^(?:(?:[0-9]{1,3}"+grp+")(?:[0-9]{3}"+grp+")*[0-9]{3}|[0-9]{1,3})("+dml+"[0-9]{2})?$";
_cd="XX"+grp+"XXX"+dml+"XX";
break;
case Boolean(ds&&!grp&&!dml):
_ce="^"+ds+"[0-9]*$";
_cd=""+ds+"XXXXX";
break;
case Boolean(!ds&&grp&&!dml):
_ce="^(?:(?:[0-9]{1,3}"+grp+")(?:[0-9]{3}"+grp+")*[0-9]{3}|[0-9]{1,3})$";
_cd="XX"+grp+"XXX";
break;
case Boolean(!ds&&!grp&&dml):
_ce="^[0-9]*("+dml+"[0-9]{2})$";
_cd="XXXXX"+dml+"XX";
break;
case Boolean(!ds&&!grp&&!dml):
_ce="^.?(?:(?:[0-9]{1,3}.?)(?:[0-9]{3}.?)*[0-9]{3}|[0-9]{1,3})(.[0-9]{2})?$";
_cd="[?]XX[?]XXX[?XX]";
}
var _cf=new RegExp(_ce);
if(!_cf.test(this.elem.value)){
this.throwError([this.elem.fName,_cd.replace(/\\/g,"")]);
}
};
fValidate.prototype.checkbox=function(_d0,_d1){
if(this.typeMismatch("cb")){
return;
}
if(typeof _d0=="undefined"){
this.paramError("minC");
return;
}
if(this.elem==this.form.elements[this.elem.name]&&!this.elem.checked){
this.throwError([this.elem.fName]);
}else{
this.elem=this.form.elements[this.elem.name];
var len=this.elem.length;
var _d3=0;
if(_d1==999||_d1=="*"||typeof _d1=="undefined"||_d1>this.elem.length){
_d1==len;
}
var i=len;
while(i-->0){
if(this.elem[i].checked){
_d3++;
}
}
if(_d3<_d0||_d3>_d1){
this.throwError([_d0,_d1,this.elem[0].fName,_d3]);
}
}
};
fValidate.prototype.radio=function(){
if(this.typeMismatch("rg")){
return;
}
if(this.elem==this.form.elements[this.elem.name]&&!this.elem.checked){
this.throwError([this.elem.fName]);
}else{
this.elem=this.form.elements[this.elem.name];
for(var i=0;i<this.elem.length;i++){
if(this.elem.item(i).checked){
return;
}
}
this.throwError([this.elem[0].fName]);
}
};
fValidate.prototype.eitheror=function(){
if(this.typeMismatch("hidden")){
return;
}
if(typeof arguments[0]=="undefined"){
this.paramError("delim");
return;
}
if(typeof arguments[1]=="undefined"){
this.paramError("fields");
return;
}
var arg,i=0,_d8=new Array(),_d9,_da=0,_db=arguments[1].split(arguments[0]);
this.elem.fields=new Array();
while(arg=_db[i++]){
_d9=this.form.elements[arg];
_d8.push(_d9.fName);
this.elem.fields.push(_d9);
if(!this.isBlank(arg)){
_da++;
}
}
if(_da!=1){
this.throwError([_d8.join("\n\t-")]);
}
};
fValidate.prototype.atleast=function(){
if(this.typeMismatch("hidden")){
return;
}
if(typeof arguments[0]==undefined){
this.paramError("qty");
return;
}
if(typeof arguments[1]==undefined){
this.paramError("delim");
return;
}
if(typeof arguments[2]==undefined){
this.paramError("fields");
return;
}
var arg,i=0,_de=new Array(),_df,_e0=0,_e1=arguments[2].split(arguments[1]);
this.elem.fields=new Array();
while(arg=_e1[i++]){
_df=this.form.elements[arg];
_de.push(_df.fName);
this.elem.fields.push(_df);
if(!this.isBlank(arg)){
_e0++;
}
}
if(_e0<arguments[0]){
this.throwError([arguments[0],_de.join("\n\t-"),_e0]);
}
};
fValidate.prototype.allornone=function(){
if(this.typeMismatch("hidden")){
return;
}
if(typeof arguments[0]=="undefined"){
this.paramError("delim");
return;
}
if(typeof arguments[1]=="undefined"){
this.paramError("fields");
return;
}
var arg,i=0,_e4=new Array(),_e5,_e6=0,_e7=arguments[1].split(arguments[0]);
this.elem.fields=new Array();
while(arg=_e7[i++]){
_e5=this.form.elements[arg];
_e4.push(_e5.fName);
this.elem.fields.push(_e5);
if(!this.isBlank(arg)){
_e6++;
}
}
if(_e6>0&&_e6<_e7.length){
this.throwError([_e4.join("\n\t-"),_e6]);
}
};
fValidate.prototype.comparison=function(_e8,_e9,_ea){
if(this.typeMismatch("hidden")){
return;
}
var _eb=this.form.elements[_e8],_ec=this.form.elements[_ea],_ed=this.getValue(_eb),_ee=this.getValue(_ec);
i18n=this.i18n.comparison;
i=-1;
var _ef=[[">",i18n.gt],["<",i18n.lt],[">=",i18n.gte],["<=",i18n.lte],["==",i18n.eq],["!=",i18n.neq]];
while(_ef[++i][0]!=_e9){
}
this.elem.fields=[_eb,_ec];
if(!eval(_ed+_e9+_ee)){
this.throwError([_eb.fName,_ef[i][1],_ec.fName]);
}
};
fValidate.prototype.file=function(_f0,_f1){
if(this.typeMismatch("file")){
return;
}
if(typeof _f0=="undefined"){
this.paramError("extensions");
return;
}
_f1=Boolean(_f1)?"":"i";
var _f2=new RegExp("^.+\\.("+_f0.replace(/,/g,"|")+")$",_f1);
if(!_f2.test(this.elem.value)){
this.throwError([_f0.replace(/,/g,"\n")]);
}
};
fValidate.prototype.custom=function(_f3,_f4){
if(this.typeMismatch("text")){
return;
}
_f3=(_f3)?_f3.replace(/[^gim]/ig):"";
var _f5=new RegExp(this.elem.getAttribute(this.config.pattern),_f3);
if(!_f5.test(this.elem.value)){
this.throwError([this.elem.fName]);
}
};
fValidate.prototype.cc=function(){
if(this.typeMismatch("text")){
return;
}
var _f6=this.form.elements[this.config.ccType];
if(!_f6){
this.devError("noCCType");
return;
}
var _f7=_f6.options[_f6.selectedIndex].value.toUpperCase();
var _f8={"VISA":/^4\d{12}(\d{3})?$/,"MC":/^5[1-5]\d{14}$/,"DISC":/^6011\d{12}$/,"AMEX":/^3[4|7]\d{13}$/,"DINERS":/^3[0|6|8]\d{12}$/,"ENROUTE":/^2[014|149]\d{11}$/,"JCB":/^3[088|096|112|158|337|528]\d{12}$/,"SWITCH":/^(49030[2-9]|49033[5-9]|49110[1-2]|4911(7[4-9]|8[1-2])|4936[0-9]{2}|564182|6333[0-4][0-9]|6759[0-9]{2})\d{10}(\d{2,3})?$/,"DELTA":/^4(1373[3-7]|462[0-9]{2}|5397[8|9]|54313|5443[2-5]|54742|567(2[5-9]|3[0-9]|4[0-5])|658[3-7][0-9]|659(0[1-9]|[1-4][0-9]|50)|844[09|10]|909[6-7][0-9]|9218[1|2]|98824)\d{10}$/,"SOLO":/^(6334[5-9][0-9]|6767[0-9]{2})\d{10}(\d{2,3})?$/};
if(_f6.validated==false&&this.groupError==true){
return;
}
if(typeof _f8[_f7]=="undefined"&&_f6.validated==false&&this.groupError==false){
this.devError([_f7]);
return;
}
this.elem.value=this.elem.value.replace(/[^\d]/g,"");
if(!_f8[_f7].test(this.elem.value)||!this.elem.value.luhn()){
this.throwError([this.elem.fName]);
}
};
String.prototype.luhn=function(){
var i=this.length;
var _fa="",_fb;
while(_fb=this.charAt(--i)){
_fa+=(i%2==0)?_fb*2:_fb;
}
_fa=eval(_fa.split("").join("+"));
return (_fa%10==0);
};
fValidate.prototype.ccDate=function(_fc,_fd){
if(this.typeMismatch("s1")){
return;
}
_fd=parseInt(this.getValue(this.form.elements[_fd]),10)+2000;
_fc=parseInt(this.getValue(this.form.elements[_fc]),10);
var _fe=new Date();
var _ff=new Date(_fd,_fc);
if(_ff<_fe){
alert(["Card Expired",_fe,_ff].join("\n"));
}
};
function nRand(_100){
today=new Date();
seed=today.getTime();
seed=(seed*9301+49297)%233280;
seed=seed/(233280);
return Math.ceil(seed*_100);
}
function popUp(path,w,h){
var t=(screen.height/2)-(h/2)-50;
var l=(screen.width/2)-(w/2);
var _106="location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no, left="+l+",top="+t+",width="+w+",height="+h;
popwin=window.open(path,"pop"+nRand(100),_106);
popwin.focus();
}
function popUpScroll(path,w,h){
var t=(screen.height/2)-(h/2)-50;
var l=(screen.width/2)-(w/2);
var _10c="location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes, left="+l+",top="+t+",width="+w+",height="+h;
popwin=window.open(path,"pop"+nRand(100),_10c);
popwin.focus();
}
function refreshParent(){
if(window.opener){
window.opener.location.reload();
}
}
function confirmationMessage(_10d,_10e,_10f){
isConfirmed=window.confirm(_10d);
if(isConfirmed){
if(_10e==""){
return;
}else{
window.location.href=_10e;
return;
}
}else{
if(_10f==""){
return;
}else{
window.location.href=_10f;
return;
}
}
}
function openImageWindow(_110){
popup_url="pop_image.jsp?imageID="+_110;
var t=20;
var l=20;
var _113="location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes, left="+l+",top="+t+",width=320,height=200";
popwin=window.open(popup_url,"pop"+nRand(100),_113);
popwin.focus();
}
var imgclose="/web/img/imgclose.gif";
var maxImages=19;
function findTopParent(){
var _114=64;
var p=window;
while((p.parent!=p)&&(p.parent!=null)&&(--_114>0)){
try{
var l=p.parent.document.location;
}
catch(e){
break;
}
p=p.parent;
}
return p;
}
function getEventPos(ev){
var posx=0;
var posy=0;
if(!ev){
var e=window.event;
}
if(!ev){
return [0,0];
}
if(ev.pageX||ev.pageY){
posx=ev.pageX;
posy=ev.pageY;
}else{
if(ev.clientX||ev.clientY){
posx=ev.clientX+document.body.scrollLeft;
posy=ev.clientY+document.body.scrollTop;
}
}
return [posx,posy];
}
function getWindowSize(){
var _11b=0;
var _11c=0;
if(typeof (window.innerWidth)=="number"){
_11b=window.innerWidth;
_11c=window.innerHeight;
}else{
if(window.document.body&&typeof (window.document.body.clientWidth)=="number"){
_11b=window.document.body.clientWidth;
_11c=window.document.body.clientHeight;
}
}
return [_11b,_11c];
}
if(document.all){
xbGetElementById=function(id,_11e){
if(!_11e){
_11e=window;
}
var elm=_11e.document.all[id];
if(!elm){
elm=null;
}
return elm;
};
}else{
if(document.getElementById){
xbGetElementById=function(id,_121){
if(!_121){
_121=window;
}
return _121.document.getElementById(id);
};
}else{
xbGetElementById=function(id,_123){
return null;
};
}
}
var iwinCtrl=null;
function baseInit(){
iwinCtrl=new ImageWinCtrl();
}
function ImageWinCtrl(){
this.handles=new Array();
this.urls=new Array();
this.imgBin=xbGetElementById("iwincontainer");
if(this.imgBin==null){
var el=document.createElement("span");
el.setAttribute("id","iwincontainer");
document.body.appendChild(el);
this.imgBin=el;
}
this.activeWin=null;
this.zIndex=20;
this.winCount=0;
var html="";
var i=0;
while(i<maxImages){
html=html+"<div class=\"iwinpop\" id=\"iwin_"+i+"\"></div>";
i++;
}
this.imgBin.innerHTML=html;
}
ImageWinCtrl.prototype.createWin=function(url,pos){
var id=this.winCount;
if(this.urls[url]!=null){
this.urls[url].show();
return;
}
if(id==maxImages){
alert("This script is configured for a maxium of "+maxImages+" images.\nPlease adjust maxImages in imgwin.js");
}
var div=xbGetElementById("iwin_"+id);
var iw=new ImageWin(div,id,url,pos);
this.handles[id]=iw;
this.urls[url]=iw;
this.winCount++;
};
ImageWinCtrl.prototype.getZ=function(){
return ++this.zIndex;
};
ImageWinCtrl.prototype.getWin=function(id){
return this.handles[id];
};
function _mup(ev){
return mup(ev);
}
function _mmove(ev){
return mmove(ev);
}
function mup(ev){
if(iwinCtrl.activeWin!=null){
iwinCtrl.activeWin.passivate();
}
document.onmouseup=null;
document.onmousemove=null;
return false;
}
var evskip=0;
function mmove(ev){
if((++evskip%3)!=0){
return false;
}
if(!ev){
var ev=window.event;
}
var iwin=iwinCtrl.activeWin;
if(iwin==null){
return false;
}
iwin.didMove=1;
if(iwin.resizing==1){
var _132=getEventPos(ev);
iwinresize(iwin.img,Math.max(_132[0]-iwin.x,20),Math.max(_132[1]-iwin.y,20));
}else{
iwin.x=iwin.x+ev.screenX-iwin.lastX;
iwin.y=iwin.y+ev.screenY-iwin.lastY;
iwin.css.left=iwin.x;
iwin.css.top=iwin.y;
iwin.lastX=ev.screenX;
iwin.lastY=ev.screenY;
}
return false;
}
function mdown(ev){
if(!ev){
var ev=window.event;
}
this.iwin.activate(ev);
document.onmousemove=_mmove;
document.onmouseup=_mup;
return false;
}
function iwinresize(i,neww,newh){
var r=newh/neww;
var h=0;
var w=0;
if(r<i.iwin.ratio){
h=newh;
w=newh/i.iwin.ratio;
}else{
w=neww;
h=neww*i.iwin.ratio;
}
i.iwin.css.width=Math.max(w,neww)+2;
i.iwin.css.height=Math.max(h,newh)+20;
i.width=w;
i.height=h;
i.iwin.width=w;
i.iwin.height=h;
}
function iwinimgloaded(i){
if(i.iwin.loaded==1){
return;
}else{
i.iwin.loaded=1;
}
var h=i.height;
var w=i.width;
i.iwin.ratio=h/w;
var _13d=getWindowSize();
if(w>(_13d[0]*0.9)){
w=_13d[0]*0.9;
h=i.iwin.ratio*w;
}
if(h>(_13d[1]*0.9)){
h=_13d[1]*0.9;
w=h/i.iwin.ratio;
}
i.width=w;
i.height=h;
i.iwin.width=w;
i.iwin.height=h;
i.iwin.css.width=w+4;
i.iwin.x=Math.max(i.iwin.x-w/2,10);
i.iwin.y=Math.max(i.iwin.y-h/2,10);
i.iwin.css.left=i.iwin.x;
i.iwin.css.top=i.iwin.y;
i.iwin.css.zIndex=iwinCtrl.getZ();
}
function ImageWin(div,id,iurl,pos){
this.url=iurl;
this.div=div;
this.css=div.style;
this.div.iwin=this;
this.x=pos[0];
this.y=pos[1];
this.imageId=id;
this.divId="iwin"+id;
this.imgId="iwinimg"+id;
this.width=0;
this.height=0;
this.ratio=0;
this.loaded=0;
this.active=0;
this.didMove=0;
this.lastX=0;
this.lastY=0;
this.resizing=0;
var _142="<div class=\"iwinclosebar\"><img alt=\"\" onClick=\"hideimg("+this.imageId+")\" class=\"iwinclose\" src=\""+imgclose+"\"></div>";
var _143="<img alt=\"\" onClick=\"hideimg("+this.imageId+")\" onLoad=\"iwinimgloaded(this)\" id=\""+this.imgId+"\" class=\"iwinimg\" src=\""+this.url+"\">";
this.div.innerHTML=_142+_143;
this.img=xbGetElementById(this.imgId);
this.img.iwin=this;
this.help=xbGetElementById("help_"+this.imgId);
this.css.left=this.x;
this.css.top=this.y;
this.css.zIndex=-50;
this.div.onmousedown=mdown;
this.css.visibility="inherit";
}
ImageWin.prototype.activate=function(ev){
iwinCtrl.activeWin=this;
this.active=1;
this.didMove=0;
this.lastX=ev.screenX;
this.lastY=ev.screenY;
var maxx=this.x+this.width+2;
var maxy=this.y+this.height+20;
var _147=getEventPos(ev);
if((_147[0]-10<maxx)&&(_147[0]+10>maxx)&&(_147[1]-10<maxy)&&(_147[1]+12>maxy)){
this.resizing=1;
}
this.css.zIndex=iwinCtrl.getZ();
};
ImageWin.prototype.passivate=function(){
iwinCtrl.activeWin=null;
this.active=0;
if(this.resizing==1){
this.css.width=this.width+2;
this.css.height=this.height+20;
}
this.resizing=0;
};
ImageWin.prototype.show=function(){
this.css.visibility="inherit";
this.css.zIndex=iwinCtrl.getZ();
};
ImageWin.prototype.hide=function(){
if(this.didMove){
this.didMove=0;
return;
}
this.css.visibility="hidden";
};
function popimg(url,ev){
if(iwinCtrl==null){
iwinCtrl=new ImageWinCtrl();
}
iwinCtrl.createWin(url,getEventPos(ev));
}
function hideimg(id){
iwinCtrl.getWin(id).hide();
}
var ttAbove=false;
var ttBgColor="#FFFFFF";
var ttBgImg="";
var ttBorderColor="FF6600";
var ttBorderWidth=1;
var ttDelay=500;
var ttFontColor="FF6600";
var ttFontFace="arial,helvetica,sans-serif";
var ttFontSize="11px";
var ttFontWeight="normal";
var ttLeft=false;
var ttOffsetX=12;
var ttOffsetY=15;
var ttOpacity=100;
var ttPadding=5;
var ttShadowColor="";
var ttShadowWidth=0;
var ttStatic=false;
var ttSticky=false;
var ttTemp=0;
var ttTextAlign="left";
var ttTitleColor="#ffffff";
var ttWidth=300;
var tt_tags=new Array("a","area","b","big","caption","center","code","dd","div","dl","dt","em","h1","h2","h3","h4","h5","h6","i","img","input","li","map","ol","p","pre","s","select","small","span","strike","strong","sub","sup","table","td","th","tr","tt","u","var","ul","layer");
var tt_obj=null,tt_ifrm=null,tt_objW=0,tt_objH=0,tt_objX=0,tt_objY=0,tt_offX=0,tt_offY=0,xlim=0,ylim=0,tt_sup=false,tt_sticky=false,tt_wait=false,tt_act=false,tt_sub=false,tt_u="undefined",tt_mf=null,tt_tag=null;
var tt_db=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body?document.body:null,tt_n=navigator.userAgent.toLowerCase(),tt_nv=navigator.appVersion;
var tt_op=!!(window.opera&&document.getElementById),tt_op6=tt_op&&!document.defaultView,tt_op7=tt_op&&!tt_op6,tt_ie=tt_n.indexOf("msie")!=-1&&document.all&&tt_db&&!tt_op,tt_ie6=tt_ie&&parseFloat(tt_nv.substring(tt_nv.indexOf("MSIE")+5))>=5.5,tt_n4=(document.layers&&typeof document.classes!=tt_u),tt_n6=(!tt_op&&document.defaultView&&typeof document.defaultView.getComputedStyle!=tt_u),tt_w3c=!tt_ie&&!tt_n6&&!tt_op&&document.getElementById;
function tt_Int(t_x){
var t_y;
return isNaN(t_y=parseInt(t_x))?0:t_y;
}
function wzReplace(t_x,t_y){
var _14f="",_150=this,t_xI;
while((t_xI=_150.indexOf(t_x))!=-1){
_14f+=_150.substring(0,t_xI)+t_y;
_150=_150.substring(t_xI+t_x.length);
}
return _14f+_150;
}
String.prototype.wzReplace=wzReplace;
function tt_N4Tags(_152,t_d,t_y){
t_d=t_d||document;
t_y=t_y||new Array();
var t_x=(_152=="a")?t_d.links:t_d.layers;
for(var z=t_x.length;z--;){
t_y[t_y.length]=t_x[z];
}
for(z=t_d.layers.length;z--;){
t_y=tt_N4Tags(_152,t_d.layers[z].document,t_y);
}
return t_y;
}
function tt_Htm(tt,t_id,txt){
var _15a=(typeof tt.T_BGCOLOR!=tt_u)?tt.T_BGCOLOR:ttBgColor,_15b=(typeof tt.T_BGIMG!=tt_u)?tt.T_BGIMG:ttBgImg,t_bc=(typeof tt.T_BORDERCOLOR!=tt_u)?tt.T_BORDERCOLOR:ttBorderColor,t_bw=(typeof tt.T_BORDERWIDTH!=tt_u)?tt.T_BORDERWIDTH:ttBorderWidth,t_ff=(typeof tt.T_FONTFACE!=tt_u)?tt.T_FONTFACE:ttFontFace,t_fc=(typeof tt.T_FONTCOLOR!=tt_u)?tt.T_FONTCOLOR:ttFontColor,_160=(typeof tt.T_FONTSIZE!=tt_u)?tt.T_FONTSIZE:ttFontSize,_161=(typeof tt.T_FONTWEIGHT!=tt_u)?tt.T_FONTWEIGHT:ttFontWeight,_162=(typeof tt.T_OPACITY!=tt_u)?tt.T_OPACITY:ttOpacity,_163=(typeof tt.T_PADDING!=tt_u)?tt.T_PADDING:ttPadding,_164=(typeof tt.T_SHADOWCOLOR!=tt_u)?tt.T_SHADOWCOLOR:(ttShadowColor||0),_165=(typeof tt.T_SHADOWWIDTH!=tt_u)?tt.T_SHADOWWIDTH:(ttShadowWidth||0),_166=(typeof tt.T_TEXTALIGN!=tt_u)?tt.T_TEXTALIGN:ttTextAlign,_167=(typeof tt.T_TITLE!=tt_u)?tt.T_TITLE:"",_168=(typeof tt.T_TITLECOLOR!=tt_u)?tt.T_TITLECOLOR:ttTitleColor,t_w=(typeof tt.T_WIDTH!=tt_u)?tt.T_WIDTH:ttWidth;
if(_164||_165){
_164=_164||"#cccccc";
_165=_165||5;
}
if(tt_n4&&(_160=="10px"||_160=="11px")){
_160="12px";
}
var _16a=(tt_n4?"":tt_n6?("-moz-opacity:"+(_162/100)):tt_ie?("filter:Alpha(opacity="+_162+")"):("opacity:"+(_162/100)))+";";
var t_y="<div id=\""+t_id+"\" style=\"position:absolute;z-index:1010;";
t_y+="left:0px;top:0px;width:"+(t_w+_165)+"px;visibility:"+(tt_n4?"hide":"hidden")+";"+_16a+"\">"+"<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\""+(t_bc?(" bgcolor=\""+t_bc+"\" style=\"background:"+t_bc+";\""):"")+" width=\""+t_w+"\">";
if(_167){
t_y+="<tr><td style=\"padding-left:3px;padding-right:3px;\" align=\""+_166+"\"><font color=\""+_168+"\" face=\""+t_ff+"\" "+"style=\"color:"+_168+";font-family:"+t_ff+";font-size:"+_160+";\"><b>"+(tt_n4?"&nbsp;":"")+_167+"</b></font></td></tr>";
}
t_y+="<tr><td><table border=\"0\" cellpadding=\""+_163+"\" cellspacing=\""+t_bw+"\" width=\"100%\">"+"<tr><td"+(_15a?(" bgcolor=\""+_15a+"\""):"")+(_15b?" background=\""+_15b+"\"":"")+" style=\"text-align:"+_166+";";
if(tt_n6){
t_y+="padding:"+_163+"px;";
}
t_y+="\" align=\""+_166+"\"><font color=\""+t_fc+"\" face=\""+t_ff+"\""+" style=\"color:"+t_fc+";font-family:"+t_ff+";font-size:"+_160+";font-weight:"+_161+";\">";
if(_161=="bold"){
t_y+="<b>";
}
t_y+=txt;
if(_161=="bold"){
t_y+="</b>";
}
t_y+="</font></td></tr></table></td></tr></table>";
if(_165){
var _16c=Math.round(_165*1.3);
if(tt_n4){
t_y+="<layer bgcolor=\""+_164+"\" left=\""+t_w+"\" top=\""+_16c+"\" width=\""+_165+"\" height=\"0\"></layer>"+"<layer bgcolor=\""+_164+"\" left=\""+_16c+"\" align=\"bottom\" width=\""+(t_w-_16c)+"\" height=\""+_165+"\"></layer>";
}else{
_16a=tt_n6?"-moz-opacity:0.85;":tt_ie?"filter:Alpha(opacity=85);":"opacity:0.85;";
t_y+="<div id=\""+t_id+"R\" style=\"position:absolute;background:"+_164+";left:"+t_w+"px;top:"+_16c+"px;width:"+_165+"px;height:1px;overflow:hidden;"+_16a+"\"></div>"+"<div style=\"position:relative;background:"+_164+";left:"+_16c+"px;top:0px;width:"+(t_w-_16c)+"px;height:"+_165+"px;overflow:hidden;"+_16a+"\"></div>";
}
}
return (t_y+"</div>"+(tt_ie6?"<iframe id=\"TTiEiFrM\" src=\"javascript:false\" scrolling=\"no\" frameborder=\"0\" style=\"filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;\"></iframe>":""));
}
function tt_EvX(t_e){
var t_y=tt_Int(t_e.pageX||t_e.clientX||0)+tt_Int(tt_ie?tt_db.scrollLeft:0)+tt_offX;
if(t_y>xlim){
t_y=xlim;
}
var _16f=tt_Int(window.pageXOffset||(tt_db?tt_db.scrollLeft:0)||0);
if(t_y<_16f){
t_y=_16f;
}
return t_y;
}
function tt_EvY(t_e){
var t_y=tt_Int(t_e.pageY||t_e.clientY||0)+tt_Int(tt_ie?tt_db.scrollTop:0);
if(tt_sup){
t_y-=(tt_objH+tt_offY-15);
}else{
if(t_y>ylim||!tt_sub&&t_y>ylim-24){
t_y-=(tt_objH+5);
tt_sub=false;
}else{
t_y+=tt_offY;
tt_sub=true;
}
}
return t_y;
}
function tt_ReleasMov(){
if(document.onmousemove==tt_Move){
if(!tt_mf&&document.releaseEvents){
document.releaseEvents(Event.MOUSEMOVE);
}
document.onmousemove=tt_mf;
}
}
function tt_ShowIfrm(t_x){
if(!tt_obj||!tt_ifrm){
return;
}
if(t_x){
tt_ifrm.style.width=tt_objW+"px";
tt_ifrm.style.height=tt_objH+"px";
tt_ifrm.style.display="block";
}else{
tt_ifrm.style.display="none";
}
}
function tt_GetDiv(t_id){
return (tt_n4?(document.layers[t_id]||null):tt_ie?(document.all[t_id]||null):(document.getElementById(t_id)||null));
}
function tt_GetDivW(){
return tt_Int(tt_n4?tt_obj.clip.width:(tt_obj.style.pixelWidth||tt_obj.offsetWidth));
}
function tt_GetDivH(){
return tt_Int(tt_n4?tt_obj.clip.height:(tt_obj.style.pixelHeight||tt_obj.offsetHeight));
}
function tt_SetDivZ(){
var t_i=tt_obj.style||tt_obj;
if(t_i){
if(window.dd&&dd.z){
t_i.zIndex=Math.max(dd.z+1,t_i.zIndex);
}
if(tt_ifrm){
tt_ifrm.style.zIndex=t_i.zIndex-1;
}
}
}
function tt_SetDivPos(t_x,t_y){
var t_i=tt_obj.style||tt_obj;
var t_px=(tt_op6||tt_n4)?"":"px";
t_i.left=(tt_objX=t_x)+t_px;
t_i.top=(tt_objY=t_y)+t_px;
if(tt_ifrm){
tt_ifrm.style.left=t_i.left;
tt_ifrm.style.top=t_i.top;
}
}
function tt_ShowDiv(t_x){
tt_ShowIfrm(t_x);
if(tt_n4){
tt_obj.visibility=t_x?"show":"hide";
}else{
tt_obj.style.visibility=t_x?"visible":"hidden";
}
tt_act=t_x;
}
function tt_OpDeHref(t_e){
var _17b;
if(t_e){
_17b=t_e.target;
while(_17b){
if(_17b.hasAttribute("href")){
tt_tag=_17b;
tt_tag.t_href=tt_tag.getAttribute("href");
tt_tag.removeAttribute("href");
tt_tag.style.cursor="hand";
tt_tag.onmousedown=tt_OpReHref;
tt_tag.stats=window.status;
window.status=tt_tag.t_href;
break;
}
_17b=_17b.parentElement;
}
}
}
function tt_OpReHref(){
if(tt_tag){
tt_tag.setAttribute("href",tt_tag.t_href);
window.status=tt_tag.stats;
tt_tag=null;
}
}
function tt_Show(t_e,t_id,_17e,_17f,_180,_181,_182,_183,_184,_185,_186){
if(tt_obj){
tt_Hide();
}
tt_mf=document.onmousemove||null;
if(window.dd&&(window.DRAG&&tt_mf==DRAG||window.RESIZE&&tt_mf==RESIZE)){
return;
}
var t_sh,t_h;
tt_obj=tt_GetDiv(t_id);
if(tt_obj){
t_e=t_e||window.event;
tt_sub=!(tt_sup=_17e);
tt_sticky=_185;
tt_objW=tt_GetDivW();
tt_objH=tt_GetDivH();
tt_offX=_181?-(tt_objW+_182):_182;
tt_offY=_183;
if(tt_op7){
tt_OpDeHref(t_e);
}
if(tt_n4){
if(tt_obj.document.layers.length){
t_sh=tt_obj.document.layers[0];
t_sh.clip.height=tt_objH-Math.round(t_sh.clip.width*1.3);
}
}else{
t_sh=tt_GetDiv(t_id+"R");
if(t_sh){
t_h=tt_objH-tt_Int(t_sh.style.pixelTop||t_sh.style.top||0);
if(typeof t_sh.style.pixelHeight!=tt_u){
t_sh.style.pixelHeight=t_h;
}else{
t_sh.style.height=t_h+"px";
}
}
}
xlim=tt_Int((tt_db&&tt_db.clientWidth)?tt_db.clientWidth:window.innerWidth)+tt_Int(window.pageXOffset||(tt_db?tt_db.scrollLeft:0)||0)-tt_objW-(tt_n4?21:0);
ylim=tt_Int(window.innerHeight||tt_db.clientHeight)+tt_Int(window.pageYOffset||(tt_db?tt_db.scrollTop:0)||0)-tt_objH-tt_offY;
tt_SetDivZ();
if(_180){
tt_SetDivPos(tt_Int((_180=_180.split(","))[0]),tt_Int(_180[1]));
}else{
tt_SetDivPos(tt_EvX(t_e),tt_EvY(t_e));
}
var _189="tt_ShowDiv('true');";
if(_185){
_189+="{"+"tt_ReleasMov();"+"window.tt_upFunc = document.onmouseup || null;"+"if(document.captureEvents) document.captureEvents(Event.MOUSEUP);"+"document.onmouseup = new Function(\"window.setTimeout('tt_Hide();', 10);\");"+"}";
}else{
if(_184){
_189+="tt_ReleasMov();";
}
}
if(_186>0){
_189+="window.tt_rtm = window.setTimeout('tt_sticky = false; tt_Hide();',"+_186+");";
}
window.tt_rdl=window.setTimeout(_189,_17f);
if(!_180){
if(document.captureEvents){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove=tt_Move;
}
}
}
var tt_area=false;
function tt_Move(t_ev){
if(!tt_obj){
return;
}
if(tt_n6||tt_w3c){
if(tt_wait){
return;
}
tt_wait=true;
setTimeout("tt_wait = false;",5);
}
var t_e=t_ev||window.event;
tt_SetDivPos(tt_EvX(t_e),tt_EvY(t_e));
if(tt_op6){
if(tt_area&&t_e.target.tagName!="AREA"){
tt_Hide();
}else{
if(t_e.target.tagName=="AREA"){
tt_area=true;
}
}
}
}
function tt_Hide(){
if(window.tt_obj){
if(window.tt_rdl){
window.clearTimeout(tt_rdl);
}
if(!tt_sticky||!tt_act){
if(window.tt_rtm){
window.clearTimeout(tt_rtm);
}
tt_ShowDiv(false);
tt_SetDivPos(-tt_objW,-tt_objH);
tt_obj=null;
if(typeof window.tt_upFunc!=tt_u){
document.onmouseup=window.tt_upFunc;
}
}
tt_sticky=false;
if(tt_op6&&tt_area){
tt_area=false;
}
tt_ReleasMov();
if(tt_op7){
tt_OpReHref();
}
}
}
function tt_Init(){
if(!(tt_op||tt_n4||tt_n6||tt_ie||tt_w3c)){
return;
}
var htm=tt_n4?"<div style=\"position:absolute;\"></div>":"",tags,t_tj,over,esc="return escape(";
var i=tt_tags.length;
while(i--){
tags=tt_ie?(document.all.tags(tt_tags[i])||1):document.getElementsByTagName?(document.getElementsByTagName(tt_tags[i])||1):(!tt_n4&&tt_tags[i]=="a")?document.links:1;
if(tt_n4&&(tt_tags[i]=="a"||tt_tags[i]=="layer")){
tags=tt_N4Tags(tt_tags[i]);
}
var j=tags.length;
while(j--){
if(typeof (t_tj=tags[j]).onmouseover=="function"&&t_tj.onmouseover.toString().indexOf(esc)!=-1&&!tt_n6||tt_n6&&(over=t_tj.getAttribute("onmouseover"))&&over.indexOf(esc)!=-1){
if(over){
t_tj.onmouseover=new Function(over);
}
var txt=unescape(t_tj.onmouseover());
htm+=tt_Htm(t_tj,"tOoLtIp"+i+""+j,txt.wzReplace("& ","&"));
t_tj.onmouseover=new Function("e","tt_Show(e,"+"\"tOoLtIp"+i+""+j+"\","+((typeof t_tj.T_ABOVE!=tt_u)?t_tj.T_ABOVE:ttAbove)+","+((typeof t_tj.T_DELAY!=tt_u)?t_tj.T_DELAY:ttDelay)+","+((typeof t_tj.T_FIX!=tt_u)?"\""+t_tj.T_FIX+"\"":"\"\"")+","+((typeof t_tj.T_LEFT!=tt_u)?t_tj.T_LEFT:ttLeft)+","+((typeof t_tj.T_OFFSETX!=tt_u)?t_tj.T_OFFSETX:ttOffsetX)+","+((typeof t_tj.T_OFFSETY!=tt_u)?t_tj.T_OFFSETY:ttOffsetY)+","+((typeof t_tj.T_STATIC!=tt_u)?t_tj.T_STATIC:ttStatic)+","+((typeof t_tj.T_STICKY!=tt_u)?t_tj.T_STICKY:ttSticky)+","+((typeof t_tj.T_TEMP!=tt_u)?t_tj.T_TEMP:ttTemp)+");");
t_tj.onmouseout=tt_Hide;
if(t_tj.alt){
t_tj.alt="";
}
if(t_tj.title){
t_tj.title="";
}
}
}
}
document.write(htm);
if(document.getElementById){
tt_ifrm=document.getElementById("TTiEiFrM");
}
}
tt_Init();

