if (document.getElementById) { window.onload = swap };
function swap() {
var numimages=7;
rndimg = new Array("../gfx/front/front1.jpg", "../gfx/front/front2.jpg", "../gfx/front/front3.jpg", "../gfx/front/front4.jpg", "../gfx/front/front5.jpg", "../gfx/front/front6.jpg", "../gfx/front/front7.jpg"); 
x=(Math.floor(Math.random()*numimages));
randomimage=(rndimg[x]);
document.getElementById("banner_front").style.backgroundImage = "url("+ randomimage +")"; 
}

function validateForm()
{
	var msg="";

	if (document.upload.elements[1].value=="") {
		msg=msg+"\nName";
	}
	if (document.upload.elements[2].value=="") {
		msg=msg+"\nAddress";
	}
	if (document.upload.elements[3].value=="") {
		msg=msg+"\nPostcode";
	}
	if (document.upload.elements[4].value=="") {
		msg=msg+"\nCity";
	}
	if (document.upload.elements[5].value=="Choose...") {
		msg=msg+"\nCountry";
	}
	if (document.upload.elements[7].value=="") {
		msg=msg+"\nE-Mail";
	}
	if (document.upload.elements[9].value=="") {
		msg=msg+"\nGender";
	}
	if (document.upload.elements[10].value=="Choose...") {
		msg=msg+"\nDestination";
	}
	if (document.upload.elements[11].value=="") {
		msg=msg+"\nLocation";
	}
	if (document.upload.elements[12].value=="") {
		msg=msg+"\nDate";
	}
	if (document.upload.elements[13].value=="Choose...") {
		msg=msg+"\nShip";
	}
	if (document.upload.elements[14].value=="") {
		msg=msg+"\nDescription";
	}
	if (document.upload.elements[16].checked==false) {
		msg=msg+"\nYou must accept the terms and conditions.";
	}
		
	if (msg!="") {
		alert("Please fill in the following field(s):\n" +msg);
	} else {
		document.getElementById('loading').style.visibility='visible';
		document.upload.submit();
	}
}