function init(){
	wW = (is.ns)? window.innerWidth-20 : document.body.offsetWidth
	wH = (is.ns)? window.innerHeight-20 : document.body.offsetHeight

	if(is.ns){
	origWidth=innerWidth;
	origHeight=innerHeight;
	onresize=function(){
		if(innerWidth!=origWidth||innerHeight!=origHeight)
		location.reload()
		}
	}
	Lnada = new DynLayer("LnadaDiv");
	Lnada.moveTo(0,0)
	Lnada.clipTo(0,wW,wH,0);
	Lcuerpo = new DynLayer("LcuerpoDiv");
	Lcuerpo.moveTo(0,wH/2-200)
	Ldatos = new DynLayer("LdatosDiv");
	Ldatos.moveTo(170,wH/2+2)
	
	if (is.ns) {
    	if(location.reload)
		Lnada.hide();
		coMienza();
	}
    if (is.ie) {
    	if(document.all)
		Lnada.hide();
		coMienza();
	}	
	carga();
}
function IP_swapImgRestore() {  
  var i,x,a=document.IP_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function IP_findObj(n, d) {  
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=IP_findObj(n,d.layers[i].document); return x;
}

function IP_swapImage() {  
  var i,j=0,x,a=IP_swapImage.arguments; document.IP_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=IP_findObj(a[i]))!=null){document.IP_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function IP_preloadImages() {  
  var d=document; if(d.images){ if(!d.IP_p) d.IP_p=new Array();
    var i,j=d.IP_p.length,a=IP_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.IP_p[j]=new Image; d.IP_p[j++].src=a[i];}}
}
function OpenVentaNa(P_pagina,N_ancho,N_alto,N_barra,N_amplia) {
		window.open(P_pagina, 'dy', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+N_barra+',width='+N_ancho+',height='+N_alto+',left=0,top=110,screenLeft=110,screenTop=110,resizable='+N_amplia+'');
}
function carga(){

	IP_preloadImages('img/tproductos.gif','img/tservicios.gif','img/tdelegaciones.gif','img/tproductosact.gif','img/tserviciosact.gif','img/tdelegacionesact.gif','img/prod1.jpg','img/prod2.jpg','img/prod3.jpg','img/prod4.jpg','img/prod5.jpg','img/prod6.jpg','img/prod7.jpg','img/prod8.jpg','img/prod9.jpg','img/pix.gif','img/hfond1.gif','img/logearhome.gif','img/hfond2.jpg','img/hendcelda1.gif','img/hendcelda2.gif','img/hendcelda3.gif','img/hendcelda4.gif','img/hendcelda5.gif','img/hendcelda6.gif','img/hendcelda7.gif','img/hendcelda8.gif','img/hendcelda9.gif','img/hendcelda10.gif','img/hfond2.gif','img/hfond3.jpg','img/bbostonact.gif','img/bboston.gif','img/bcelestionact.gif','img/bfujitsuact.gif','img/bfujitsu.gif','img/bjblact.gif','img/bjbl.gif','img/bkefact.gif','img/bkef.gif','img/bmissionact.gif','img/bmission.gif','img/bnakamichiact.gif','img/bnakamichi.gif','img/bonkyoact.gif','img/bonkyo.gif','img/bortofonact.gif','img/bortofon.gif','img/bteacact.gif','img/bteac.gif');
}
// (C) 2003 by CodeLifter.com
// Free for all users, but leave in this header.197

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 5000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 2;

var Picture = new Array();
var Caption = new Array();
var showHot = false;

Picture[1]  = 'img/prod0.gif';

Caption[1]  = "";
/*
Picture[1]  = 'img/prod1.jpg';
Picture[2]  = 'img/prod2.jpg';
Picture[3]  = 'img/prod3.jpg';
Picture[4]  = 'img/prod4.jpg';
Picture[5]  = 'img/prod5.jpg';
Picture[6]  = 'img/prod6.jpg';
Picture[7]  = 'img/prod7.jpg';
Picture[8]  = 'img/prod8.jpg';
Picture[9]  = 'img/prod9.jpg';
Picture[10]  = 'img/prod10.jpg';
Picture[11]  = 'img/prod11.jpg';
Picture[12]  = 'img/prod12.jpg';
Picture[13]  = 'img/prod13.jpg';
Picture[14]  = 'img/prod14.jpg';
Picture[15]  = 'img/prod15.jpg';
Picture[16]  = 'img/prod16.jpg';
Picture[17]  = 'img/prod17.jpg';

Caption[1]  = "";
Caption[2]  = "";
Caption[3]  = "";
Caption[4]  = "";
Caption[5]  = "";
Caption[6]  = "";
Caption[7]  = "";
Caption[8]  = "";
Caption[9]  = "";
Caption[10]  = "";
Caption[11]  = "";
Caption[12]  = "";
Caption[13]  = "";
Caption[14]  = "";
Caption[15]  = "";
Caption[16]  = "";
Caption[17]  = "";
*/

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;
//if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('runSlideShow()', SlideShowSpeed);
}
function coMienza(){
	runSlideShow();
}
