/*ADOBE SYSTEMS INCORPORATED
Copyright 2007 Adobe Systems Incorporated
All Rights Reserved.

NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the
terms of the Adobe license agreement accompanying it.  If you have received this file from a
source other than Adobe, then your use, modification, or distribution of it requires the prior
written permission of Adobe.*/
var _CF_error_messages=new Array();
var _CF_error_fields=new Object();
var _CF_FirstErrorField=null;
var _CF_submit_status=new Array();
_CF_signalLoad=function(){
_CF_loaded=1;
};
_CF_onError=function(_87a,_87b,_87c,_87d){
if(_CF_error_fields[_87b]==null){
if(_CF_FirstErrorField==null){
_CF_FirstErrorField=_87b;
}
_CF_error_exists=true;
_CF_error_fields[_87b]=_87d;
_CF_error_messages[_CF_error_messages.length]=_87d;
}
};
_CF_onErrorAlert=function(_87e){
var _87f="";
for(var i=0;i<_87e.length;i++){
_87f+=_87e[i]+"\n";
}
alert(_87f);
return false;
};
updateHiddenValue=function(val,form,name){
if(form==null||form==""){
form=0;
}
if(document.forms[form]==null||document.forms[form][name]==null){
return;
}
document.forms[form][name].value=val;
};
_CF_hasValue=function(obj,_885,_886){
if(_885=="TEXT"||_885=="FILE"||_885=="PASSWORD"||_885=="CFTEXTAREA"||_885=="TEXTAREA"||_885=="CFTEXTINPUT"||_885=="DATEFIELD"){
if(obj.value.length==0){
return false;
}else{
if(_886){
str=obj.value.replace(/^\s+/,"").replace(/\s+$/,"");
if(str.length==0){
return false;
}
}
}
return true;
}else{
if(_885=="SELECT"){
for(i=0;i<obj.length;i++){
if(obj.options[i].selected&&obj.options[i].value.length>0){
return true;
}
}
return false;
}else{
if(_885=="SINGLE_VALUE_RADIO"||_885=="SINGLE_VALUE_CHECKBOX"){
if(obj.checked){
return true;
}else{
return false;
}
}else{
if(_885=="RADIO"||_885=="CHECKBOX"){
if(obj.length==undefined&&obj.checked){
return true;
}else{
for(i=0;i<obj.length;i++){
if(obj[i].checked){
return true;
}
}
}
return false;
}else{
if(_885=="CFTREE"){
if(obj["value"].length>0){
return true;
}else{
return false;
}
}else{
if(_885=="RICHTEXT"){
var _887=FCKeditorAPI.GetInstance(obj.id);
var val=_887.GetXHTML();
if(val.length==0){
return false;
}else{
if(_886){
str=val.replace(/^\s+/,"").replace(/\s+$/,"");
if(str.length==0){
return false;
}
}
return true;
}
}else{
return true;
}
}
}
}
}
}
};
_CF_checkdate=function(_889,_88a){
_889=_889.replace(/^\s+/,"").replace(/\s+$/,"");
_889=_889=_889.replace(/{d \'/,"").replace(/'}/,"");
if(_88a){
if(_889.length==0){
return false;
}
}else{
if(_889.length==0){
return true;
}
}
if(_889.length==0){
return true;
}
isplit=_889.indexOf("/");
splitchr="/";
if(isplit==-1){
isplit=_889.indexOf(".");
splitchr=".";
}
if(isplit==-1){
isplit=_889.indexOf("-");
splitchr="-";
}
if(isplit==-1||isplit==_889.length){
return false;
}
var _88b=_889.substring(0,isplit);
if(_88b.length==4){
sYear=_889.substring(0,isplit);
isplit=_889.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_889.length){
return false;
}
sMonth=_889.substring((sYear.length+1),isplit);
sDay=_889.substring(isplit+1);
}else{
sMonth=_889.substring(0,isplit);
isplit=_889.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_889.length){
return false;
}
sDay=_889.substring((sMonth.length+1),isplit);
sYear=_889.substring(isplit+1);
}
if((sDay.length==0)||(sMonth.length==0)||(sYear.length==0)){
return false;
}
if(!_CF_checkinteger(sMonth)){
return false;
}else{
if(!_CF_checkrange(sMonth,1,12)){
return false;
}else{
if(!_CF_checkinteger(sYear)){
return false;
}else{
if(sYear.length!=1&&sYear.length!=2&&sYear.length!=4){
return false;
}else{
if(!_CF_checkrange(sYear,0,9999)){
return false;
}else{
if(!_CF_checkinteger(sDay)){
return false;
}else{
if(!_CF_checkday(sYear,sMonth,sDay)){
return false;
}else{
return true;
}
}
}
}
}
}
}
};
_CF_checkeurodate=function(_88c,_88d){
_88c=_88c.replace(/^\s+/,"").replace(/\s+$/,"");
_88c=_88c=_88c.replace(/{d \'/,"").replace(/'}/,"");
if(_88d){
if(_88c.length==0){
return false;
}
}else{
if(_88c.length==0){
return true;
}
}
isplit=_88c.indexOf("/");
splitchr="/";
if(isplit==-1){
isplit=_88c.indexOf(".");
splitchr=".";
}
if(isplit==-1){
isplit=_88c.indexOf("-");
splitchr="-";
}
if(isplit==-1||isplit==_88c.length){
return false;
}
var _88e=_88c.substring(0,isplit);
if(_88e.length==4){
sYear=_88c.substring(0,isplit);
isplit=_88c.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_88c.length){
return false;
}
sMonth=_88c.substring((sYear.length+1),isplit);
sDay=_88c.substring(isplit+1);
}else{
sDay=_88c.substring(0,isplit);
isplit=_88c.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_88c.length){
return false;
}
sMonth=_88c.substring((sDay.length+1),isplit);
sYear=_88c.substring(isplit+1);
}
if(!_CF_checkinteger(sMonth)){
return false;
}else{
if(!_CF_checkrange(sMonth,1,12)){
return false;
}else{
if(!_CF_checkinteger(sYear)){
return false;
}else{
if(!_CF_checkrange(sYear,0,null)){
return false;
}else{
if(!_CF_checkinteger(sDay)){
return false;
}else{
if(!_CF_checkday(sYear,sMonth,sDay)){
return false;
}else{
return true;
}
}
}
}
}
}
};
_CF_checkday=function(_88f,_890,_891){
maxDay=31;
if(_890==4||_890==6||_890==9||_890==11){
maxDay=30;
}else{
if(_890==2){
if(_88f%4>0){
maxDay=28;
}else{
if(_88f%100==0&&_88f%400>0){
maxDay=28;
}else{
maxDay=29;
}
}
}
}
return _CF_checkrange(_891,1,maxDay);
};
_CF_checkinteger=function(_892,_893){
_892=_892.replace(/^\s+/,"").replace(/\s+$/,"");
_892=_892.replace(/[$£¥€,~+]?/g,"");
if(_893){
if(_892.length==0){
return false;
}
}else{
if(_892.length==0){
return true;
}
}
var _894=".";
var _895=_892.indexOf(_894);
if(_895==-1){
return _CF_checknumber(_892);
}else{
return false;
}
};
_CF_numberrange=function(_896,_897,_898,_899){
if(_899){
if(_896.length==0){
return false;
}
}else{
if(_896.length==0){
return true;
}
}
if(_897!=null){
if(_896<_897){
return false;
}
}
if(_898!=null){
if(_896>_898){
return false;
}
}
return true;
};
_CF_checknumber=function(_89a,_89b){
var _89c=" .+-0123456789";
var _89d=" .0123456789";
var _89e;
var _89f=false;
var _8a0=false;
var _8a1=false;
_89a=_89a.replace(/^\s+/,"").replace(/\s+$/,"");
_89a=_89a.replace(/[$£¥€,~+]?/g,"");
if(_89b){
if(_89a.length==0){
return false;
}
}else{
if(_89a.length==0){
return true;
}
}
_89e=_89c.indexOf(_89a.charAt(0));
if(_89e==1){
_89f=true;
}else{
if(_89e<1){
return false;
}
}
for(var i=1;i<_89a.length;i++){
_89e=_89d.indexOf(_89a.charAt(i));
if(_89e<0){
return false;
}else{
if(_89e==1){
if(_89f){
return false;
}else{
_89f=true;
}
}else{
if(_89e==0){
if(_89f||_8a1){
_8a0=true;
}
}else{
if(_8a0){
return false;
}else{
_8a1=true;
}
}
}
}
}
return true;
};
_CF_checkrange=function(_8a3,_8a4,_8a5,_8a6){
_8a3=_8a3.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8a6){
if(_8a3.length==0){
return false;
}
}else{
if(_8a3.length==0){
return true;
}
}
if(!_CF_checknumber(_8a3)){
return false;
}else{
return (_CF_numberrange((eval(_8a3)),_8a4,_8a5));
}
return true;
};
_CF_checktime=function(_8a7,_8a8){
_8a7=_8a7.replace(/^\s+/,"").replace(/\s+$/,"");
_8a7=_8a7.replace(/\s+:\s+/,":");
_8a7=_8a7=_8a7.replace(/{t \'/,"").replace(/'}/,"");
if(_8a8){
if(_8a7.length==0){
return false;
}
}else{
if(_8a7.length==0){
return true;
}
}
var _8a9=_CF_checkregex(_8a7,/^((([0-1]?\d)|(2[0-3])):[0-5]?\d)?(:[0-5]?\d)? ?([AP]M|[AP]m|[ap]m|[ap]M)?$/,_8a8);
return _8a9;
};
_CF_checkphone=function(_8aa,_8ab){
_8aa=_8aa.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8ab){
if(_8aa.length==0){
return false;
}
}else{
if(_8aa.length==0){
return true;
}
}
if(_8aa.length==0){
return true;
}
return _CF_checkregex(_8aa,/^(((1))?[ ,\-,\.]?([\\(]?([1-9][0-9]{2})[\\)]?))?[ ,\-,\.]?([^0-1]){1}([0-9]){2}[ ,\-,\.]?([0-9]){4}(( )((x){0,1}([0-9]){1,5}){0,1})?$/,_8ab);
};
_CF_checkzip=function(_8ac,_8ad){
_8ac=_8ac.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8ad){
if(_8ac.length==0){
return false;
}
}else{
if(_8ac.length==0){
return true;
}
}
return _CF_checkregex(_8ac,/^([0-9]){5,5}$|(([0-9]){5,5}(-| ){1}([0-9]){4,4}$)/,_8ad);
};
_CF_checkcreditcard=function(_8ae,_8af){
_8ae=_8ae.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8af){
if(_8ae.length==0){
return false;
}
}else{
if(_8ae.length==0){
return true;
}
}
if(_8ae.length==0){
return true;
}
var _8b0=" -";
var _8b1="";
var _8b2;
for(var i=0;i<_8ae.length;i++){
_8b2=_8b0.indexOf(_8ae.charAt(i));
if(_8b2<0){
_8b1+=_8ae.substring(i,(i+1));
}
}
if(_8b1.length<13||_8b1.length>19){
return false;
}
if(_8b1.charAt(0)=="+"){
return false;
}
if(!_CF_checkinteger(_8b1)){
return false;
}
var _8b4=_8b1.length%2==1?false:true;
var _8b5=0;
var _8b6;
for(var i=0;i<_8b1.length;i++){
_8b6=eval(_8b1.charAt(i));
if(_8b4){
_8b6*=2;
_8b5+=(_8b6%10);
if((_8b6/10)>=1){
_8b5++;
}
_8b4=false;
}else{
_8b5+=_8b6;
_8b4=true;
}
}
return (_8b5%10)==0?true:false;
};
_CF_checkssn=function(_8b7,_8b8){
_8b7=_8b7.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8b8){
if(_8b7.length==0){
return false;
}
}else{
if(_8b7.length==0){
return true;
}
}
return _CF_checkregex(_8b7,/^[0-9]{3}(-| )[0-9]{2}(-| )[0-9]{4}$/,_8b8);
};
_CF_checkEmail=function(_8b9,_8ba){
_8b9=_8b9.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8ba){
if(_8b9.length==0){
return false;
}
}else{
if(_8b9.length==0){
return true;
}
}
return _CF_checkregex(_8b9,/^[a-zA-Z_0-9-'\+~]+(\.[a-zA-Z_0-9-'\+~]+)*@([a-zA-Z_0-9-]+\.)+[a-zA-Z]{2,7}$/,_8ba);
};
_CF_checkURL=function(_8bb,_8bc){
_8bb=_8bb.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8bc){
if(_8bb.length==0){
return false;
}
}else{
if(_8bb.length==0){
return true;
}
}
return _CF_checkregex(_8bb.toLowerCase(),/^((http|https|ftp|file)\:\/\/([a-zA-Z0-0]*:[a-zA-Z0-0]*(@))?[a-zA-Z0-9-\.]+(\.[a-zA-Z]{2,3})?(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9-\._\?\,\'\/\+&amp;%\$#\=~])*)|((mailto)\:[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9]{2,7})|((news)\:[a-zA-Z0-9\.]*)$/,_8bc);
};
_CF_checkUUID=function(_8bd,_8be){
_8bd=_8bd.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8be){
if(_8bd.length==0){
return false;
}
}else{
if(_8bd.length==0){
return true;
}
}
return _CF_checkregex(_8bd,/[A-Fa-f0-9]{8,8}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{16,16}/,_8be);
};
_CF_checkGUID=function(_8bf,_8c0){
_8bf=_8bf.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8c0){
if(_8bf.length==0){
return false;
}
}else{
if(_8bf.length==0){
return true;
}
}
return _CF_checkregex(_8bf,/[A-Fa-f0-9]{8,8}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{12,12}/,_8c0);
};
_CF_checkBoolean=function(_8c1,_8c2){
_8c1=_8c1.replace(/^\s+/,"").replace(/\s+$/,"");
if(_8c2){
if(_8c1.length==0){
return false;
}
}else{
if(_8c1.length==0){
return true;
}
}
if(_8c1.toUpperCase()=="TRUE"||_8c1.toUpperCase()=="YES"||(_CF_checknumber(_8c1)&&_8c1!="0")){
return true;
}else{
if(_8c1.toUpperCase()=="FALSE"||_8c1.toUpperCase()=="NO"||_8c1=="0"){
return true;
}else{
return false;
}
}
};
_CF_setFormParam=function(_8c3,_8c4,_8c5){
var _8c6="document['"+_8c3+"']['"+_8c4+"']";
var obj=eval(_8c6);
if(obj==undefined){
return false;
}else{
obj.value=_8c5;
return true;
}
};
_CF_checkregex=function(_8c8,_8c9,_8ca){
if(_8ca){
if(_8c8.length==0){
return false;
}
}else{
if(_8c8.length==0){
return true;
}
}
return _8c9.test(_8c8);
};

