function MakeArray(n) {
	this.length = n
	return this
}
monthNames = new MakeArray(12)
monthNames[1] = "January"
monthNames[2] = "February"
monthNames[3] = "March"
monthNames[4] = "April"
monthNames[5] = "May"
monthNames[6] = "June"
monthNames[7] = "July"
monthNames[8] = "August"
monthNames[9] = "September"
monthNames[10] = "October"
monthNames[11] = "November"
monthNames[12] = "December"

function customDateString() {
	currentDate = new Date()
	var theMonth = monthNames[currentDate.getMonth() + 1]
	msie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	if (msie4) {
	    var theYear = currentDate.getYear()
	}
	else {
	     var theYear = currentDate.getYear() +1900
	}
	return theMonth + " " + currentDate.getDate() + ", " + theYear
}

function ValidateForm(contact)
{

	 if(""==document.forms.contact.name.value)
	 {
		 alert("Please enter Name");
		 document.forms.contact.name.focus();
		 return false;
	 }

	 if(""==document.forms.contact.address.value)
	 {
		 alert("Please enter Address");
		 document.forms.contact.address.focus();
		 return false;
	 }

	 if(""==document.forms.contact.city.value)
	 {
		 alert("Please enter City");
		 document.forms.contact.city.focus();
		 return false;
	 }

	 if(""==document.forms.contact.state.value)
	 {
		 alert("Please enter State/ Province");
		 document.forms.contact.state.focus();
		 return false;
	 }

         if(""==document.forms.contact.zip.value)
	 {
		 alert("Please enter Zip/ Postal Code");
		 document.forms.contact.zip.focus();
		 return false;
	 }

	 if(""==document.forms.contact.country.value)
	 {
		 alert("Please enter Country");
		 document.forms.contact.country.focus();
		 return false;
	 }

         if(""==document.forms.contact.phone.value)
	 {
		 alert("Please enter Phone");
		 document.forms.contact.phone.focus();
		 return false;
	 }

	 for (i=0;i<document.forms.contact.phone.value.length;i++)
	 {
		 if (document.forms.contact.phone.value.charAt(i)<"0")
		 {
		 alert ("Enter Numbers only in Phone");
		 document.forms.contact.phone.focus();
		 return false;
		 }
		 if (document.forms.contact.phone.value.charAt(i)>"9")
		 {
		 alert ("Enter Numbers only in Phone");
		 document.forms.contact.phone.focus();
		 return false;
		 }
	 }

         if(""==document.forms.contact.email.value)
	 {
		 alert("Please enter Email");
		 document.forms.contact.email.focus();
		 return false;
	 }

	 if(!EmailVerify(document.forms.contact.email.value))
	 {
		 alert("Invalid email detected.");
		 document.forms.contact.email.focus();
		 return false;
	 }

	 function EmailVerify(e)
	 {
		 ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
		 for(i=0; i < e.length ;i++){
		 if(ok.indexOf(e.charAt(i))<0){
		 return (false);
		 }
		 }

		 if (document.images) {
		 re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		 re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		 if (!e.match(re) && e.match(re_two)) {
		 return (-1);
		 }
		 }
	 }

 }

<!--
 function nameDefined(ckie,nme)
{
   var splitValues
   var i
   for (i=0;i<ckie.length;++i)
   {
      splitValues=ckie[i].split("=")
      if (splitValues[0]==nme) return true
   }
   return false
}

function delBlanks(strng)
{
   var result=""
   var i
   var chrn
   for (i=0;i<strng.length;++i) {
      chrn=strng.charAt(i)
      if (chrn!=" ") result += chrn
   }
   return result
}
function getCookieValue(ckie,nme)
{
   var splitValues
   var i
   for(i=0;i<ckie.length;++i) {
      splitValues=ckie[i].split("=")
      if(splitValues[0]==nme) return splitValues[1]
   }
   return ""
}
function insertCounter() {
 readCookie()
 displayCounter()
}
 function displayCounter() {
 document.write('<H4 ALIGN="CENTER">')
 document.write("")
 if(counter==1) document.write("Browse our extensive line of drill bits.")
 else if (counter==2) document.write("Welcome back!")
 else document.write("You've visited this page "+counter+" times.")
 document.writeln('</H4>')
 }
function readCookie() {
 var cookie=document.cookie
 counter=0
 var chkdCookie=delBlanks(cookie)  //are on the client computer
 var nvpair=chkdCookie.split(";")
 if(nameDefined(nvpair,"pageCount"))
 counter=parseInt(getCookieValue(nvpair,"pageCount"))
 ++counter
 var futdate = new Date()
 var expdate = futdate.getTime()
 expdate += 3600000 * 24 *30  //expires in 1 hour
 futdate.setTime(expdate)

 var newCookie="pageCount="+counter
 newCookie += "; expires=" + futdate.toGMTString()
 window.document.cookie=newCookie
}
// -->


