// Do not edit this compressed file. Download, rename & edit the master version of it.
davidEst=GetCookie("davidEst");function clearField(Field){if(Field.value==Field.defaultValue)Field.value="";}
function checkField(Field){if(!Field.value)Field.value=Field.defaultValue;}
function morphForm(getURL){var SiteURL=gId("siteURL");if(getURL){SiteURL.className="on";document.AspForm.Web_Site_URL.focus();}
else
SiteURL.className="off";}
function initForm(){try{if(fileNameLC=="inquire.aspx"){var Form=document.AspForm;Form.Name.focus();if(Form.Job_Request2.checked)morphForm(true);Form.SubmitButton.disabled=false;try{if(top.qStr){if(top.qStr.getVal("to")=="david")top.document.title="TESTING: Mail shall be sent to "+testEmail;if(top.qStr.getVal("autofill")=="y")autoFillForm();}}
catch(Err){}}}
catch(Err){if(local){var eMsg="Exception caught at function initForm:\n\n";for(var i in Err)eMsg+=i+": "+Err[i]+"\n";alert(eMsg);}
else
setTimeout("initForm();",250);}}
function validateForm(){var Form=document.AspForm;Form.SubmitButton.disabled=true;var supressValidation=(qStr&&qStr.getVal("validate")=="n");var validate=!supressValidation;var Missing=null;var MissingInfo=new Array();var Name=Form.Name;Name.value=Name.value.trim();if(!Name.value){if(!Missing)Missing=Name;MissingInfo.push("Your Name");}
var Sender_Email=Form.Sender_Email;Sender_Email.value=Sender_Email.value.trim();if(!Sender_Email.value){if(!Missing)Missing=Sender_Email;MissingInfo.push("Your E-Mail Address");}
var Web_Site_URL=Form.Web_Site_URL;if(gId("siteURL").className=="on"&&Web_Site_URL.value==""){if(!Missing)Missing=Web_Site_URL;MissingInfo.push("Web Site URL");}
if(validate&&MissingInfo.length){var missingInfo=MissingInfo.join("</li><li>");var htm="We're sorry, you failed to provide the following information:<ol><li>"+missingInfo+"</li></ol>Please provide the missing information & try again...<div align='center' style='margin:6px 0px 0px 0px;'><input type='button' value='OK' id='DW_OK' class='DwOk' onClick='DW.removeWin();' title='Close message' /></div><input type='hidden' id='EvalOnClose' value='gId(\""+Missing.id+"\").focus();' />";DW.createWindow(["Missing Information",htm],[0,450,0],null,null,10,[4,0,0],null,1);gId("DW_OK").focus();Form.SubmitButton.disabled=false;return false;}
else{if(validate){var goodEmail=verifyEmail(Form,Form.Sender_Email);if(!goodEmail)return false;}
if(Form.Primary_Tel.value==Form.Primary_Tel.defaultValue)Form.Primary_Tel.value="";if(Form.Other_Tel.value==Form.Other_Tel.defaultValue)Form.Other_Tel.value="";if(Form.Comments.value==Form.Comments.defaultValue)Form.Comments.value="";var jobRequest="";var nCheckBox=1;while(gId("Job_Request"+nCheckBox)){var Checkbox=gId("Job_Request"+nCheckBox);if(Checkbox.checked)jobRequest+=Checkbox.value;nCheckBox++;}
Form.Job_Type.value=(jobRequest)?jobRequest.replace(/; $/, "" ) : "Not Selected";
if(gId("siteURL").className!="on"&&Web_Site_URL.value)Web_Site_URL.value="";var systemInfo="OS: "+navigator.platform+"\r\nSystem/Browser: "+navigator.platform+" "+navigator.appName+" "+navigator.appVersion+"\r\nUser Agent: "+navigator.userAgent+"\r\nJava Enabled: "+navigator.javaEnabled()+"\r\nMonitor: "+screen.width+" x "+screen.height+" x "+screen.colorDepth+"\r\nCookies Enabled: "+navigator.cookieEnabled+"\r\n";Form.Diagnostics.value=systemInfo;var estURL=(davidEst&&davidEst.getVal("EstUrl"))?davidEst.getVal("EstUrl"):"None";estURL=estURL.replace(/_/g, "=" );
estURL=estURL.replace(/\|/g, "&" );
Form.Estimate.value=estURL;Form.Referrer.value=GetCookie("theReferrer");var gmtOffSetHi=10;var Now=new Date();var gmtOffSetClient=Now.getTimezoneOffset()/60;var timeDiff=gmtOffSetHi-gmtOffSetClient;var plural=(Math.abs(timeDiff)==1)?"":"s"
var theSign=(timeDiff>0)?"+":"";var forTime=theSign+timeDiff+" hour"+plural;Form.Sent.value=Now.toLocaleString()+" (client's time)";Form.Time_Difference.value=forTime;if(validate){var htm="Please double check your e-mail address for accuracy:<ul><li>Click Submit if <nobr>&ldquo;"+Sender_Email.value+"&rdquo;</nobr> is correct and the form will be sent.</li><li>Click Cancel if you need to correct it.</li></ul>This is important because if you make a typo in your e-mail address we may be unable to contact you.<div align='center' style='margin:6px 0px 0px 0px;'><input type='button' value='Submit' id='DW_OK' class='DwOkCancel' onClick='submitForm();' title='E-mail is accurate \u2022 Submit form' /> &nbsp; <input type='button' value='Cancel' class='DwOkCancel' onClick='gId(\"Sender_Email\").focus(); DW.removeWin();' title='E-mail needs correction' /></div><input type='hidden' id='EvalOnClose' value='gId( \"SubmitButton\" ).disabled = false;' />";DW.createWindow(["Confirm E-Mail",htm],[0,400,0],null,null,10,[4,0,0],null,1);gId("DW_OK").focus();}
else
submitForm();return false;}}
function verifyEmail(Form,Email){Email.value=Email.value.replace(/\s/g, "" );
EmailArr=Email.value.split(",");for(i in EmailArr){if( !emailRE.test(EmailArr[i])){var htm="We're sorry but &ldquo;"+EmailArr[i]+"&rdquo; is an invalid e-mail address. Some examples of valid e-mail addresses are:<ul><li>Joe@Hotmail.com</li><li>sally_smith@aol.com</li><li>jim.clark@co.la.ca.us</li><li>Madonna@Gmail.com</li></ul>Valid e-mails contain 1 &ldquo;@&rdquo; character & end with .com .net .us .ca etc.<div align='center' style='margin:6px 0px 0px 0px;'><input type='button' value='OK' id='DW_OK' class='DwOk' onClick='DW.removeWin();' title='Close message' /></div><input type='hidden' id='EvalOnClose' value='gId(\""+Email.id+"\").focus();' />";DW.createWindow(["Invalid E-Mail Address",htm],[0,500,0],null,null,10,[4,0,0],null,1);gId("DW_OK").focus();Form.SubmitButton.disabled=false;return false;}}
return true;}
var RequestPost=null;var waitingForRequest=1;var requestPostStartTimeMS=-1;var submitButton="";function submitForm(){window.RequestPost=getAjaxRequest();if(RequestPost){DW.removeWin();var SubmitButtonContainer=gId("SubmitButtonContainer");submitButton=SubmitButtonContainer.innerHTML;SubmitButtonContainer.innerHTML=PB.getProgressBar(8,"rgb(145,109,66)","rgb(24,20,243)");PB.initProgressBar();var Form=document.AspForm;RequestPost.onreadystatechange=function(){try{if(RequestPost.readyState==4){if(RequestPost.status==200){waitingForRequest=0;var responseText=RequestPost.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>.*$/, "" );
aspError+="<div align='center' style='margin:6px 0px 0px 0px;'><input type='button' value='OK' class='DwOk' onClick='DW.removeWin();' title='Close message' /></div><input type='hidden' id='EvalOnClose' value='gId(\"Sender_Email\").focus();' />";DW.createWindow(["Internal Server Error",aspError],[0,600,0],null,null,10,[4,0,0],null,1,1);}
else{var Htm=new Array();Htm.push("<table align='center'>");Htm.push("<tr>");Htm.push("<td>");Htm.push("<img src='images/ContactUs.jpg' onContextmenu='return ( Settings.preventImageTheft ) ? false : true;' style='width:133px; height:200px; float:left; border-width:0px;'>");Htm.push("</td>");Htm.push("<td style='padding:0px 0px 0px 12px;'>");Htm.push("<table align='center'>");Htm.push("<tr>");Htm.push("<td style='padding:0px 0px 0px 0px; font-size:12pt;'>");Htm.push("Thanks so much for your inquiry!");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td align='center' style='padding:15px 0px 4px 0px; font-size:12pt;'>");Htm.push("&#151; I&rsquo;ll get back to you right away");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td style='padding:0px 0px 0px 80px;'>");Htm.push("<div class='signature'>");Htm.push(DB.Contact.Name);Htm.push("<br/>");Htm.push(DB.Contact.Title);Htm.push("</div>");Htm.push("</td>");Htm.push("</tr>");Htm.push("<tr>");Htm.push("<td style='padding:15px 0px 0px 0px; font-size:11pt;'>");Htm.push("PS. You will be receiving an auto-generated copy of your inquiry within a minute or two. If it doesn&rsquo;t show up remember to check your spam folder.");Htm.push("</td>");Htm.push("</tr>");Htm.push("</table>");Htm.push("</td>");Htm.push("</tr>");Htm.push("</table>");var firstName=Form.Name.value.split(" ")[0];var MailSuccess=["Aloha "+firstName,Htm.join("")];DW.createWindow(MailSuccess,[0,460,0],null,null,10,[4,0,0],null,1,1);Form.reset();gId("siteURL").className="off";}
SubmitButtonContainer.innerHTML=submitButton;var SubmitButton=gId("SubmitButton");SubmitButton.disabled=false;}}}
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 requestBody=getRequestBody(Form);Form.action="form-mailer.aspx"+((qStr)?"?"+qStr:"");RequestPost.open("post",Form.action,true);RequestPost.setRequestHeader("Content-Type","application/x-www-form-urlencoded");RequestPost.setRequestHeader("ASP_Job","Inquire");waitingForRequest=1;RequestPost.send(requestBody);requestPostStartTimeMS=new Date().getTime();pollRequestPost();}
else{SubmitButton.disabled=false;showNoAjaxMsg();}}
function pollRequestPost(){var threshold=45;var nowMS=new Date().getTime();var pollAgain=true;var duration=parseInt(Math.round(nowMS-requestPostStartTimeMS)/1000);if(duration>0)self.status="Submitting Form \u2022 Duration "+duration+" seconds \u2022 Aborts at "+threshold+" seconds";if((nowMS-requestPostStartTimeMS>threshold*1000)&&waitingForRequest){if(RequestPost)RequestPost.abort();var SubmitButtonContainer=gId("SubmitButtonContainer");SubmitButtonContainer.innerHTML=submitButton;gId("SubmitButton").disabled=false;pollAgain=false;var msg="Submission has taken exceptionally long ("+threshold+" seconds). As a result it has been aborted. It probably failed because you lost your internet connection? If so, here's some tips to assist you in re-submitting this form:<ol><li>Keep your browser on the this page. Do not close it or navigate away.</li><li>Now, while your browser is on this page, you need to re-establish your internet connection.</li><li>After you re-establish a live internet connection press the Submit button again.</li></ol><div align='center' style='margin:10px 0px 0px 0px;'><input type='button' value='OK' class='DwOk' onClick='DW.removeWin();' title='Close message' /></div>";DW.createWindow(["Form Submission Failed",msg],[0,500,0],null,null,10,[4,0,0]);}
if(pollAgain&&waitingForRequest)pollRequestPostTimer=setTimeout("pollRequestPost();",500);else
clearTimeout(pollRequestPostTimer);}
function showNoAjaxMsg(){var htm="We're sorry, it appears that your web browser is not AJAX enabled. This means you will be unable to submit this form. With that in mind, please send e-mail to <a href='mailto:"+DB.Contact.Email+"?subject="+escape("Web Site Inquiry (no ajax)")+"'>"+DB.Contact.Email+"</a> instead of submitting the form.";DW.createWindow(["Problem Detected",htm],[0,400,0],null,null,10,[4,0,0],null,1);}
function autoFillForm(){var Form=document.AspForm;Form.Name.value="David Regier";Form.Sender_Email.value=testEmail;Form.Primary_Tel.value="264-6562";Form.Business_Name.value="Web Creations";Form.Business_Nature.value="Web & Software Developement";gId("siteURL").className="on";Form.Job_Request2.checked=true;Form.Web_Site_URL.value="http://www.DavidRegier.com";Form.Comments.value="The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. \n\nThe quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.";Form.SubmitButton.focus();}