// JavaScript Document<!--
//    -=pH2=-  April 1, 2004
//    ph2 Enterprises 


defaultStatus = "Forever fit results";


// --------------------  ** Browser Detection **  ----------------->

   bName = navigator.appName;
   bVersion = parseFloat(navigator.appVersion);
   r = 'false';

if (bName == "Netscape" && bVersion >= 3.0){
        //alert(bName+bVersion);
	document.write('<link rel=stylesheet type="text/css" href="../../js/css/netscape.css">');
        r = 'true';
	}
else if (bName == "Microsoft Internet Explorer" && bVersion >= 3.0)
	{
	document.write('<link rel=stylesheet type="text/css" href="../../js/css/default.css">');
	r = 'true';
	}
else
	{
	//alert("Niether");
	r = 'false';
	document.write('<link rel=stylesheet type="text/css" href="../../js/css/default.css">');
}
// --------------------  ** DOM Detection **  ----------------->
  	     
var b // Check DOM 

if (document.getElementById) {
        //alert("This browser is WC3 DOM Compliant! IE 5.5 or Netscape 6");
        	if (bName == "Netscape" && bVersion >= 4.0){
        	
        		var NS6 = true; //It is Netscape 6
			b="WC3";
			
  		}else{
  			b="WC3"; 
  			var NS6 = false;
  			
  		}
  	}
else if(document.all){
	//alert("This browser is IE!");
	b="IE";
	}
else if (document.layers) {
  	//alert("This browser is Netscape!");
    	b="N";
}

//alert(b);   


// --------------------  ** Image Rollover Function **  ----------------->

function msover(img,ref){
	if (r == 'true'){
		document.images[img].src = ref;
	}
}

function msout(img,ref){
	if (r == 'true'){
		document.images[img].src = ref;
	}
}


   
// --------------------  ** New Window Function **  ----------------->  
   
function openWin(thepage,winname,iwidth,iheight,scroll) {
   
	if (parseInt(navigator.appVersion) >= 4) {
		var winl = (screen.width - iwidth) / 2;
		var wint = (screen.height - iheight) / 2;
		winargs = 'height='+iheight+',width='+iwidth+',top='+wint+',left='+winl+',scrollbars='+scroll
		win = window.open(thepage,winname,winargs)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
		} 
      
		else
      
		{
		winargs = 'height='+iheight+',width='+iwidth+ ', scrollbars='+scroll
		window.open(thepage,winname,winargs)
		}
}
         


// -->


// function for mouseover effects on original images
function imgVar(){
	if (document.images) {
		nav1on = new Image();
		nav1on.src = "../images/nav1a_on.gif";
		nav1off = new Image();
		nav1off.src = "../images/nav1a_off.gif";
		nav2on = new Image();
		nav2on.src = "../images/contactus_on.gif";
		nav2off = new Image();
		nav2off.src = "../images/contactus_off.gif";
		nav3on = new Image();
		nav3on.src = "../images/train_on.gif";
		nav3off = new Image();
		nav3off.src = "../images/train_off.gif";
		nav4on = new Image();
		nav4on.src = "../images/fitness_on.gif";
		nav4off = new Image();
		nav4off.src = "../images/fitness_off.gif";
		tnav1on = new Image();
		tnav1on.src = "../images/topmenu2_over_01.gif";
		tnav1off = new Image();
		tnav1off.src = "../images/topmenu2_01.gif";
		tnav2on = new Image();
		tnav2on.src = "../images/topmenu2_over_02.gif";
		tnav2off = new Image();
		tnav2off.src = "../images/topmenu2_02.gif";
		tnav3on = new Image();
		tnav3on.src = "../images/topmenu2_over_03.gif";
		tnav3off = new Image();
		tnav3off.src = "../images/topmenu2_03.gif";
		tnav4on = new Image();
		tnav4on.src = "/images/topmenu2_over_04.gif";
		tnav4off = new Image();
		tnav4off.src = "../images/topmenu2_04.gif";
		tnav5on = new Image();
		tnav5on.src = "../images/topmenu2_over_05.gif";
		tnav5off = new Image();
		tnav5off.src = "/images/topmenu2_05.gif";
		tnav6on = new Image();
		tnav6on.src = "../images/topmenu2_over_06.gif";
		tnav6off = new Image();
		tnav6off.src = "/images/topmenu2_06.gif";
		tnav7on = new Image();
		tnav7on.src = "/images/topmenuProd_over_testimonia.gif";
		tnav7off = new Image();
		tnav7off.src= "../images/topmenuProd_testimonia.gif";
		tnav8on = new Image();
		tnav8on.src = "/images/topmenuProd_over_bio.gif";
		tnav8off = new Image();
		tnav8off.src = "/images/topmenuProd_bio.gif";

tnav10on = new Image();
tnav10on.src = "/images/topnavn.home.over.069.019.gif";
tnav10off = new Image();
tnav10off.src = "/images/topnavn.home.069.019.gif";

tnav11on = new Image();
tnav11on.src = "../images/topnavn.orderserv.over.123.109.gif";
tnav11off = new Image();
tnav11off.src = "../images/topnavn.orderserv.123.109.gif";

tnav12on = new Image();
tnav12on.src = "../images/topnavn.orderp.over.124.019.gif";
tnav12off = new Image();
tnav12off.src = "../images/topnavn.orderp.124.019.gif";

tnav13on = new Image();
tnav13on.src = "../images/topnavn.start.over.126.019.gif";
tnav13off = new Image();
tnav13off.src = "../images/topnavn.start.126.019.gif";

tnav14on = new Image();
tnav14on.src = "../images/topnavn.contct.over.109.019.gif";
tnav14off = new Image();
tnav14off.src = "../images/topnavn.contct.109.019.gif";

	}
}

// Function to show new images.
function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}

// Function to revert to old images.
function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
	}
}

imgVar();


if (document.getElementById){
document.write('<style type="text/css">')
document.write('.submenu{display: none;}')
document.write('<\/style>')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			el.style.display = "block";

		}else{
			el.style.display = "none";
		}
	}
}

function SubmitNLForm(oform) {
    // DATA VALIDATION
	if (oform.fullName.value == '') {
        alert("Please enter your 'Name'");
        oform.fullName.focus();
        return false;
    }
    if (oform.email.value == '') {
        alert("Please enter your 'Email'");
        oform.email.focus();
        return false;
    }
	if (!isEmail(oform.email)) {
		alert("Please fill in the E-mail address correctly");
        oform.email.focus();
		return false;
	}
}

