﻿
//Form Check for Quote 

function validateQuote(x)  {
	
	var valid = true;
	if (!(x.realname.value > ""))  {
		alert ("We need your Name in order to process your request for a quote.");
		valid = false;
		x.realname.focus();
		}
	if (!(x.company.value > "") && valid == true)  {
		alert ("We need the name of your Company in order to process your request for a quote.");
		valid = false;
		x.company.focus();
		}
	if (!(x.add1.value > "") && valid == true)  {
		alert ("We need the Street Address in order to process your request for a quote.");
		valid = false;
		x.add1.focus();
		}
	if (!(x.city.value > "") && valid == true)  {
		alert ("We need to know the City in order to process your request for a quote.");
		valid = false;
		x.city.focus();
		}
	if (!(x.zip.value > "") && valid == true)  {
		alert ("We need to know the Zip Code in order to process your request for a quote.");
		valid = false;
		x.zip.focus();
		}
	if (!(x.phone.value > "") && valid == true)  {
		alert ("We need a contact Phone Number in order to process your request for a quote.");
		valid = false;
		x.phone.focus();
		}
	

//	if(valid == true)  {	
//		var txt="";
//		for (i=0;i<x.services.length;i++)  {
//			if(x.services[i].checked)  {
//				txt += x.services[i].value + ", ";
//				}
//			}
//		x.services[i-1].value = txt;
//		}
	
	return valid;
		
}  //Function validateQuote


function CEImail(Uname,LinkMsg,Lclass)  {
	var Uname, LinkMsg;
	var Udom = "grjanitorial";
	var Utld = ".com";
	var esub = "From the GRJANITORIAL Website";
	if(!Uname)  {Uname = "info";  }
	if(!LinkMsg)  {LinkMsg = "info at grjanitorial . com";  }
	document.write("<a class= "+ "'" + Lclass + "'" + " href= " + '"' + "mailto:" + Uname + "&#64;" + Udom + Utld + "?subject=" + esub +'"' + ">" + LinkMsg + "<\/a>");

} //function CEImail

//end
