var openDiv = null;
var last = '';

function showDiv(object, width, height) {
	//centrar o popup na horizontal
	if(window.innerWidth) {
		document.getElementById(object).style.left = ((window.innerWidth / 2) - (width / 2)) + 'px';
	} else {
		document.getElementById(object).style.left = ((document.body.offsetWidth / 2) - (width / 2)) + 'px';
	}
	
	//centrar o popup na vertical
	if(window.innerHeight) {
		//document.getElementById(object).style.top = ((window.innerHeight / 2) - (height / 2)) + 'px';
		document.getElementById(object).style.top =  height + 'px';
	} else {
		//document.getElementById(object).style.top = ((document.body.offsetHeight / 2) - (height / 2)) + 'px';
		document.getElementById(object).style.top =  height + 'px';
	}
	
	scrollTo(0,0);
	document.getElementById(object).style.display = 'block';
	document.getElementById('overlayDiv').style.display = 'block';
	
	
	openDiv = object;
}

function hideDiv(object) {
	document.getElementById(object).style.display = 'none';
	openDiv = null;
	document.getElementById('overlayDiv').style.display = 'none';
}
