//Desenvolvido por Visual Planet Web
function hide(id,num)
{
	document.getElementById(id+num).style.display = "none";
}
function getPageScroll(){
	var yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// Todos outros Exploreres
		yScroll = document.body.scrollTop;
	}
	arrayPageScroll = new Array('',yScroll)
	return arrayPageScroll;
}
//
function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // Todos Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...tambem funciona para Explorer 6, Mozilla e Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// Todos exceto Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Modo Explorer 6
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // outros Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	// para páginas pequenas menores que a altura
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else {
		pageHeight = yScroll;
	}
	// para páginas pequenas menores que a largura
	if(xScroll < windowWidth){
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
	return arrayPageSize;
}
function carrega(nome,tm)
{
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	var boxTop = arrayPageScroll[1] + (arrayPageSize[3] / 15)+20;
	if (boxTop<210) boxTop=210;
	//arrayPageScroll[1] + (arrayPageSize[3] / 15)+50;
	document.getElementById('popup').style.top=boxTop+'px';
	document.getElementById('popup').style.width=tm+10+'px';
	document.getElementById('popup').innerHTML='<a href="#" onclick="document.getElementById(\'popup\').style.display=\'none\';return false;" class="fechar"><img src="imagens/fechar.gif" width="113" height="24" alt="Fechar" align="right" border="0" /></a><br style="clear:both"><center><img name="img" src="'+nome+'.jpg" id="big"></center><br style="clear:both">';
	document.getElementById('popup').style.display='block';
	var meio=tm/2;
	document.getElementById('popup').style.margin='0 -'+meio+'px 0 -'+meio+'px';
}