/*
	Global javascript
	Updated on October 4, 2004
	Designed, developed and maintained by CCT Integrated Systems Limited: http://www.cctsystems.co.uk/

*/

// preload images
// ----------------------------------------------
function preloadImages()
{ 
  var args = preloadImages.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}

// switch images
// ----------------------------------------------
function switchImage(imgName,imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {
      document.images[imgName].src = imgSrc;
    }
  }
}
// protect email addresses from spambots
// ----------------------------------------------
function SpamShield(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
	}
	
// CODE USED TO POP NEW WINDOWS
// -----------------------------------------------------------------------------
	window.onerror=null
	var TimerID = null;
	var timer = 0;
	var screenHeight=window.screen.height;
	var screenWidth=window.screen.width;
// -----------------------------------------------------------------------------
function popWindowCenter(URLString,windowWidth,windowHeight) {
	var Xcoordinate = (screenWidth-windowWidth)/2;
	var Ycoordinate = (screenHeight-windowHeight)/4;
	poppedWindowCenter = window.open(URLString,'CCS','width='+windowWidth+',height='+windowHeight+',scrollbars=auto,toolbar=no,menubar=no,status=yes,directories=no,location=no,resizable=yes');
	poppedWindowCenter.moveTo(Xcoordinate,Ycoordinate);
	poppedWindowCenter.focus();
}