function set_search_box()
{
	if (document.getElementById('search_str').value == "Enter search keywords here")
		document.getElementById('search_str').value = "";
	else
		document.getElementById('search_str').value = "Enter search keywords here";
}
function reset_search()
{
	document.getElementById('search_str').value = "Enter search keywords here";
}
function toggle_site_map(obj_id,id)
{
	if (document.getElementById('site_map_' + id).style.display == "none")
	{
		document.getElementById('site_map_' + id).style.display = "block";
		//document.getElementById(obj_id).classname = "site_map_product_div_opened";
		document.getElementById(obj_id).style.background = "#003322";
		document.getElementById(obj_id).style.color = "#ffffff";
	}
	else 
	{
		document.getElementById('site_map_' + id).style.display = "none";
		//document.getElementById(obj_id).classname = "site_map_product_div_closed";
		document.getElementById(obj_id).style.background = "#ffffff";
		document.getElementById(obj_id).style.color = "#000000";
	}
}
function validate_search()
{
	if (document.getElementById('search_str').value == "")
	{
		alert("Need something to search for!");
		return false;
	}
	var sUrl = "search_results.php?search_str=" + document.getElementById('search_str').value;
	document.location = sUrl;
	return false;
}
function validate_contact()
{
	if (document.getElementById('contact_name').value == "")
	{
		alert("Please enter your contact name!");
		document.getElementById('contact_name').focus();
		return false;
	}
	if (document.getElementById('contact_email').value == "")
	{
		alert("Please enter an email!");
		document.getElementById('contact_email').focus();
		return false;
	}
	if (document.getElementById('contact_email2').value == "")
	{
		alert("Please re-enter your email!");
		document.getElementById('contact_email2').focus();
		return false;
	}
	if (document.getElementById('contact_email2').value != document.getElementById('contact_email').value)
	{
		alert("The email addresses you entered must match - please correct!");
		document.getElementById('contact_email2').focus();
		return false;
	}
	
	var postData = "";
	postData += "type=contact_us";
	postData += "&contact_name=" + document.getElementById('contact_name').value;
	postData += "&contact_email=" + document.getElementById('contact_email').value;
	//postData += "&bride_name=" + document.getElementById('bride_name').value;
	//postData += "&groom_name=" + document.getElementById('groom_name').value;
	//postData += "&wedding_date=" + document.getElementById('wedding_date').value;
	postData += "&contact_msg=" + document.getElementById('contact_msg').value;
	
	var sUrl = "include/send_contact.php";
    var callback = {
        success: function(o) {
			alert("You message has been sent. We will respond within one business day.");
            history.back(1);;
        },
        failure: function(o) {
            alert("There was a problem sending your message. Please try again.");
        }
    }
    var transaction = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
	
	return true;
}


