window.onload=show;
function show(id) {
var d = document.getElementById(id);
//var u1='http://new.ccg.com.au/';
var u1='http://www.ccg.com.au/';
var u2='http://new.ccg.com.au/';
	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';}

if((window.location==u1+'home.php?page=history')||(window.location==u1+'home.php?page=ourteam')||(window.location==u1+'home.php?page=careers')||(window.location==u1+'home.php?page=aboutus')||(window.location==u2+'home.php?page=history')||(window.location==u2+'home.php?page=ourteam')||(window.location==u2+'home.php?page=careers')||(window.location==u2+'home.php?page=aboutus'))
{
document.getElementById('smenu3').style.display='block';
}

if((window.location==u1+'home.php?page=candidate')||(window.location==u1+'home.php?page=client')||(window.location==u1+'home.php?page=staff')||(window.location==u1+'home.php?page=testimonials')||(window.location==u2+'home.php?page=candidate')||(window.location==u2+'home.php?page=client')||(window.location==u2+'home.php?page=staff')||(window.location==u2+'home.php?page=testimonials'))
{
document.getElementById('smenu5').style.display='block';
}

if((window.location==u1+'home.php?page=outplacement')||(window.location==u1+'home.php?page=workforce_mapping')||(window.location==u1+'home.php?page=recruitment_services')||(window.location==u1+'home.php?page=unbundled_services')||(window.location==u1+'home.php?page=services')||(window.location==u2+'home.php?page=outplacement')||(window.location==u2+'home.php?page=workforce_mapping')||(window.location==u2+'home.php?page=recruitment_services')||(window.location==u2+'home.php?page=unbundled_services')||(window.location==u2+'home.php?page=services'))
{
document.getElementById('smenu6').style.display='block';
}

}







 function check_form1()
 {

 if(document.form1.nam.value=="")
 {
 	alert('Please enter the name');
	return false;
 } 
  if(document.form1.organisation.value=="")
 {
 	alert('Please enter the organisation');
	return false;
 }
  if(document.form1.email.value=="")
 {
 	alert('Please enter the Email Address');
	return false;
 }
 
 if(document.form1.email.value!="")
  			{
			 var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;


      			if (filter.test(document.form1.email.value))
        			{

        			}
      			else
					{
						alert("Please enter your valid Email Address");
						document.form1.email.focus();
						return false;
						
					}
  			}
 
 
 }
 function check_form2()
 {
 
 if(document.form2.nam.value=="")
 {
 	alert('Please enter the name');
	return false;
 } 
  if(document.form2.organisation.value=="")
 {
 	alert('Please enter the organisation');
	return false;
 }
  if(document.form2.email.value=="")
 {
 	alert('Please enter the Email Address');
	return false;
 }
 
  
		  
		  
		  if(document.form2.email.value!="")
  			{
			 var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;


      			if (filter.test(document.form2.email.value))
        			{

        			}
      			else
					{
						alert("Please enter your valid Email Address");
						document.form2.email.focus();
						return false;
						
					}
  			}

 
 }
