function ChangeImg(img)
{
	document.getElementById('imgService').src = 'images/'+img;
}

function ChangeText(id)
{
	document.getElementById('greyContent').style.display = "";
	var text = new Array;
	text[0] = "<h2>Janitorial Services</h2><p>BSM's commercial office cleaning division is proficient at keeping your building clean. </p>";
	text[1] = "<h2>Construction Clean-up </h2><p>BSM has been providing Construction clean-up services since 1979.  With experience like that, you can rest assured that We know what we are doing! </p>";
	text[2] = "<h2>Hauling</h2><p>Hauling services are available to haul everything from construction debris to furniture or any other unwanted items taking up your valuable space.</p>";
	text[3] = "<h2>Commercial Grounds Maintenance</h2><p>Smart commercial property owners know that clients and tenants alike will form an opinion about a business the minute they step foot on the property and before they even step through the front door.</p>";
	text[4] = "<h2>Truck Mounted Parking Lot Sweeping</h2><p>BSM provides complete parking lot maintenance services for large parking structures,&nbsp; surface lots&nbsp;or any other paved surface.</p>";
	text[5] = "<h2>Facility Repair & Maintenance</h2><p>We are equipped to perform many light maintenance requirements efficiently, and in a neat and orderly manner. Our technicians are trained and skilled in most all aspects of facility maintenance and repair.</p>";
	text[6] = "<h2>Tenant Improvements</h2><p>&nbsp;</p>";
	text[7] = "<h2>General Labor Placement</h2><p>BSM provides labor for all types of needs.  Whether you need labor assistance for a day or a month or more, we have the staff to fill the need in a hurry.  No matter what the task may be, we will provide the right person to complete the job to your satisfaction.</p>";
	text[8] = "<h2>Shuttle Bus Service</h2><p>BSM's Tenant shuttle services are available to and from your facility and the nearest major public transportation Depot, such as BART.</p>";
	document.getElementById('greyContent').innerHTML = text[id];
}

function checkForm(form)
{
	var msg = "";
	var sName = form.name.value;
	var sMail = form.email.value;
	var sRefer = form.refer.value;
	var sMessage = form.message.value;
    var rePat = /[a-zA-Z0-9_\.\-\+]+@[a-zA-Z0-9_\.\-\+]+\.[a-zA-Z]+$/;
    var bln = rePat.test(sMail);

	if(sName=="") msg +=  "Name: This field is required.\n";
	if(sMail=="")
	{ 
		msg +=  "E-Mail: This field is required.\n";
	} else {
		if(!bln) msg +=  "E-Mail: A valid email address is required.\n";  
	}
	if(sRefer=="") msg +=  "Re: This field is required.\n";
	if(sMessage=="") msg +=  "Message: This field is required.\n";

	if(msg=="") { 
		return true;
	} else {
		alert(msg);
		return false;
	}
}
