// JavaScript Document

function setSize(x) {
	if (x != null || x != "") {
		document.getElementById("content").style.fontSize = x;
		document.cookie('fontsize') = x;
	}
}

function getImage() {
	var randomnumber=Math.floor(Math.random()*12);
	
	document.write("<img src=\"images/sideimage" + randomnumber + ".jpg\" width=\"169\" height=\"155\" border=\"0\" />");
}

if (navigator.appVersion.search("MSIE 7") != -1) {
 document.write("<style>");
 document.write("@import url(\"ie.css\");");
 document.write("</style>");
}

function valForm() {
	if (document.getElementById("name").value == null || document.getElementById("name").value == "") {
		alert("Please enter your name.");
		document.getElementById("name").focus();
		return false;
	}
	if (document.getElementById("email").value == null || document.getElementById("email").value == "") {
		alert("Please enter your email address.");
		document.getElementById("email").focus();
		return false;
	}
	if (document.getElementById("whofor").value == "--") {
		alert("Please enter who you're inquiring for.");
		document.getElementById("whofor").focus();
		return false;
	}
	if (document.getElementById("number").value == null || document.getElementById("number").value == "") {
		alert("Please enter the Verification Code.");
		document.getElementById("number").focus();
		return false;
	}
	
}

// Driving Direction Functions

function expandDirects(x) {
	if (document.getElementById("direct" + x).style.display != 'block') {
		document.getElementById("direct" + x).style.display = 'block';
		document.getElementById("expand" + x).src = 'images/minus.png';
		
	}
	else {
		document.getElementById("direct" + x).style.display = 'none';
		document.getElementById("expand" + x).src = 'images/plus.png';
	}
	
	return;
}

function makeBig() {
	if (document.getElementById("bigmap").style.display != 'block') {
		document.getElementById("bigmap").style.display = 'block';
	}
	else {
		document.getElementById('bigmap').style.display = 'none';
	}
	
	return;
}