

	function alertSize() {
	  var myWidth = 0, myHeight = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	  }
	
	  if(myHeight > 560){
		  document.getElementById("mainContainer").style.top = (myHeight - 560) /2 +"px"
	  }else{
		document.getElementById("mainContainer").style.top = "0px"  
	  }
	}
		

		

	iLayer = 1
	function swapPics(smyPic){
		if(iLayer==1){
			tmpLayer =2
		}else{
			tmpLayer =1		
		}


			Element.setOpacity('photo' + tmpLayer,0)
			
		document.getElementById('photo' + tmpLayer).innerHTML  = "<img src='"+smyPic+"'  onload=\"showPics(tmpLayer)\">"
	}
	
	function showPics(iID){
		if(iID == 1){
			iFade = 2
		}else{
			iFade = 1
		}
		
		new Effect.Appear('photo' + iID, { duration: 2, from: 0, to: 1.0 });
		document.getElementById('photo'+iID).style.zIndex=2;
		document.getElementById('photo'+iFade).style.zIndex=1;
		iLayer = iID
	}
	

	function checkDetails(theform){
		fields = "";
		valid = true;
		
		if(theform.name.value == ""){
			fields += "Name\n";
			valid = false;
		}
		if(theform.currentAddress.value == ""){
			fields += "Current Address\n";
			valid = false;
		}
		if(theform.phone.value == ""){
			fields += "Phone\n";
			valid = false;
		}
		if(theform.email.value == ""){
			fields += "Email Address\n";
			valid = false;
		}
		if(theform.email.value.indexOf("@") == -1 || theform.email.value.indexOf(".") == -1 ){
			fields += "Email Address is not valid\n";
			valid = false;
		}
		if(theform.proposedAddress.value == ""){
			fields += "Proposed Address\n";
			valid = false;
		}
		
		if(valid == false){
			message = "Please fill in the following fields\n";
			message += "--------------------------------------\n";
			message += fields;
			alert(message);
			return(false);
		}else{
			return(true);
		}	
		
	}


