function menuOver(imageID, onOff, alphaValue) {
	thisImage = document.getElementById("menu_" + imageID)
	if (navigator.userAgent.indexOf('Safari') != -1) {
		return false;
	}
	if (onOff == 1) {
		
		if (thisImage.style.opacity != null) { // safari keeps removing the images! failed to find a fix, so no alpha change for the mac!) {
			thisImage.style.opacity = alphaValue / 100;
		} else if (thisImage.style.filter != null) {
			thisImage.style.filter = "alpha(opacity=" + alphaValue + ")";
		} else {
			/*
			thisImage.style.borderBottom = "1px solid #215B6E";
			thisImage.style.borderTop = "1px solid #215B6E";
			thisImage.style.marginTop = "-1px";
			*/
		}
	} else {
		if (thisImage.style.opacity != null) {
			thisImage.style.opacity = alphaValue / 100;
		} else if (thisImage.style.filter != null) {
			thisImage.style.filter = "alpha(opacity=" + alphaValue + ")";
		} else {
			/*
			thisImage.style.borderBottom = "0px";
			thisImage.style.borderTop = "0px";
			thisImage.style.marginTop = "0px";
			*/
		}
	}
}


function initPage(thisMessage) {
	preloadMenu();
	if (thisMessage != "") {
		alert(thisMessage)
	}
	reposition()
}


function preloadMenu() {
	var menuArray = new Array('home-&-news', 'new-releases', 'artists', 'shop', 'contact-&-about', 'links');
	var newArray = new Array();
	for (i = 0; i < menuArray.length; i ++) {
		newArray[i] = new Image();
		newArray[i].src = "images/menu_" + menuArray[i] + "1.gif";
	}
}


function checkEmail(emailString, languageCode) { // adapted from http://www.wallpaperama.com/forums/how-to-validate-check-email-address-is-correct-in-forms-when-submit-php-t635.html

	var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(emailString)) {
		return true;
	} else {
		if (languageCode == 'DE') {
			alert("Please enter a valid email address.");
		} else {
			alert("Please enter a valid email address.");
		}
		return false;
	}
}

function launchPhoto(thisname, thisWidth, thisHeight, thisWindowTitle) {
	var newWindow = window.open("showphoto.asp?name=" + thisname + "&window_title=" + thisWindowTitle, "_blank", "width=" + thisWidth + ", height=" + thisHeight + ", resizable=0, fullscreen=0, status=yes, scrollbars=no, toolbar=0, location=0, directories=0, menubar=0")
	newWindow.focus()
} 
