<!--

// --- no menubar etc.
function openWindow(url,x,y) {
  mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=' + x + ',height=' + y + ',screenX=50,screenY=50,top=50,left=50');
  mywin.focus();
}

// --- include menubar etc.
function openWindow2(url,x,y) {
  mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=' + x + ',height=' + y + ',screenX=50,screenY=50,top=50,left=50');
  mywin.focus();
}

function closewindow() {
  window.close();
}

function printWindow() {
   if (window.print)
     {
     window.print();
     }
}

logoSliderCurrentLogoIndex = 0;
function logoSlider() {
	/**
	 * An array of images to be rotated. These are relative to the images
	 * subdirectory.
	 */
	var images = [ "company/cytec.gif",
	               "company/keymark.gif",
	               "company/hydro.gif", 
	               "company/almag2.png",
	               "company/novelis2.gif", 
	               "company/western2.png",
	               "company/rhodia.gif", 
	               "company/sapa.gif" ];
	
	var getImageSrcHtml = function(imageFile) {
		return "<div id='logoPadImage' style='display:none;margin:0px;padding:0px'>" +
			"<img src='/images/" + 
			imageFile + "' /></div>";
	};
	
	var showNextLogo = function() {
		var curImage = getImageSrcHtml(images[logoSliderCurrentLogoIndex]);
		
		$("td#logoPad").html(curImage);
		$("div#logoPadImage").fadeIn(2000, function() {
			$("div#logoPadImage").delay(2000).fadeOut(250, showNextLogo);
		});
		
		logoSliderCurrentLogoIndex++;
		if (logoSliderCurrentLogoIndex >= images.length) {
			logoSliderCurrentLogoIndex = 0;
		}
	};
	
	
	showNextLogo();
}

// -->

