PageUtils=function(){};
PageUtils.addHiddenInput=function(c,a,b){this.addHiddenInputForDoc(document,c,a,b)
};
PageUtils.addHiddenInputForDoc=function(e,f,a,d){var b=e.createElement("INPUT");
b.type="hidden";
b.name=a;
b.value=(d==null)?"-":d;
b.style.display="none";
var c=e.forms[f];
c.appendChild(b)
};
PageUtils.doSubmit=function(c,a,b){this.doSubmitForDoc(document,c,a,b)
};
PageUtils.doSubmitForDoc=function(d,e,b,c){PageUtils.addHiddenInputForDoc(d,e,b,c);
var a=d.createElement("input");
a.type="submit";
a.style.display="none";
d.forms[e].appendChild(a);
a.click()
};
PageUtils.keyToUpperCase=function(){if(document.all){var b=event.keyCode;
var a=String.fromCharCode(b).toUpperCase().charCodeAt();
event.keyCode=a;
return true
}else{return true
}};
function PageBlocker(){}var ua=navigator.userAgent.toLowerCase();
var isOpera=(ua.indexOf("opera")>-1);
var isIE=(window.ActiveXObject);
PageBlocker.prototype.start=function(b){this.addBlockingDivToWindow(b);
var a=this.getBlockingDiv();
a.style.height=this.getDocumentHeight()+"px";
a.style.width=this.getDocumentWidth()+"px";
a.style.display="";
if(b!=true){document.body.scrollTop=0
}this.setSelectBoxVisibility("hidden")
};
PageBlocker.prototype.stop=function(){var a=this.getBlockingDiv();
if(a){a.style.display="none";
this.setSelectBoxVisibility("visible")
}};
PageBlocker.prototype.addBlockingDivToWindow=function(c){if(!this.divForBlockingAdded){var a=top.document.body;
if(a){this.divForBlockingAdded=true;
var e=top.document.createElement("DIV");
e.id="PageBlocker_DivForBlocking";
e.style.zIndex=20000;
e.style.position="absolute";
e.style.width="100%";
e.style.height="100%";
e.style.left=0;
e.style.top=0;
e.style.cursor="wait";
e.style.display="none";
e.style.backgroundImage='url("images/mask_bg_white.gif")';
e.style.backgroundRepeat="repeat";
e.innerHTML="<IMG src='images/loading.gif' style='position: relative;top: "+(c==true?300+document.body.scrollTop:300)+";left: 350;'/>";
a.appendChild(e);
var b=this.getBlockingDiv();
b.onclick=PageBlocker.eventHandler;
b.onkeydown=b.onclick;
b.onkeypress=b.onclick;
b.onkeyup=b.onclick
}}};
PageBlocker.eventHandler=function(){try{if(top.window.event.keyCode==27){var b=top.document.getElementById("PageBlocker_DivForBlocking");
if(b){b.style.display="none"
}top.window.event.returnValue=true
}else{top.window.event.cancelBubble=true;
top.window.event.returnValue=false
}}catch(a){}return false
};
PageBlocker.prototype.getBlockingDiv=function(){return top.document.getElementById("PageBlocker_DivForBlocking")
};
PageBlocker.prototype.setSelectBoxVisibility=function(a){var d=top.document;
for(var b=0;
b<d.forms.length;
b++){for(var c=0;
c<d.forms[b].length;
c++){if(d.forms[b].elements[c].tagName=="SELECT"){d.forms[b].elements[c].style.visibility=a
}}}};
PageBlocker.prototype.descendingOrderComp=function(d,c){return(c-d)
};
PageBlocker.prototype.getDocumentHeight=function(){var b=-1,i=-1,g=-1;
var c=0;
var f=0;
var d=top.document;
var e=d.compatMode;
if((e||isIE)&&!isOpera){switch(e){case"CSS1Compat":b=((window.innerHeight&&window.scrollMaxY)?window.innerHeight+window.scrollMaxY:-1);
i=[d.documentElement.clientHeight,self.innerHeight||-1].sort(this.descendingOrderComp)[0];
g=d.body.offsetHeight+c+f;
break;
default:b=d.body.scrollHeight;
g=d.body.clientHeight
}}else{b=d.documentElement.scrollHeight;
i=self.innerHeight;
g=d.documentElement.clientHeight
}var a=[b,i,g].sort(this.descendingOrderComp);
return a[0]
};
PageBlocker.prototype.getDocumentWidth=function(){var d=-1,a=-1,c=-1;
var f=0;
var e=0;
var g=top.document;
var h=g.compatMode;
if(h||isIE){switch(h){case"CSS1Compat":d=g.documentElement.clientWidth;
a=g.body.offsetWidth+e+f;
break;
default:a=g.body.clientWidth;
d=g.body.scrollWidth;
break
}}else{d=g.documentElement.clientWidth;
a=g.body.offsetWidth+e+f
}var b=Math.max(d,a);
return b
};
YourBillBuddyPage=function(){};
YourBillBuddyPage.prototype._doc=null;
YourBillBuddyPage.prototype._pageBlocker=new PageBlocker();
var milisec=0;
var seconds=200;
var currentTimer=0;
YourBillBuddyPage._init=function(a){milisec=0;
seconds=a
};
YourBillBuddyPage._startTimer=function(){if(milisec<=0){milisec=9;
seconds-=1
}if(seconds<=-1){milisec=0;
seconds+=1;
if(this.currentTimer){clearTimeout(this.currentTimer);
this.currentTimer=null
}}else{milisec-=1;
this.currentTimer=setTimeout("YourBillBuddyPage._startTimer()",100)
}};
YourBillBuddyPage._resetTimer=function(){YourBillBuddyPage._init(300)
};
YourBillBuddyPage._callTimer=function(){YourBillBuddyPage._init(300);
YourBillBuddyPage._startTimer()
};
YourBillBuddyPage._stopTimer=function(){if(this.currentTimer){clearTimeout(this.currentTimer);
this.currentTimer=0
}};
YourBillBuddyPage.createInstance=function(c,b){if(c!=null){var a=new YourBillBuddyPage();
YourBillBuddyPage._initialize(a,c,b);
return a
}return null
};
YourBillBuddyPage._initialize=function(a,c,b){a._doc=c;
if(b){a._initializeDynamicProperties(b)
}if(a._displayError!=null&&a._displayError.length>0&&a._displayError!="null"){alert(a._displayError)
}};
YourBillBuddyPage.prototype._initializeDynamicProperties=function(c){var b=false;
for(var a in c){if(a=="_logoutFalse"){b=true
}this[a]=c[a]
}if(b==true){this["_logoutFalsePresent"]="true"
}};
YourBillBuddyPage.prototype.cancelBack=function(){};
YourBillBuddyPage.prototype.onLoad=function(){this.cancelBack();
this.setWindowReady(true);
if(this["_logoutFalsePresent"]){}else{YourBillBuddyPage._callTimer()
}};
YourBillBuddyPage.prototype.onContextMenu=function(){return false
};
YourBillBuddyPage.prototype.onKeyDown=function(){var a=window.event;
if(a.keyCode==27){this.setWindowReady(true)
}if(a.keyCode==8){if(a.srcElement.tagName!="INPUT"&&a.srcElement.tagName!="TEXTAREA"){a.returnValue=false;
a.cancelBubble=true;
return
}}if((a.altKey&&a.keyCode==37)||(a.ctrlKey&&a.keyCode==78)){a.returnValue=false;
a.cancelBubble=true;
return
}};
YourBillBuddyPage.prototype.setCookieValue=function(a,b){var c=new Date();
c.setFullYear(c.getFullYear()+1);
document.cookie=a+"="+b+"; expires="+c.toGMTString()
};
YourBillBuddyPage.prototype.getCookieValue=function(c){var d="";
var b=document.cookie;
var f=b.indexOf(c);
if(f!=-1){var e=f+c.length+1;
var a=b.indexOf(";",e);
if(a==-1){a=b.length
}d=b.substring(e,a)
}return d
};
YourBillBuddyPage.prototype.toString=function(){return"YourBillBuddyPage - \n"
};
YourBillBuddyPage.prototype.preLoadImage=function(c){if(document.images){if(!document.imgArray){document.imgArray=new Array()
}var b;
var a=document.imgArray.length;
document.imgArray[a]=new Image;
document.imgArray[a].src=c
}};
YourBillBuddyPage.prototype.showModalDialog=function(d,f,a,c){var b="scroll:no;status:no;resizable:yes;help:no;dialogHeight:"+a+"px;dialogWidth:"+c+"px;";
var e=window.showModalDialog("Dialog.do?dlgTitle="+f,d,b);
return e
};
YourBillBuddyPage.openNewWindow=function(b,a,c){var d=window.open(b,a,c);
return d
};
String.prototype.trim=function(){var a=this.replace(/^\s*/,"");
a=a.replace(/\s*$/,"");
a=a.replace(/\s\s*/g,"");
return a
};
YourBillBuddyPage.prototype.setWindowReady=function(b,a){b=(b==null)?true:b;
if(b){this._pageBlocker.stop()
}else{this._pageBlocker.start(a)
}};
YourBillBuddyPage.prototype.highlight=function(b,f){try{var c=document.getElementById(b);
var a="#ffffcc";
if(f!=null){a=f
}c.style.backgroundColor=a
}catch(d){}};
YourBillBuddyPage.prototype.blur=function(b,f){try{var c=document.getElementById(b);
var a="#ffffff";
if(f!=null){a=f
}c.style.backgroundColor=a
}catch(d){}};
YourBillBuddyPage.prototype.generateheader=function(g,d,b){var f='<table width="775" border="0" align="left" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><img src="img/ima-04.gif" width="265" height="36" /></td>  </tr>  <tr>     <td width="761" background="img/ima-bg.gif">&nbsp;</td>    <td width="14">&nbsp;</td>  </tr></table><tr>';
var e="";
if(g=="unlogged"){e='<td colspan="2"><table width="775" border="0" cellspacing="0" cellpadding="0">   <tr>       <td width="335">&nbsp;</td>       <td width="440"><a href="Welcome.do" class="links">Home</a> | <a href="javascript:pageHelper.callPopup(\'common/AboutUS.html\',\'yes\',800,500);" class="links">About us</a> |<a href="javascript:pageHelper.callPopup(\'common/Contact.html\',\'yes\',800,500);" class="links">Contact Us</a> | <a href="javascript:pageHelper.callPopup(\'common/FAQ.html\',\'yes\',800,500);" class="links">FAQ</a> </td>   </tr>      <tr>         <td>&nbsp;</td>         <td>&nbsp;</td>       </tr>    </table></td></tr>'
}else{if(d=="editprofile"){var a=b;
e='<td colspan="2"><table width="775" border="0" cellspacing="0" cellpadding="0">   <tr>       <td width="335"  class="member"> Welcome '+g+'</td>       <td width="440"><a href='+a+' class="linksunder">Back to Member Area</a> | <a href="javascript:pageHelper.callPopup(\'common/AboutUS.html\',\'yes\',800,500);" class="links">About us</a> | <a href="javascript:pageHelper.callPopup(\'common/Contact.html\',\'yes\',800,500);" class="links">Contact Us</a> | <a href="javascript:pageHelper.callPopup(\'common/FAQ.html\',\'yes\',800,500);" class="links">FAQ</a>  | <a href="logout.do" class="links">Logout</a></td>   </tr>      <tr>         <td>&nbsp;</td>         <td>&nbsp;</td>       </tr>    </table></td></tr>'
}else{if(d=="detailedview"){var a=b;
e='<td colspan="2"><table width="775" border="0" cellspacing="0" cellpadding="0">   <tr>   </tr>      <tr>         <td>&nbsp;</td>         <td>&nbsp;</td>       </tr>    </table></td></tr>'
}else{var c=b;
e='<td colspan="2"><table width="775" border="0" cellspacing="0" cellpadding="0">   <tr>       <td width="335"  class="member"> Welcome '+g+'</td>       <td width="440"><a href='+c+' class="links">Edit/View Profile</a> | <a href="javascript:pageHelper.callPopup(\'common/AboutUS.html\',\'yes\',800,500);" class="links">About us</a> | <a href="javascript:pageHelper.callPopup(\'common/Contact.html\',\'yes\',800,500);" class="links">Contact Us</a> | <a href="javascript:pageHelper.callPopup(\'common/FAQ.html\',\'yes\',800,500);" class="links">FAQ</a>  | <a href="logout.do" class="links">Logout</a></td>   </tr>      <tr>         <td>&nbsp;</td>         <td>&nbsp;</td>       </tr>    </table></td></tr>'
}}}document.write(f+e)
};
YourBillBuddyPage.prototype.callPopupInternal=function(c,b,a){window.name="mainWin";
return window.open(c,b,a)
};
YourBillBuddyPage.prototype.callPopup=function(e,d,c,b){YourBillBuddyPage._stopTimer();
var a;
a="menubar=0,toolbar=0,location=0,directories=0,status=0,scrollbars="+d+",resizable=1,width="+c+",height="+b;
this.callPopupInternal(e,"popupWndow",a)
};
YourBillBuddyPage.prototype.emailregex=/^\s*([a-zA-Z0-9_\-])+([a-zA-Z0-9_\.\-])*([a-zA-Z0-9_\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+\s*$/;
YourBillBuddyPage.prototype.wordregex=/^[a-zA-Z0-9_]+$/;
YourBillBuddyPage.prototype.validatefield=function(entered,checkfornull,regex,alertboxn,alertboxr){with(entered){if(checkfornull){if(value==null||value==""){if(alertboxn!=""&&alertboxn!=null){alert(alertboxn)
}return false
}}if(regex!=null&&regex!=""){if(regex.test(value)){return true
}else{if(alertboxr!=""&&alertboxr!=null){alert(alertboxr)
}return false
}}}return true
};
YourBillBuddyPage.prototype.findDOM=function(b,a){var c=0;
var f=0;
var e=0;
var d=0;
if(document.getElementById){f=1;
c=1
}else{if(document.all){e=1;
c=1
}else{browserVersion=parseInt(navigator.appVersion);
if((navigator.appName.indexOf("Netscape")!=-1)&&(browserVersion==4)){d=1;
c=1
}}}if(f){return a?document.getElementById(b).style:document.getElementById(b)
}if(e){return a?document.all[b].style:document.all[b]
}if(d){return document.layers[b]
}};
YourBillBuddyPage.prototype.toggleField=function(b,a){var c=this.findDOM(b,1);
if(a){c.visibility="visible"
}else{c.visibility="hidden"
}};
YourBillBuddyPage.prototype.headerPopup=function(a){var c=640;
var d=540;
var e=(screen.width-c)/2;
var b=(screen.height-d)/2;
winProp="width="+c+",height="+d+",left="+e+",top="+b+",scrollbars=yes,resizable";
Win=window.open(a,"Information",winProp);
if(parseInt(navigator.appVersion)>=4){Win.window.focus()
}};
YourBillBuddyPage.prototype.forgotPasswordPopup=function(a){var c=320;
var d=300;
var e=(screen.width-c)/2;
var b=(screen.height-d)/2;
winProp="width="+c+",height="+d+",left="+e+",top="+b+",scrollbars=no,resizable";
Win=window.open(a,"Information",winProp);
if(parseInt(navigator.appVersion)>=4){Win.window.focus()
}};
YourBillBuddyPage.prototype.forgotWebsiteTourPopup=function(a){var c=650;
var d=520;
var e=(screen.width-c)/2;
var b=(screen.height-d)/2;
winProp="width="+c+",height="+d+",left="+e+",top="+b+",scrollbars=1,resizable=1";
Win=window.open(a,"Information",winProp);
if(parseInt(navigator.appVersion)>=4){Win.window.focus()
}};
YourBillBuddyPage.prototype.registerWarnPopup=function(a){var c=487;
var d=390;
var e=(screen.width-c)/2;
var b=(screen.height-d)/2;
winProp="width="+c+",height="+d+",left="+e+",top="+b+",scrollbars=0,resizable=0";
Win=window.open(a,"Information",winProp);
if(parseInt(navigator.appVersion)>=4){Win.window.focus()
}};
YourBillBuddyPage.prototype.changeImg=function(a,b){a.src=b
};
YourBillBuddyPage.prototype.availableTPPopup=function(a){var c=480;
var d=540;
var e=(screen.width-c)/2;
var b=(screen.height-d)/2;
winProp="width="+c+",height="+d+",left="+e+",top="+b+",scrollbars=yes,resizable";
Win=window.open(a,"Information",winProp);
if(parseInt(navigator.appVersion)>=4){Win.window.focus()
}};
YourBillBuddyPage.prototype.getFormValues=function(fobj,valFunc){var str="";
var valueArr=null;
var val="";
var cmd="";
for(var i=0;
i<fobj.elements.length;
i++){switch(fobj.elements[i].type){case"text":if(valFunc){cmd=valFunc+"(fobj.elements[i].value)";
val=eval(cmd)
}str+=fobj.elements[i].name+"="+escape(fobj.elements[i].value)+"&";
break;
case"select-one":str+=fobj.elements[i].name+"="+fobj.elements[i].options[fobj.elements[i].selectedIndex].value+"&";
break;
case"checkbox":str+=fobj.elements[i].name+"="+escape(fobj.elements[i].checked)+"&";
break;
default:alert(fobj.elements[i].type)
}}str=str.substr(0,(str.length-1));
return str
};
function getItemByID(b){var a=false;
if(document.getElementById){a=document.getElementById(b)
}else{if(document.all){a=document.all[b]
}else{if(document.layers){a=document.layers[b]
}}}return a
}YourBillBuddyPage.prototype.toggleTable=function(b){var a=getItemByID(b);
if(!a){return false
}if(!a){return false
}if(a.style.display==""){a.style.display="none"
}else{if(a.style.display=="none"){a.style.display=""
}}return true
};
YourBillBuddyPage.prototype.toggleImage=function(a){if(_sectionStatus[a]==true){document.images[_sectionImage[a]].src="images/icon_RightArrow.gif";
_sectionStatus[a]=false
}else{if(_sectionStatus[a]==false){document.images[_sectionImage[a]].src="images/icon_DownArrow.gif";
_sectionStatus[a]=true
}else{if(_sectionStatus[a]=="disabled"){}}}return true
};
YourBillBuddyPage.prototype.toggleImageAndTable=function(a,b){this.toggleImage(a);
this.toggleTable(b)
};
YourBillBuddyPage.prototype.trackEvent=function(a){if(typeof urchinTracker=="function"){urchinTracker(a)
}};
YourBillBuddyPage._startTimerstatic=function(){if(milisec<=0){milisec=29;
seconds-=1
}if(seconds<=-1){milisec=0;
seconds+=1;
if(this.currentTimer){clearTimeout(this.currentTimer);
this.currentTimer=null
}}else{milisec-=1;
this.currentTimer=setTimeout("YourBillBuddyPage._startTimerstatic()",100)
}};
YourBillBuddyPage._resetTimerstatic=function(){YourBillBuddyPage._init(10)
};
YourBillBuddyPage._callTimerstatic=function(){YourBillBuddyPage._init(10);
YourBillBuddyPage._startTimerstatic()
};
var timeoutId,href_this;
var delayTime=750;
function startBookmark(a){href_this=a;
timeoutId=setTimeout("checkBookmark()",delayTime)
}function stopBookmark(){clearTimeout(timeoutId)
}function checkBookmark(){return addthis_open(href_this,"","[URL]","[TITLE]")
}WhyThisPlanPageHelper=function(){};
WhyThisPlanPageHelper.prototype=new YourBillBuddyPage();
WhyThisPlanPageHelper.createInstance=function(c,b){if(c!=null){var a=new WhyThisPlanPageHelper();
WhyThisPlanPageHelper._initialize(a,c,b);
return a
}return null
};
WhyThisPlanPageHelper.prototype.viewLeadDetails=function(){var a=this.showModalDialog("welcome.do","Edit Lead Details",200,350)
};
WhyThisPlanPageHelper._initialize=function(a,c,b){YourBillBuddyPage._initialize(a,c,b)
};
WhyThisPlanPageHelper.prototype.MM_swapImgRestore=function(){var d,b,c=document.MM_sr;
for(d=0;
c&&d<c.length&&(b=c[d])&&b.oSrc;
d++){b.src=b.oSrc
}};
WhyThisPlanPageHelper.prototype.MM_preloadImages=function(){var f=document;
if(f.images){if(!f.MM_p){f.MM_p=new Array()
}var e,c=f.MM_p.length,b=this.MM_preloadImages.arguments;
for(e=0;
e<b.length;
e++){if(b[e].indexOf("#")!=0){f.MM_p[c]=new Image;
f.MM_p[c++].src=b[e]
}}}};
WhyThisPlanPageHelper.prototype.MM_findObj=function(f,e){var c,b,a;
if(!e){e=document
}if((c=f.indexOf("?"))>0&&parent.frames.length){e=parent.frames[f.substring(c+1)].document;
f=f.substring(0,c)
}if(!(a=e[f])&&e.all){a=e.all[f]
}for(b=0;
!a&&b<e.forms.length;
b++){a=e.forms[b][f]
}for(b=0;
!a&&e.layers&&b<e.layers.length;
b++){a=this.MM_findObj(f,e.layers[b].document)
}if(!a&&e.getElementById){a=e.getElementById(f)
}return a
};
WhyThisPlanPageHelper.prototype.MM_swapImage=function(){var e,d=0,b,c=this.MM_swapImage.arguments;
document.MM_sr=new Array;
for(e=0;
e<(c.length-2);
e+=3){if((b=this.MM_findObj(c[e]))!=null){document.MM_sr[d++]=b;
if(!b.oSrc){b.oSrc=b.src
}b.src=c[e+2]
}}};
WhyThisPlanPageHelper.prototype.Redirect=function(a){top.window.location.replace(a);
this.setWindowReady(false)
};
WhyThisPlanPageHelper.prototype.changeGraph=function(b,a){var e=document.getElementById("months");
var d=document.getElementById("graph");
var c=b+"?typ=wtp&cat="+a+"&selID="+e.selectedIndex;
d.src=c
};
WhyThisPlanPageHelper.prototype.setupGraph=function(c,b){var e=document.getElementById("graph");
var d=c+"?typ=wtp&cat="+b+"&selID=0";
e.src=d;
var a=document.getElementById("months");
a.selectedIndex=0
};
function formSubmit(a){document.forms.f1.submit(a)
};