﻿$("#IWS_WH_Elem_Header").append('<div id="imglogo"><img align="right" src="/images/logo.gif" border="0" complete="complete"/></div>');$(document).ready(function(){ogbit_ol.init()});var ogbit_ol={init:function(){jQuery("input[title*='Zip Code'],input[title*='Phone']").each(function(){ogbit_ol.ValNumber(this)});jQuery("input[title*='Tire Size']").each(function(){$(this).attr("title","look on the side of the tire i.e 175/95/15")});jQuery("textarea[title*='Comments']").each(function(){$(this).attr("title","quantity of tires, do you need installation?, How soon do you need the tires?")});$("input[type='submit']").click(function(b){var a="";$("input[title*='Year/Make/Model'],input[title*='First Name'],input[title*='Last Name'],input[title*='Zip Code'],input[title*='E-Mail']").each(function(){if($(this).val()=="")a+=$(this).attr("title")+"\n";if($(this).val()!=""&&$(this).attr("title")=="E-Mail")if(!ogbit_ol.ValEmail($(this).val()))a+=$(this).attr("title")+" format is not valid\n"});if(a!=""){a="Please enter the following information:\n"+a;b.preventDefault();alert(a);return false}return true})},ValNumber:function(a){$(a).keydown(function(b){var a=b.keyCode;if(!(a==44||a==188||a==190||a==110||a==46||a==8||a==9||a>=48&&a<=56||a>=96&&a<=105||a>=37&&a<=40))b.preventDefault()});$(a).focus(function(){this.select()})},ValEmail:function(b){var a=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;return a.test(b)}}
