<!--
/* function to change the background image of a button that a mouse is over  */
/* jsStr - Is the passed in Name of the button */
function ChangeoverButton(jsStr) { //v2.0
	/* elemL - Is Name of the button + the cell positioning */
	var elemL = jsStr + "L";
	/* cellL - Is which cell to change */
	var cellL = document.getElementById(elemL);
	/* change the className of the cell with css */
	cellL.className='buttonUpL';

	/* elemL - Is Name of the button + the cell positioning  */
	var elemL = jsStr + "C";
	/* cellL - Is which cell to change */
	var cellL = document.getElementById(elemL);
	/* change the className of the cell with css */
	cellL.className='buttonUpC';

	/* elemL - Is Name of the button + the cell positioning  */
	var elemL = jsStr + "R";
	/* cellL - Is which cell to change */
	var cellL = document.getElementById(elemL);
	/* change the className of the cell with css */
	cellL.className='buttonUpR';
} 

/* function to change the background image of a button that a mouse presses */
function ChangePressButton(jsStr) { //v2.0
	var elemL = jsStr + "L";
	var cellL = document.getElementById(elemL);
	cellL.className='buttonPressL';

	var elemL = jsStr + "C";
	var cellL = document.getElementById(elemL);
	cellL.className='buttonPressC';

	var elemL = jsStr + "R";
	var cellL = document.getElementById(elemL);
	cellL.className='buttonPressR';
}

/* function to change the background image of a button that a mouse moves off of */
function ChangeoutButton(jsStr) { //v2.0
	var elemL = jsStr + "L";
	var cellL = document.getElementById(elemL);
	cellL.className='buttonL';

	var elemL = jsStr + "C";
	var cellL = document.getElementById(elemL);
	cellL.className='button';

	var elemL = jsStr + "R";
	var cellL = document.getElementById(elemL);
	cellL.className='buttonR';
}

/* Redirect to another page */
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]+"'");
}

/*  */
function emailHide(email, domain, display) {
 document.write('<a href=' + 'mail' + 'to:' + email + '@' + domain + '>' + display + '</a>');
}

/*  */
function B1_CheckWhichKeyPress(B1Aray) {
 var B1_event = B1Aray[0];
 var B1_case = B1Aray[1];
 var B1_Path = B1Aray[2];
 var B1_Window = B1Aray[3];
 var B1_Chrome = B1Aray[4];
 if (B1_event.keyCode == '13' || B1_event.keyCode == '32'){
 switch (B1_case){
 case ('Submit'):
 //alert('Submit');
 eval(document.form1.Submit1.click());
 if (!(B1_Path == 'null')){
 document.form1.action = B1_Path;
 }
 document.form1.Submit1.click();
 break;
 case ('MM_goToURL'):
 /*alert('MM_goToURL');*/
 MM_goToURL("parent",B1_Path);return document.MM_returnValue;
 break;
 case ('Exit'):
 /*alert('Exit');*/
 window.location='Exit.php';
 break;
 case ('setValuesAndSubmitForm'):
 /*alert(B1_Path)*/
 setValuesAndSubmitForm(B1_Path);
 break;
 case ('window.open'):
 window.open(B1_Path,B1_Window,B1_Chrome);
 break;
 case ('history'):
 history.back();
 break;
 case('doCancel'):
 doCancel(B1_Path);
 break;
 }
 } 
 else{
 return 0;
 }
}

/*  */
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

/*  */
function B1_Open(B1Name){
	if (B1Name == 'TT'){
		oNewWindow = window.open("http://ttdemo.binaryone.com.au/TrainTracker.php","TT","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to run Train Tracker.\nAs Train Tracker runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'b1ProgQuote'){
		oNewWindow = window.open("../quoteforms/ProgQuotes.php","b1ProgQuote","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to run Train Tracker.\nAs Train Tracker runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'b1WebQuote'){
		oNewWindow = window.open("http://www.binaryone.com.au/quoteforms/WebQuoteForm.php","b1WebQuote","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to run Train Tracker.\nAs Train Tracker runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'TTRegister'){
		oNewWindow = window.open("http://www.binaryone.com.au/registration/TTRegister.php","TTRegister","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to register for Train Tracker.\nAs Train Tracker registration runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'TTFeedback'){
		oNewWindow = window.open("../feedback/TTFeedback.php","TTFeedback","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to register for Train Tracker.\nAs Train Tracker registration runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'IForgotmypassword'){
		oNewWindow = window.open("http://www.binaryone.com.au/Products/TTAccess2.php","ForgotPassword","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to register for Train Tracker.\nAs Train Tracker registration runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'TTPurchase'){
		oNewWindow = window.open("http://www.binaryone.com.au/purchase/TTPurchase.php","TTPurchase","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Popups kneed to be enabled to register for Train Tracker.\nAs Train Tracker registration runs in a secure window.\nPlease enable popups on you browser.");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
	if (B1Name == 'Secure'){
		oNewWindow = window.open("http://localhost/Secure/SSecureLogin.php","Secure","resizable=yes,scrollbars=yes");
		if(oNewWindow=="" || oNewWindow.closed || oNewWindow.name==undefined ){
		 alert("Enable popups");
		} else {
			//window.opener='0';
			//window.close(); 
		}
	}
}
//-->

