// este script é chamado do letreiro.js
// caso contrário, incluir, onload=init()

var zoomimage =  "images/asselegis2.gif"
var widthimg = 359
var heightimg = 114
var imgpreload= new Image()
imgpreload.src=zoomimage

var zoomfactor= 9
var positionleft=0
var positiontop=20
var timer
var marginright=0
var i_fadestrength=5
var i_images=0
var step=1
var content
var imageboxwidth=0
var imageboxheight=0


function init() {
	if (document.layers) {
		content="<img src='images/asselegis2.gif'>";
		 document.layers["netscape"].document.open();
              document.layers["netscape"].document.write(content);
              document.layers["netscape"].document.close();
   
	}	

	else {
	content="<img name='newpic' src='" + zoomimage + "'>"
	imagebox.innerHTML=content
	timer=setTimeout("resizeimage()",50)
	}
}


// Zoom Image

function resizeimage() {
	if (imageboxwidth<widthimg) {
		if (imageboxwidth+zoomfactor>widthimg) {
			imageboxwidth=widthimg
		}
		else {
			imageboxwidth+=zoomfactor
		}
	content="<img name='newpic' src='" + zoomimage + "' width='"+imageboxwidth+"'>"
	imagebox.innerHTML=content
	imageboxwidth=document.newpic.width
	imageboxheight=document.newpic.height
//	imagebox.filters.alpha.opacity=Math.floor(100-i_fadestrength)
	document.all.imagebox.style.posLeft=positionleft
	document.all.imagebox.style.posTop=positiontop
	document.all.imagebox.style.overflowX="hidden"
	document.all.imagebox.style.visibility="visible"
	step+=1.5
	i_fadestrength+=step
	timer=setTimeout("resizeimage()",50)
}
else {
	paraImagem()
}

}

// Pára imagem opaca após a 1a. etapa

function paraImagem() {

	content="<img name='newpic' src='" + zoomimage +  "' width=' "+widthimg+"' height= '"+heightimg+"'>"
	//content="<img name='newpic' src='" + zoomimage + "' width='"+imageboxwidth+"'>"


	imagebox.innerHTML=content
	imageboxwidth=document.newpic.width
	imageboxheight=document.newpic.height
//	imagebox.filters.alpha.opacity=Math.floor(100-i_fadestrength)
	document.all.imagebox.style.posLeft=positionleft
	document.all.imagebox.style.posTop=positiontop
	document.all.imagebox.style.overflowX="hidden"
	document.all.imagebox.style.visibility="visible"
}


if (document.all) {
	onload=init
}


