// Java que faz os mouse serem over
// *******************************************************************
// * soopa-rollovers.js
// * 7/28/2001
// * www.youngpup.net
// *
// * easiest rollovers on earth, baby!
// * see www.youngpup.net for documentation.
// *******************************************************************
function soopaSetup() {
	var img, sh, sn, sd;
	for (var i = 0; (img = document.images[i]); i++) {
		if (img.getAttribute) {

			sn = img.getAttribute("src");
			sh = img.getAttribute("hsrc");
			sd = img.getAttribute("dsrc");

			if (sn != "" && sn != null) {
				img.n = new Image();
				img.n.src = img.src;
			
				if (sh != "" && sh != null) {
					img.h = new Image();
					img.h.src = sh;
					img.onmouseover = soopaSwapOn;
					img.onmouseout  = soopaSwapOff;
				}

				if (sd != "" && sd != null) {
					img.d = new Image();
					img.d.src = sd;
					img.onmousedown = soopaSwapDown;
				}
			}
		}
	}
}

function soopaSwapOn() {
	this.src = this.h.src;
}

function soopaSwapOff() {
	this.src  = this.n.src;
}

function soopaSwapDown() {
	this.src  = this.d.src;
	this.temp = typeof(document.onmouseup) != 'undefined' && typeof(document.onmouseup) != 'unknown' ? document.onmouseup : "";
	soopaSwapUp.img = this;
	document.onmouseup = soopaSwapUp;
}

function soopaSwapUp() {
	var ths = soopaSwapUp.img;
	ths.src = ths.n.src;
	if (ths.temp) document.onmouseup = ths.temp;
}



function MostraEsconde(idMostra, idEsconde) {
	if (idMostra) {
		var a = idMostra.split(/\W/);
		for (var i in a) {
			var e = document.all && document.all[a[i]] || document.getElementById && document.getElementById(a[i]);
			if (e)
				e.style.display = '';
		}
	}
	if (idEsconde) {
		var a = idEsconde.split(/\W/);
		for (var i in a) {
			var e = document.all && document.all[a[i]] || document.getElementById && document.getElementById(a[i]);
			if (e)
				e.style.display = 'none';
		}
	}
}

function submenuPort(mostra) {
	
	if (mostra) {
	
		MostraEsconde('subMenuPort','');
		
	}
	else {
		
		MostraEsconde('','subMenuPort');
		
	}
}


function AbrirImagem(caminho) {
	
	if(window.navigator.userAgent.indexOf("MSIE") > -1) {
	
		Modalbox.show('<img src='+caminho+' />',{title: this.title});
	
	} else {
	
		Modalbox.show('<img src='+caminho+' />',{title: this.title, height:'auto'});
	
	}
}

function AbrirImagemPortfolio(caminho, legenda) {
	
	if(window.navigator.userAgent.indexOf("MSIE") > -1) {
	
		Modalbox.show('<img src='+caminho+' /><br /><p>'+legenda+'</p>',{title: this.title});
	
	} else {
	
		Modalbox.show('<img src='+caminho+' /><br /><p>'+legenda+'</p>',{title: this.title, height:'auto'});
	
	}
}


function AbrirTransformacao(transItem) {

	if(window.navigator.userAgent.indexOf("MSIE") > -1) {
	
		Modalbox.show("modal_transformacao.asp?intPosicao="+transItem, {title: this.title, width: 600});
	
	} else {
	
		Modalbox.show("modal_transformacao.asp?intPosicao="+transItem, {title: this.title, width: 600, height: 'auto'});
	
	}
}

function AbrirImprensa(caminho) {
	
	if(window.navigator.userAgent.indexOf("MSIE") > -1) {
	
		Modalbox.show(caminho, {title: this.title, width: 760});
			
 	} else {
	
		Modalbox.show(caminho, {title: this.title, width: 760, height: 'auto'});
	
	}
}