//
// if send email successful, alert user
//
function sendConf() {
	var scId = document.getElementById("subConfId");
	if (scId) {
		alert("Request submitted!");
	}
}

//
// validate flds from indexes.asp information request form
//
function validateFlds() {
	var nameId = document.getElementById("nameId");
	var companyId = document.getElementById("companyId");
	var emailId = document.getElementById("emailId");
	var em = "";
	//alert("name=" + nameId.value + "\ncompany=" + companyId.value + "\nemail=" + emailId.value);
	if (nameId.value == null || nameId.value == "") {
		em += "Your Name is missing\n";
	}
	if (companyId.value == null || companyId.value == "") {
		em += "Company Name is missing\n";
	}
	if (emailId.value == null || emailId.value == "") {
		em += "Email is missing\n";
	}
	// phone is optional
	if (em != "") {
		alert(em);
		return false;
	}
	return true;
}

//
// validate flds from contact.asp form
//
function validateContactFlds() {
	var nameId = document.getElementById("nameId");
	var companyId = document.getElementById("companyId");
	var emailId = document.getElementById("emailId");
	var commentsId = document.getElementById("commentsId")
	var em = "";
	//alert("name=" + nameId.value + "\ncompany=" + companyId.value + "\nemail=" + emailId.value);
	if (nameId.value == null || nameId.value == "") {
		em += "Your Name is missing\n";
	}
	if (companyId.value == null || companyId.value == "") {
		em += "Company Name is missing\n";
	}
	if (emailId.value == null || emailId.value == "") {
		em += "Email is missing\n";
	}
	if (commentsId.value == null || commentsId.value == "") {
		em += "Comments are missing\n";
	}
	if (em != "") {
		alert(em);
		return false;
	}
	return true;
}

//
// start scrolling
//
function startScroll(obj) {
	// not all browsers that support Marquee have start/stop methods
	if (obj.start) {
		obj.start();
	}
	else { 
		obj.scrollAmount = 2;
	}
}

//
// stop scrolling
//
function stopScroll(obj) {
	// not all browsers that support Marquee have start/stop methods
	if (obj.stop) {
		obj.stop();
	}
	else {
		obj.scrollAmount = 0;
	}
}
