function showContactForm() {
	var displayOfContactForm = $("blackBox").style.display;
	if (displayOfContactForm != '') {
	Effect.SlideDown('blackBox', {duration:0.8});
	}
}

captions = new Array();
captions[1] = "Oliver Tompsett (Fiyero) and Kerry Ellis (Elphaba)";
captions[2] = "Susie Blake (Madame Morrible) and Kerry Ellis (Elphaba)";
captions[3] = "London Cast 2007";
captions[4] = "Dianne Pilkington (Glinda) and London Cast 2007";
captions[5] = "Christopher Mitchell (Chistery)";
captions[6] = "Kerry Ellis ( Elphaba)";
captions[7] = "London Cast 2007";
captions[8] = "London Cast 2007";

function changeImg(newImg,caption) {

	$("galleryLeft").innerHTML = "<img src='images/gallery/" + newImg + ".jpg' width='490' height='330' alt='Img1'>" + "<p id='captionArea'>" + captions[caption] + "</p><p id='photographer'>Photographs by: Tristam Kenton</p>";

	
}	

function loadImg(newImg) {
	pic = new Image(490,360); 
	pic.src="images/gallery/" + newImg + ".jpg";
}

function validateForm(emailValue,recipientName) {

emailAddress = emailValue;
validationString = /orangehome\.co\.uk$|wanadoo\.co\.uk$|freeserve\.co\.uk$|fsnet\.co\.uk$|fsbusiness\.co\.uk$|fslife\.co\.uk$|fsworld\.co\.uk$|fsmail\.net$|pokelondon\.com$|orange.net$/;
resultValidation = emailAddress.match(validationString);


	if (resultValidation != null) { 	
		new Ajax.Request('email/index.php', {method:'post', postBody:'name=' + recipientName + '&email=' + emailAddress});
		$("formContainer").innerHTML = "<p id='thanks'>Thanks for submitting your details, your reference code has been sent to your Orange e-mail address.</p>";
	}
	else {
		new Effect.Highlight('email', {duration:2});
		$("formValidation").innerHTML = "Invalid Orange email address, please try again.";	
	}

}

function closeBlackBox() {
	Effect.SlideUp('blackBox', {duration:0.8});
}
