
// Preload function - call onload

function doPreload()
{
	if(document.images)
	{
		var the_images = new Array(
		'/graphics/mainmenu_who_on.gif',
		'/graphics/mainmenu_professional_on.gif',
		'/graphics/mainmenu_pitches_on.gif',
		'/graphics/mainmenu_miscellaneous_on.gif',
		'/graphics/mainmenu_cars_on.gif',
		'/graphics/mainmenu_furnitures_on.gif',
		'/graphics/mainmenu_contact_on.gif',
		'/graphics/mainmenu_cv_on.gif');
		preloadImages(the_images);
	}
}

function preloadImages(the_images_array) {
  
	for(loop = 0; loop < the_images_array.length; loop++)
	{
   		var an_image = new Image();
		an_image.src = the_images_array[loop];
	}
}

function openWindowcenter(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  window.open(url, name, str);
}

function openWindowcenterscroll(url, name, height, width) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
    str += ",scrollbars=1"
  }
  window.open(url, name, str);
}
