
function submitForm(form){
	var name = 'upload' + (new Date()).getTime();
	var div = document.createElement("div");
	div.innerHTML = '<iframe style="display:none" src="about:blank" id="' + name + '" name="' + name + '"></iframe>';
	document.body.appendChild(div);

	form.setAttribute("target", name);
	return true;
}

function validateForm(form, inputs){
	for(var i in inputs){
		var inputName = inputs[i];
		var input = form[inputName];
		if(input.value == null || input.value == ''){
			alert("Missing required field.");
			input.focus();
			return false;
		}
	}
	return true;
}

function demoRequestSubmitted(email){
	var body = document.getElementById("requestDemoFormBody");
	var header = document.getElementById("requestDemoFormHeader");
	body.innerHTML = "Thank you for requesting a demo with us.  Your request has been submitted to our team and we will respond at '" + email + "' as quickly as we can.  <br /><br />Sincerely, <br />The BoldCCM Team.";
	//header.innerHTML = "";
}

function priceQuoteSubmitted(email){
	var body = document.getElementById("priceQuoteBody");
	body.innerHTML = "<p>Thank you for requesting a price quote.  Your request has been submitted to our team and we will respond at '" + email + "' as quickly as we can.  <br /><br />Sincerely, <br />The BoldCCM Team.</p>";
}