
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}


function preLoad()
			{
			pics=new Array("talking-parrots.jpg","port-timeless.jpg","port-smlbeginnings.jpg","port-positive.jpg","port-painters.jpg","port-nvisage.jpg","port-nesc.jpg","port-helenbrown.jpg","port-childminder.jpg","port-calibration.jpg","port-axiom.jpg","mouse.jpg","growing-plant.jpg","green-boots.jpg");
			
			
			
			for (imgnum=0; imgnum<pics.length; imgnum++)
			{
			imgfile=new Image();
			imgfile.src="images/"+pics[imgnum];
			}
			}
			
			


function checkrequired(which){
var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,3)=="req"){
if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("Please complete the required fields, then submit again.")
return false
}
else
return true
}





function openApp()
{
window.open('apply/application.php', name, 'toolbars=no, width=800, resize=yes, scrollbars=yes')
}
function checkForm()
	{
	
	
	if(document.comment.realname.value=="")
			{
			alert("Please enter your name");
			document.comment.realname.focus();
			document.comment.realname.select();
			return false;
			}
if(document.comment.email.value=="")
			{
			alert("Please enter your email address");
		document.comment.email.focus();
			document.comment.email.select();
			return false;
			}
if(document.comment.phone.value=="")
		{
	alert("Please enter your telephone number");
			document.comment.phone.focus();
	document.comment.phone.select();
		return false;
		}
			
		

	
			
			
	}
function checkApplication()
	{
	
	
	if(document.apply.realname.value=="")
			{
			alert("Please enter your name");
			document.apply.realname.focus();
			document.apply.realname.select();
			return false;
			}
if(document.apply.email.value=="")
			{
			alert("Please enter your email address");
			document.apply.email.focus();
			document.apply.email.select();
			return false;
			}
if(document.apply.phone.value=="")
		{
	alert("Please enter your phone number");
			document.apply.phone.focus();
	document.apply.phone.select();
		return false;
		}
			
	if(document.apply.project.value=="")
		{
	alert("Please enter the name of your project");
			document.apply.project.focus();
	document.apply.project.select();
		return false;
		}	

		if(document.apply.address.value=="")
		{
	alert("Please enter your address");
			document.apply.address.focus();
	document.apply.address.select();
		return false;
		}	
	if(document.apply.postcode.value=="")
		{
	alert("Please enter your postocde");
			document.apply.postcode.focus();
	document.apply.postocde.select();
		return false;
		}	
	if(document.apply.background.value=="")
		{
	alert("Please enter enter some background information about your project");
			document.apply.background.focus();
	document.apply.background.select();
		return false;
		}	
	if(document.apply.reason.value=="")
		{
	alert("Please enter your goals and aims for your website");
			document.apply.reason.focus();
	document.apply.reason.select();
		return false;

}
 return true;


}
		
function checkNews()
	{
	
	
	if(document.newsletter.newsname.value=="")
			{
			alert("Please enter your name");
			document.newsletter.newsname.focus();
			document.newsletter.newsname.select();
			return false;
			}
if(document.newsletter.newsemail.value=="")
			{
			alert("Please enter your email address");
		document.newsletter.newsemail.focus();
			document.newsletter.newsemail.select();
			return false;
			}

			
		 return true;

	
			
			
	}		







			
			
			
			