
function ChangeImage(strPath) {	
	window.document.forms[0].imgItemImage.src = strPath.replace('\\','/');
}

function RunLogin() {
	window.document.forms[0].submit();
}

function RunCustomerSave()
{
	if(window.document.forms[0].CustomerUsername.value == "") {
		alert("Please provide a username so you can log in again later.");
		window.document.forms[0].CustomerUsername.focus();
	} else if(window.document.forms[0].CustomerPassword.value == "") {
		alert("Your password cannot be blank.");
		window.document.forms[0].CustomerPassword.focus();
	} else if(window.document.forms[0].CustomerPassword.value != window.document.forms[0].CustomerConfirm.value) {
		alert("The two passwords do not match.");
		window.document.forms[0].CustomerPassword.focus();
	} else if(window.document.forms[0].CustomerEmail.value == "" && window.document.forms[0].CustomerPhone.value == "") {
		alert("Please provide either your phone number or email so we can contact you.");
	} else {
		window.document.forms[0].submit();
	}
}


function RunPrint() {
	
	objWindow = window.open();
	objWindow.document.write(window.document.getElementById('divPrint').innerHTML);
	
}

function ChangeEventType(intType, strDate, strPath) {

	window.location = strPath + "?event=" + intType + "&month=" + strDate;

}


function RunSubmitContactForm() {

	window.document.forms[0].action = window.document.forms[0].action + "&contactformsubmit=1";
	window.document.forms[0].submit();

}

function RunSubmitGuestbook() {

	window.document.forms[0].action = window.document.forms[0].action + "&guestbooksubmit=1";
	window.document.forms[0].submit();

}


function SubscribeToNewsletter(newsletter) {

	
	window.document.forms[0].action = "index.aspx?newslettersub=" + newsletter;
	window.document.forms[0].submit();

}


function ChangeMainGalleryImage(path) {

var imgGalleryMain = window.document.getElementById("imgGalleryMain");

imgGalleryMain.src = path;

}




function runSearchCheck() {







var objSearch = window.document.getElementById("CW_Search_All_Site_Content");







 if(objSearch.value == "Search Entire Site")



 {



 objSearch.value = "";



 }



}







function RunSiteWideSearch() {







 var objSearch = window.document.getElementById("CW_Search_All_Button");







 objSearch.value = "Search Site";



 window.document.forms[0].submit();







}







function RunEnterCheck(objTextField, objEvent)



{



var intKeyCode;



if(window.event) {



intKeyCode = window.event.keyCode;



} else if(objEvent) {



intKeyCode = objEvent.which;



} else {



return true;



}



if (intKeyCode == 13) {



RunSiteWideSearch();



return false;



} else {



return true;



}



}




