
function popupURL(url)
{
	urlWindow = window.open (url, 'Popup','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,height=600,width=700');
	urlWindow.focus();
}

function showDate() {
		var mydate=new Date()
		var year=mydate.getYear()
		if (year < 1000)
			year+=1900
		var day=mydate.getDay()
		var month=mydate.getMonth()
		var daym=mydate.getDate()
		var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
		var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
		document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+year)
}


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 YY_checkform() { //v4.66
//copyright (c)1998,2002 Yaromat.com
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = MM_findObj(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
  document.MM_returnValue = (myErr=='');
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

/* This script is written by Eric (Webcrawl@usa.net)
 * For more info visit dynamicdrive.com
 */
function _printIt()
{  
	if (window.print) {
			window.print() ;  
	}
	else {
			var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
			document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
			WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
	}
}

function printIt()
{
	NS = (navigator.appName == "Netscape");
	var VERSION = parseInt(navigator.appVersion);
	if (VERSION > 3) {
			document.write('<form name="print" id="print"><input type=button value=" Print Page " name="Print" onClick="_printIt()"></form>');
	}
}


/*
============================================================
Script:     Random Quote

Functions:  This simple script allows you to print random
            quotations in the page.  Any number of quotes
            may be used.
            
Browsers:   All

Author:     etLux
============================================================

NOTE:
	In quotation 8, note the text, \"beauty\" -- if you need
	to use double-quote " marks, you *must* precede each
	double-quote with a backslash \... otherwise the script
	will break.
*/

// ==============================================
// Copyright 2004 by CodeLifter.com
// Free for all; but please leave in this header.
// ==============================================

function showQuotation()
{
	var Quotation=new Array();
	
	// Set up the quotations to be shown, below.
	// To add more quotations, continue with the pattern, adding to the array.
	// Remember to increment the Quotation[x] index!

	Quotation[0] = "Oxygen is a necessary component in every chemical reaction important to human physiology.";
	Quotation[1] = "We can survive without water for a few days and without food for literally weeks but without oxygen we can only live for a few minutes.";
	Quotation[2] = "Nutrients in our bodies, such as proteins, carbohydrates and fats must have a constant supply of oxygen to convert \"potential\" energy.";
	Quotation[3] = "\"Oxygen Debt\" is now a significant issue with sports people.";
	Quotation[4] = "Physical Stress consumes large quantities of oxygen and, therefore, reduces the supply to numerous cells and tissues throughout the body.";
	Quotation[5] = "Australians are renowned worldwide for their high participation rates and achievements in sport, and for their strong anti-drug stance.";
	Quotation[6] = "Proper oxygenation allows the body to produce and supply ATP to the muscles, giving them strength and elasticity.";
	Quotation[6] = "A lack of oxygen (hypoxia) causes the body to produce an oxygen-deficient form of ATP called lactic acid. reducing muscle efficiency.";
	Quotation[7] = "Sports OxyShot is 100% Australian owned and manufactured. It is totally 100% non-toxic and drug-free";

	var Q = Quotation.length;
	var whichQuotation=Math.round(Math.random()*(Q-1));
	
	document.write(Quotation[whichQuotation]);
}

