<!--

// función que redimensiona una ventana en Netscape

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


// función que despliega pop up desde flash
function openWindow(url, w, h) {
var windowprop = "width=" + w + ",height=" + h + ",scrollbars=1";
popup = window.open(url,'remote',windowprop);
}

//función que reconoce el ancho de pantalla
function pantalla(){
	if (screen.width==800){
		alto = 220;
	}
}


// función que despliega los banners rotatorios

function create(){
	this.scr = '';
	this.href = '';
	this.mouseover = '';
}

// función que crea carga los banners a los distintos arrays
function banner(){
	ads = new Array();
	for (var i=0;i<=12;i++){ ads[i] = new create();}
	
	ads[0].src= 'blythe.gif';
	ads[0].href = 'http://www.wm-blythe.co.uk/';
	ads[0].mouseover = 'William Blythe Web Site';
	
	ads[1].src= 'bm.gif';
	ads[1].href = 'http://www.brunnermond.com/';
	ads[1].mouseover = 'The World of Brunner Mond';
	
	//ads[2].src= 'borax.gif';
	//ads[2].href = 'http://www.borax.com/';
	//ads[2].mouseover = 'Borax Web Site';
	
	ads[2].src= 'aetfilms.gif';
	ads[2].href = 'http://www.aetfilms.com/';
	ads[2].mouseover = 'Aet Films Web Site';
	
	ads[3].src= 'chance_hunt.gif';
	ads[3].href = 'http://www.chance-hunt.com/';
	ads[3].mouseover = 'Chance & Hunt Web Site';
	
	//ads[4].src= 'dupont.gif';
	//ads[4].href = 'http://www.dupont.com/';
	//ads[4].mouseover = 'Dupont, The Miracles of Science';
	
	ads[4].src= 'solarfine.gif';
	ads[4].href = 'http://www.solarfine.com.tw/';
	ads[4].mouseover = 'Solar Fine Web Site';
	
	ads[5].src= 'e_e.gif';
	ads[5].href = 'http://www.elliseverard.co.uk/';
	ads[5].mouseover = 'Ellis & Everard Web Site';
	
	ads[6].src= 'haifa.gif';
	ads[6].href = 'http://www.haifachem.co.il/';
	ads[6].mouseover = 'Haifa Chemicals Web Site';
	
	ads[7].src= 'lucite.gif';
	ads[7].href = 'http://www.luciteinternational.com/';
	ads[7].mouseover = 'Lucite International Web Site';
	
	ads[8].src= 'krauss.gif';
	ads[8].href = 'http://www.krauss-maffei.de/';
	ads[8].mouseover = 'Krauss Maffei Web Site';
	
	ads[9].src= 'snf.gif';
	ads[9].href = 'http://www.snf.fr/';
	ads[9].mouseover = 'SNF Floerger, the world and water';
	
	//ads[10].src= 'uniqema.gif';
	//ads[10].href = 'http://www.uniqema.com/';
	//ads[10].mouseover = 'Uniqema Web Site';

    ads[10].src= 'holliday.gif';
	ads[10].href = 'http://www.holliday-pigments.com/';
	ads[10].mouseover = 'Holliday Pigments Web Site';

	
    ads[11].src= 'genetron.gif';
	ads[11].href = 'http://www.genetron.com/';
	ads[11].mouseover = 'Genetron lider';

    ads[12].src= 'ineoschlor.gif';
	ads[12].href = 'http://www.ineoschlor.com/';
	ads[12].mouseover = 'Ineos Chlor Web Site';
	aleatorio();
}


// función que saca los 4 números aleatorios
function aleatorio(){

	a = 13;
	b = 13;
	c = 13;
	d = 13;

	while (a > 12){
			while (b > 12){
					while (c > 12){
							while (d > 12){
								var w = Math.random() + '';
								w = w*100;
								d = parseInt(w);
							}
						var x = Math.random() + '';
						x = x*100;
						c = parseInt(x);
						if (c==d){c = 13;}
					}
				var y = Math.random() + '';
				y = y*100;
				b = parseInt(y);
				if (b == c || b == d){b = 13;}
			}
		var z = Math.random() + '';
		z = z*100;
		a = parseInt(z);
		if (a == b || a == c || a == d) {a = 13;}
	}
	if (navigator.appVersion.indexOf("IE") != -1){
			document.all.link1.href = ads[a].href;
			document.all.link2.href = ads[b].href;
			document.all.link3.href = ads[c].href;
			document.all.link4.href = ads[d].href;
	}
	else {
			
	}
	
	document.banner1.src = "images/banners/" + ads[a].src;
	document.banner2.src = "images/banners/" + ads[b].src;
	document.banner3.src = "images/banners/" + ads[c].src;
	document.banner4.src = "images/banners/" + ads[d].src;

	window.setTimeout('aleatorio();',5000);
	

	//var ad1 = '<a href="'+ ads[a].href +'"  target="_top"><img src="images/banners/'+ ads[a].src +'" width="162" height="36" border="0">';
	//var ad2 = '<a href="'+ ads[b].href +'"  target="_top"><img src="images/banners/'+ ads[b].src +'" width="162" height="36" border="0">';
	//var ad3 = '<a href="'+ ads[c].href +'"  target="_top"><img src="images/banners/'+ ads[c].src +'" width="162" height="36" border="0">';
	//var ad4 = '<a href="'+ ads[d].href +'"  target="_top"><img src="images/banners/'+ ads[d].src +'" width="162" height="36" border="0">';
	
    /*document.write("<br>");
	document.write(ad1);
	document.write("<br><br>");
	document.write(ad2);
	document.write("<br><br>");
	document.write(ad3);
	document.write("<br><br>");
	document.write(ad4);*/
}
//-->