/*
 * Copyright 2010 The Bernard Group. All rights reserved.
 */
 
 
 function CometManager(_1){
this.comm=_1;
this.commType="comet";
this.OBJECTID="id";
this.OBJECTID2="id2";
this.newRequest=CometManager_newRequest;
}
function CometManager_newRequest(_2,_3,_4,_5){
return new CometRequest(this,_2,_3,_4,_5);
}
function CometRequest(_6,_7,_8,_9,_a){
this.manager=_6;
this.handlerUrl=_7;
this.url=this.manager.comm.createUrl(null,_8,this.manager.commType);
this.resultHandlerFunction=_9;
this.resultHandlerFunctionParameter=_a;
this.statusDivId=null;
this.spinner=SPINNERIMAGE;
this.errorMessage=null;
this.commSuccess=false;
this.serverSuccess=false;
this.xmlResponse=null;
this.sessionTracking=false;
this.systemErrors=new Array();
this.infoMessages=new Array();
this.warningMessages=new Array();
this.errorMessages=new Array();
this.send=CometRequest_send;
this.addParameter=CometRequest_addParameter;
this.addObject=CometRequest_addObject;
this.addObjectId=CometRequest_addObjectId;
this.addObjectId2=CometRequest_addObjectId2;
this.addFormField=CometRequest_addFormField;
this.addDropDown=CometRequest_addDropDown;
this.addRadio=CometRequest_addRadio;
this.addCheckBox=CometRequest_addCheckBox;
this.hasUserMessages=CometRequest_hasUserMessages;
this.hasInfoMessages=CometRequest_hasInfoMessages;
this.hasWarningMessages=CometRequest_hasWarningMessages;
this.hasErrorMessages=CometRequest_hasErrorMessages;
this.showUserMessages=CometRequest_showUserMessages;
this.getObject=CometRequest_getObject;
this.getResultNode=CometRequest_getResultNode;
this.getListManager=CometRequest_getListManager;
this.getWorkingObject=CometRequest_getWorkingObject;
this.private_getRootNode=CometRequest_private_getRootNode;
this.private_setSessionTracking=CometRequest_private_setSessionTracking;
this.private_finished=CometRequest_private_finished;
this.private_setStatusDiv=CometRequest_private_setStatusDiv;
this.private_getMessageArray=CometRequest_private_getMessageArray;
}
function CometRequest_addParameter(_b,_c){
this.url.appendParam(_b,_c);
}
function CometRequest_addObjectId(_d){
this.addParameter(this.manager.OBJECTID,_d);
}
function CometRequest_addObjectId2(_e){
this.addParameter(this.manager.OBJECTID2,_e);
}
function CometRequest_addFormField(_f,_10){
this.addParameter(_f,getFormItemValue(_f));
if(_10==true){
resetFormItemValue(_f);
}
}
function CometRequest_addCheckBox(_11,_12){
if(isChecked(_11)){
this.addParameter(_11,"true");
}
if(_12==true){
}
}
function CometRequest_addDropDown(_13,_14){
this.addParameter(_13,getDropDownSelectedValue(_13));
if(_14==true){
selectIndexOnDropDown(_13,0);
}
}
function CometRequest_addRadio(_15){
this.addParameter(_15,getSelectedRadioValue(getFormItem(_15)));
}
function CometRequest_addObject(_16,_17){
var key=_16;
if(key==null){
key=this.manager.OBJECTID;
}
var _19="";
if(_17!=null){
_19=$.toJSON(_17);
}
this.addParameter(key,_19);
}
function CometRequest_send(){
this.private_setStatusDiv("<img src=\""+this.spinner+"\" border=\"0\"/>");
var _1a=null;
if(window.XMLHttpRequest){
_1a=new XMLHttpRequest();
if(_1a.overrideMimeType){
_1a.overrideMimeType("text/xml");
}
}else{
if(window.ActiveXObject){
try{
_1a=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_1a=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
}
}
if(!_1a){
this.commSuccess=false;
this.errorMessage="Cannot create an XMLHTTP object";
return this.private_finished();
}
var _1b=this;
_1a.onreadystatechange=function(){
CometRequest_private_handleResult(_1b,_1a);
};
_1a.open("POST",this.handlerUrl,true);
_1a.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
var _1c=this.url.getParams();
_1a.send(_1c);
}
function CometRequest_private_handleResult(_1d,_1e){
if(_1e.readyState==4){
try{
if(_1e.status==200){
_1d.xmlResponse=_1e.responseXML;
_1d.commSuccess=true;
if(_1d.xmlResponse.childNodes.length==0){
_1d.commSuccess=false;
_1d.errorMessage="Communication error.  No results returned from server.  Please try again later.";
}else{
_1d.systemErrors=_1d.private_getMessageArray("systemErrors");
if(_1d.systemErrors.length>0){
_1d.serverSuccess=false;
var _1f="";
for(var i=0;i<_1d.systemErrors.length;i++){
var _21=_1d.systemErrors[i];
_1f+=_21;
_1f+="\n\n";
}
_1d.errorMessage=_1f;
}else{
_1d.serverSuccess=true;
_1d.private_setSessionTracking();
}
}
}else{
if(_1e.status==0){
return null;
}else{
_1d.commSuccess=false;
_1d.errorMessage="Could not communicate with server.  Server may be down.  Please try again later. (status "+_1e.status+")";
}
}
}
catch(ex){
_1d.commSuccess=false;
_1d.errorMessage="Could not communicate with server.  Server may be down.  Please try again later.";
}
return _1d.private_finished();
}
return null;
}
function CometRequest_private_getRootNode(_22){
var _23=this.xmlResponse.lastChild;
var _24=_23.childNodes;
for(var i=0;i<_24.length;i++){
var _26=_24[i];
if(_26.nodeName==_22){
return _26;
}
}
return null;
}
function CometRequest_private_setSessionTracking(){
var _27=this.private_getRootNode("sessionTracking");
if(_27!=null){
var val=_27.firstChild.nodeValue;
this.sessionTracking=(val=="true"?true:false);
}
}
function CometRequest_private_getMessageArray(_29){
var _2a=this.private_getRootNode(_29);
if(_2a!=null){
var _2b=new Array();
var _2c=_2a.childNodes;
for(var j=0;j<_2c.length;j++){
var _2e=_2c[j];
_2b[_2b.length]=_2e.firstChild.nodeValue;
}
return _2b;
}
return new Array();
}
function CometRequest_private_finished(){
this.private_setStatusDiv(null);
if(this.errorMessage!=null){
alertPanel.alert(this.errorMessage);
this.private_setStatusDiv(this.errorMessage);
}
if(!this.commSuccess){
var _2f="Communication Error: "+this.errorMessage;
logDebug(_2f);
this.private_setStatusDiv(_2f);
}else{
if(!this.serverSuccess){
var _2f="System Error: "+this.errorMessage;
logDebug(_2f);
this.private_setStatusDiv(_2f);
}else{
this.infoMessages=this.private_getMessageArray("infoMessages");
this.warningMessages=this.private_getMessageArray("warningMessages");
this.errorMessages=this.private_getMessageArray("errorMessages");
return this.resultHandlerFunction(this,this.resultHandlerFunctionParameter);
}
}
}
function CometRequest_private_setStatusDiv(_30){
if(this.statusDivId!=null){
var _31=_30;
if(_31==null){
_31="";
}
dynamic.setDivIdContent(this.statusDivId,_31);
}
}
function CometRequest_hasUserMessages(){
return this.hasInfoMessages()||this.hasErrorMessages();
}
function CometRequest_hasInfoMessages(){
if(this.infoMessages.length>0){
return true;
}
return false;
}
function CometRequest_hasWarningMessages(){
if(this.warningMessages.length>0){
return true;
}
return false;
}
function CometRequest_hasErrorMessages(){
if(this.warningMessages.length>0){
return true;
}else{
if(this.errorMessages.length>0){
return true;
}
}
return false;
}
function CometRequest_showUserMessages(_32){
var _33="";
if(this.hasUserMessages()){
if(this.errorMessages.length>0){
_33+="<div id=\"userMessageError\"><strong>";
for(var i=0;i<this.errorMessages.length;i++){
var _35=this.errorMessages[i];
_33+=strWB(_35+"\n");
}
_33+="</strong></div>";
}
if(this.warningMessages.length>0){
_33+="<div id=\"userMessageAlert\"><strong>";
for(var i=0;i<this.warningMessages.length;i++){
var _35=this.errorMessages[i];
_33+=strWB(_35+"\n");
}
_33+="</strong></div>";
}
if(this.infoMessages.length>0){
_33+="<div id=\"userMessageInfo\"><strong>";
for(var i=0;i<this.infoMessages.length;i++){
var _35=this.infoMessages[i];
_33+=strWB(_35+"\n");
}
_33+="</strong></div>";
}
dynamic.setDivIdContent(_32,_33);
}
}
function CometRequest_getResultNode(_36){
var _37=this.private_getRootNode("results");
if(_37!=null){
var _38=_37.childNodes;
for(var j=0;j<_38.length;j++){
var _3a=_38[j];
if(_3a.nodeName==_36){
return _3a;
}
}
}
return null;
}
function CometRequest_getObject(_3b){
var key=_3b;
if(key==null){
key="WORKINGOBJECT";
}
var _3d=this.getResultNode(key);
if(_3d==null){
return null;
}
var _3e=_3d.firstChild;
if(_3e==null){
return null;
}
var bo=new CometBusinessObject(_3e);
return bo;
}
function CometRequest_getListManager(){
return this.getObject("LISTMANAGER");
}
function CometRequest_getWorkingObject(){
return this.getObject("WORKINGOBJECT");
}
function CometCache(_40,_41,_42,_43,_44){
this.requestHandlerName=_41;
this.fetchAction=_42;
this.fetchKey=_43;
this.comet=_40;
this.debugDisplayId=_44;
this.autoLoadKeys=new Array();
this.cache=new Array();
this.get=CometCache_get;
this.put=CometCache_put;
this.has=CometCache_has;
this.fetch=CometCache_fetch;
this.addAutoLoadKey=CometCache_addAutoLoadKey;
this.generateDebugInfo=CometCache_generateDebugInfo;
this.initialize=CometCache_initialize;
this.checkInitialized=CometCache_checkInitialized;
this.onload=CometCache_onload;
var _45=this;
$(window).load(function(){
_45.initialize();
});
}
function CometCache_initialize(){
if(this.autoLoadKeys.length==0){
this.onload();
}else{
var _46=new Array();
for(var i=0;i<this.autoLoadKeys.length;i++){
_46[_46.length]=this.autoLoadKeys[i];
}
for(var i=0;i<_46.length;i++){
var key=_46[i];
this.fetch(key);
}
}
}
function CometCache_checkInitialized(){
for(var i=0;i<this.autoLoadKeys.length;i++){
if(this.autoLoadKeys[i]!="_DONE_"){
return;
}
}
this.onload();
}
function CometCache_has(key){
var _4b=this.get(key);
return _4b!=null;
}
function CometCache_get(key){
var _4d=this.cache;
for(var i=0;i<_4d.length;i++){
var _4f=_4d[i];
if(_4f.name==key){
return _4f.value;
}
}
return null;
}
function CometCache_put(key,_51){
for(var i=0;i<this.cache.length;i++){
var _53=this.cache[i];
if(_53.name==key){
_53.value=_51;
this.generateDebugInfo();
return;
}
}
var _53=new CometCacheItem(key,_51);
this.cache[this.cache.length]=_53;
this.generateDebugInfo();
}
function CometCache_fetch(_54){
var _55=new Array();
_55[0]=this;
_55[1]=_54;
var _56=comet.newRequest(this.requestHandlerName,this.fetchAction,CometCache_handleFetchResult,_55);
_56.addParameter(this.fetchKey,_54);
_56.send();
}
function CometCache_handleFetchResult(_57,_58){
var _59=_58[0];
var _5a=_58[1];
if(_57.hasUserMessages()){
}else{
var _5b=_57.getObject(_5a);
_59.put(_5a,_5b);
for(var i=0;i<_59.autoLoadKeys.length;i++){
if(_59.autoLoadKeys[i]==_5a){
_59.autoLoadKeys[i]="_DONE_";
}
}
_59.checkInitialized();
}
}
function CometCache_addAutoLoadKey(_5d){
this.autoLoadKeys[this.autoLoadKeys.length]=_5d;
}
function CometCache_onload(){
}
function CometCache_generateDebugInfo(){
var _5e=this.debugDisplayId;
if(_5e!=null&&getDiv(_5e)!=null){
var _5f="";
var _60=this.cache;
for(var i=0;i<_60.length;i++){
var _62=_60[i];
_5f+=_62.generateDebugInfo();
}
dynamic.setDivIdContent(_5e,_5f);
}
}
function CometCacheItem(_63,_64){
this.name=_63;
this.value=_64;
this.generateDebugInfo=CometCacheItem_generateDebugInfo;
}
function CometCacheItem_generateDebugInfo(){
var _65="";
_65+="<table border=\"0\" cellspacing=\"0\" class=\"debugObject\">\n";
_65+="<tr><td>";
_65+=strWeb(this.name);
_65+="</td><td>";
if(this.value==null){
_65+="NULL";
}else{
_65+=this.value.private_generateDebugInfo();
}
_65+="</td></tr>\n";
_65+="</table><br />\n\n";
return _65;
}
function CometMessages(_66,_67){
this.divId=_66;
this.thisName=_67;
this.showing=false;
this.autoHide=false;
if(_67!=null){
this.autoHide=true;
}
this.showAll=CometMessages_showAll;
this.showAllInfo=CometMessages_showAllInfo;
this.showInfo=CometMessages_showInfo;
this.showAllWarning=CometMessages_showAllWarning;
this.showAllMessages=CometMessages_showAllMessages;
this.show=CometMessages_show;
this.hide=CometMessages_hide;
}
function CometMessages_showAll(_68){
var _69="";
var _6a=_68.errorMessages;
if(_6a!=null&&_6a.length>0){
for(var i=0;i<_6a.length;i++){
_69+="<div id=\"userMessageError\">"+strWeb(_6a[i])+"</div>\n";
}
}
var _6c=_68.warningMessages;
if(_6c!=null&&_6c.length>0){
for(var i=0;i<_6c.length;i++){
_69+="<div id=\"userMessageAlert\">"+strWeb(_6c[i])+"</div>\n";
}
}
var _6d=_68.infoMessages;
if(_6d!=null&&_6d.length>0){
for(var i=0;i<_6d.length;i++){
_69+="<div id=\"userMessageInfo\">"+strWeb(_6d[i])+"</div>\n";
}
}
if(_69!=""){
var _6e=this;
this.hide(function(){
_6e.show(_69);
});
}
}
function CometMessages_showInfo(_6f){
var _70="";
_70+="<div id=\"userMessageInfo\">"+strWeb(_6f)+"</div>\n";
if(_70!=""){
var _71=this;
this.hide(function(){
_71.show(_70);
});
}
}
function CometMessages_showAllInfo(_72){
this.showAllMessages(_72,"userMessageInfo");
}
function CometMessages_showAllWarning(_73){
this.showAllMessages(_73,"userMessageAlert");
}
function CometMessages_showAllMessages(_74,_75){
if(_74!=null&&_74.length>0){
var _76=this;
this.hide(function(){
var _77="";
for(var i=0;i<_74.length;i++){
var _79=_74[i];
_77+="<div id=\""+_75+"\">"+strWeb(_79)+"</div>";
}
_76.show(_77);
});
}
}
function CometMessages_show(_7a,_7b){
this.showing=true;
dynamic.setContentSmooth2(this.divId,_7a,{duration:400,onDone:_7b});
if(this.autoHide){
setTimeout(this.thisName+".hide()",5000);
}
}
function CometMessages_hide(_7c){
if(this.showing){
dynamic.setContentSmooth2(this.divId,"",{duration:400,onDone:_7c});
this.showing=false;
}else{
if(_7c!=null){
_7c();
}
}
}
function CometBusinessObject(_7d){
this.javaClassName;
this.properties=new Array();
this.setPropertyNode=CometBusinessObject_setPropertyNode;
this.setPropertyInt=CometBusinessObject_setPropertyInt;
this.setPropertyDouble=CometBusinessObject_setPropertyDouble;
this.setPropertyBoolean=CometBusinessObject_setPropertyBoolean;
this.setPropertyDate=CometBusinessObject_setPropertyDate;
this.setPropertyMoney=CometBusinessObject_setPropertyMoney;
this.setPropertyString=CometBusinessObject_setPropertyString;
this.setPropertyBO=CometBusinessObject_setPropertyBO;
this.setPropertyHashMap=CometBusinessObject_setPropertyHashMap;
this.setPropertyArrayList=CometBusinessObject_setPropertyArrayList;
this.setPropertyJSON=CometBusinessObject_setPropertyJSON;
this.getProperty=CometBusinessObject_getProperty;
this.setProperty=CometBusinessObject_setProperty;
this.setPropertyAny=CometBusinessObject_setPropertyAny;
this.get=CometBusinessObject_get;
this.put=CometBusinessObject_put;
this.getHtml=CometBusinessObject_getHtml;
this.private_generateDebugInfo=CometBusinessObject_private_generateDebugInfo;
this.strXMLtoJS=CometBusinessObject_strXMLtoJS;
if(_7d!=null){
this.javaClassName=_7d.getAttribute("class");
var _7e=_7d.childNodes;
for(var i=0;i<_7e.length;i++){
var _80=_7e[i];
this.setPropertyNode(_80);
}
}
}
function CometBusinessObject_strXMLtoJS(_81){
var _82=_81.replace(/<br \/>/g,"\n");
return _82;
}
function CometBusinessObject_setPropertyNode(_83){
var _84=_83.getAttribute("name");
if(_83.childNodes.length==1){
var _85=_83.firstChild;
if(_85.nodeName=="value"){
var _86=_85.getAttribute("type");
if(_86=="Integer"){
this.setPropertyInt(_84,_86,_85.firstChild.nodeValue);
}else{
if(_86=="Double"){
this.setPropertyDouble(_84,_86,_85.firstChild.nodeValue);
}else{
if(_86=="Boolean"){
this.setPropertyBoolean(_84,_86,_85.firstChild.nodeValue);
}else{
if(_86=="Date"){
this.setPropertyDate(_84,_86,_85.firstChild.nodeValue);
}else{
if(_86=="Money"){
this.setPropertyMoney(_84,_86,_85.firstChild.nodeValue);
}else{
if(_86=="String"){
if(_85.firstChild==null){
this.setPropertyString(_84,_86,"");
}else{
var _87="";
if(typeof (_85.textContent)!="undefined"){
_87=_85.textContent;
}else{
_87=_85.firstChild.nodeValue;
}
this.setPropertyString(_84,_86,_87);
}
}else{
if(_86=="SerializedObject"){
this.setPropertyBO(_84,_86,_85.firstChild);
}else{
if(_86=="HashMap"){
this.setPropertyHashMap(_84,_86,_85.firstChild);
}else{
if(_86=="ArrayList"){
this.setPropertyArrayList(_84,_86,_85);
}else{
if(_86=="JSONOBJECT"){
this.setPropertyJSON(_84,_86,_85);
}
}
}
}
}
}
}
}
}
}
}
}
}
function CometBusinessObject_setPropertyInt(_88,_89,_8a){
if(_8a=="null"){
this.setProperty(_88,_89,null);
}else{
this.setProperty(_88,_89,toInt(_8a));
}
}
function CometBusinessObject_setPropertyDouble(_8b,_8c,_8d){
if(_8d=="null"){
this.setProperty(_8b,_8c,null);
}else{
this.setProperty(_8b,_8c,toFloat(_8d));
}
}
function CometBusinessObject_setPropertyBoolean(_8e,_8f,_90){
if(_90=="null"){
this.setProperty(_8e,_8f,null);
}else{
this.setProperty(_8e,_8f,_90=="true"?true:false);
}
}
function CometBusinessObject_setPropertyDate(_91,_92,_93){
if(_93=="null"){
this.setProperty(_91,_92,null);
}else{
var _94=new Date();
_94.setTime(Date.parse(_93));
this.setProperty(_91,_92,_94);
}
}
function CometBusinessObject_setPropertyMoney(_95,_96,_97){
if(_97=="null"){
this.setProperty(_95,_96,null);
}else{
this.setProperty(_95,_96,toFloat(_97));
}
}
function CometBusinessObject_setPropertyString(_98,_99,_9a){
if(_9a=="null"){
this.setProperty(_98,_99,null);
}else{
this.setProperty(_98,_99,this.strXMLtoJS(_9a));
}
}
function CometBusinessObject_setPropertyBO(_9b,_9c,_9d){
if(_9d.nodeName=="#text"&&_9d.nodeValue=="null"){
this.setProperty(_9b,_9c,null);
}else{
var bo=new CometBusinessObject(_9d);
this.setProperty(_9b,_9c,bo);
}
}
function CometBusinessObject_setPropertyHashMap(_9f,_a0,_a1){
if(_a1.nodeName=="#text"&&_a1.nodeValue=="null"){
this.setProperty(_9f,_a0,null);
}else{
var bo=new CometBusinessObject(_a1);
this.setProperty(_9f,_a0,bo);
}
}
function CometBusinessObject_setPropertyArrayList(_a3,_a4,_a5){
if(_a5.firstChild==null||(_a5.firstChild.nodeName=="#text"&&_a5.firstChild.nodeValue=="null")){
this.setProperty(_a3,_a4,null);
}else{
var _a6=_a5.childNodes;
var _a7=new Array();
for(var i=0;i<_a6.length;i++){
var _a9=_a6[i];
if(_a9.nodeName=="#text"&&_a9.nodeValue=="null"){
this.setProperty(_a3,_a4,null);
}else{
var bo=new CometBusinessObject(_a9);
_a7[_a7.length]=bo;
}
}
this.setProperty(_a3,_a4,_a7);
}
}
function CometBusinessObject_setPropertyJSON(_ab,_ac,_ad){
if(_ad.nodeName=="#text"&&_ad.nodeValue=="null"){
this.setProperty(_ab,_ac,null);
}else{
var _ae="";
if(typeof (_ad.textContent)!="undefined"){
_ae=_ad.textContent;
}else{
_ae=_ad.firstChild.nodeValue;
}
var _af={};
if(_ae!=""){
_af=$.parseJSON(_ae);
}
this.setProperty(_ab,_ac,_af);
}
}
function CometBusinessObject_setProperty(_b0,_b1,_b2){
var _b3=this.getProperty(_b0);
if(_b3==null){
_b3=new CometBusinessObjectProperty(_b0,_b1,_b2);
this.properties[this.properties.length]=_b3;
}else{
_b3.value=_b2;
}
}
function CometBusinessObject_setPropertyAny(_b4,_b5){
var _b6=this.getProperty(_b4);
if(_b6==null){
_b6=new CometBusinessObjectProperty(_b4,null,_b5);
this.properties[this.properties.length]=_b6;
}else{
_b6.value=_b5;
}
}
function CometBusinessObject_getProperty(_b7){
var _b8=this.properties;
for(var i=0;i<_b8.length;i++){
var _ba=_b8[i];
if(_ba.name==_b7){
return _ba;
}
}
return null;
}
function CometBusinessObject_get(_bb){
var _bc=this.getProperty(_bb);
if(_bc==null){
return null;
}else{
return _bc.value;
}
}
function CometBusinessObject_put(_bd,_be){
var _bf=this.getProperty(_bd);
if(_bf==null){
}else{
_bf.setValue(_be);
}
}
function CometBusinessObject_getHtml(_c0){
var _c1=this.get(_c0);
return strUnweb(_c1);
}
function CometBusinessObject_private_generateDebugInfo(){
var _c2=this.properties;
var _c3="";
_c3+="\n<table border=\"0\" cellspacing=\"0\" class=\"debugObject\">";
_c3+="<tr><td colspan=\"2\" class=\"javatypename\">";
_c3+=strWeb(this.javaClassName);
_c3+="</td></tr>\n";
for(var i=0;i<_c2.length;i++){
var _c5=_c2[i];
_c3+=_c5.private_generateDebugInfo();
}
_c3+="</table>\n";
return _c3;
}
function CometBusinessObjectProperty(_c6,_c7,_c8){
this.name=_c6;
this.value=_c8;
this.type=_c7;
this.private_generateDebugInfo=CometBusinessObjectProperty_private_generateDebugInfo;
this.setValue=CometBusinessObjectProperty_setValue;
}
function CometBusinessObjectProperty_setValue(_c9){
this.value=_c9;
}
function CometBusinessObjectProperty_private_generateDebugInfo(){
var _ca="";
_ca+="<tr><td>";
_ca+=strWeb(this.name);
_ca+="</td><td>";
if(this.value!=null&&(this.type=="SerializedObject"||this.type=="HashMap")){
_ca+=this.value.private_generateDebugInfo();
}else{
if(this.value!=null&&this.type=="ArrayList"){
_ca+="\n<table border=\"0\" cellspacing=\"0\" class=\"debugObject\">";
_ca+="<tr>";
for(var i=0;i<this.value.length;i++){
_ca+="<td>"+i+"</td>";
}
_ca+="</tr>\n<tr>";
for(var i=0;i<this.value.length;i++){
var _cc=this.value[i];
_ca+="<td>";
_ca+=_cc.private_generateDebugInfo();
_ca+="</td>";
}
_ca+="</tr>\n</table>\n";
}else{
_ca+=strWB(this.value);
}
}
_ca+="</td></tr>\n";
return _ca;
}
function Communications(_cd){
this.sourcePageHandler=_cd;
this.createUrl=Communications_createUrl;
}
function Communications_createUrl(_ce,_cf,_d0){
var _d1=new JDURL(_ce);
_d1.appendParam(SOURCEPAGEHF,this.sourcePageHandler);
_d1.appendParam(PAGEACTIONHF,_cf);
_d1.appendParam(REQUESTTYPE,_d0);
return _d1;
}
function Cookie(_d2){
this.name=null;
this.path=_d2;
this.value=null;
this.values=new Array();
this.save=Cookie_save;
this.put=Cookie_put;
this.get=Cookie_get;
this.display=Cookie_display;
}
function Cookie_get(key){
for(var i=0;i<this.values.length;i++){
var _d5=this.values[i];
if(_d5.key==key){
return _d5.value;
}
}
return null;
}
function Cookie_put(key,_d7){
for(var i=0;i<this.values.length;i++){
var _d9=this.values[i];
if(_d9.key==key){
_d9.value=_d7;
return;
}
}
this.values[this.values.length]={key:key,value:_d7};
}
function Cookie_save(){
var _da="";
for(var i=0;i<this.values.length;i++){
var _dc=this.values[i];
if(i>0){
_da+=":";
}
_da+=_dc.key+"="+_dc.value;
}
this.value=_da;
$.cookie(this.name,this.value,{expires:5,path:this.path});
this.display();
}
function Cookie_display(){
if(DEBUG){
dynamic.setDivIdContent("debugCookie","name:"+this.name+" value:"+this.value);
}
}
Cookie.load=function(_dd,_de){
var _df=new Cookie();
_df.name=_dd;
_df.path=_de;
_df.value=$.cookie(_dd);
_df.values=new Array();
_df.display();
if(_df.value==null){
return null;
}else{
var _e0=_df.value.split(":");
for(var i=0;i<_e0.length;i++){
var _e2=_e0[i];
var _e3=_e2.split("=");
_df.values[_df.values.length]={key:_e3[0],value:_e3[1]};
}
}
return _df;
};
var dynamic={setClass:function(_e4,_e5){
$("#"+_e4)[0].className=_e5;
},getClass:function(_e6){
return $("#"+_e6)[0].className;
},removeClass:function(_e7,_e8){
$("#"+_e7).removeClass(_e8);
},addClass:function(_e9,_ea){
$("#"+_e9).addClass(_ea);
},showOverlay:function(_eb,_ec){
$("#"+_eb).css({opacity:0.3,zIndex:_ec,left:"0px",top:"0px",width:$(document).width()+"px",height:$(document).height()+"px"});
},hideOverlay:function(_ed){
$("#"+_ed).css({width:"1px",height:"1px",top:"-1px"});
},centerDiv:function(_ee){
var _ef=$(window).width();
var _f0=$("#"+_ee).width();
var _f1=(_ef/2)-(_f0/2);
$("#"+_ee).css({left:_f1+"px"});
},slideDownDiv:function(_f2,_f3){
var _f4=_f3;
if(_f4==null){
_f4={};
}
var top=-1*$("#"+_f2).height()-100;
$("#"+_f2).css({top:top+"px"});
var _f6=$().scrollTop();
var _f7=_f6-top;
var _f8=400;
if(_f4.speed!=null){
_f8=_f4.speed;
}
var _f9=null;
if(_f4.ondone!=null){
_f9=_f4.ondone;
}
$("#"+_f2).animate({top:_f7},{duration:_f8,easing:"circEaseInOut",complete:_f9});
},slideUpDiv:function(_fa,_fb){
var _fc=_fb;
if(_fc==null){
_fc={};
}
var div=$("#"+_fa);
var _fe=(-1*div.height()-100)-div.position().top;
var _ff=400;
if(_fc.speed!=null){
_ff=_fc.speed;
}
var _100=null;
if(_fc.ondone!=null){
_100=_fc.ondone;
}
$("#"+_fa).animate({top:_fe},{duration:_ff,easing:"circEaseInOut",complete:_100});
},setDivIdContent:function(_101,_102){
var node=$("#"+_101)[0];
if(node!=null){
node.innerHTML=_102;
}
},divHasContent:function(_104){
var node=$("#"+_104)[0];
if(node!=null){
var _106=node.innerHTML;
return (_106!=null&&_106!="");
}
return false;
},setContentSmooth:function(_107,_108,_109){
var _10a=_109;
if(_10a==null){
_10a={};
}
var div=$("#"+_107);
var _10c=_107+"content";
div.css({overflow:"hidden",height:div.height()});
var _10d="\n<div id=\""+_10c+"\"";
if(_10a.cssClass!=null){
_10d+=" class=\""+_10a.cssClass+"\"";
}
if(_10a.style!=null){
_10d+=" style=\""+_10a.style+"\"";
}
_10d+=">\n";
_10d+=_108;
_10d+="</div>\n";
_10d+="<!-- end "+_10c+" -->\n";
this.setDivIdContent(_107,_10d);
if(_10a.beforeShow!=null){
_10a.beforeShow();
}
var _10e=500;
if(_10a.duration!=null){
_10e=_10a.duration;
}
var _10f=null;
if(_10a.onDone!=null){
_10f=_10a.onDone;
}
var _110=$("#"+_10c);
var _111=_110.outerHeight(true);
var pad=_108!=null&&_108!=""?5:0;
div.animate({height:_111+pad},{duration:_10e,easing:"circEaseInOut",complete:_10f});
},setContentSmooth2:function(_113,_114,_115){
var _116=_115;
if(_116==null){
_116={};
}
var div=$("#"+_113);
if(_116.cssClass!=null){
div.addClass(_116.cssClass);
}
var _118=500;
if(_116.duration!=null){
_118=_116.duration;
}
var _119=null;
if(_116.onDone!=null){
_119=_116.onDone;
}
if(_114==null||_114==""){
div.slideUp(_118,function(){
dynamic.setDivIdContent(_113,"");
div.addClass("hideIt");
if(_119!=null){
_119();
}
});
}else{
var _11a=function(){
dynamic.setDivIdContent(_113,_114);
if(_116.beforeShow!=null){
_116.beforeShow();
}
div.slideDown(_118,_119);
};
if(this.divHasContent(_113)){
this.setContentSmooth2(_113,"",{onDone:_11a});
}else{
_11a();
}
}
}};
function DDOption(id,name){
this.id=id;
this.name=name;
this.get=function(key){
return this[key];
};
}
var forms={dd:function(name,_11f,_120,_121){
var _122=_121;
if(_122==null){
_122={};
}
var _123=_122.idProperty==null?"id":_122.idProperty;
var _124=function(item){
if(item.get){
return item.get("name");
}else{
return item["name"];
}
};
if(_122.nameProperty!=null){
var _126=_122.nameProperty;
_124=function(item){
return item.get(_126);
};
}
if(_122.propertyFunction!=null){
_124=_122.propertyFunction;
}
var _128="";
_128+="\n<select name=\""+name+"\"";
if(_122.onchange!=null){
_128+=" onchange=\""+_122.onchange+"\"";
}
if(_122.cssClass!=null){
_128+=" class=\""+_122.cssClass+"\"";
}
_128+=">\n";
if(_122.showNullOption==null||_122.showNullOption==true){
var _129="Select One";
if(_122.nullOption!=null){
_129=_122.nullOption;
}
_128+="<option value=\"\">"+_129+"</option>\n";
}
if(_11f!=null){
for(var i=0;i<_11f.length;i++){
var _12b=_11f[i];
var _12c="";
var id=null;
var _12e=null;
if(_12b.get){
id=_12b.get(_123);
}else{
id=_12b[_123];
}
if(_120!=null){
if(_120.get){
_12e=_120.get(_123);
}else{
_12e=_120[_123];
}
if(_12e==id){
_12c=" selected=\"selected\" ";
}
}
_128+="<option value=\""+id+"\" "+_12c+">";
_128+=strWeb(_124(_12b));
_128+="</option>\n";
}
}
_128+="</select>\n";
return _128;
},ef:function(name,_130,_131){
var _132=_131;
if(_132==null){
_132={};
}
var _133="";
_133+="<input name=\""+name+"\" value=\""+_130+"\"";
if(_132.type==null){
_133+=" type=\"text\"";
}else{
_133+=" type=\""+_132.type+"\"";
}
if(_132.id!=null){
_133+=" id=\""+_132.id+"\"";
}
if(_132.cssClass!=null){
_133+=" class=\""+_132.cssClass+"\"";
}
if(_132.size!=null){
_133+=" size=\""+_132.size+"\"";
}
if(_132.onfocus!=null){
_133+=" onfocus=\""+_132.onfocus+"\"";
}
if(_132.onblur!=null){
_133+=" onblur=\""+_132.onblur+"\"";
}
if(_132.onkeypress!=null){
_133+=" onkeypress=\""+_132.onkeypress+"\"";
}
if(_132.onkeyup!=null){
_133+=" onkeyup=\""+_132.onkeyup+"\"";
}
_133+="/>";
return _133;
},cb:function(name,text,_136,_137){
var _138=_137;
if(_138==null){
_138={};
}
var _139="";
_139+="<input name=\""+name+"\" id=\""+name+"\" value=\"true\" type=\"checkbox\"";
if(_138.cssClass!=null){
_139+=" class=\""+_138.cssClass+"\"";
}
if(_136==true){
_139+=" checked";
}
if(_138.onchange!=null){
_139+=" onchange=\""+_138.onchange+"\"";
}
_139+="/>";
if(text!=null){
_139+="<label for=\""+name+"\">";
_139+=text;
_139+="</label>";
}
return _139;
},rb:function(name,_13b,text,_13d,_13e){
var _13f=_13e;
if(_13f==null){
_13f={};
}
var _140="";
_140+="<input name=\""+name+"\" id=\""+name+"\" value=\""+_13b+"\" type=\"radio\"";
if(_13f.cssClass!=null){
_140+=" class=\""+_13f.cssClass+"\"";
}
if(_13d==true){
_140+=" checked";
}
_140+="/>";
if(text!=null){
_140+="<label>";
_140+=text;
_140+="</label>";
}
return _140;
},ta:function(name,_142,_143){
var _144=_143;
if(_144==null){
_144={};
}
var _145="";
_145+="<textarea name=\""+name+"\"";
if(_144.id!=null){
_145+=" id=\""+_144.id+"\"";
}
if(_144.cssClass!=null){
_145+=" class=\""+_144.cssClass+"\"";
}
if(_144.rows!=null){
_145+=" rows=\""+_144.rows+"\"";
}
if(_144.onfocus!=null){
_145+=" onfocus=\""+_144.onfocus+"\"";
}
if(_144.onblur!=null){
_145+=" onblur=\""+_144.onblur+"\"";
}
_145+=">";
_145+=_142;
_145+="</textarea>\n";
return _145;
},button:function(_146,_147){
var _148=_147;
if(_148==null){
_148={};
}
var _149="";
_149+="<button";
if(_148.name!=null){
_149+=" id=\""+_148.name+"\"";
_149+=" name=\""+_148.name+"\"";
}
if(_148.cssClass!=null){
_149+=" class=\""+_148.cssClass+"\"";
}
if(_148.onclick!=null){
_149+=" onclick=\""+_148.onclick+"\"";
}
_149+=">";
_149+=_146;
_149+="</button>";
return _149;
}};
var frames={iframe:function(id,_14b,_14c,_14d,_14e){
var _14f=_14e;
if(_14f==null){
_14f={};
}
var _150=0;
if(_14f.frameborder!=null){
_150=_14f.frameborder;
}
var _151="auto";
if(_14f.scrolling!=null){
_151=_14f.scrolling;
}
var _152="";
_152+="<iframe id=\""+id+"\" src=\""+_14b+"\" width=\""+_14c+"\" height=\""+_14d+"\" frameborder=\""+_150+"\" scrolling=\""+_151+"\" ";
if(_14f.onload!=null){
_152+=" onload=\""+_14f.onload+"\"";
}
_152+=">\n";
_152+="ERROR: Your browser does not support iframes.\n";
_152+="</iframe>\n";
return _152;
},getDoc:function(_153){
var _154=$("#"+_153)[0];
var _155=_154.contentWindow;
return _155;
},print:function(_156){
var _157=this.getDoc(_156);
_157.focus();
_157.print();
}};
var tags={a:function(text,url,_15a){
var _15b=_15a;
if(_15b==null){
_15b={};
}
var _15c="";
_15c+="<a href=\""+url+"\"";
if(_15b.id!=null){
_15c+=" id=\""+_15b.id+"\"";
}
if(_15b.cssClass!=null){
_15c+=" class=\""+_15b.cssClass+"\"";
}
if(_15b.target!=null){
_15c+=" target=\""+_15b.target+"\"";
}
if(_15b.title!=null){
_15c+=" title=\""+_15b.title+"\"";
}
if(_15b.other!=null){
_15c+=" "+_15b.other+"";
}
_15c+=">";
if(text==null||text==""){
_15c+="&nbsp;";
}else{
_15c+=text;
}
_15c+="</a>\n";
return _15c;
},div:function(_15d,_15e){
var _15f=_15e;
if(_15f==null){
_15f={};
}
var _160="";
_160+="<div ";
if(_15f.id!=null){
_160+=" id=\""+_15f.id+"\"";
}
if(_15f.cssClass!=null){
_160+=" class=\""+_15f.cssClass+"\"";
}
if(_15f.style!=null){
_160+=" style=\""+_15f.style+"\"";
}
_160+=">";
_160+=_15d;
_160+="</div>\n";
return _160;
},p:function(_161,_162){
var _163=_162;
if(_163==null){
_163={};
}
var _164="";
_164+="<p ";
if(_163.id!=null){
_164+=" id=\""+_163.id+"\"";
}
if(_163.cssClass!=null){
_164+=" class=\""+_163.cssClass+"\"";
}
_164+=">";
_164+=_161;
_164+="</p>\n";
return _164;
},img:function(url,_166,_167,_168){
var _169=_168;
if(_169==null){
_169={};
}
var _16a="";
_16a+="<img src=\""+url+"\"";
_16a+=" width=\""+_166+"\"";
_16a+=" height=\""+_167+"\"";
if(_169.border==null){
_169.border=0;
}
for(var i in _169){
_16a+=" "+i+"=\""+_169[i]+"\"";
}
_16a+="/>\n";
return _16a;
}};
function JDUL(_16c){
this.options=_16c;
if(this.options==null){
this.options={};
}
this.items=new Array();
this.add=JDUL_add;
this.generate=JDUL_generate;
}
function JDUL_add(_16d,_16e){
var each=new JDLI(_16d);
if(_16e!=null){
each.options=_16e;
}
this.items[this.items.length]=each;
}
function JDUL_generate(){
var _170=this.options;
var _171="";
_171+="<ul ";
if(_170.cssClass!=null){
_171+=" class=\""+_170.cssClass+"\"";
}
_171+=">\n";
for(var i=0;i<this.items.length;i++){
var item=this.items[i];
_171+=item.generate();
}
_171+="</ul>\n";
return _171;
}
function JDLI(_174){
this.content=_174;
this.options={};
this.generate=JDLI_generate;
}
function JDLI_generate(){
var _175="";
var _176=this.options;
_175+="<li";
if(_176.cssClass!=null){
_175+=" class=\""+_176.cssClass+"\"";
}
_175+=">\n";
_175+=this.content;
_175+="</li>\n";
return _175;
}
function JDTable(_177){
this.options=_177;
if(this.options==null){
this.options={};
}
this.rows=new Array();
this.generate=JDTable_generate;
this.addRow=JDTable_addRow;
}
function JDTable_addRow(_178,_179){
var row=new JDRow();
row.cells=_178;
if(_179!=null){
row.options=_179;
}
this.rows[this.rows.length]=row;
}
function JDTable_generate(){
var _17b=this.options;
var _17c="";
_17c+="<table ";
if(_17b.cellspacing!=null){
_17c+=" cellspacing=\""+_17b.cellspacing+"\"";
}
if(_17b.cellpadding!=null){
_17c+=" cellpadding=\""+_17b.cellpadding+"\"";
}
if(_17b.border!=null){
_17c+=" border=\""+_17b.border+"\"";
}
if(_17b.width!=null){
_17c+=" width=\""+_17b.width+"\"";
}
if(_17b.cssClass!=null){
_17c+=" class=\""+_17b.cssClass+"\"";
}
_17c+=">\n";
if(_17b.caption!=null){
_17c+="<caption>"+_17b.caption+"</caption>\n";
}
for(var i=0;i<this.rows.length;i++){
var row=this.rows[i];
_17c+=row.generate();
}
_17c+="</table>\n";
return _17c;
}
function JDRow(){
this.cells=new Array();
this.options={};
this.generate=JDRow_generate;
}
function JDRow_generate(){
var _17f="";
var _180=this.options;
var tag="td";
if(_180.tag!=null){
tag=_180.tag;
}
_17f+="<tr";
if(_180.cssClass!=null){
_17f+=" class=\""+_180.cssClass+"\"";
}
_17f+=">\n";
for(var i=0;i<this.cells.length;i++){
var cell=this.cells[i];
if(isObject(cell)){
var _184=tag;
if(cell.tag!=null){
_184=cell.tag;
}
_17f+="<"+_184;
if(cell.cssClass!=null){
_17f+=" class=\""+cell.cssClass+"\"";
}
if(cell.scope!=null){
_17f+=" scope=\""+cell.scope+"\"";
}
if(cell.colspan!=null){
_17f+=" colspan=\""+cell.colspan+"\"";
}
if(cell.nowrap!=null&&cell.nowrap==true){
_17f+=" nowrap=\"nowrap\"";
}
_17f+=">";
_17f+=cell.text;
_17f+="</"+_184+">\n";
}else{
_17f+="<"+tag+">";
_17f+=cell;
_17f+="</"+tag+">\n";
}
}
_17f+="</tr>\n";
return _17f;
}
function JDField(){
}
function isObject(_185){
if(_185==null){
return false;
}else{
return "object"==typeof _185;
}
}
function strWeb(_186){
if(!isString(_186)){
return _186;
}
var _187="";
for(var i=0;i<_186.length;i++){
var d=_186.charAt(i);
if(d=="<"){
_187+="&lt;";
}else{
if(d==">"){
_187+="&gt;";
}else{
if(d=="\""){
_187+="&quot;";
}else{
_187+=d;
}
}
}
}
return _187;
}
function strSize(_18a,_18b){
if(!isString(_18a)){
return _18a;
}
if(_18a.length>(_18b-3)){
return _18a.substring(0,_18b-3)+"...";
}
return _18a;
}
function strUnweb(_18c){
if(!isString(_18c)){
return _18c;
}
var _18d=_18c;
_18d=_18d.replace(/&lt;/g,"<");
_18d=_18d.replace(/&gt;/g,">");
return _18d;
}
function strBR(_18e){
if(!isString(_18e)){
return _18e;
}
var _18f="";
for(var i=0;i<_18e.length;i++){
var d=_18e.charAt(i);
if(d=="\n"){
_18f+="<br />";
}else{
_18f+=d;
}
}
return _18f;
}
function strWB(_192){
var _193=strWeb(_192);
var _194=strBR(_193);
return _194;
}
function strJS(_195){
if(!isString(_195)){
return _195;
}
var _196="";
for(var i=0;i<_195.length;i++){
var d=_195.charAt(i);
if(d=="\n"){
_196+=" ";
}else{
if(d=="\""){
_196+=" ";
}else{
if(d=="'"){
_196+=" ";
}else{
if(d=="<"){
_196+=" ";
}else{
if(d==">"){
_196+=" ";
}else{
_196+=d;
}
}
}
}
}
}
return _196;
}
function strPrice(_199){
if(_199==null){
return "";
}
return "$"+_199.toFixed(2);
return _199;
}
function strDate(_19a){
if(_19a==null||_19a==""){
return "";
}
return formatDate(_19a,"MM/dd/yyyy");
}
function strDateTime(_19b){
if(_19b==null||_19b==""){
return "";
}
return formatDate(_19b,"MM/dd/yyyy hh:mm:ss a");
}
function strTime(_19c){
if(_19c==null||_19c==""){
return "";
}
return formatDate(_19c,"hh:mm:ss a");
}
function strAddress(add1,add2,city,_1a0,zip,_1a2){
var _1a3="";
_1a3+=hasValue(add1)?(add1+"\n"):"";
_1a3+=hasValue(add2)?(add2+"\n"):"";
_1a3+=hasValue(city)?city:"";
_1a3+=hasValue(_1a0)?", "+_1a0:"";
_1a3+=hasValue(zip)?(" "+zip+"\n"):"";
_1a3+=hasValue(_1a2)?_1a2:"";
return _1a3;
}
function stringTrim(s){
if(s==null){
return s;
}
while(s.substring(0,1)==" "){
s=s.substring(1,s.length);
}
while(s.substring(s.length-1,s.length)==" "){
s=s.substring(0,s.length-1);
}
return s;
}
function hasValue(_1a5){
if(_1a5==null||stringTrim(_1a5)==""){
return false;
}
return true;
}
function isString(_1a6){
return (typeof _1a6=="string");
}
function lineCount(_1a7,_1a8){
if(!isString(_1a7)){
return 0;
}
var _1a9=_1a7;
var _1aa=0;
var _1ab=_1a9.indexOf("\n");
while(_1ab!=-1){
_1aa++;
if((_1ab+1)<_1a9.length){
_1a9=_1a9.substr(_1ab+1);
_1ab=_1a9.indexOf("\n");
}else{
break;
}
}
_1aa=_1aa+Math.floor(_1a7.length/_1a8);
if(_1aa==0){
return 1;
}
return _1aa;
}
var pageLog=null;
function logDebug(_1ac,_1ad){
if(DEBUG&&pageLog!=null){
pageLog.logDebug(_1ac,_1ad);
}
}
var tracker={event:function(_1ae,_1af,_1b0){
logDebug("event",_1ae+":"+_1af+":"+_1b0);
try{
if(pageTracker!=null){
pageTracker._trackEvent(_1ae,_1af,_1b0);
}
}
catch(err){
}
}};
var THEFORM="theform";
var SORTCOLUMNHF="sortColumnValueHF";
var SORTCOLUMNACTION="sortColumnAction";
var SOURCEPAGEHF="sourcepage";
var PAGEACTIONHF="pageaction";
var REQUESTTYPE="requesttype";
var MAXTA=500;
function MM_reloadPage(init){
if(init==true){
with(navigator){
if((appName=="Netscape")&&(parseInt(appVersion)==4)){
document.MM_pgW=innerWidth;
document.MM_pgH=innerHeight;
onresize=MM_reloadPage;
}
}
}else{
if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH){
location.reload();
}
}
}
MM_reloadPage(true);
function MM_findObj(n,d){
var p,i,x;
if(!d){
d=document;
}
if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);
}
if(!(x=d[n])&&d.all){
x=d.all[n];
}
for(i=0;!x&&i<d.forms.length;i++){
x=d.forms[i][n];
}
for(i=0;!x&&d.layers&&i<d.layers.length;i++){
x=MM_findObj(n,d.layers[i].document);
}
if(!x&&d.getElementById){
x=d.getElementById(n);
}
return x;
}
var IE=(document.all)?true:false;
function isEnterEvent(_1b7){
var code=0;
if(IE){
code=_1b7.keyCode;
}else{
code=_1b7.which;
}
if(code==13||code==3){
return true;
}
return false;
}
function openWindow(_1b9,_1ba,_1bb,_1bc,opts){
var _1be="status=1,resizable=1,location=1,directories=1,menubar=1,toolbar=1,titlebar=1,scrollbars=1";
if(opts!=null){
_1be=opts;
}
if(_1bb==null||_1bc==null){
return window.open(_1b9,_1ba,_1be);
}else{
var _1bf=(screen.width-_1bb)/2;
var _1c0=(screen.height-_1bc)/2;
return window.open(_1b9,_1ba,"width="+_1bb+",height="+_1bc+",left="+_1bf+",top="+_1c0+","+_1be);
}
}
function openImageWindow(_1c1,_1c2,_1c3){
var opts="status=0,resizable=0,location=0,directories=0,menubar=0,toolbar=0,titlebar=1";
openWindow(_1c1,"TBGIMAGEWINDOW",_1c2+15,_1c3+10,opts);
}
function gotoURL(aURL){
location=aURL;
}
function goToAnchor(_1c6){
setTimeout("goToAnchorPrivate('"+_1c6+"')",100);
}
function goToAnchorPrivate(_1c7){
return document.location.hash=_1c7;
}
function isMac(){
var agt=navigator.userAgent.toLowerCase();
return (agt.indexOf("mac")!=-1);
}
function isMacSafari(){
var agt=navigator.userAgent.toLowerCase();
return (isMac()&&(agt.indexOf("safari")!=-1));
}
function isMacIE(){
var _1ca=navigator.appVersion.toLowerCase();
return (isMac()&&(_1ca.indexOf("msie")!=-1));
}
function findAnyObject(_1cb){
return MM_findObj(_1cb);
}
function mm(){
window.status="";
return true;
}
function getDiv(_1cc){
return document.getElementById(_1cc);
}
function getForm(){
return eval("document."+THEFORM);
}
function getFormItem(_1cd){
var _1ce=$("input[name='"+_1cd+"'], select[name='"+_1cd+"'], textarea[name='"+_1cd+"'], button[name='"+_1cd+"']",getForm());
if(_1ce.lengh==0){
return null;
}else{
if(_1ce.length==1){
return _1ce[0];
}
}
return _1ce;
}
function getFormItemValue(_1cf){
var _1d0=getFormItem(_1cf);
return (_1d0==null)?null:_1d0.value;
}
function isChecked(_1d1){
var _1d2=getFormItem(_1d1);
return _1d2.checked;
}
function resetFormItemValue(_1d3){
var _1d4=getFormItem(_1d3);
if(_1d4!=null){
_1d4.value="";
}
}
function getSelectedRadioNamed(_1d5){
return getSelectedRadioValue(getFormItem(_1d5));
}
function getSelectedRadioValue(_1d6){
if(_1d6==null||_1d6.length==0){
return "";
}
for(var i=0;i<_1d6.length;i++){
var _1d8=_1d6[i];
if(_1d8.checked){
return _1d8.value;
}
}
return null;
}
function setHiddenFieldValue(_1d9,_1da){
var _1db=getFormItem(_1d9);
_1db.value=_1da;
}
function setFieldValue(_1dc,_1dd){
var _1de=getFormItem(_1dc);
_1de.value=_1dd;
}
function submitForm(_1df,_1e0){
return private_submitForm(_1df,_1e0);
}
function submitFormToHandler(_1e1,_1e2){
return private_submitForm(_1e2,null,_1e1);
}
function private_submitForm(_1e3,_1e4,_1e5){
var _1e6=getForm();
if(_1e5!=null){
_1e6.action=_1e5;
}else{
_1e6.action=formAction;
}
setHiddenFieldValue(PAGEACTIONHF,_1e3);
if(_1e4!=null&&_1e4!=""){
getForm().target=_1e4;
}else{
getForm().target="_self";
}
getForm().submit();
return false;
}
function downloadPDF(_1e7,_1e8){
if(isMac()&&!isMacSafari()){
submitForm(_1e7);
}else{
if(_1e8!=null){
setHiddenFieldValue(_1e8,"true");
}
submitForm(_1e7,"PDFWINDOW");
}
}
var globalAllSelected=false;
function selectAllCheckbox(_1e9,_1ea){
var form=getForm();
globalAllSelected=!globalAllSelected;
for(var i=0;i<_1ea.length;i++){
var _1ed=getFormItem(_1e9+_1ea[i]);
if(_1ed!=null){
_1ed.checked=globalAllSelected;
}
}
}
function selectOptionOnDropDown(_1ee,_1ef){
var _1f0=""+_1ef;
var _1f1=getFormItem(_1ee);
if(_1f1!=null){
var _1f2=_1f1.options;
for(var i=0;i<_1f2.length;i++){
var _1f4=_1f2[i];
if(_1f4.value==_1f0){
_1f4.selected=true;
return;
}
}
}
}
function selectIndexOnDropDown(_1f5,_1f6){
var _1f7=getFormItem(_1f5);
if(_1f7!=null){
var _1f8=_1f7.options;
var _1f9=_1f8[_1f6];
_1f9.selected=true;
}
}
function selectLikeNameOnDropDown(_1fa,_1fb){
var _1fc=getFormItem(_1fa);
if(_1fc!=null){
var _1fd=_1fc.options;
for(var i=0;i<_1fd.length;i++){
var _1ff=_1fd[i];
if(_1ff.text.toLowerCase().indexOf(_1fb.toLowerCase())!=-1){
_1ff.selected=true;
return;
}
}
}
}
function getDropDownSelectedText(_200){
var _201=getFormItem(_200);
if(_201!=null){
var _202=_201.options;
for(var i=0;i<_202.length;i++){
var _204=_202[i];
if(_204.selected){
return _204.text;
}
}
}
return null;
}
function getDropDownSelectedValue(_205){
var _206=getFormItem(_205);
if(_206!=null){
var _207=_206.options;
for(var i=0;i<_207.length;i++){
var _209=_207[i];
if(_209.selected){
return _209.value;
}
}
}
return null;
}
function dropDownSearchChanged(_20a,_20b){
var _20c=getFormItem(_20b);
selectLikeNameOnDropDown(_20a,_20c.value);
}
function moveChooserItems(_20d,_20e,_20f,_210){
var _211=getFormItem(_20d);
var _212=getFormItem(_20e);
var _213=_211.options;
var _214=_212.options;
var _215=new Array();
var _216=new Array();
var _217="";
for(var i=0;i<_214.length;i++){
var _219=_214[i];
_216[_216.length]=new Option(_219.text,_219.value);
}
for(var i=0;i<_213.length;i++){
var _21a=_213[i];
var _21b=new Option(_21a.text,_21a.value);
if(_21a.selected){
_21b.selected=true;
_216[_216.length]=_21b;
}else{
_215[_215.length]=_21b;
}
}
var _21c="";
if(_20f){
for(var i=0;i<_216.length;i++){
var _21d=_216[i];
if(i>0){
_21c+=",";
}
_21c+=_21d.value;
}
}else{
for(var i=0;i<_215.length;i++){
var _21d=_215[i];
if(i>0){
_21c+=",";
}
_21c+=_21d.value;
}
}
var _21e=getFormItem(_210);
_21e.value=_21c;
_211.length=0;
_212.length=0;
for(var i=0;i<_215.length;i++){
var _21d=_215[i];
_211.options[i]=_21d;
}
for(var i=0;i<_216.length;i++){
var _21d=_216[i];
_212.options[i]=_21d;
}
}
function sortColumn(_21f){
setHiddenFieldValue(SORTCOLUMNHF,_21f);
submitForm(SORTCOLUMNACTION);
}
function focusOn(_220){
var _221=getFormItem(_220);
if(_221!=null){
try{
_221.focus();
}
catch(e){
}
}
}
function selectAll(_222){
var _223=getFormItem(_222);
if(_223!=null){
try{
_223.select();
}
catch(e){
}
}
}
function taChanged(_224,_225,_226){
var ta=getFormItem(_224);
if(ta==null){
return;
}
var _228=ta.value.length;
if(_225!=null&&_225>0){
if(_228>_225){
alertPanel.alert("Max characters limit reached");
ta.value=ta.value.substring(0,_225);
_228--;
}
}
if(_226!=null){
var _229=getFormItem(_226);
if(_229!=null){
_229.value=_228;
}
}
}
function enableFormItem(_22a,_22b){
var _22c=getFormItem(_22a);
if(_22c!=null){
if(_22b==null){
_22c.disabled=false;
}else{
_22c.disabled=!_22b;
}
}
}
function blurFormItem(_22d){
var _22e=getFormItem(_22d);
if(_22e!=null){
_22e.blur();
}
}
function disableFormItem(_22f){
enableFormItem(_22f,false);
}
function enableFormItems(_230){
for(var i=0;i<_230.length;i++){
enableFormItem(_230[i]);
}
}
function disableFormItems(_232){
for(var i=0;i<_232.length;i++){
disableFormItem(_232[i]);
}
}
function RolloverImage(_234,_235){
this.image=new Image();
this.image.src=_234;
this.overImage=new Image();
this.overImage.src=_235;
this.rollOverAction=RolloverImage_rollOverAction;
this.rollOutAction=RolloverImage_rollOutAction;
}
function RolloverImage_rollOverAction(_236){
_236.src=this.overImage.src;
}
function RolloverImage_rollOutAction(_237){
_237.src=this.image.src;
}
function JDImage(_238,_239,_23a,_23b,_23c){
this.id=_23a;
this.name;
this.width=_238;
this.height=_239;
this.url=_23b;
this.title=_23c;
}
function toInt(_23d){
return parseInt(_23d);
}
function toFloat(_23e){
return parseFloat(_23e);
}
function getAntiCache(){
var date=new Date();
return ""+formatDate(date,"HHmmss")+date.getMilliseconds();
}
function getRandomNumber(){
return Math.floor(Math.random()*100000000000);
}
function countDecimalPlaces(num){
if(isNaN(num)){
return 0;
}
var _241=""+num;
var dot=_241.indexOf(".");
if(dot==-1){
return 0;
}
var _243=_241.substring(dot);
if(_243.length==1){
return 0;
}
var _243=_243.substring(1);
return _243.length;
}
var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");
function LZ(x){
return (x<0||x>9?"":"0")+x;
}
function formatDate(date,_246){
_246=_246+"";
var _247="";
var _248=0;
var c="";
var _24a="";
var y=date.getYear()+"";
var M=date.getMonth()+1;
var d=date.getDate();
var E=date.getDay();
var H=date.getHours();
var m=date.getMinutes();
var s=date.getSeconds();
var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
var _261=new Object();
if(y.length<4){
y=""+(y-0+1900);
}
_261["y"]=""+y;
_261["yyyy"]=y;
_261["yy"]=y.substring(2,4);
_261["M"]=M;
_261["MM"]=LZ(M);
_261["MMM"]=MONTH_NAMES[M-1];
_261["NNN"]=MONTH_NAMES[M+11];
_261["d"]=d;
_261["dd"]=LZ(d);
_261["E"]=DAY_NAMES[E+7];
_261["EE"]=DAY_NAMES[E];
_261["H"]=H;
_261["HH"]=LZ(H);
if(H==0){
_261["h"]=12;
}else{
if(H>12){
_261["h"]=H-12;
}else{
_261["h"]=H;
}
}
_261["hh"]=LZ(_261["h"]);
if(H>11){
_261["K"]=H-12;
}else{
_261["K"]=H;
}
_261["k"]=H+1;
_261["KK"]=LZ(_261["K"]);
_261["kk"]=LZ(_261["k"]);
if(H>11){
_261["a"]="PM";
}else{
_261["a"]="AM";
}
_261["m"]=m;
_261["mm"]=LZ(m);
_261["s"]=s;
_261["ss"]=LZ(s);
while(_248<_246.length){
c=_246.charAt(_248);
_24a="";
while((_246.charAt(_248)==c)&&(_248<_246.length)){
_24a+=_246.charAt(_248++);
}
if(_261[_24a]!=null){
_247=_247+_261[_24a];
}else{
_247=_247+_24a;
}
}
return _247;
}
function PageGlobals(){
this.debugDivId="pageGlobalsDebugDiv";
this.thisName=getRandomNumber();
this.keys=new Array();
this.has=PageGlobals_has;
this.set=PageGlobals_set;
this.get=PageGlobals_get;
this.generateDebugInfo=PageGlobals_generateDebugInfo;
}
function PageGlobals_has(key){
for(var i=0;i<this.keys.length;i++){
var akey=this.keys[i];
if(akey==key){
return true;
}
}
return false;
}
function PageGlobals_set(key,_266){
this[key]=_266;
if(!this.has(key)){
this.keys[this.keys.length]=key;
}
if(DEBUG){
this.generateDebugInfo();
}
}
function PageGlobals_get(key){
return this[key];
}
function PageGlobals_generateDebugInfo(){
var _268=this.debugDivId;
var _269=$("#"+_268);
if(_269!=null){
var _26a=_268+this.thisName;
var div=$("#"+_26a)[0];
if(div==null){
_269.append("<div id=\""+_26a+"\"></div>");
}
var _26c="<br /><br />";
for(var i=0;i<this.keys.length;i++){
var key=this.keys[i];
var _26f=this[key];
_26c+="<table border=\"0\" cellspacing=\"0\" class=\"debugObject\">\n";
_26c+="<tr><td>";
_26c+=strWeb(key);
_26c+="</td><td>";
if(_26f==null){
_26c+="NULL";
}else{
_26c+=_26f.private_generateDebugInfo();
}
_26c+="</td></tr>\n";
_26c+="</table><br />\n\n";
}
dynamic.setDivIdContent(_26a,_26c);
}
}
function PageLog(_270){
this.divId=_270;
this.div=null;
this.contentDivId=_270+"contentDiv";
this.contentDiv=null;
this.grabXOffset;
this.grabYOffset;
this.mouseUpConnect=null;
this.mouseMoveConnect=null;
this.logDebug=PageLog_logDebug;
this.initialize=PageLog_initialize;
this.mouseDown=PageLog_mouseDown;
this.mouseUp=PageLog_mouseUp;
this.mouseMove=PageLog_mouseMove;
var _271=this;
$(window).load(function(){
_271.initialize();
});
}
function PageLog_initialize(){
this.div=$("#"+this.divId)[0];
}
function PageLog_mouseDown(evt){
this.div.css({cursor:"-moz-grabbing",position:"absolute"});
var pos=this.div.position();
this.grabXOffset=evt.pageX-pos.left;
this.grabYOffset=evt.pageY-pos.top;
this.mouseMove(evt);
$.connect(document,"onmouseup",this,"mouseUp");
$.connect(document,"onmousemove",this,"mouseMove");
}
function PageLog_mouseMove(evt){
var x=evt.pageX-this.grabXOffset;
var y=evt.pageY-this.grabYOffset;
this.div.css({left:x+"px",top:y+"px"});
}
function PageLog_mouseUp(){
this.div.css({cursor:"move"});
$.disconnect(document,"onmousemove",this,"mouseMove");
$.disconnect(document,"onmouseup",this,"mouseUp");
}
function PageLog_logDebug(_277,_278){
var div=$("#"+this.divId);
if(div!=null){
var text=_277;
if(_278!=null){
text+=" | "+_278;
}
text+="<br />";
div.append(text);
}
}
function SearchDropDown(_27b,_27c,_27d){
this.options=_27d;
if(_27d==null){
this.options={};
}
this.thisName=_27b;
this.divId=this.options.divId;
this.fieldName=_27c;
this.efName=_27c+"EF";
this.searchAction=_27c+"SearchAction";
this.listName=_27c+"LIST";
this.listDivId=_27c+"listDiv";
this.clist=null;
this.selected=this.options.selected;
this.listShowing=false;
this.generate=SearchDropDown_generate;
this.generateInline=SearchDropDown_generateInline;
this.keyUp=SearchDropDown_keyUp;
this.getList=SearchDropDown_getList;
this.showResults=SearchDropDown_showResults;
this.hideList=SearchDropDown_hideList;
this.search=SearchDropDown_search;
this.selectItem=SearchDropDown_selectItem;
this.getValue=SearchDropDown_getValue;
this.downArrow=SearchDropDown_downArrow;
this.x=SearchDropDown_x;
this.isValid=SearchDropDown_isValid;
this.getReason=SearchDropDown_getReason;
this.setSelected=SearchDropDown_setSelected;
}
function SearchDropDown_generate(){
var _27e="";
_27e+=this.generateInline();
dynamic.setDivIdContent(this.divId,_27e);
}
function SearchDropDown_generateInline(){
var _27f="";
_27f+="<div class=\"searchDD\">";
_27f+=forms.ef(this.efName,this.selected!=null?this.selected.get("name"):"",{id:this.efName,cssClass:"searchField "+(this.selected==null?"searching":""),onkeyup:this.thisName+".keyUp(event)"});
_27f+=tags.a("","javascript:"+this.thisName+".x()",{cssClass:"clearDD",title:"Clear the Field"});
_27f+=tags.a("","javascript:"+this.thisName+".downArrow()",{cssClass:"dropDD",title:"Show the List"});
_27f+="</div>";
_27f+=tags.div("",{id:this.listDivId,cssClass:"searchDDList"});
return _27f;
}
function SearchDropDown_keyUp(_280){
this.setSelected(null);
var _281=getFormItemValue(this.efName);
if(_281==""){
this.hideList();
}else{
this.search(_281);
}
}
function SearchDropDown_getList(){
var _282=this.clist;
if(_282!=null){
var list=_282.get("list");
if(list!=null){
return list;
}
}
return new Array();
}
function SearchDropDown_showResults(){
var list=this.getList();
var ul=new JDUL();
for(var i=0;i<list.length;i++){
var each=list[i];
ul.add(tags.a(each.get("name"),"javascript:"+this.thisName+".selectItem("+i+")"));
}
dynamic.setDivIdContent(this.listDivId,ul.generate());
$("#"+this.listDivId).css({display:"block"});
this.listShowing=true;
}
function SearchDropDown_hideList(){
this.listShowing=false;
$("#"+this.listDivId).css({display:"none"});
}
function SearchDropDown_search(_288){
var _289=this;
var _28a=comet.newRequest(chandler,this.searchAction,function(){
_289.clist=_28a.getObject(_289.listName);
pageglobals.set("ddlist",_289.clist);
_289.showResults();
});
_28a.addParameter(this.efName,_288);
_28a.send();
}
function SearchDropDown_selectItem(_28b){
var item=this.getList()[_28b];
this.setSelected(item);
setFieldValue(this.efName,item.get("name"));
this.hideList();
}
function SearchDropDown_getValue(){
var _28d=this.selected;
if(_28d!=null){
return _28d.get("id");
}
return null;
}
function SearchDropDown_downArrow(){
if(this.listShowing){
if(this.selected==null){
setFieldValue(this.efName,"");
}
this.hideList();
}else{
var _28e=getFormItemValue(this.efName);
this.search(_28e);
}
}
function SearchDropDown_x(){
this.setSelected(null);
setFieldValue(this.efName,"");
this.hideList();
}
function SearchDropDown_isValid(){
return this.selected!=null;
}
function SearchDropDown_getReason(){
return "is required";
}
function SearchDropDown_setSelected(_28f){
this.selected=_28f;
if(_28f==null){
$("#"+this.efName).addClass("searching");
}else{
$("#"+this.efName).removeClass("searching");
}
}
function JDURL(_290){
this.url=_290;
this.params="";
this.appendParam=JDURL_appendParam;
this.getUrl=JDURL_getUrl;
this.getParams=JDURL_getParams;
this.toHttpString=JDURL_toHttpString;
this.toHttpsString=JDURL_toHttpsString;
}
function JDURL_getUrl(){
if(this.url==null||this.url==""){
return this.params;
}else{
if(this.params==null||this.params==""){
return this.url;
}else{
var _291="?";
var _292=this.url;
if(_292.indexOf("?")!=-1){
_291="&";
}
return this.url+_291+this.params;
}
}
}
function JDURL_appendParam(_293,_294){
var _295="&";
var _296=this.params;
if(_296==null||_293==null||_294==null){
return;
}
if(_296==null||_296==""){
_295="";
}
this.params=_296+_295+_293+"="+encodeURIComponent(_294);
}
function JDURL_getParams(){
return this.params;
}
function JDURL_toHttpString(){
return "http://"+this.getUrl();
}
function JDURL_toHttpsString(){
return "https://"+this.getUrl();
}
function itemIsChecked(_297){
if(_297==null||_297.checked==null){
return false;
}else{
return _297.checked;
}
}
function itemHasValue(_298){
if(_298==null||_298.value==null||stringTrim(_298.value)==""){
return false;
}
return true;
}
function isValidCreditCardNumber(_299,_29a){
var _29b=false;
var _29c=/[^\d ]/;
_29b=!_29c.test(_299);
if(_29b){
var _29d=_299.replace(/ /g,"");
var _29e=_29d.length;
var _29f=false;
var _2a0=false;
var _2a1;
switch(_29a){
case "Visa":
_29f=(_29e==16||_29e==13);
_2a1=/^4/;
break;
case "Mastercard":
_29f=(_29e==16);
_2a1=/^5[1-5]/;
break;
case "American Express":
_29f=(_29e==15);
_2a1=/^3(4|7)/;
break;
case "Discover":
_29f=(_29e==16);
_2a1=/^6011/;
break;
default:
_2a1=/^$/;
return false;
}
_2a0=_2a1.test(_29d);
_29b=_2a0&&_29f;
}
if(_29b){
var _2a2;
var _2a3;
var _2a4=0;
for(digitCounter=_29e-1;digitCounter>=0;digitCounter--){
_2a4+=parseInt(_29d.charAt(digitCounter));
digitCounter--;
_2a2=String((_29d.charAt(digitCounter)*2));
for(var _2a5=0;_2a5<_2a2.length;_2a5++){
_2a4+=parseInt(_2a2.charAt(_2a5));
}
}
_29b=(_2a4%10==0);
}
return _29b;
}
function Validator(){
this.validateItems=new Array();
this.isValid=Validator_isValid;
this.addItem=Validator_addItem;
}
function Validator_isValid(){
var _2a6=this.validateItems;
var _2a7="";
var _2a8=null;
var _2a9=0;
for(var i=0;i<_2a6.length;i++){
var _2ab=_2a6[i];
if(!_2ab.isValid()){
_2a9++;
_2a7+="<li>"+_2ab.reason+"</li>";
if(_2a8==null){
_2a8=_2ab;
}
}
}
if(_2a9>0){
var _2ac="<p>Please address the following:</p>";
_2ac+="<ol>"+_2a7+"</ol>";
alertPanel.alert(_2ac,function(){
if(_2a8.isRadioType()){
document.location.hash=_2a8.anchorName;
}else{
if(_2a8.name!=null){
focusOn(_2a8.getName());
}
}
});
return false;
}else{
return true;
}
}
function Validator_addItem(_2ad){
this.validateItems[this.validateItems.length]=_2ad;
}
function ValidateItem(_2ae,_2af,_2b0,_2b1){
this.name=_2ae;
this.description=_2af;
this.failureDescription=null;
this.required=(_2b0==null?true:_2b0);
this.type=(_2b1==null?ValidateItem.BASICVALUE:_2b1);
this.conditionalType=ValidateItem.CONDITIONS.OFF;
this.extra=null;
this.extra2=null;
this.extra3=null;
this.anchorName=null;
this.reason="";
this.isValid=ValidateItem_isValid;
this.getReason=ValidateItem_getReason;
this.isRadioType=ValidateItem_isRadioType;
this.getName=ValidateItem_getName;
this.isValidValue=ValidateItem_isValidValue;
this.isNotSpecificValue=ValidateItem_isNotSpecificValue;
this.isValidEmptyValue=ValidateItem_isValidEmptyValue;
this.isValidNumber=ValidateItem_isValidNumber;
this.isValidPositiveNumber=ValidateItem_isValidPositiveNumber;
this.isValidInteger=ValidateItem_isValidInteger;
this.isValidPositiveInteger=ValidateItem_isValidPositiveInteger;
this.isValidIntegerRange=ValidateItem_isValidIntegerRange;
this.isValidRadioButtons=ValidateItem_isValidRadioButtons;
this.isValidEmail=ValidateItem_isValidEmail;
this.isValidDate=ValidateItem_isValidDate;
this.isValidPhone=ValidateItem_isValidPhone;
this.isValidCreditCard=ValidateItem_isValidCreditCard;
this.isValidPassword=ValidateItem_isValidPassword;
this.isValidCheckBoxes=ValidateItem_isValidCheckBoxes;
this.isValidOR=ValidateItem_isValidOR;
this.isValidWidget=ValidateItem_isValidWidget;
this.isValidPositiveMoney=ValidateItem_isValidPositiveMoney;
this.isValidMoney=ValidateItem_isValidMoney;
}
ValidateItem.BASICVALUE="BasicValue";
ValidateItem.NOTSPECIFICVALUE="NotSpecificValue";
ValidateItem.NUMBER="Number";
ValidateItem.POSITIVENUMBER="PositiveNumber";
ValidateItem.POSITIVEMONEY="POSITIVEMONEY";
ValidateItem.MONEY="MONEY";
ValidateItem.INTEGER="Integer";
ValidateItem.POSITIVEINTEGER="PositiveInteger";
ValidateItem.INTEGERRANGE="IntegerRange";
ValidateItem.EMAIL="Email";
ValidateItem.DATE="Date";
ValidateItem.PHONE="Phone";
ValidateItem.CREDITCARD="CreditCard";
ValidateItem.EMPTY="EmptyNull";
ValidateItem.PASSWORDMATCH="PasswordMatch";
ValidateItem.VALUEOREXTRA="ValueOrExtra";
ValidateItem.RADIO="RadioButtons";
ValidateItem.CHECKBOXES="Checkboxes";
ValidateItem.WIDGET="Widget";
function ValidateItemConditionTypes(){
}
ValidateItemConditionTypes.OFF="Off";
ValidateItemConditionTypes.EXTRA_IS_FUNCTION="Any Function";
ValidateItemConditionTypes.EXTRA_IS_CHECKED="Checked Checkbox";
ValidateItemConditionTypes.EXTRA_IS_NOT_CHECKED="Checked Not Checkbox";
ValidateItemConditionTypes.EXTRA_HAS_VALUE="Extra Has Value";
ValidateItemConditionTypes.EXTRA_IS_EXTRA2="Extra is Extra2 Value";
ValidateItemConditionTypes.EXTRARADIO_IS_EXTRA2="Extra Radio Button is Extra2 Value";
ValidateItem.CONDITIONS=ValidateItemConditionTypes;
function ValidateItem_getName(){
return this.name;
}
function ValidateItem_getReason(){
return this.reason;
}
function ValidateItem_isValid(){
if(this.conditionalType!=ValidateItem.CONDITIONS.OFF){
if(this.conditionalType==ValidateItem.CONDITIONS.EXTRA_IS_FUNCTION){
this.required=(this.extra()==true);
}else{
if(this.conditionalType==ValidateItem.CONDITIONS.EXTRA_IS_CHECKED){
if(itemIsChecked(getFormItem(this.extra))){
this.required=true;
}else{
this.required=false;
}
}else{
if(this.conditionalType==ValidateItem.CONDITIONS.EXTRA_IS_NOT_CHECKED){
if(itemIsChecked(getFormItem(this.extra))){
this.required=false;
}else{
this.required=true;
}
}else{
if(this.conditionalType==ValidateItem.CONDITIONS.EXTRA_HAS_VALUE){
if(itemHasValue(getFormItem(this.extra))){
this.required=true;
}else{
this.required=false;
}
}else{
if(this.conditionalType==ValidateItem.CONDITIONS.EXTRA_IS_EXTRA2){
if(getFormItem(this.extra).value==this.extra2){
this.required=true;
}else{
this.required=false;
}
}else{
if(this.conditionalType==ValidateItem.CONDITIONS.EXTRARADIO_IS_EXTRA2){
if(getSelectedRadioValue(getFormItem(this.extra))==this.extra2){
this.required=true;
}else{
this.required=false;
}
}
}
}
}
}
}
}
this.reason="";
switch(this.type){
case ValidateItem.BASICVALUE:
return this.isValidValue();
case ValidateItem.NOTSPECIFICVALUE:
return this.isNotSpecificValue();
case ValidateItem.NUMBER:
return this.isValidNumber();
case ValidateItem.POSITIVENUMBER:
return this.isValidPositiveNumber();
case ValidateItem.INTEGER:
return this.isValidInteger();
case ValidateItem.POSITIVEINTEGER:
return this.isValidPositiveInteger();
case ValidateItem.POSITIVEMONEY:
return this.isValidPositiveMoney();
case ValidateItem.MONEY:
return this.isValidMoney();
case ValidateItem.POSITIVEINTEGER:
return this.isValidPositiveInteger();
case ValidateItem.INTEGERRANGE:
return this.isValidIntegerRange();
case ValidateItem.EMAIL:
return this.isValidEmail();
case ValidateItem.DATE:
return this.isValidDate();
case ValidateItem.PHONE:
return this.isValidPhone();
case ValidateItem.CREDITCARD:
return this.isValidCreditCard();
case ValidateItem.EMPTY:
return this.isValidEmptyValue();
case ValidateItem.PASSWORDMATCH:
return this.isValidPassword();
case ValidateItem.VALUEOREXTRA:
return this.isValidOR();
case ValidateItem.RADIO:
return this.isValidRadioButtons();
case ValidateItem.CHECKBOXES:
return this.isValidCheckBoxes();
case ValidateItem.WIDGET:
return this.isValidWidget();
default:
this.reason="invalid validation type";
return false;
}
}
function ValidateItem_isValidValue(){
var _2b2=getFormItem(this.name);
var _2b3=itemHasValue(_2b2);
if(_2b3){
return true;
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isNotSpecificValue(){
var _2b4=getFormItem(this.name);
var _2b5=itemHasValue(_2b4);
if(_2b5){
if(_2b4.value==this.extra2){
this.reason=""+this.failureDescription;
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidPassword(){
var _2b6=getFormItem(this.name);
var _2b7=itemHasValue(_2b6);
if(_2b7){
var _2b8=getFormItem(this.extra);
var _2b9=itemHasValue(_2b8);
if(_2b9){
if(_2b6.value==_2b8.value){
return true;
}else{
this.reason="Passwords are not equal";
return false;
}
}else{
this.reason="Verify Password is required";
return false;
}
}else{
if(this.required){
this.reason="Password is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidOR(){
var _2ba=getFormItem(this.name);
var _2bb=itemHasValue(_2ba);
var _2bc=getFormItem(this.extra);
var _2bd=itemHasValue(_2bc);
if(!_2bb&&!_2bd){
this.reason=""+this.description;
return false;
}
return true;
}
function ValidateItem_isValidEmptyValue(){
var _2be=getFormItem(this.name);
var _2bf=itemHasValue(_2be);
if(_2bf){
this.reason=""+this.description;
return false;
}else{
return true;
}
}
function ValidateItem_isValidNumber(){
var _2c0=getFormItem(this.name);
var _2c1=itemHasValue(_2c0);
if(_2c1){
var _2c2=_2c0.value;
_2c2=_2c2.replace(",","");
if(isNaN(_2c2)){
this.reason=""+this.description+" is not a number";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidPositiveNumber(){
var _2c3=getFormItem(this.name);
var _2c4=itemHasValue(_2c3);
if(_2c4){
var _2c5=_2c3.value;
_2c5=_2c5.replace(",","");
if(isNaN(_2c5)||_2c5<=0){
this.reason=""+this.description+" is not a number greater than zero";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidPositiveMoney(){
var _2c6=getFormItem(this.name);
var _2c7=itemHasValue(_2c6);
if(_2c7){
var _2c8=_2c6.value;
_2c8=_2c8.replace(",","");
if(isNaN(_2c8)||_2c8<=0||countDecimalPlaces(_2c8)>2){
this.reason=""+this.description+" is not a dollar and cents value greater than zero";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidMoney(){
var _2c9=getFormItem(this.name);
var _2ca=itemHasValue(_2c9);
if(_2ca){
var _2cb=_2c9.value;
_2cb=_2cb.replace(",","");
if(isNaN(_2cb)||countDecimalPlaces(_2cb)>2){
this.reason=""+this.description+" is not a dollar and cents value";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidInteger(){
var _2cc=getFormItem(this.name);
var _2cd=itemHasValue(_2cc);
if(_2cd){
var _2ce=_2cc.value;
_2ce=_2ce.replace(",","");
if(isNaN(_2ce)||_2ce.indexOf(".")!=-1){
this.reason=""+this.description+" is not an integer";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidPositiveInteger(){
var _2cf=getFormItem(this.name);
var _2d0=itemHasValue(_2cf);
if(_2d0){
var _2d1=_2cf.value;
_2d1=_2d1.replace(",","");
if(isNaN(_2d1)||_2d1.indexOf(".")!=-1||_2d1<1){
this.reason=""+this.description+" is not an integer greater than zero";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidIntegerRange(){
var _2d2=getFormItem(this.name);
var _2d3=itemHasValue(_2d2);
if(_2d3){
var _2d4=_2d2.value;
var _2d5=true;
if(this.extra2!=null){
_2d5=_2d4>=this.extra2;
}
var _2d6=true;
if(this.extra3!=null){
_2d6=_2d4<=this.extra3;
}
if(isNaN(_2d4)||_2d4.indexOf(".")!=-1||!_2d5||!_2d6){
this.reason=""+this.description+" must be";
if(this.extra2!=null&&this.extra3!=null){
this.reason+=" between "+this.extra2+" and "+this.extra3;
}else{
if(this.extra2!=null){
this.reason+=" greater than or equal to "+this.extra2;
}else{
this.reason+=" less than or equal to "+this.extra3;
}
}
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidRadioButtons(){
var _2d7=getFormItem(this.name);
var val=getSelectedRadioValue(_2d7);
if(val==null||val==""){
this.reason=""+this.description+" is required";
return false;
}
return true;
}
function ValidateItem_isValidEmail(){
var _2d9=getFormItem(this.name);
var _2da=itemHasValue(_2d9);
if(_2da){
var _2db=_2d9.value;
if((_2db.indexOf("@")==-1)||(_2db.indexOf(".")==-1)){
this.reason=""+this.description+" is not a email address";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidDate(){
var _2dc=getFormItem(this.name);
var _2dd=itemHasValue(_2dc);
if(_2dd){
var _2de=_2dc.value;
if(_2de.length<10||_2de.charAt(2)!="/"||_2de.charAt(5)!="/"){
this.reason=""+this.description+" is not a valid date format (MM/DD/YYYY)";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidPhone(){
var _2df=getFormItem(this.name);
var _2e0=itemHasValue(_2df);
if(_2e0){
var _2e1=_2df.value;
if(_2e1.length!=12||_2e1.charAt(3)!="-"||_2e1.charAt(7)!="-"){
this.reason=""+this.description+" is not a valid phone format (000-000-0000)";
return false;
}else{
return true;
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidCreditCard(){
var _2e2=getFormItem(this.name);
var _2e3=getDropDownSelectedText(this.extra);
var _2e4=itemHasValue(_2e2);
if(_2e4){
var _2e5=_2e2.value;
if(isNaN(_2e5)){
this.reason=""+this.description+" can only contain numbers";
return false;
}else{
if(!isValidCreditCardNumber(_2e5,_2e3)){
this.reason=""+this.description+" is not a valid credit card number for the selected credit card type";
return false;
}else{
return true;
}
}
}else{
if(this.required){
this.reason=""+this.description+" is required";
return false;
}else{
return true;
}
}
}
function ValidateItem_isValidCheckBoxes(){
var ids=this.extra;
for(var i=0;i<ids.length;i++){
var anid=ids[i];
var _2e9=getFormItem(this.name+anid);
if(_2e9!=null){
if(_2e9.checked){
return true;
}
}
}
this.reason="At least one "+this.description+" must be selected";
return false;
}
function ValidateItem_isValidWidget(){
var _2ea=this.extra;
if(_2ea.isValid()){
return true;
}else{
this.reason=this.description+" "+_2ea.getReason();
return false;
}
}
function ValidateItem_isRadioType(){
return (this.type==ValidateItem.RADIO);
}
function newEmailValidateItem(_2eb,_2ec){
return new ValidateItem(_2eb,_2ec,true,ValidateItem.EMAIL);
}
function newOptionalEmailValidateItem(_2ed,_2ee){
return new ValidateItem(_2ed,_2ee,false,ValidateItem.EMAIL);
}
function newDateValidateItem(_2ef,_2f0){
return new ValidateItem(_2ef,_2f0,true,ValidateItem.DATE);
}
function newOptionalDateValidateItem(_2f1,_2f2){
return new ValidateItem(_2f1,_2f2,false,ValidateItem.DATE);
}
function newPhoneValidateItem(_2f3,_2f4){
return new ValidateItem(_2f3,_2f4,true,ValidateItem.PHONE);
}
function newOptionalPhoneValidateItem(_2f5,_2f6){
return new ValidateItem(_2f5,_2f6,false,ValidateItem.PHONE);
}
function newNumberValidateItem(_2f7,_2f8){
return new ValidateItem(_2f7,_2f8,true,ValidateItem.NUMBER);
}
function newPositiveNumberValidateItem(_2f9,_2fa){
return new ValidateItem(_2f9,_2fa,true,ValidateItem.POSITIVENUMBER);
}
function newPositiveMoneyValidateItem(_2fb,_2fc){
return new ValidateItem(_2fb,_2fc,true,ValidateItem.POSITIVEMONEY);
}
function newOptionalPositiveMoneyValidateItem(_2fd,_2fe){
return new ValidateItem(_2fd,_2fe,false,ValidateItem.POSITIVEMONEY);
}
function newMoneyValidateItem(_2ff,_300){
return new ValidateItem(_2ff,_300,true,ValidateItem.MONEY);
}
function newOptionalMoneyValidateItem(_301,_302){
return new ValidateItem(_301,_302,false,ValidateItem.MONEY);
}
function newIntegerValidateItem(_303,_304){
return new ValidateItem(_303,_304,true,ValidateItem.INTEGER);
}
function newPositiveIntegerValidateItem(_305,_306){
return new ValidateItem(_305,_306,true,ValidateItem.POSITIVEINTEGER);
}
function newOptionalNumberValidateItem(_307,_308){
return new ValidateItem(_307,_308,false,ValidateItem.NUMBER);
}
function newOptionalIntegerValidateItem(_309,_30a){
return new ValidateItem(_309,_30a,false,ValidateItem.INTEGER);
}
function newOptionalPositiveIntegerValidateItem(_30b,_30c){
return new ValidateItem(_30b,_30c,false,ValidateItem.POSITIVEINTEGER);
}
function newCreditCardValidateItem(_30d,_30e,_30f){
var _310=new ValidateItem(_30d,_30e,true,ValidateItem.CREDITCARD);
_310.extra=_30f;
return _310;
}
function newRadioValidateItem(_311,_312,_313){
var _314=new ValidateItem(_311,_312,true,ValidateItem.RADIO);
_314.anchorName=_313;
return _314;
}
function newNotSpecificValueValidateItem(_315,_316,_317,_318){
var _319=new ValidateItem(_315,_316,true,ValidateItem.NOTSPECIFICVALUE);
_319.extra2=_317;
_319.failureDescription=_318;
return _319;
}
function newConditionalFunction(_31a,_31b,_31c){
var _31d=new ValidateItem(_31a,_31b,true,ValidateItem.BASICVALUE);
_31d.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_FUNCTION;
_31d.extra=_31c;
return _31d;
}
function newConditionalValidateItem(_31e,_31f,_320){
var _321=new ValidateItem(_31e,_31f,true,ValidateItem.BASICVALUE);
_321.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_CHECKED;
_321.extra=_320;
return _321;
}
function newConditionalHasValueValidateItem(_322,_323,_324){
var _325=new ValidateItem(_322,_323,true,ValidateItem.BASICVALUE);
_325.conditionalType=ValidateItem.CONDITIONS.EXTRA_HAS_VALUE;
_325.extra=_324;
return _325;
}
function newConditionalNumberValidateItem(_326,_327,_328){
var _329=new ValidateItem(_326,_327,true,ValidateItem.NUMBER);
_329.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_CHECKED;
_329.extra=_328;
return _329;
}
function newConditionalIntegerValidateItem(_32a,_32b,_32c){
var _32d=new ValidateItem(_32a,_32b,true,ValidateItem.INTEGER);
_32d.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_CHECKED;
_32d.extra=_32c;
return _32d;
}
function newConditionalPositiveIntegerValidateItem(_32e,_32f,_330){
var _331=new ValidateItem(_32e,_32f,true,ValidateItem.POSITIVEINTEGER);
_331.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_CHECKED;
_331.extra=_330;
return _331;
}
function newConditionalIntegerRangeValidateItem(_332,_333,_334,_335,_336){
var _337=new ValidateItem(_332,_333,true,ValidateItem.INTEGERRANGE);
_337.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_CHECKED;
_337.extra=_334;
_337.extra2=_335;
_337.extra3=_336;
return _337;
}
function newIntegerRangeValidateItem(_338,_339,_33a,_33b){
var _33c=new ValidateItem(_338,_339,true,ValidateItem.INTEGERRANGE);
_33c.extra2=_33a;
_33c.extra3=_33b;
return _33c;
}
function newConditionalDateValidateItem(_33d,_33e,_33f){
var _340=new ValidateItem(_33d,_33e,true,ValidateItem.DATE);
_340.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_CHECKED;
_340.extra=_33f;
return _340;
}
function newSpecificRadioConditionalDateValidateItem(_341,_342,_343,_344){
var _345=new ValidateItem(_341,_342,true,ValidateItem.DATE);
_345.conditionalType=ValidateItem.CONDITIONS.EXTRARADIO_IS_EXTRA2;
_345.extra=_343;
_345.extra2=_344;
return _345;
}
function newSpecificConditionalValidateItem(_346,_347,_348,_349){
var _34a=new ValidateItem(_346,_347,true,ValidateItem.BASICVALUE);
_34a.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_EXTRA2;
_34a.extra=_348;
_34a.extra2=_349;
return _34a;
}
function newSpecificConditionalNumberValidateItem(_34b,_34c,_34d,_34e){
var _34f=new ValidateItem(_34b,_34c,true,ValidateItem.NUMBER);
_34f.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_EXTRA2;
_34f.extra=_34d;
_34f.extra2=_34e;
return _34f;
}
function newSpecificConditionalIntegerValidateItem(_350,_351,_352,_353){
var _354=new ValidateItem(_350,_351,true,ValidateItem.INTEGER);
_354.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_EXTRA2;
_354.extra=_352;
_354.extra2=_353;
return _354;
}
function newSpecificConditionalPositiveIntegerValidateItem(_355,_356,_357,_358){
var _359=new ValidateItem(_355,_356,true,ValidateItem.POSITIVEINTEGER);
_359.conditionalType=ValidateItem.CONDITIONS.EXTRA_IS_EXTRA2;
_359.extra=_357;
_359.extra2=_358;
return _359;
}
function newValidateItem(_35a,_35b,_35c){
return new ValidateItem(_35a,_35b,true,ValidateItem.BASICVALUE);
}
function newPasswordValidateItem(_35d,_35e){
var _35f=new ValidateItem(_35d,"",true,ValidateItem.PASSWORDMATCH);
_35f.extra=_35e;
return _35f;
}
function newOptionalPasswordValidateItem(_360,_361){
var _362=new ValidateItem(_360,"",false,ValidateItem.PASSWORDMATCH);
_362.extra=_361;
return _362;
}
function newORValidateItem(_363,_364,_365){
var _366=new ValidateItem(_363,_364,true,ValidateItem.VALUEOREXTRA);
_366.extra=_365;
return _366;
}
function newCheckBoxesValidateItem(_367,_368,_369){
var _36a=new ValidateItem(_367,_368,true,ValidateItem.CHECKBOXES);
_36a.extra=_369;
return _36a;
}
function newWidgetValidateItem(_36b,_36c){
var _36d=new ValidateItem(null,_36b,true,ValidateItem.WIDGET);
_36d.extra=_36c;
return _36d;
}
function CustomValidateItem(_36e,_36f,_370){
this.name=_36e;
this.reason="";
if(_370!=null){
this.reason=_370;
}
this.isValid=CustomValidateItem_isValid;
if(_36f!=null){
this.isValid=_36f;
}
this.getReason=CustomValidateItem_getReason;
this.isRadioType=CustomValidateItem_isRadioType;
this.getName=CustomValidateItem_getName;
}
function CustomValidateItem_getName(){
return this.name;
}
function CustomValidateItem_isRadioType(){
return false;
}
function CustomValidateItem_getReason(){
return this.reason;
}
function CustomValidateItem_isValid(){
return true;
}

