/*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(_2c,_2d,_2e,_2f){
if(_CF_error_fields[_2d]==null){
if(_CF_FirstErrorField==null){
_CF_FirstErrorField=_2d;
}
_CF_error_exists=true;
_CF_error_fields[_2d]=_2f;
_CF_error_messages[_CF_error_messages.length]=_2f;
}
};
_CF_onErrorAlert=function(_30){
var _31="";
for(var i=0;i<_30.length;i++){
_31+=_30[i]+"\n";
}
alert(_31);
return false;
};
updateHiddenValue=function(val,_34,_35){
if(_34==null||_34==""){
_34=0;
}
if(document.forms[_34]==null||document.forms[_34][_35]==null){
return;
}
document.forms[_34][_35].value=val;
};
_CF_hasValue=function(obj,_37,_38){
if(_37=="TEXT"||_37=="FILE"||_37=="PASSWORD"||_37=="CFTEXTAREA"||_37=="TEXTAREA"||_37=="CFTEXTINPUT"||_37=="DATEFIELD"){
if(obj.value.length==0){
return false;
}else{
if(_38){
str=obj.value.replace(/^\s+/,"").replace(/\s+$/,"");
if(str.length==0){
return false;
}
}
}
return true;
}else{
if(_37=="SELECT"){
for(i=0;i<obj.length;i++){
if(obj.options[i].selected){
return true;
}
}
return false;
}else{
if(_37=="SINGLE_VALUE_RADIO"||_37=="SINGLE_VALUE_CHECKBOX"){
if(obj.checked){
return true;
}else{
return false;
}
}else{
if(_37=="RADIO"||_37=="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(_37=="CFTREE"){
if(obj["value"].length>0){
return true;
}else{
return false;
}
}else{
if(_37=="RICHTEXT"){
var _39=FCKeditorAPI.GetInstance(obj.id);
var val=_39.GetXHTML();
if(val.length==0){
return false;
}else{
if(_38){
str=val.replace(/^\s+/,"").replace(/\s+$/,"");
if(str.length==0){
return false;
}
}
return true;
}
}else{
return true;
}
}
}
}
}
}
};
_CF_checkdate=function(_3b,_3c){
_3b=_3b.replace(/^\s+/,"").replace(/\s+$/,"");
_3b=_3b=_3b.replace(/{d \'/,"").replace(/'}/,"");
if(_3c){
if(_3b.length==0){
return false;
}
}else{
if(_3b.length==0){
return true;
}
}
if(_3b.length==0){
return true;
}
isplit=_3b.indexOf("/");
splitchr="/";
if(isplit==-1){
isplit=_3b.indexOf(".");
splitchr=".";
}
if(isplit==-1){
isplit=_3b.indexOf("-");
splitchr="-";
}
if(isplit==-1||isplit==_3b.length){
return false;
}
var _3d=_3b.substring(0,isplit);
if(_3d.length==4){
sYear=_3b.substring(0,isplit);
isplit=_3b.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_3b.length){
return false;
}
sMonth=_3b.substring((sYear.length+1),isplit);
sDay=_3b.substring(isplit+1);
}else{
sMonth=_3b.substring(0,isplit);
isplit=_3b.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_3b.length){
return false;
}
sDay=_3b.substring((sMonth.length+1),isplit);
sYear=_3b.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(_3e,_3f){
_3e=_3e.replace(/^\s+/,"").replace(/\s+$/,"");
_3e=_3e=_3e.replace(/{d \'/,"").replace(/'}/,"");
if(_3f){
if(_3e.length==0){
return false;
}
}else{
if(_3e.length==0){
return true;
}
}
isplit=_3e.indexOf("/");
splitchr="/";
if(isplit==-1){
isplit=_3e.indexOf(".");
splitchr=".";
}
if(isplit==-1){
isplit=_3e.indexOf("-");
splitchr="-";
}
if(isplit==-1||isplit==_3e.length){
return false;
}
var _40=_3e.substring(0,isplit);
if(_40.length==4){
sYear=_3e.substring(0,isplit);
isplit=_3e.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_3e.length){
return false;
}
sMonth=_3e.substring((sYear.length+1),isplit);
sDay=_3e.substring(isplit+1);
}else{
sDay=_3e.substring(0,isplit);
isplit=_3e.indexOf(splitchr,isplit+1);
if(isplit==-1||(isplit+1)==_3e.length){
return false;
}
sMonth=_3e.substring((sDay.length+1),isplit);
sYear=_3e.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(_41,_42,_43){
maxDay=31;
if(_42==4||_42==6||_42==9||_42==11){
maxDay=30;
}else{
if(_42==2){
if(_41%4>0){
maxDay=28;
}else{
if(_41%100==0&&_41%400>0){
maxDay=28;
}else{
maxDay=29;
}
}
}
}
return _CF_checkrange(_43,1,maxDay);
};
_CF_checkinteger=function(_44,_45){
_44=_44.replace(/^\s+/,"").replace(/\s+$/,"");
_44=_44.replace(/[$£¥€,~+]?/g,"");
if(_45){
if(_44.length==0){
return false;
}
}else{
if(_44.length==0){
return true;
}
}
var _46=".";
var _47=_44.indexOf(_46);
if(_47==-1){
return _CF_checknumber(_44);
}else{
return false;
}
};
_CF_numberrange=function(_48,_49,_4a,_4b){
if(_4b){
if(_48.length==0){
return false;
}
}else{
if(_48.length==0){
return true;
}
}
if(_49!=null){
if(_48<_49){
return false;
}
}
if(_4a!=null){
if(_48>_4a){
return false;
}
}
return true;
};
_CF_checknumber=function(_4c,_4d){
var _4e=" .+-0123456789";
var _4f=" .0123456789";
var _50;
var _51=false;
var _52=false;
var _53=false;
_4c=_4c.replace(/^\s+/,"").replace(/\s+$/,"");
_4c=_4c.replace(/[$£¥€,~+]?/g,"");
if(_4d){
if(_4c.length==0){
return false;
}
}else{
if(_4c.length==0){
return true;
}
}
_50=_4e.indexOf(_4c.charAt(0));
if(_50==1){
_51=true;
}else{
if(_50<1){
return false;
}
}
for(var i=1;i<_4c.length;i++){
_50=_4f.indexOf(_4c.charAt(i));
if(_50<0){
return false;
}else{
if(_50==1){
if(_51){
return false;
}else{
_51=true;
}
}else{
if(_50==0){
if(_51||_53){
_52=true;
}
}else{
if(_52){
return false;
}else{
_53=true;
}
}
}
}
}
return true;
};
_CF_checkrange=function(_55,_56,_57,_58){
_55=_55.replace(/^\s+/,"").replace(/\s+$/,"");
if(_58){
if(_55.length==0){
return false;
}
}else{
if(_55.length==0){
return true;
}
}
if(!_CF_checknumber(_55)){
return false;
}else{
return (_CF_numberrange((eval(_55)),_56,_57));
}
return true;
};
_CF_checktime=function(_59,_5a){
_59=_59.replace(/^\s+/,"").replace(/\s+$/,"");
_59=_59.replace(/\s+:\s+/,":");
_59=_59=_59.replace(/{t \'/,"").replace(/'}/,"");
if(_5a){
if(_59.length==0){
return false;
}
}else{
if(_59.length==0){
return true;
}
}
var _5b=_CF_checkregex(_59,/^((([0-1]?\d)|(2[0-3])):[0-5]\d)?(:[0-5]\d)? ?([AP]M|[AP]m|[ap]m|[ap]M)?$/,_5a);
return _5b;
};
_CF_checkphone=function(_5c,_5d){
_5c=_5c.replace(/^\s+/,"").replace(/\s+$/,"");
if(_5d){
if(_5c.length==0){
return false;
}
}else{
if(_5c.length==0){
return true;
}
}
if(_5c.length==0){
return true;
}
return _CF_checkregex(_5c,/^(((1))?[ ,\-,\.]?([\\(]?([1-9][0-9]{2})[\\)]?))?[ ,\-,\.]?([^0-1]){1}([0-9]){2}[ ,\-,\.]?([0-9]){4}(( )((x){0,1}([0-9]){1,5}){0,1})?$/,_5d);
};
_CF_checkzip=function(_5e,_5f){
_5e=_5e.replace(/^\s+/,"").replace(/\s+$/,"");
if(_5f){
if(_5e.length==0){
return false;
}
}else{
if(_5e.length==0){
return true;
}
}
return _CF_checkregex(_5e,/^([0-9]){5,5}$|(([0-9]){5,5}(-| ){1}([0-9]){4,4}$)/,_5f);
};
_CF_checkcreditcard=function(_60,_61){
_60=_60.replace(/^\s+/,"").replace(/\s+$/,"");
if(_61){
if(_60.length==0){
return false;
}
}else{
if(_60.length==0){
return true;
}
}
if(_60.length==0){
return true;
}
var _62=" -";
var _63="";
var _64;
for(var i=0;i<_60.length;i++){
_64=_62.indexOf(_60.charAt(i));
if(_64<0){
_63+=_60.substring(i,(i+1));
}
}
if(_63.length<13||_63.length>19){
return false;
}
if(_63.charAt(0)=="+"){
return false;
}
if(!_CF_checkinteger(_63)){
return false;
}
var _66=_63.length%2==1?false:true;
var _67=0;
var _68;
for(var i=0;i<_63.length;i++){
_68=eval(_63.charAt(i));
if(_66){
_68*=2;
_67+=(_68%10);
if((_68/10)>=1){
_67++;
}
_66=false;
}else{
_67+=_68;
_66=true;
}
}
return (_67%10)==0?true:false;
};
_CF_checkssn=function(_69,_6a){
_69=_69.replace(/^\s+/,"").replace(/\s+$/,"");
if(_6a){
if(_69.length==0){
return false;
}
}else{
if(_69.length==0){
return true;
}
}
return _CF_checkregex(_69,/^[0-9]{3}(-| )[0-9]{2}(-| )[0-9]{4}$/,_6a);
};
_CF_checkEmail=function(_6b,_6c){
_6b=_6b.replace(/^\s+/,"").replace(/\s+$/,"");
if(_6c){
if(_6b.length==0){
return false;
}
}else{
if(_6b.length==0){
return true;
}
}
return _CF_checkregex(_6b,/^[a-zA-Z_0-9-'\+~]+(\.[a-zA-Z_0-9-'\+~]+)*@([a-zA-Z_0-9-]+\.)+[a-zA-Z]{2,7}$/,_6c);
};
_CF_checkURL=function(_6d,_6e){
_6d=_6d.replace(/^\s+/,"").replace(/\s+$/,"");
if(_6e){
if(_6d.length==0){
return false;
}
}else{
if(_6d.length==0){
return true;
}
}
return _CF_checkregex(_6d.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\.]*)$/,_6e);
};
_CF_checkUUID=function(_6f,_70){
_6f=_6f.replace(/^\s+/,"").replace(/\s+$/,"");
if(_70){
if(_6f.length==0){
return false;
}
}else{
if(_6f.length==0){
return true;
}
}
return _CF_checkregex(_6f,/[A-Fa-f0-9]{8,8}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{4,4}-[A-Fa-f0-9]{16,16}/,_70);
};
_CF_checkGUID=function(_71,_72){
_71=_71.replace(/^\s+/,"").replace(/\s+$/,"");
if(_72){
if(_71.length==0){
return false;
}
}else{
if(_71.length==0){
return true;
}
}
return _CF_checkregex(_71,/[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}/,_72);
};
_CF_checkBoolean=function(_73,_74){
_73=_73.replace(/^\s+/,"").replace(/\s+$/,"");
if(_74){
if(_73.length==0){
return false;
}
}else{
if(_73.length==0){
return true;
}
}
if(_73.toUpperCase()=="TRUE"||_73.toUpperCase()=="YES"||(_CF_checknumber(_73)&&_73!="0")){
return true;
}else{
if(_73.toUpperCase()=="FALSE"||_73.toUpperCase()=="NO"||_73=="0"){
return true;
}else{
return false;
}
}
};
_CF_setFormParam=function(_75,_76,_77){
var _78="document['"+_75+"']['"+_76+"']";
var obj=eval(_78);
if(obj==undefined){
return false;
}else{
obj.value=_77;
return true;
}
};
_CF_checkregex=function(_7a,_7b,_7c){
if(_7c){
if(_7a.length==0){
return false;
}
}else{
if(_7a.length==0){
return true;
}
}
return _7b.test(_7a);
};

