// Set application environment
if(APPLICATION_ENV==undefined||APPLICATION_ENV=='undefined'||APPLICATION_ENV==null||typeof(APPLICATION_ENV)!='string'){var APPLICATION_ENV='production';}

//lib.events.js
function AddEvent(el,type,fn){if(window.addEventListener){el.addEventListener(type,fn,false);}else if(window.attachEvent){el.attachEvent('on'+type,fn);}else{el['on'+type]=fn;}}

// class.browser_utilities.js
var xBrowser=function(){this.version='2.1.1';this.appName='';this.appVersion='';this.cookieEnabled='';this.userAgent='';this.SetBrowserData();this.ieMessageBoard='';(function(){function _$(els){this.elements=[];for(var i=0,len=els.length;i<len;i++){var element=els[i];if(typeof element==='string'){element=document.getElementById(element);}
this.elements.push(element);}}
_$.prototype={each:function(fn){for(var i=0,len=this.elements.length;i<len;i++){fn.call(this,this.elements[i]);}
return this;},setStyle:function(prop,val){this.each(function(el){el.style[prop]=val;});return this;},show:function(){var that=this;this.each(function(el){that.setStyle('display','block');});return this;},hide:function(){var that=this;this.each(function(el){that.setStyle('display','none');});return this;}};window.$=function(){return new _$(arguments);};})();}
xBrowser.prototype={AddEvent:function(el,type,fn){if(window.addEventListener){el.addEventListener(type,fn,false);}else if(window.attachEvent){el.attachEvent('on'+type,fn);}else{el['on'+type]=fn;}},Log:function(msg){if(this.GetUrlParams('xbrowser-log-production')=='true'||APPLICATION_ENV=='development'){console.log(msg);}},GetUrlParams:function(strParamName){var strReturn="";var strHref=window.location.href;if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")).toLowerCase();var aQueryString=strQueryString.split("&");for(var iParam=0;iParam<aQueryString.length;iParam++){if(aQueryString[iParam].indexOf(strParamName.toLowerCase()+"=")>-1){var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break;}}}
return unescape(strReturn);},SetBrowserData:function(){this.userAgent=navigator.userAgent;this.cookieEnabled=navigator.cookieEnabled;if(/Firefox[\/\s](\d+\.\d+)/.test(this.userAgent)){this.appName='Firefox';this.appVersion=new Number(RegExp.$1);}
if(/Safari[\/\s](\d+\.\d+)/.test(this.userAgent)){this.appName='Safari';this.appVersion=new Number(RegExp.$1);}
if(/Chrome[\/\s](\d+\.\d+)/.test(this.userAgent)){this.appName='Chrome';this.appVersion=new Number(RegExp.$1);}
if(/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){this.appName='Opera';this.appVersion=new Number(RegExp.$1);}
if(/MSIE (\d+\.\d+);/.test(this.userAgent)){this.appName='Microsoft Internet Explorer';this.appVersion=new Number(RegExp.$1);}
this.Log('Browser Name => '+this.appName);this.Log('Browser Version => '+this.appVersion);this.Log(this.userAgent);this.Log('Cookies Enabled => '+this.cookieEnabled);},GetAppName:function(){return this.appName;},GetAppVersion:function(){return this.appVersion;},GetAppCookieEnabled:function(){return this.cookieEnabled;},GetAppUserAgent:function(){return this.userAgent;}}
var XBrowser=new xBrowser();

//class.base64.js
var Base64={UrlEncode:function(plainText){plainText=this.encode(plainText);strReturn=plainText.replace(/\+/gi,'-');strReturn=plainText.replace(/\//gi,'_');strReturn=plainText.replace(/\=/gi,',');return strReturn;},UrlDecode:function(strParam){strReturn=strParam.replace(new RegExp('-','gi'),'+');strReturn=strParam.replace(new RegExp('_','gi'),'/');strReturn=strParam.replace(new RegExp(',','gi'),'=');strReturn=this.decode(strReturn);return strReturn;},_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var xxx=0;var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=Base64._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}
output=output+
this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+
this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}
return output;},decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}
if(enc4!=64){output=output+String.fromCharCode(chr3);}}
output=Base64._utf8_decode(output);return output;},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}
else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}
else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}}

//class.interface.js
var Interface=function(name,methods){if(arguments.length!=2){throw new Error('Interface constructor called with '+arguments.length+' arguments, but expected exactly 2.');}
this.name=name;this.methods=[];for(var i=0,len=methods.length;i<len;i++){if(typeof methods[i]!=='string'){throw new Error('Interface constructor expects method names to be passed in as a string.');}}};Interface.EnsureImplements=function(object){if(arguments.length<2){throw new Error('Function Interface.EnsureImplements called with '+arguments.length+' arguments, but expected at least 2.');}
for(var i=1,len=arguments.length;i<len;i++){var xInterface=arguments[i];if(xInterface.constructor!==Interface){throw new Error('Function Interface.EnsureImplements expects arguments two and above to be instances of Interface.');}
for(var j=0,methodsLen=xInterface.methods.length;j<methodsLen;j++){var method=xInterface.methods[j];if(!object[method]||typeof object[method]!=='function'){throw new Error("Function Interface.EnsureImplements: object "
+"does not implement the "+xInterface.name
+" interface. Method "+method+" was not found.");}}}};

//class.extend.js
function Extend(subClass,superClass){var F=function(){};F.prototype=superClass.prototype;subClass.prototype=new F();subClass.prototype.constructor=subClass;subClass.superClass=superClass.prototype;if(superClass.prototype.constructor==Object.prototype.constructor){superClass.prototype.constructor=superClass;}}

//class.messageboard.js
var MessageBoard=function(messageBoardId){if(messageBoardId==''||messageBoardId==undefined){this.MessageBoardId='MessageBoard';}else{this.MessageBoardId=messageBoardId;}
this.MessageBoardContainer=document.getElementById(this.MessageBoardId);try{this.MessageBoardContainer.setAttribute('id',this.MessageBoardId);}catch(err){this.MessageBoardContainer.id=this.MessageBoardId;}
this.LoadBar=document.createElement('div');try{this.LoadBar.setAttribute('id','loadBar');}catch(err){this.LoadBar.id='loadBar';}
try{this.LoadBar.setAttribute('style','display:none;');}catch(err){this.LoadBar.style.display='none';}
this.LoadBarImage='/images/loading.gif';this.LoadBar.innerHTML='';this.Confirmation=document.createElement('div');try{this.Confirmation.setAttribute('id','displayConfirmation');}catch(err){this.Confirmation.id='displayConfirmation';}
try{this.Confirmation.setAttribute('style','display:none;');}catch(err){this.Confirmation.style.display='none';}
this.MessageBoardContainer.appendChild(this.LoadBar);this.MessageBoardContainer.appendChild(this.Confirmation);}
MessageBoard.prototype={ShowLoadBar:function(){this.HideConfirmation();this.SetLoadBarInnerHtml();this.MessageBoardContainer.style.display='block';this.LoadBar.style.display='block';},HideLoadBar:function(){this.LoadBar.style.display='none';},ShowConfirmation:function(xColor,xConfirmation,xAnchor){if(xAnchor!==undefined){this.mAnchor=xAnchor;}else{this.mAnchor=true;}
this.HideLoadBar();var msg='<a name="'+this.MessageBoardId+'" href="javascript:void(0);"></a>';msg+='<div style="padding:12px; background-color:#f5f3d6; border:#ffc78f 1px solid;">';if(xColor=='red'){msg+='<table class="tblMessageBoard">';msg+='<tr>';msg+='<td>';msg+='<img alt="Error: " src="http://www.ovwebsolutions.com/images/icons/error_msg_icon.gif" border="0" align="absmiddle" />';msg+='</td>';msg+='<td style="padding-left:10px;">';}
msg+='<strong style="color:'+xColor+';">';msg+=xConfirmation;msg+='</strong>';if(xColor=='red'){msg+='</td>';msg+='</tr>';msg+='</table>';}
msg+='</div><br />';this.MessageBoardContainer.style.display='block';this.Confirmation.style.display='block';this.Confirmation.innerHTML=msg;if(this.mAnchor){window.location='#'+this.MessageBoardId;}},HideConfirmation:function(){this.Confirmation.style.display='none';},DisplayIn:function(element_id){document.getElementById(element_id).appendChild(this.MessageBoardContainer);},SetLoadBarImage:function(img){this.LoadBarImage=img;},GetLoadBarImage:function(img){return this.LoadBarImage;},SetLoadBarInnerHtml:function(){this.LoadBar.innerHTML='<strong>Processing&#8230;</strong><br /><img src="'+this.GetLoadBarImage()+'" alt="Processing request..." title="Processing request" />';}};

//class.form_observer.js
var FormObserver=function(id,MessageBoard,ContactForm){this.pdid=id||Number(new Date);this.MessageBoard=MessageBoard||null;this.ContactForm=ContactForm||null;this.is_valid=false;this.postVars='';this.stopValidateLoop=false;};FormObserver.prototype={SetId:function(id){this.pdid=id;},GetId:function(){return this.pdid;},GetUrlParams:function(strParamName){var strReturn="";var strHref=window.location.href;if(strHref.indexOf("?")>-1){var strQueryString=strHref.substr(strHref.indexOf("?")).toLowerCase();var aQueryString=strQueryString.split("&");for(var iParam=0;iParam<aQueryString.length;iParam++){if(aQueryString[iParam].indexOf(strParamName.toLowerCase()+"=")>-1){var aParam=aQueryString[iParam].split("=");strReturn=aParam[1];break;}}}
return unescape(strReturn);},SetContactForm:function(ContactForm){this.ContactForm=ContactForm;},GetContactForm:function(){return this.ContactForm;},SetMessageBoard:function(MessageBoard){this.MessageBoard=MessageBoard;},GetMessageBoard:function(){return this.MessageBoard;},Validate:function(MessageBoard,ContactForm){if(this.MessageBoard==undefined){this.MessageBoard=MessageBoard;}
if(this.ContactForm==undefined){this.ContactForm=ContactForm;}
this.stopValidateLoop=false;for(var i=0,len=this.ContactForm.FormComponents.length;i<len;i++){if(this.stopValidateLoop==true){break;}
if(this.ContactForm.FormComponents[i].GetType()=='fieldset'){this.ValidateFieldset(this.ContactForm.FormComponents[i]);}else if(this.ContactForm.FormComponents[i].GetType=='grouped-fieldset'){this.ValidateGroupedFieldset(this.ContactForm.FormComponents[i]);}else{this.ValidateFormComponent(this.ContactForm.FormComponents[i]);}}
if(this.is_valid){this.Submit(this.postVars,this.ContactForm,this.MessageBoard);}},ValidateFieldset:function(Fieldset){for(var id in Fieldset.components){if(this.stopValidateLoop==true){break;}
if(Fieldset.components[id].GetType()=='grouped-fieldset'){this.ValidateGroupedFieldset(Fieldset.components[id]);}else{this.ValidateFormComponent(Fieldset.components[id]);}}},ValidateGroupedFieldset:function(Fieldset){var selected=false;for(var id in Fieldset.components){if(this.stopValidateLoop==true){break;}
if(Fieldset.components[id].GetType()=='checkbox'&&Fieldset.GetRequired()==true){if(Fieldset.components[id].Validate()==true){selected=true;}}
this.ValidateFormComponent(Fieldset.components[id]);}
if(!selected&&Fieldset.GetRequired()==true){this.stopValidationLoop=true;this.is_valid=false;this.MessageBoard.ShowConfirmation('red',Fieldset.GetCustomRegExMessage());}},ValidateFormComponent:function(element){if(element.GetType()=='text'||element.GetType()=='textarea'||element.GetType()=='checkbox'&&element.GetRequired()==true){if(!element.Validate()){this.is_valid=false;this.MessageBoard.ShowConfirmation('red',element.GetCustomRegExMessage());document.getElementById(element.id).focus();this.stopValidateLoop=true;}else{this.is_valid=true;}}
if(element.GetType()=='text'||element.GetType()=='textarea'||element.GetType()=='password'||element.GetType()=='checkbox'||element.GetType()=='select'||element.GetType()=='hidden'){this.postVars+='&'+element.id+'='+element.GetValue();}
if(element.GetType()=='radio'){for(var j=0,len2=element.GetTotalButtons();j<len2;j++){if(element.GetChecked(j)==true){this.postVars+='&'+element.GetId(j)+'='+element.GetValue(j);}}}},Submit:function(postVars,ContactForm,MessageBoard){if(this.MessageBoard==undefined){this.MessageBoard=MessageBoard;}
this.MessageBoard.ShowLoadBar();if(this.ContactForm==undefined){this.ContactForm=ContactForm;}
if(this.ContactForm.GetUrl()==undefined&&this.ContactForm.GetAction()!=undefined){this.ContactForm.Submit();}else{AjaxManager.Request('POST',ContactForm.GetUrl()+'?pdid='+this.GetId()+'&contact=true&xml=true '+'&download_environment='+this.GetUrlParams('download_environment')+'&utm_source='+this.GetUrlParams('utm_source')+'&utm_medium='+this.GetUrlParams('utm_medium')+'&utm_campaign='+this.GetUrlParams('utm_campaign')+'&utm_content='+this.GetUrlParams('utm_content'),XhrCallBack,postVars);}}};XhrCallBack={Success:function(){},Failure:function(error_code){}};

//class.composite_form.js
var Composite=new Interface('Composite',['Add','Remove','GetChild']);var CompositeForm=function(id,method,action,is_ajax){this.FormComponents=[];this.Element=document.createElement('form');this.Element.id=id;this.Element.is_valid=false;this.Element.method=method||'POST';if(!is_ajax||is_ajax==undefined){this.Element.action=action||'#';}else{this.Element.action='#';this.Element.url=Base64.decode(action);}
this.postVars='';};CompositeForm.prototype={Add:function(child){Interface.EnsureImplements(child,Composite,FormItem);this.FormComponents.push(child);this.Element.appendChild(child.GetElement());},Remove:function(child){for(var i=0,len=this.FormComponents.length;i<len;i++){if(this.FormComponents[i].id===child){this.FormComponents.splice(i,1);break;}}},GetElement:function(){return this.Element;},GetChild:function(i){return this.FormComponents[i];},SetUrl:function(action_url){this.Element.action='#';this.Element.url=Base64.decode(action_url);},GetAction:function(){return this.Element.action;},GetUrl:function(){return this.Element.url;},Save:function(){for(var i=0,len=this.FormComponents.length;i<len;i++){this.FormComponents[i].Save();}},Submit:function(){this.Element.submit();},Restore:function(){for(var i=0,len=this.FormComponents.length;i<len;i++){this.FormComponents[i].Restore();alert('Restoring: '+this.FormComponents[i].id);}},Reset:function(){this.Element.reset();},Display:function(){document.getElementById('frmFieldsArea').appendChild(this.Element);},DisplayIn:function(element_id){document.getElementById(element_id).appendChild(this.Element);}};

//class.composite_fieldset.js
var CompositeFieldset=function(id,legendText){this.components={};this.element=document.createElement('fieldset');this.element.id=id;if(legendText){this.legend=document.createElement('legend');this.legend.appendChild(document.createTextNode(legendText));this.element.appendChild(this.legend);}};CompositeFieldset.prototype.Add=function(child){this.components[child.id]=child;this.element.appendChild(child.GetElement());};CompositeFieldset.prototype.Remove=function(child){};CompositeFieldset.prototype.GetChild=function(id){if(this.components[id]!=undefined){return this.components[id];}else{return null;}};CompositeFieldset.prototype.Save=function(){};CompositeFieldset.prototype.Restore=function(){};CompositeFieldset.prototype.GetElement=function(){return this.element;};CompositeFieldset.prototype.GetType=function(){return'fieldset';};CompositeFieldset.prototype.GetName=function(){return this.element.name;};CompositeFieldset.prototype.GetId=function(){return this.element.id;};

//class.form_item.js
var FormItem=new Interface('FormItem',['Save','Restore']);var Field=function(id){this.id=id;this.Element;this.whiteSpace=/^[\s]+$/;this.customRegEx=null;this.customRegExMessage=null;};Field.prototype.Add=function(){};Field.prototype.Remove=function(){};Field.prototype.GetChild=function(){};Field.prototype.Focus=function(){this.Element.focus();};Field.prototype.Save=function(){setCookie(this.id,this.getValue);};Field.prototype.Restore=function(){this.Element.value=getCookie(this.id);};Field.prototype.GetElement=function(){return this.Element;};Field.prototype.GetId=function(){return this.id;};Field.prototype.GetValue=function(){throw new Error(this.id+': Unsupported operation on the class Field.');};Field.prototype.GetName=function(){throw new Error(this.id+': Unsupported operation on the class Field.');};Field.prototype.GetCustomRegEx=function(){return this.customRegEx;};Field.prototype.SetCustomRegExMessage=function(msg){this.customRegExMessage=msg;};Field.prototype.GetCustomRegExMessage=function(){return this.customRegExMessage;};Field.prototype.GetType=function(){throw new Error(this.id+': Unsupported operation on the class Field.');};Field.prototype.GetRequired=function(){throw new Error(this.id+': Unsupported operation on the class Field.');};Field.prototype.Validate=function(){throw new Error(this.id+': Unsupported operation on the class Field.');};var GetTableComponent=function(td1Content,td2Content){var table=document.createElement('table');var tbody=document.createElement('tbody');var tr1=document.createElement('tr');tbody.appendChild(tr1);table.appendChild(tbody);var td1=document.createElement('td');var td2=document.createElement('td');td1.className='tbl-input-field-1';td2.className='tbl-input-field-2';if(td1Content!==null){td1.appendChild(td1Content);}else{td1.appendChild(document.createTextNode(" "));}
td2.appendChild(td2Content);tr1.appendChild(td1);tr1.appendChild(td2);return table;};Field.prototype.ValidateUserInput=function(element){if(element.value==''&&element.required==true||this.whiteSpace.test(element.value)&&element.required==true){this.SetCustomRegExMessage(element.name+' is a required field.');return false;}else{if(this.customRegEx!==null){if(element.value.search(this.customRegEx)==-1){return false;}else{return true;}}else{return true;}}};var CheckboxField=function(id,name,label,required,layout){Field.call(this,id);this.checkbox=document.createElement('input');this.checkbox.id=id;this.checkbox.name=name;this.checkbox.required=required;this.checkbox.type='checkbox';this.label=document.createElement('label');var labelTextNode=document.createTextNode(label);if(required==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
this.Element=document.createElement('div');this.Element.style.position='relative';switch(layout){default:this.Element.appendChild(this.checkbox);this.Element.appendChild(this.label);break;}};Extend(CheckboxField,Field);CheckboxField.prototype.GetName=function(){return this.checkbox.name;};CheckboxField.prototype.GetValue=function(){return this.checkbox.checked;};CheckboxField.prototype.GetType=function(){return this.checkbox.type;};CheckboxField.prototype.GetRequired=function(){return this.checkbox.required;};CheckboxField.prototype.Validate=function(){if(!this.checkbox.checked){return false;}else{return true;}};var RadioButton=function(id,name,label,required,layout){Field.call(this,id);this.radio=document.createElement('input');this.radio.id=id;this.radio.name=name;this.radio.required=required;this.radio.type='radio';this.label=document.createElement('label');var labelTextNode=document.createTextNode(label);if(required==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
this.Element=document.createElement('div');this.Element.style.position='relative';switch(layout){case'left':this.Element.appendChild(this.label);this.Element.appendChild(this.radio);break;case'right':this.Element.appendChild(this.radio);this.Element.appendChild(this.label);break;}};Extend(RadioButton,Field);RadioButton.prototype.GetName=function(){return this.radio.name;};RadioButton.prototype.GetValue=function(){return this.radio.checked;};RadioButton.prototype.GetType=function(){return this.radio.type;};RadioButton.prototype.GetRequired=function(){return this.radio.required;};RadioButton.prototype.Validate=function(){};var RadioButtonArray=function(array){this.radiobuttons=new Array();this.radio=new Array();this.totalbuttons=array.length;this.Element=document.createElement('div');this.Element.style.position='relative';for(var i=0,len=array.length;i<len;i++){this.radiobuttons[i]=array[i];this.radio[i]=document.createElement('input');this.radio[i].id=this.radiobuttons[i][0];this.radio[i].name=this.radiobuttons[i][1];this.radio[i].value=this.radiobuttons[i][3]
this.radio[i].required=this.radiobuttons[i][4];this.radio[i].totalbuttons=len;this.radio[i].type='radio';Field.call(this,this.radio[i].id);this.label=document.createElement('label');var labelTextNode=document.createTextNode(this.radiobuttons[i][2]);if(this.radiobuttons[i][4]==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
switch(this.radiobuttons[i][5]){case'left':this.Element.appendChild(this.label);break;case'right':this.Element.appendChild(this.radio[i]);this.Element.appendChild(this.label);break;}}};Extend(RadioButtonArray,Field);RadioButtonArray.prototype.GetTotalButtons=function(){return this.totalbuttons;};RadioButtonArray.prototype.GetId=function(i){return this.radio[i].id;};RadioButtonArray.prototype.GetName=function(i){return this.radio[i].name;};RadioButtonArray.prototype.GetChecked=function(i){return this.radio[i].checked;};RadioButtonArray.prototype.GetValue=function(i){return this.radio[i].value;};RadioButtonArray.prototype.GetType=function(){return'radio';};RadioButtonArray.prototype.GetRequired=function(){return'false';};RadioButtonArray.prototype.Validate=function(){};var TextLabel=function(id,text,required){this.label=document.createElement('label');this.id=id;var labelTextNode=document.createTextNode(text);this.Element=document.createElement('div');this.Element.style.position='relative';if(required==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
this.Element.appendChild(this.label);};Extend(TextLabel,Field);TextLabel.prototype.GetValue=function(){return this.label;};TextLabel.prototype.GetType=function(){return'label';};TextLabel.prototype.GetRequired=function(){return false;};var TextLabelGroup=function(id,name,required,customRegExMsg){Field.call(this,id);this.components={};this.id=id;if(required==undefined||required=='undefined'||required==null){this.required=false;}else{this.required=required;}
this.customRegExMessage=customRegExMsg||null;this.Element=document.createElement('div');this.Element.className='input-field';this.Element.style.position='relative';this.table=document.createElement('table');this.tbody=document.createElement('tbody');this.tr1=document.createElement('tr');this.tbody.appendChild(this.tr1);this.table.appendChild(this.tbody);this.td1=document.createElement('td');this.td2=document.createElement('td');this.td1.className='tbl-input-field-1';this.td2.className='tbl-input-field-2';this.tr1.appendChild(this.td1);this.tr1.appendChild(this.td2);this.Element.appendChild(this.table);};Extend(TextLabelGroup,Field);TextLabelGroup.prototype.AddLabel=function(child){this.components[child.id]=child;this.td1.appendChild(child.GetElement());};TextLabelGroup.prototype.AddElements=function(elementsArray){for(var i=0,len=elementsArray.length;i<len;i++){this.components[elementsArray[i].id]=elementsArray[i];this.td2.appendChild(elementsArray[i].GetElement());}};TextLabelGroup.prototype.GetType=function(){return'grouped-fieldset';};TextLabelGroup.prototype.GetRequired=function(){return this.required;};var InputButton=function(id,label,method,layout){Field.call(this,id);this.button=document.createElement('input');this.button.id=id;this.button.type='button';this.button.value=label;this.button.className='button';this.button.onclick=method||'';this.Element=document.createElement('div');this.Element.className='input-field';this.Element.style.position='relative';switch(layout){case'vertical':this.Element.appendChild(this.label);this.br=document.createElement('br');this.Element.appendChild(this.br);this.Element.appendChild(this.button);break;case'horizontal':this.Element.appendChild(GetTableComponent(null,this.button));break;default:this.Element.appendChild(this.button);break;}};Extend(InputButton,Field);InputButton.prototype.GetValue=function(){throw new Error('Unsupported Value in class InputButton.');};InputButton.prototype.GetType=function(){return this.button.type;};InputButton.prototype.GetRequired=function(){return false;};var InputField=function(id,name,label,required,layout,type,customRegEx,customRegExMsg){Field.call(this,id);this.input=document.createElement('input');this.input.id=id;this.input.name=name;this.input.type=type||'text';this.input.className='text';if(required==undefined||required=='undefined'||required==null){this.input.required=false;}else{this.input.required=required;}
if(!customRegEx==undefined||!customRegEx==" "){this.customRegEx=new RegExp(customRegEx[0],customRegEx[1]);}else{this.customRegEx=null;}
this.customRegExMessage=customRegExMsg||null;this.label=document.createElement('label');var labelTextNode=document.createTextNode(label);if(required==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
this.Element=document.createElement('div');this.Element.className='input-field';this.Element.style.position='relative';switch(layout){case'vertical':this.Element.appendChild(this.label);this.br=document.createElement('br');this.Element.appendChild(this.br);this.Element.appendChild(this.input);break;case'horizontal':this.Element.appendChild(GetTableComponent(this.label,this.input));break;default:this.Element.appendChild(this.label);this.Element.appendChild(this.input);break;}};Extend(InputField,Field);InputField.prototype.GetName=function(){return this.input.name;};InputField.prototype.GetValue=function(){return this.input.value;};InputField.prototype.GetType=function(){return this.input.type;};InputField.prototype.GetRequired=function(){return this.input.required;};InputField.prototype.Validate=function(){if(this.input.value==''&&this.input.required||this.whiteSpace.test(this.input.value)&&this.input.required){this.SetCustomRegExMessage(this.input.name+' is a required field.');return false;}else{if(this.customRegEx!==null&&this.input.value!==''){if(this.input.value.search(this.customRegEx)==-1){return false;}else{return true;}}else{return true;}}};var HiddenField=function(id,value){Field.call(this,id);this.Element=document.createElement('input');this.Element.type='hidden';this.Element.id=id;this.Element.value=value||'';};Extend(HiddenField,Field);HiddenField.prototype.GetValue=function(){return this.Element.value;};HiddenField.prototype.GetType=function(){return this.Element.type;};HiddenField.prototype.SetValue=function(udef_value){this.Element.value=udef_value;};var TextareaField=function(id,name,label,required,layout,customRegEx,customRegExMsg){Field.call(this,id);this.textarea=document.createElement('textarea');this.textarea.id=id;this.textarea.name=name;this.textarea.className='textarea';if(required==undefined||required=='undefined'||required==null){this.textarea.required=false;}else{this.textarea.required=required;}
if(!customRegEx==undefined||!customRegEx==" "){this.customRegEx=new RegExp(customRegEx[0],customRegEx[1]);}else{this.customRegEx=null;}
this.customRegExMessage=customRegExMsg||null;this.label=document.createElement('label');var labelTextNode=document.createTextNode(label);if(required==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
this.Element=document.createElement('div');this.Element.className='input-field';this.Element.style.position='relative';switch(layout){case'vertical':this.Element.appendChild(this.label);this.br=document.createElement('br');this.Element.appendChild(this.br);this.Element.appendChild(this.textarea);break;case'horizontal':this.Element.appendChild(GetTableComponent(this.label,this.textarea));break;default:this.Element.appendChild(this.label);this.Element.appendChild(this.textarea);break;}};Extend(TextareaField,Field);TextareaField.prototype.GetName=function(){return this.textarea.name;};TextareaField.prototype.GetValue=function(){return this.textarea.value;};TextareaField.prototype.GetType=function(){return'textarea';};TextareaField.prototype.GetRequired=function(){return this.textarea.required;};TextareaField.prototype.Validate=function(){if(this.textarea.value==''&&this.textarea.required||this.whiteSpace.test(this.textarea.value)&&this.textarea.required){this.SetCustomRegExMessage(this.textarea.name+' is a required field.');return false;}else{if(this.customRegEx!==null){if(this.textarea.value.search(this.customRegEx)==-1){return false;}else{return true;}}else{return true;}}};var SelectField=function(id,label,optionsArray,required,layout){Field.call(this,id);this.select=document.createElement('select');this.select.id=id;if(required==undefined||required=='undefined'||required==null){this.select.required=false;}else{this.select.required=required;}
this.label=document.createElement('label');var labelTextNode=document.createTextNode(label);if(required==true){var reqIndicator=document.createElement('font');reqIndicator.style.color='#cc0000';reqIndicator.innerHTML='* ';this.label.appendChild(reqIndicator);this.label.appendChild(labelTextNode);}else{this.label.appendChild(labelTextNode);}
this.Element=document.createElement('div');this.Element.className='input-field';this.Element.style.position='relative';switch(layout){case'vertical':this.Element.appendChild(this.label);this.br=document.createElement('br');this.Element.appendChild(this.br);this.Element.appendChild(this.select);break;case'horizontal':this.Element.appendChild(GetTableComponent(this.label,this.select));break;default:this.Element.appendChild(this.label);this.Element.appendChild(this.select);}
for(key in optionsArray){var option=document.createElement('option');option.text=optionsArray[key];option.value=key;option.innerHTML=optionsArray[key];try{this.select.appendChild(option);}catch(ex){var elOptOld=this.select.options[this.select.selectedIndex];try{elSel.add(option,elOptOld);}catch(ex){elSel.add(option,this.select.selectedIndex);}}}};Extend(SelectField,Field);SelectField.prototype.GetValue=function(){return this.select.options[this.select.selectedIndex].value;};SelectField.prototype.GetType=function(){return'select';};SelectField.prototype.GetRequired=function(){return this.select.required;};SelectField.prototype.Validate=function(){};var ElementSpacing=function(){this.Element=document.createElement('br');};Extend(ElementSpacing,Field);ElementSpacing.prototype.GetType=function(){return'br';};ElementSpacing.prototype.GetRequired=function(){return'false';};

//class.xhr.js
var AjaxHandler=new Interface('AjaxHandler',['Request','CreateXhrObject']);var AjaxResponseHandler=new Interface('AjaxResponseHandler',['Success','Failure']);var AjaxFactory=function(){var _xhr;};AjaxFactory.prototype={Request:function(method,url,XhrCallBack,postVars){Interface.EnsureImplements(XhrCallBack,AjaxResponseHandler);_xhr=this.CreateXhrObject();_xhr.onreadystatechange=function(){if(_xhr.readyState!==4)return;(_xhr.status===200)?XhrCallBack.Success(_xhr.responseText,_xhr.responseXML):XhrCallBack.Failure(_xhr.status);};_xhr.open(method,url,true);_xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(method!=='POST'){postVars=null;}
_xhr.send(postVars);},CreateXhrObject:function(){var methods=[function(){return new XMLHttpRequest();},function(){return new ActiveXObject('Msxml2.XMLHTTP');},function(){return new ActiveXObject('Microsoft.XMLHTTP');}];for(var i=0,len=methods.length;i<len;i++){try{return methods[i]();}catch(e){continue;}}
throw new Error('SimpleHandler: Could not create an XHR Object.');},GetXmlResponse:function(){return _xhr.responseXML;},GrabPosXml:function(tagName){return _xhr.responseXML.documentElement.getElementsByTagName(tagName)[0].childNodes[0].nodeValue;},CleanPosUrl:function(value){cleanString=value;cleanString=cleanString.replace(/&/g,'**am**');cleanString=cleanString.replace(/=/g,'**eq**');cleanString=cleanString.replace(/\\+/g,'**pl**');return cleanString;}};var AjaxManager=new AjaxFactory();

//class.ga.js
var _gaq=_gaq||[];var AnalyticsFactory=function(){this.accounts=new Array();this.pageTracker=new Array();};AnalyticsFactory.prototype={SetAccounts:function(ga_accounts){for(var i=0,len=ga_accounts.length;i<len;i++){this.accounts[i]=ga_accounts[i];XBrowser.Log('GaManager.SetAccounts() => ["'+ga_accounts[i]+'"]');}},TrackAsyncPageView:function(page){if(page==undefined||page==''){page=this.GetCurrentPage();}
if(APPLICATION_ENV=='production'){for(var i=0,len=this.accounts.length;i<len;i++){_gaq.push(["m"+i+"._setAccount",this.accounts[i]]);_gaq.push(["m"+i+"._trackPageview",page]);XBrowser.Log('LIVE ASYNC. PAGEVIEW : _gaq.push(["m'+i+'._setAccount", '+this.accounts[i]+'])');XBrowser.Log('LIVE ASYNC. PAGEVIEW : _gaq.push(["m'+i+'._trackPageview", '+page+'])');}}else{for(var i=0,len=this.accounts.length;i<len;i++){XBrowser.Log('TEST ASYNC. PAGEVIEW : _gaq.push(["m'+i+'._setAccount", '+this.accounts[i]+'])');XBrowser.Log('TEST ASYNC. PAGEVIEW: _gaq.push(["m'+i+'._trackPageview", '+page+'])');}}},TrackPageView:function(page){if(page==undefined||page==''){page=this.GetCurrentPage();}
if(APPLICATION_ENV=='production'){for(var i=0,len=this.accounts.length;i<len;i++){try{this.pageTracker[i]=_gat._getTracker(this.accounts[i]);this.pageTracker[i]._trackPageview(page);XBrowser.Log('LIVE PAGEVIEW : this.pageTracker['+i+'] = _gat._getTracker('+this.accounts[i]+')');XBrowser.Log('LIVE PAGEVIEW : this.pageTracker['+i+']._trackPageview('+page+')');}catch(e){try{XBrowser.Log('GaManager.TrackPageView() Failed => '+e);}catch(err){}}}}else{for(var i=0,len=this.accounts.length;i<len;i++){XBrowser.Log('TEST PAGEVIEW : this.pageTracker['+i+'] = _gat._getTracker('+this.accounts[i]+')');XBrowser.Log('TEST PAGEVIEW : this.pageTracker['+i+']._trackPageview('+page+')');}}},GetCurrentPage:function(){url_protocol=(("https:"==document.location.protocol)?"https://":"http://");url=window.location.href;url=url.replace(url_protocol,'');url=url.replace(document.domain,'');XBrowser.Log('GaManager.GetCurrentPage() => '+url);return url;},TestTrackPageView:function(page){if(page==undefined||page==''){page=this.GetCurrentPage();}
for(var i=0,len=this.accounts.length;i<len;i++){alert('Tracking Page: '+page+' for account: '+this.accounts[i]);}},TrackUrchinConversion:function(uacct,goal){if(uacct==undefined||uacct==''){throw new Error('_uacct cannot be null and/or blank.');}
if(goal==undefined||goal==''){throw new Error('Goal cannot be null and/or blank.');}
try{_uff=0;_uacct=uacct;urchinTracker(goal);}catch(err){}},_uGA:function(l,n,s){if(!l||l==""||!n||n==""||!s||s=="")return"-";var i,i2,i3,c="-";i=l.indexOf(n);i3=n.indexOf("=")+1;if(i>-1){i2=l.indexOf(s,i);if(i2<0){i2=l.length;}
c=l.substring((i+i3),i2);}
return c;},SetVisitorLabel:function(label){for(var i=0,len=this.accounts.length;i<len;i++){this.pageTracker[i]._setVar(label);date=new Date();date.setTime(date.getTime()+1*60*60*1000);document.cookie="__utmv="+_udh+"."+_uES(label)+";path="+_utcp+"; expires="+date.toGMTString()+";"+_udo;}}};if(typeof(GaManager)!='object'){XBrowser.Log('Instantiating GaManager');var GaManager=new AnalyticsFactory();XBrowser.Log('GaManager Ready.');}else{XBrowser.Log('Deferring GaManager Instantiation: Already available');}
