function displayImage( image, w, h,name )
{
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var tw = (w/1 + 10)/1;
  var th = (h/1 + 10)/1;
  winprops = 'height='+th+',width='+tw+',top='+wint+',left='+winl+',scrollbars=no,toolbar=no'
  
  msgWindow = window.open( '',name,winprops )
  msgWindow.document.writeln("<HTML><HEAD><TITLE>© Copyright Van Laecke NV</TITLE></HEAD>" )
  
  msgWindow.document.writeln("<BODY leftMargin='3' topMargin='3' MARGINWIDTH='3' MARGINHEIGHT='3'>" )
  msgWindow.document.writeln("<table width="+w+" border=0 cellpadding=0 height="+h+">" )
  msgWindow.document.writeln("<tr>" )
  msgWindow.document.writeln("<td align=center valign=middle><img border=1 src='"+image+"'></a>" )
  msgWindow.document.writeln("</tr>" )
  msgWindow.document.writeln("</table>" )
  msgWindow.document.writeln("</BODY></HTML>" )
  
  if (parseInt(navigator.appVersion) >= 4) { msgWindow.window.focus(); }
}

var animatedjpeg_fotos = new Array();
animatedjpeg_fotos[0] = "images/window_s8000iq_00.gif";
animatedjpeg_fotos[1] = "images/window_s8000iq_01.gif";
animatedjpeg_fotos[2] = "images/window_s8000iq_02.gif";
animatedjpeg_fotos[2] = "images/window_s8000iq_03.gif";
animatedjpeg_fotos[3] = "images/window_aluclip_00.gif";
animatedjpeg_fotos[4] = "images/window_aluclip_01.gif";
animatedjpeg_fotos[5] = "images/window_aluclip_02.gif";

var animatedjpeg_counter  = 0;

var animatedjpeg1_fotos = new Array();
animatedjpeg1_fotos[0] = "images/window_acrylcolor.gif";
animatedjpeg1_fotos[1] = "images/window_acrylcolor.gif";

var animatedjpeg1_counter  = 1;

var animatedjpeg2_fotos = new Array();
animatedjpeg2_fotos[0] = "images/trocal_campagne_00.gif";
animatedjpeg2_fotos[1] = "images/trocal_campagne_01.gif";
animatedjpeg2_fotos[2] = "images/trocal_campagne_02.gif";

var animatedjpeg2_counter  = 0;

function animateJpeg(strImagename, intTimedelay )
{
	document.images[strImagename].src =eval(strImagename + "_fotos[" + strImagename + "_counter]");
	eval(strImagename + "_counter++");
	if (eval(strImagename + "_counter >= " +strImagename + "_fotos.length"))
	{
		eval(strImagename + "_counter = 0;");
  }
  setTimeout("animateJpeg('" + strImagename + "'," +intTimedelay + ")",intTimedelay);
}

//////////////////////////////////////////////////////////////////////////
//Sequential fly-in text script


var pausebetweenmsg=10 //customize pause in miliseconds between each message showing up (3000=3 seconds)
var glidespeed=100 //customize glide speed in pixels per frame.

var curobjindex=0

function actualstyle(el, cssproperty){
	if (el.currentStyle)
	return el.currentStyle[cssproperty]
	else if (window.getComputedStyle){
	var elstyle=window.getComputedStyle(el, "")
	return elstyle.getPropertyValue(cssproperty)
	}
}

function collectElementbyClass(){
	var classname="glidetext"
	glidearray=new Array()
	var inc=0
	var alltags=document.all? document.all : document.getElementsByTagName("*")
	for (i=0; i<alltags.length; i++){
	if (alltags[i].className==classname)
	glidearray[inc++]=alltags[i]
	}
	if (glidearray.length>0)
	onebyoneglide()
}

function onebyoneglide(){
	if (curobjindex<glidearray.length)
	glidetimer=setInterval("glideroutine()",50)
}

function glideroutine(){
	if (parseInt(actualstyle(glidearray[curobjindex], "left"))<0)
	glidearray[curobjindex].style.left=parseInt(actualstyle(glidearray[curobjindex], "left"))+50
	else{
	glidearray[curobjindex].style.left=0
	curobjindex++
	clearInterval(glidetimer)
	setTimeout("onebyoneglide()", pausebetweenmsg)
	}
}

if (window.addEventListener)
window.addEventListener("load", collectElementbyClass, false)
else if (window.attachEvent)
window.attachEvent("onload", collectElementbyClass)
else if (document.getElementById)
window.onload=collectElementbyClass


