function mmLoadMenus() {
  if (window.mm_menu_0420130045_0) return;
        window.mm_menu_0420130045_0 = new Menu("root",196,18,"Arial, Helvetica, sans-serif",12,"#FFFFFF","#FFFFFF","#4FA6AD","#104B73","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
   mm_menu_0420130045_0.addMenuItem("15288&nbsp;Relations","location='relations.html'");
   mm_menu_0420130045_0.addMenuItem("15288&nbsp;Processes","location='processes.html'");
   mm_menu_0420130045_0.addMenuItem("15288&nbsp;Category","location='category.html'");
   mm_menu_0420130045_0.addMenuItem("15288&nbsp;Stages","location='stages.html'");
   mm_menu_0420130045_0.addMenuItem("15288&nbsp;Relationship&nbsp;to&nbsp;12207","location='relationship.html'");
   mm_menu_0420130045_0.addMenuItem("Five&nbsp;Steps","location='five_steps.html'");
   mm_menu_0420130045_0.addMenuItem("Evolution","location='evolution.html'");
   mm_menu_0420130045_0.fontWeight="bold";
   mm_menu_0420130045_0.hideOnMouseOut=true;
   mm_menu_0420130045_0.bgColor='#555555';
   mm_menu_0420130045_0.menuBorder=0;
   mm_menu_0420130045_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0420130045_0.menuBorderBgColor='#000000';

mm_menu_0420130045_0.writeMenus();
} // mmLoadMenus()

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// To open a popup window
function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function printPage(){
	var pname='printfile.asp?page='+window.location.href;
	window.open(pname,'print','width=500, height=600, scrollbars=1, status=no');	
}


// Newsletter Subscription Form
function Newsletter() {
  	mailid = document.newsMail.email
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}
}

// Online Form validation
function Online() {

	firstName = document.onlineForm.txtFirstname
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	lastName = document.onlineForm.txtlastname
	if (lastName.value == "" || !isNaN(lastName.value))
	{
		alert("Please enter your last name");
		lastName.focus()
		return false		
	}
	
	address = document.onlineForm.txtaddress
	if (address.value == "" || !isNaN(address.value))
	{
		alert("Please enter your Address");
		address.focus()
		return false		
	}

	suburb = document.onlineForm.txtsuburb
	if (suburb.value == "" || !isNaN(suburb.value))
	{
		alert("Please enter your Suburb");
		suburb.focus()
		return false		
	}
	
	postcode = document.onlineForm.txtpostcode
	if (postcode.value == "" || isNaN(postcode.value))
	{
		alert("Please enter your Postcode");
		postcode.focus()
		return false		
	}

	telephone = document.onlineForm.txphone
	if (telephone.value == "" || !isNaN(telephone.value))
	{
		alert("Please enter your Telephone");
		telephone.focus()
		return false		
	}

	mailid = document.onlineForm.txtemail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

if (!document.onlineForm.con.checked && !document.onlineForm.car.checked && !document.onlineForm.hp.checked)
	{
	alert('Please select who you are');
	return false;
	}

}

// Feedback form validation
function Feedback() {

	firstName = document.fbForm.txtFirstname
	if (firstName.value == "" || !isNaN(firstName.value))
	{
		alert("Please enter your first name");
		firstName.focus()
		return false		
	}

	lastName = document.fbForm.txtlastname
	if (lastName.value == "" || !isNaN(lastName.value))
	{
		alert("Please enter your last name");
		lastName.focus()
		return false		
	}

	dayPhone = document.fbForm.txtworkphone
	if (isNaN(dayPhone.value))
	{
		alert("Phone number you have entered is invalid");
		dayPhone.focus()
		return false		
	}

	eveningPhone = document.fbForm.txthomephone
	if (isNaN(eveningPhone.value))
	{
		alert("Phone number you have entered is invalid");
		eveningPhone.focus()
		return false		
	}

	mailid = document.fbForm.txtemail
	if (mailid.value == '')
	{
		alert("Please enter E-mail Id");
		mailid.focus()
		return false
	}
	else if (mailid.value.indexOf("@")==-1 || mailid.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		mailid.focus()	   
		return false
	}

	age = document.fbForm.cmbAgeRange
	if (age.options(age.selectedIndex).value == "")
	{
		alert("Please select your age group");
		age.focus()
		return false		
	}	

	sportsAct = document.fbForm.txtsports
	if (sportsAct.value != "" && !isNaN(sportsAct.value))
	{
		alert("Please enter Sports Activities");
		sportsAct.focus()
		return false		
	}

	comments = document.fbForm.txtComments
	if (comments.value == "" || !isNaN(comments.value))
	{
		alert("Please add your comments");
		comments.focus()
		return false		
	}	
}

// Appointments form validation
function Appointment()
{
if (document.frmAppointment.txtFirstName.value=="" || !isNaN(document.frmAppointment.txtFirstName.value))
	{
	alert('Enter FirstName');
	document.frmAppointment.txtFirstName.focus();
	return false;
	}
if (document.frmAppointment.txtSurname.value=="" || !isNaN(document.frmAppointment.txtSurname.value))
	{
	alert('Enter Surname');
	document.frmAppointment.txtSurname.focus();
	return false;
	}
if (document.frmAppointment.txtHomePhoneNumber.value=="" || isNaN(document.frmAppointment.txtHomePhoneNumber.value))
	{
	alert('Enter Home Phone No.');
	document.frmAppointment.txtHomePhoneNumber.focus();
	return false;
	}
if (document.frmAppointment.txtBusinessPhoneNumber.value!="" && isNaN(document.frmAppointment.txtBusinessPhoneNumber.value))
	{
	alert('Enter a valid Business Phone Number');
	document.frmAppointment.txtBusinessPhoneNumber.focus();
	return false;
	}
	
if (document.frmAppointment.txtMobileNumber.value!="" && isNaN(document.frmAppointment.txtMobileNumber.value))
	{
	alert('Mobile number you have entered is invalid');
	document.frmAppointment.txtMobileNumber.focus();
	return false;
	}
	
if (document.frmAppointment.txtEmailAddress.value=="")
	{
	alert('Enter Email Address');
	document.frmAppointment.txtEmailAddress.focus();
	return false;
	}
	else if (document.frmAppointment.txtEmailAddress.value.indexOf("@")==-1 || document.frmAppointment.txtEmailAddress.value.indexOf(".")==-1){
		alert("Invalid E-mail ID")
		document.frmAppointment.txtEmailAddress.focus()	   
		return false
	}	
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
	{
	c_start=c_start + c_name.length+1
	c_end=document.cookie.indexOf(";",c_start)
	if (c_end==-1) c_end=document.cookie.length
	return unescape(document.cookie.substring(c_start,c_end))
	}
  }
return null
}

function randImagesCookie()
{

		if(getCookie('name')==null || getCookie('name')=="NaN")
		{
				document.cookie="name"+"="+1;
		}
		var cimgnum=getCookie('name');
		if(cimgnum >= 7) {
				var simgnum=1;
		} else {
				var simgnum=parseInt(cimgnum)+1;
		}
		
			var imagename = "header"+simgnum;
			document.cookie="name"+"="+simgnum;

			var thePicture=document.getElementById('header');
			var picPath="images/"+imagename+".jpg";

			thePicture.style.backgroundImage="url('"+picPath+"')";
}
				
var min=8;
var max=18;
function increaseFontSize() {
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function decreaseFontSize() {
   var p = document.getElementsByTagName('span');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 12;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}