/* Javascript functions for ColyIrr (WaterMart)
 * Author:	Jared Pritchard, Waterexchange
 * Date:	9th June 2005
 */
 
//  Change button style on mouseover / out
function changeButton ( oObject, bOver, sColour )
{
	oObject.className = 'psButton_' + sColour + ( (bOver == 0) ? '' : '_o' );
}

// Open a window with standard size, centered etc.
function openWindow (htmlSrc) {
  var width = 420;
  var height = 450;
  var winLeft =(screen.width - width) / 2;
  var winUp = (screen.height - height) / 2;
  var centre = ',screenX='+winLeft+',screenY='+winUp+',left='+winLeft+',top='+winUp;
    win=window.open(htmlSrc, "WaterX1", 'scrollbars=yes,width='+width+',height='+height+centre);
    win.focus ();
}

// Open a window with standard size FOR TRIAL RUN, centered etc.
function openWindow2 (htmlSrc) {
  var width = 480;
  var height = 200;
  var winLeft =(screen.width - width) / 2;
  var winUp = (screen.height - height) / 2;
  var centre = ',screenX='+winLeft+',screenY='+winUp+',left='+winLeft+',top='+winUp;
    win=window.open(htmlSrc, "WaterX2", 'scrollbars=no,width='+width+',height='+height+centre);
    win.focus ();
}

// Opens a blank window
function openWindow3 (htmlSrc) {
  var width = 650;
  var height = 480;
  var winLeft =(screen.width - width) / 2;
  var winUp = (screen.height - height) / 2;
  var centre = ',screenX='+winLeft+',screenY='+winUp+',left='+winLeft+',top='+winUp;
    win=window.open(htmlSrc, "WaterX2", 'scrollbars=yes,toolbar=yes,resizable=yes,width='+width+',height='+height+centre);
    win.focus ();
}