// Do not edit this compressed file. Download, rename & edit the master version of it.
function getFinancialFormat(moneyIn,showZeroCents,noDollarSign){var moneyOut="";moneyIn=moneyIn.toFixed(2);var moneyInStr=moneyIn.toString();var Money=moneyInStr.split(".");var dollars=Money[0],cents=Money[1];var Dollars=new Array();var counter=0;for(var i=dollars.length-1;i>=0;i--){counter++;Dollars.push(dollars.charAt(i));if(counter%3==0&&i)Dollars.push(",");}
if(!noDollarSign)Dollars.push("$");Dollars.reverse();if(showZeroCents)cents="."+cents;else cents=(cents=="00")?"":"."+cents;moneyOut=Dollars.join("")+cents;return moneyOut;}
function showBindingPriceQuoteMaterials(){var RequiredMaterials=gId("RequiredMaterials");RequiredMaterials.className=(RequiredMaterials.className=="off")?"on":"off";}
function writeTxt(theResult){var EstimateConsole=gId("EstimateConsole");EstimateConsole.innerHTML=theResult;}
function getCost(PullDown){var total=0;var Form=document.EstimateForm;var Size=Form.Size;var NumForms=Form.NumForms;var WebHosting=Form.WebHosting;var LogoDesign=Form.LogoDesign;var NumPhotos=Form.NumPhotos;var SlideShow=Form.SlideShow;var Ecommerce=Form.Ecommerce;var EZ_Edit=Form.EZ_Edit;var BookingCalendar=Form.BookingCalendar;var ThumbnailViewer=Form.ThumbnailViewer;var Missing=null;if(Size.selectedIndex)"davidEst".recordToCookie("Size",Size.selectedIndex);else if(!Missing)Missing=Size;if(NumForms.selectedIndex)"davidEst".recordToCookie("NumForms",NumForms.selectedIndex);else if(!Missing)Missing=NumForms;if(WebHosting.selectedIndex)"davidEst".recordToCookie("WebHosting",WebHosting.selectedIndex);else if(!Missing)Missing=WebHosting;if(LogoDesign.selectedIndex)"davidEst".recordToCookie("LogoDesign",LogoDesign.selectedIndex);else if(!Missing)Missing=LogoDesign;if(NumPhotos.selectedIndex)"davidEst".recordToCookie("NumPhotos",NumPhotos.selectedIndex);else if(!Missing)Missing=NumPhotos;if(SlideShow.selectedIndex)"davidEst".recordToCookie("SlideShow",SlideShow.selectedIndex);else if(!Missing)Missing=SlideShow;if(Ecommerce.selectedIndex)"davidEst".recordToCookie("Ecommerce",Ecommerce.selectedIndex);else if(!Missing)Missing=Ecommerce;if(EZ_Edit.selectedIndex)"davidEst".recordToCookie("EZ_Edit",EZ_Edit.selectedIndex);else if(!Missing)Missing=EZ_Edit;if(BookingCalendar.selectedIndex)"davidEst".recordToCookie("BookingCalendar",BookingCalendar.selectedIndex);else if(!Missing)Missing=BookingCalendar;if(ThumbnailViewer.selectedIndex)"davidEst".recordToCookie("ThumbnailViewer",ThumbnailViewer.selectedIndex);else if(!Missing)Missing=ThumbnailViewer;if(Missing){Missing.focus();writeTxt(Msg.EstimateInstructions);return;}
var thisHost=(live)?theHost+"/webdesign":theHost+"/david";"davidEst".recordToCookie("EstUrl","http://"+thisHost+"/estimate.aspx?A_"+Size.selectedIndex+"|B_"+NumForms.selectedIndex+"|C_"+WebHosting.selectedIndex+"|D_"+LogoDesign.selectedIndex+"|E_"+NumPhotos.selectedIndex+"|F_"+SlideShow.selectedIndex+"|G_"+Ecommerce.selectedIndex+"|H_"+EZ_Edit.selectedIndex+"|I_"+BookingCalendar.selectedIndex+"|J_"+ThumbnailViewer.selectedIndex);total=parseInt(Size[Size.selectedIndex].value)+parseInt(NumForms[NumForms.selectedIndex].value)+parseInt(WebHosting[WebHosting.selectedIndex].value)+parseInt(LogoDesign[LogoDesign.selectedIndex].value)+parseInt(NumPhotos[NumPhotos.selectedIndex].value)+parseInt(SlideShow[SlideShow.selectedIndex].value)+parseInt(Ecommerce[Ecommerce.selectedIndex].value)+parseInt(EZ_Edit[EZ_Edit.selectedIndex].value)+parseInt(BookingCalendar[BookingCalendar.selectedIndex].value)+parseInt(ThumbnailViewer[ThumbnailViewer.selectedIndex].value);if(total<DB.Rates.Minimum)total=DB.Rates.Minimum;var deposit=Math.round(total/2);total=Math.round(total);writeTxt("<span class='smallCaps'>Estimate</span> "+getFinancialFormat(total)+" <span class='bullet'>&#149;</span> <span class='smallCaps'>Deposit</span> "+getFinancialFormat(deposit)+" <span class='bullet'>&#149;</span> <a href='javascript:void(0);' onClick='getMailQuoteGUI( this, event );' onMouseover='this.title = Msg.EmailEst;'>Mail Quote</a>");}
function setupEstimator(){var Form=document.EstimateForm;var davidEst=GetCookie("davidEst");var A=qStr.getVal("A");var B=qStr.getVal("B");var C=qStr.getVal("C");var D=qStr.getVal("D");var E=qStr.getVal("E");var F=qStr.getVal("F");var G=qStr.getVal("G");var H=qStr.getVal("H");var I=qStr.getVal("I");var J=qStr.getVal("J");var qStrComplete=(A&&B&&C&&D&&E&&F&&G&&H&&I&&J)?true:false;var qStrIsNum=isNaN(A+B+C+D+E+F+G+H+I+J)?false:true;if(qStrComplete&&qStrIsNum){Form.Size.selectedIndex=parseInt(A);Form.NumForms.selectedIndex=parseInt(B);Form.WebHosting.selectedIndex=parseInt(C);Form.LogoDesign.selectedIndex=parseInt(D);Form.NumPhotos.selectedIndex=parseInt(E);Form.SlideShow.selectedIndex=parseInt(F);Form.Ecommerce.selectedIndex=parseInt(G);Form.EZ_Edit.selectedIndex=parseInt(H);Form.BookingCalendar.selectedIndex=parseInt(I);Form.ThumbnailViewer.selectedIndex=parseInt(J);getCost(null);}
else if(davidEst){var Size=davidEst.getVal("Size");if(Size)Form.Size.selectedIndex=parseInt(Size);var NumForms=davidEst.getVal("NumForms");if(NumForms)Form.NumForms.selectedIndex=parseInt(NumForms);var WebHosting=davidEst.getVal("WebHosting");if(WebHosting)Form.WebHosting.selectedIndex=parseInt(WebHosting);var LogoDesign=davidEst.getVal("LogoDesign");if(LogoDesign)Form.LogoDesign.selectedIndex=parseInt(LogoDesign);var NumPhotos=davidEst.getVal("NumPhotos");if(NumPhotos)Form.NumPhotos.selectedIndex=parseInt(NumPhotos);var SlideShow=davidEst.getVal("SlideShow");if(SlideShow)Form.SlideShow.selectedIndex=parseInt(SlideShow);var Ecommerce=davidEst.getVal("Ecommerce");if(Ecommerce)Form.Ecommerce.selectedIndex=parseInt(Ecommerce);var EZ_Edit=davidEst.getVal("EZ_Edit");if(EZ_Edit)Form.EZ_Edit.selectedIndex=parseInt(EZ_Edit);var BookingCalendar=davidEst.getVal("BookingCalendar");if(BookingCalendar)Form.BookingCalendar.selectedIndex=parseInt(BookingCalendar);var ThumbnailViewer=davidEst.getVal("ThumbnailViewer");if(ThumbnailViewer)Form.ThumbnailViewer.selectedIndex=parseInt(ThumbnailViewer);getCost(null);}}
function mailQuote(Form){var MailStatus=gId("MailStatus");var Sender_Email=Form.Sender_Email;Sender_Email.value=Sender_Email.value.trim();var Recipient_Email=Form.Recipient_Email;Recipient_Email.value=Recipient_Email.value.trim();if(!Sender_Email.value){Sender_Email.focus();MailStatus.innerHTML="<span style='color:red;'>Enter your e-mail address</span>";return false;}
else if( !emailRE.test(Sender_Email.value)){Sender_Email.focus();MailStatus.innerHTML="<span style='color:red;'>Sender&rsquo;s e-mail is invalid - bad format</span>";return false;}
else if(!Recipient_Email.value){Recipient_Email.focus();MailStatus.innerHTML="<span style='color:red;'>Enter recipient&rsquo;s e-mail address</span>";return false;}
else if( !emailRE.test(Recipient_Email.value)){Recipient_Email.focus();MailStatus.innerHTML="<span style='color:red;'>Recipient&rsquo;s e-mail is invalid - bad format</span>";return false;}
else if(Form.Comments.value==Form.Comments.defaultValue)Form.Comments.value="";SetCookie("quoteSender",Sender_Email.value,expDate12Mon);Form.Subject.value="Web Site Quote from "+Sender_Email.value;var SubmitRequest=getAjaxRequest();MailStatus.innerHTML="<div align='center'>"+PB.getProgressBar(null,null,null,null,null,"10pt")+"</div>";PB.initProgressBar();var SubmitButton=gId("SubmitButton");SubmitButton.style.cursor="wait";SubmitButton.disabled=true;SubmitRequest.onreadystatechange=function(){try{if(SubmitRequest.readyState==4){if(SubmitRequest.status==200){var responseText=SubmitRequest.responseText;if( /<span id='ServerError'>/.test(responseText)){var aspError=responseText.replace(/\r/g, "" ).replace(/\n/g, "" );
aspError=aspError.replace(/^.*<span id='ServerError'>/, "" );
aspError=aspError.replace(/<\/span>.*$/, "" );
MailStatus.innerHTML="<span style='color:red;'><b>Error</b>: Your e-mail was undeliverable</span>";var Error=gId("ErrorMailingCart");Error.className="ErrorMailingCart";Error.innerHTML=aspError;}
else{MailStatus.innerHTML="Your e-mail was successfully sent <span class='bullet' style='color:rgb( 75,75,75 );'>&#149;</span> <a href='javascript:DW.removeWin();' class='dwLink' title='Close this pop-up window'>Close</a>";Form.Recipient_Email.value="";Form.Comments.value=Form.Comments.defaultValue;}}
else if(SubmitRequest.status)alert("Form post error, please try again...\n\nRequest.status expected: 200\nRequest.status returned: "+SubmitRequest.status);SubmitButton.disabled=false;SubmitButton.style.cursor="default";SubmitRequest=getAjaxRequest();}}
catch(Err){var eMsg="AJAX exception at submitForm\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";try{alert(eMsg);} catch(Err){}}}
var EstimateForm=document.EstimateForm;var thisHost=(live)?theHost+"/webdesign":theHost+"/david";var MsgCanned=new Array();MsgCanned.push(Form.Sender_Email.value);MsgCanned.push(" has e-mailed you a price quote from the web site of David Regier, Web Developer. <a href='");MsgCanned.push("http://");MsgCanned.push(thisHost);MsgCanned.push("/estimate.aspx");MsgCanned.push("?A=");MsgCanned.push(EstimateForm.Size.selectedIndex);MsgCanned.push("&B=");MsgCanned.push(EstimateForm.NumForms.selectedIndex);MsgCanned.push("&C=");MsgCanned.push(EstimateForm.WebHosting.selectedIndex);MsgCanned.push("&D=");MsgCanned.push(EstimateForm.LogoDesign.selectedIndex);MsgCanned.push("&E=");MsgCanned.push(EstimateForm.NumPhotos.selectedIndex);MsgCanned.push("&F=");MsgCanned.push(EstimateForm.SlideShow.selectedIndex);MsgCanned.push("&G=");MsgCanned.push(EstimateForm.Ecommerce.selectedIndex);MsgCanned.push("&H=");MsgCanned.push(EstimateForm.EZ_Edit.selectedIndex);MsgCanned.push("&I=");MsgCanned.push(EstimateForm.BookingCalendar.selectedIndex);MsgCanned.push("&J=");MsgCanned.push(EstimateForm.ThumbnailViewer.selectedIndex);MsgCanned.push("'>Click here</a> to view the price estimate.");var cannedMsg=MsgCanned.join("");Form.MailLink.value=cannedMsg;var requestBody=getRequestBody(Form);Form.action="form-mailer.aspx"+((qStr)?"?"+qStr:"");SubmitRequest.open("post",Form.action,true);SubmitRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");SubmitRequest.setRequestHeader("ASP_Job","Mail_Quote");SubmitRequest.send(requestBody);}
function getMailQuoteGUI(Link,evt){if(getAjaxRequest()){var Htm=new Array();Htm.push("<form name='MailCart' id='MailCart' onSubmit='mailQuote( this ); return false;' style='margin:0px 0px 0px 0px;'>");Htm.push("<input type='hidden' name='Subject' value='Web Site Quote from David Regier, Web Developer' />");Htm.push("<input type='hidden' name='MailLink' />");Htm.push("<table align='center'>");Htm.push("<tr align='left'>");Htm.push("<td style='padding:0px 0px 0px 0px;'>From</td>");Htm.push("<td style='padding:0px 0px 0px 15px;'>");Htm.push("<input name='Sender_Email' type='text' style='width:250px;' title='Accurately enter your e-mail'>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr align='left'>");Htm.push("<td style='padding:15px 0px 0px 0px;'>To</td>");Htm.push("<td style='padding:15px 0px 0px 15px;'>");Htm.push("<input name='Recipient_Email' type='text' style='width:250px;' title='Accurately enter recipient&rsquo;s e-mail'>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push();Htm.push("<td colspan='2' align='center' style='padding:15px 0px 0px 0px;'>");Htm.push("<textarea name='Comments' onFocus='if( value == defaultValue ) value = \"\";' onBlur='if( !value ) value = defaultValue;' title='Message is optional' class='textInputFullWid' style='width:300px; height:100px;'>Your Message</textarea>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td colspan='2' align='center' style='padding:10px 0px 0px 0px;'>");Htm.push("<div id='MailStatus' style='font-size:10pt;'>A copy shall automatically be sent to you</div>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td colspan='2' align='center' style='padding:10px 0px 0px 0px;'>");Htm.push("<input type='submit' name='SubmitButton' id='SubmitButton' value='Send' style='width:60px;'>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td colspan='2'>");Htm.push("<div id='ErrorMailingCart' class='off'></div>");Htm.push("</td>");Htm.push("</tr>");Htm.push("</table>");Htm.push("</form>");var htm=Htm.join("");var MailQuote=["Mail Your Quote",htm];DW.createWindow(MailQuote,[0,360,0],Link,evt,15,[2,0,-20],null,1);var quoteSender=GetCookie("quoteSender");var MailCart=document.MailCart;try{if(quoteSender){MailCart.Sender_Email.value=quoteSender;MailCart.Recipient_Email.focus();}
else
MailCart.Sender_Email.focus();}
catch(Err){}
if(0){document.MailCart.Sender_Email.value=testEmail;document.MailCart.Recipient_Email.value=testEmail;document.MailCart.Comments.value="The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.";}}
else{var htm="We're sorry, it appears that your web browser is not AJAX enabled. As a result you cannot use our &ldquo;Mail Estimate&rdquo; feature.";DW.createWindow(["Problem Detected",htm],[0,400,0],Link,evt,10,[2,0,-20],null,1);}}