//ADT - SUPER FORM //Author(s): Elias Amador //Post Author(s): Joe Cork, Kanika Binzani //Version: 2.0 //Published: 12/26/2010 //Last Revised: 12/09/2011 by Elias Amador var superFormDefault=false; var superFormSet=false; var clickCount=false; var target,settitle,setdescription,settype,setcolumns,setlabel,setdisclaimer,setccdisplay,setbutton,setlanguage,setformname,setformsubject,setformtype,setformdnis,setformtyurl,settmplstylesheet,setstylesheet,activeDnis,activeDivision,activeLanguage,activeDataType,activeType,bodyResi,bodySmb,bodyComm,govForm,tempSubject,tempDnis,tempType,tempTY; function ccClick() { if (clickCount) { document.getElementById("Request_Email_Subject").value=tempSubject; document.getElementById("Promotion_Code").value=tempDnis; document.getElementById("Request_Message_Type").value=tempType; document.getElementById("thank_you_url").value=tempTY; clickCount=false; } else { tempSubject = document.getElementById("Request_Email_Subject").value; tempDnis = document.getElementById("Promotion_Code").value; tempType = document.getElementById("Request_Message_Type").value; tempTY = document.getElementById("thank_you_url").value; document.getElementById("Request_Email_Subject").value="Customer Service - DNIS 000-000-0371"; document.getElementById("Promotion_Code").value="0000000371"; document.getElementById("Request_Message_Type").value="L"; document.getElementById("thank_you_url").value=getCCURL(); clickCount=true; } } function formatField(fieldVal) { var fieldVal1 = fieldVal.substring(0,3); var fieldVal2 = fieldVal.substring(3,6); var fieldVal3 = fieldVal.substring(6,10); fieldVal = fieldVal1 +"-"+ fieldVal2 +"-"+ fieldVal3; return fieldVal; } function fireOmniture() { s.prop7=activeDnis; if (s.prop7!='') {s.eVar7=s.prop7;} s.prop9=activeDivision; s.eVar9=s.prop9; if ($('#Request_Message_Type').val()=="L") { s.prop10='Lead Form'; s.prop13='Lead'; } else { s.prop10='Contact Form'; s.prop13='Contact'; } s.eVar10=s.prop10; s.eVar13=s.prop13; var stringEvents=String(s.events); if (stringEvents.indexOf("event2")==-1) { s.events=s.events+', event2'; } } function getCCURL() { var tempDomain = document.domain; var tempMatrix = tempDomain.split('.'); if (tempMatrix[0] == 'perf' || tempMatrix[0] == 'dev' || tempMatrix[0] == 'authoring') { tempDomain = 'http://perf.www.adt.com'; } else { tempDomain = 'http://www.adt.com'; } return (tempDomain + '/about-adt/thank-you?ty=0000000371#page=' + s.pageName); } function getCSSURL() { var tempDomain = document.domain; var tempMatrix = tempDomain.split('.'); if (tempMatrix[0] == 'dev') { tempDomain = 'dev.www.adt.com'; } else if (tempMatrix[0] == 'perf' || tempMatrix[0] == 'authoring') { tempDomain = 'perf.www.adt.com'; } else { tempDomain = 'www.adt.com'; } return tempDomain; } function getStoreURL() { var tempDomain = document.domain; var tempMatrix = tempDomain.split('.'); if (tempMatrix[0] == 'perf' || tempMatrix[0] == 'dev' || tempMatrix[0] == 'authoring') { tempDomain = 'perf.www.adt.com'; } else { tempDomain = 'www.adt.com'; } return (tempDomain + '/wps/portal/adt/for_your_home/products_services/security_systems/store'); } function getTYURL() { var tempDomain = document.domain; var tempMatrix = tempDomain.split('.'); var tempDivision; var currPageURL = String(window.location); if (tempMatrix[0] == 'perf' || tempMatrix[0] == 'dev' || tempMatrix[0] == 'authoring') { tempDomain = 'http://perf.www.adt.com'; } else { tempDomain = 'http://www.adt.com'; } if (activeDivision == 'Resi') { if (currPageURL.indexOf("/customer-service")!=-1) { tempDivision = '/about-adt'; } else { tempDivision = '/home-security'; } } else if (activeDivision == 'Smbiz') { tempDivision = '/small-business-security'; } else if (activeDivision == 'Comm') { if (govForm != 1) { tempDivision = '/commercial-security'; } else { tempDivision = '/government-security'; } } else { tempDivision = '/about-adt'; } return (tempDomain + tempDivision + '/thank-you?ty='); } function usesFormOmniture(x) { var s=s_gi(s_account); s.linkTrackVars='prop7,prop9,prop10,prop13,eVar7,eVar9,eVar10,eVar13,events'; s.linkTrackEvents='event2'; s.prop7=activeDnis; s.eVar7=s.prop7; s.prop9=activeDivision; s.eVar9=s.prop9; s.prop10='Lead Form'; s.eVar10=s.prop10; s.prop13='Lead'; s.eVar13=s.prop13; s.events='event2'; s.tl(this,"o",x); //RESET OMNITURE VARIABLES s.linkTrackVars='pev2'; s.linkTrackEvents=null; s.prop7=null; s.eVar7=s.prop7; s.prop9=null; s.eVar9=s.prop9; s.prop10=null; s.eVar10=s.prop10; s.prop13=null; s.eVar13=s.prop13; s.events=null; } function usesForm(x,y) { if (y==1) { if (bodySmb!=0 && bodyComm!=0) { $('#smbFormContainer,#commFormContainer').html(''); } else if (bodySmb==0) { $('#commFormContainer').html(''); } else if (bodyComm==0) { $('#smbFormContainer').html(''); } $('#resiFormContainer').html('
'); setSuperForm("#resiForm",x); usesFormOmniture("HP:TabbedContent:HomeSecurity"); } else if (y==2) { if (bodyResi!=0 && bodyComm!=0) { $('#resiFormContainer,#commFormContainer').html(''); } else if (bodyResi==0) { $('#commFormContainer').html(''); } else if (bodyComm==0) { $('#resiFormContainer').html(''); } $('#smbFormContainer').html(''); setSuperForm("#smbForm",x); usesFormOmniture("HP:TabbedContent:SMB"); } else if (y==3) { if (bodySmb!=0 && bodyResi!=0) { $('#smbFormContainer,#resiFormContainer').html(''); } else if (bodySmb==0) { $('#resiFormContainer').html(''); } else if (bodyResi==0) { $('#smbFormContainer').html(''); } $('#commFormContainer').html(''); setSuperForm("#commForm",x); usesFormOmniture("HP:TabbedContent:Commercial"); } } function setContentForms(x,y,z) { if (x!=null) {$('#tabs h1.first a').click(function() {usesForm(x,1);});bodyResi=1;} else {bodyResi=0;} if (y!=null) {$('#tabs h1.second a').click(function() {usesForm(y,2);});bodySmb=1;} else {bodySmb=0;} if (z!=null) {$('#tabs h1.third a').click(function() {usesForm(z,3);});bodyComm=1;} else { bodyComm=0;} } function superForm(title,description,type,columns,label,disclaimer,ccdisplay,button,language,formname,formsubject,formtype,formdnis,formtyurl,tmplstylesheet,stylesheet,name) { this.title=title; this.description=description; this.type=type; this.columns=columns; this.label=label; this.disclaimer=disclaimer; this.ccdisplay=ccdisplay; this.button=button; this.language=language; this.formname=formname; this.formsubject=formsubject; this.formtype=formtype; this.formdnis=formdnis; this.formtyurl=formtyurl; this.tmplstylesheet=tmplstylesheet; this.stylesheet=stylesheet; this.name=name; } // BRING FORM ASSETS FROM NAVIGATOR superForm1=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','resi','two','top','','true','CALL ME','english','default','Home Security Review - DNIS 000-000-0022','L','0000000022','#','None','/wps/wcm/connect/c0a915804524b69d99679f03dd566e8c/download.css?MOD=AJPERES','superForm1');superForm2=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','resi','two','top','','true','CALL ME','english','default','Pulse - DNIS 000-000-0027','L','0000000027','#','None','/wps/wcm/connect/1df1680045526a9ebfb1bf03dd566e8c/download.css?MOD=AJPERES','superForm2');superForm3=new superForm('Free Security Review','','comm','two','top','','false','CONTACT ME','english','default','Commercial Security Review - DNIS 000-000-0130','L','0000000130','/commercial-security/thank-you/?ty=comm0001','None','/wps/wcm/connect/c1208b00457dbdca8309ab912df0422b/heroFormSMBTemplate.css?MOD=AJPERES','superForm3');superForm4=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0128','L','0000000128','/small-business-security/thank-you/?ty=smb0001','None','/wps/wcm/connect/dba942004589fe5f990eb9912df0422b/heroFormSMBTemplate.css?MOD=AJPERES','superForm4');superForm5=new superForm('Request More Info','','resi','two','top','','true','CONTACT ME','english','default','Home Health - DNIS 000-000-0188','L','0000000188','/home-security/thank-you/?ty=compan0002','None','/wps/wcm/connect/d2fcc280458a03af9997b9912df0422b/heroFormTemplate.css?MOD=AJPERES','superForm5');superForm6=new superForm('Free Security Review','','resi','two','top','','true','CALL ME','english','default','Home Security Review - DNIS 000-000-0022','L','0000000022','/home-security/thank-you/?ty=resi0001','None','/wps/wcm/connect/2e030500458c6816ab1eab912df0422b/download.css?MOD=AJPERES','superForm6');superForm7=new superForm('Free Security Review','','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0128','L','0000000128','/small-business-security/thank-you?ty=smb0001','None','/wps/wcm/connect/46f80980458d1355b04eb9912df0422b/download+%281%29.css?MOD=AJPERES','superForm7');superForm8=new superForm('Free Security Review','','comm','two','top','','false','CONTACT ME','english','default','Commercial Security Review - DNIS 000-000-0130','L','0000000130','/commercial-security/thank-you?ty=comm0001','None','/wps/wcm/connect/3212ee80458d180bb089b9912df0422b/download+%282%29.css?MOD=AJPERES','superForm8');superForm9=new superForm('Request More Info','','resi','two','top','','true','CONTACT ME','english','default','Home Health - DNIS 000-000-0037','L','0000000037','/home-security/thank-you/?ty=compan0001','None','/wps/wcm/connect/bb338800458f4a18bfb3bf912df0422b/download+%283%29.css?MOD=AJPERES','superForm9');superForm10=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','resi','two','top','','true','CALL ME','english','default','Home Security Review - DNIS 444-222-2222','L','4442222222','/home-security/thank-you/?ty=resi0003','None','/wps/wcm/connect/e580750045a81ffc9e81bf912df0422b/heroFormTemplate.css?MOD=AJPERES','superForm10');superForm11=new superForm('WE WILL CONTACT YOU','Fill out the form below and we will call you in minutes.','comm','two','top','','false','SUBMIT','english','default','Commercial Security Review - DNIS 000-000-0202','L','0000000202','#','None','/wps/wcm/connect/29bfba0045faba1a9f30bf912df0422b/custom-css.css?MOD=AJPERES','superForm11');superForm12=new superForm('WE WILL CONTACT YOU','Fill out the form below and we will call you in minutes.','gov','two','top','','false','SUBMIT','english','default','Government Security Review - DNIS 000-000-0203','L','0000000203','#','None','/wps/wcm/connect/bbb81b8045fb8fc8a61daf912df0422b/custom-css.css?MOD=AJPERES','superForm12');superForm13=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0128','L','0000000128','/small-business-security/thank-you?ty=smb0001','None','/wps/wcm/connect/830577004601874ea1f0f37ce7989c6c/download+%281%29.css?MOD=AJPERES','superForm13');superForm14=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','resi','two','top','','true','CALL ME','english','default','Pulse - DNIS 000-000-0197','L','0000000197','#','Resi Two Column Hero','/wps/wcm/connect/f43883804610cac5911bd37ce7989c6c/download.css?MOD=AJPERES','superForm14');superForm15=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','resi','two','top','','true','CALL ME','english','default','Home Security Review - DNIS 000-000-0194','L','0000000194','#','Resi Two Column Hero','/wps/wcm/connect/3e3070804610cb7d9133d37ce7989c6c/heroFormTemplate.css?MOD=AJPERES','superForm15');superForm16=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','resi','two','top','','true','CALL ME','english','default','Home Security Review - DNIS 000-000-0196','L','0000000196','/home-security/thank-you/?ty=resi0007','None','/wps/wcm/connect/21d11a004610cbf79148d37ce7989c6c/heroFormTemplate.css?MOD=AJPERES','superForm16');superForm17=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0190','L','0000000190','#','Smb Two Column Hero','/wps/wcm/connect/961dce004610e234920cd27ce7989c6c/newcss.css?MOD=AJPERES','superForm17');superForm18=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0191','L','0000000191','/small-business-security/thank-you?ty=smb0002','None','/wps/wcm/connect/ddd442004610e2949225d27ce7989c6c/heroFormSMBTemplate.css?MOD=AJPERES','superForm18');superForm19=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0198','L','0000000198','/small-business-security/thank-you?ty=smb0003','None','/wps/wcm/connect/d824ec004610ea4c92a8d27ce7989c6c/heroFormSMBTemplate.css?MOD=AJPERES','superForm19');superForm20=new superForm('WE\'LL CALL YOU!','Fill out the form below and an ADT representative will call you in minutes.','smb','two','top','','false','CALL ME','english','default','Small Business Security Review - DNIS 000-000-0199','L','0000000199','/small-business-security/thank-you?ty=smb0004','None','/wps/wcm/connect/658e2d804610ea9992c1d27ce7989c6c/heroFormSMBTemplate.css?MOD=AJPERES','superForm20');superForm21=new superForm('Get a FREE No-Obligation Home Security Review','','resi','two','top','or call