function changeLanguage(input) {

	var Div_UK = document.getElementById("UK_language");
	var Div_Polish = document.getElementById("Polish_language");
	var Div_Slovak = document.getElementById("Slovak_language");
	var Div_Czech = document.getElementById("Czech_language");

		if (input == 'UK') {
            Div_UK.style.display  = "block";
			Div_Polish.style.display = "none";
			Div_Slovak.style.display = "none";
			Div_Czech.style.display = "none";
        } else if (input == 'Polish') {
            Div_UK.style.display  = "none";
			Div_Polish.style.display = "block";
			Div_Slovak.style.display = "none";
			Div_Czech.style.display = "none";
        } else if (input == "Slovak") {
            Div_UK.style.display  = "none";
			Div_Polish.style.display = "none";
			Div_Slovak.style.display = "block";
			Div_Czech.style.display = "none";
        } else if (input == "Czech")  {
            Div_UK.style.display  = "none";
			Div_Polish.style.display = "none";
			Div_Slovak.style.display = "none";
			Div_Czech.style.display = "block";
        }

}

function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(myForm.mailingemail.value)){return (true);}
alert("You have typed an invalid email address. Please check and try again.");return (false);
}

function menuchange(menuitem, action) {
	if (action == '') {
		document.getElementById(menuitem).style.removeProperty("background");
		}
	else {
		document.getElementById(menuitem).style.background = "url('images/classic/hover_bg.jpg') top center no-repeat";
	}
}

function menuchangegallery(menuitem, action) {
	if (action == '') {
		document.getElementById(menuitem).style.removeProperty("background");
		}
	else {
		document.getElementById(menuitem).style.background = "url('../../images/classic/hover_bg.jpg') top center no-repeat";
	}
}

function getRootURL() {
    var baseURL = location.href;
    var rootURL = baseURL.substring(0, baseURL.indexOf('/', 7));

    // if the root url is localhost, don't add the directory as cassani doesn't use it
    if (baseURL.indexOf('localhost') == -1) {
        return rootURL + "/";
    } else {
    return rootURL + baseURL.substring(baseURL.indexOf('/', 8), baseURL.indexOf('/', baseURL.indexOf('/', 8)+1)) + "/";        
    }
}

