/*
 * (c) Accu-Rate.ca 2006
 *
 * Shared Javascript functions
 *
 * HTML & PHP code by Webmotion
 * mikael.grave@webmotion.com
 */

<!-- //
function openWindow( title, content ) {
  w = 400;
  h = 300;
  attributes = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="
               + w + ",height=" + h;
  pm = window.open( "", "jsWindow", attributes );
  pm.document.open();
  pm.document.write(
      "<html><head><title>Accu-Rate - " + title + "</title></head>"
    + "<body bgcolor=#FFFFFF text=#000000 link=#999999 vlink=#999999 alink=#ffffff>\n"
    + "<font face=\"helvetica\">"
	+ "<p><b>" + title + "</b></p>\n"
    + "<p align=\"justify\"><font size=\"-1\">" + content + "</font></p>\n"
    + "<p align=\"center\"><font size=\"-2\">[<a href=\"javascript:window.close()\">close window</a>]</font></p>"
    + "</font>\n"
    + "</body>\n</html>\n" );
  pm.document.close();	
  pm.focus();
}

function openWindowByID( id ) {
  openWindow( eval( 'helpTitle' + id ), eval( 'helpContent' + id ) );
}

function rollIn(image_name) {
  document[image_name].src = eval(image_name + "_on.src");
}

function rollOut(image_name) {
  document[image_name].src = eval(image_name + "_off.src");
  window.status = '';
}

var lastCheckedImg = '';
function checkImg( image_name ) {
  if ( lastCheckedImg ) rollOut( lastCheckedImg );
  rollIn( image_name );
  lastCheckedImg = image_name;
}

// -->

