function send_msg() {
	var errors = new Array();
	var error_msg = "The following errors have been detected:\n----------------------------------------\n";
	if ($('name').value == '' || $('name').value == ' ') { errors.push('Please fill in your name!'); }
	if ($('email').value == '' || $('email').value == ' ') { errors.push('Please fill in your email!'); }
	if ($('message').value == '' || $('message').value == ' ') { errors.push('Please send me a message!'); }
	
	if (errors.length > 0) {
		for (var i=0;i<errors.length;i++) {
			error_msg += (i+1) + ". " + errors[i] + "\n";
		}
		error_msg += "----------------------------------------\nPlease fix and re-submit.";
		alert(error_msg);
	} else {
		var ajax_script = 'http://www.dalyvisions.com/ajax/send_msg.php';
		var params = 'email=' + encodeURIComponent($('email').value) + '&name=' + encodeURIComponent($('name').value) + '&message=' + encodeURIComponent($('message').value) + '&doit=y';
		var opts = {method:'post',parameters:params,
			onSuccess: function(resp) {
				//alert(resp.responseText);
				$('contact_form').innerHTML = '<p class="msg">Thanks for your inquiry into dalyVisions!</p>';
			},
			onFailure: function() { alert('Something went wrong...'); }
	  	};
	  	new Ajax.Request(ajax_script,opts);
	}
}


var curr_picts = null;
function showPicts(picts) {
	if ($(picts).visible()) {
		new Effect.BlindUp(curr_picts);
	} else {
		new Effect.BlindDown(picts);
	}
	
	if (curr_picts != null && curr_picts != picts) {
		new Effect.BlindUp(curr_picts);
	}

	curr_picts = picts;
}
function hidePicts(picts) {
	new Effect.BlindUp(picts);
	curr_picts = null;
}