function popup(pagina,w,h,s) {
	if (self.screen) { 
		sw = screen.width
		sh = screen.height
		cx = (.5*sw) - (w*.5)
		cy = (.5*sh) - (h*.5)
		var  dimentions_and_such = 'width='+w+','+'height='+h+',' + 'screenX=' +cx+','+'screenY='+cy+','+'left='+cx+','+'top='+cy+',scrollbars='+s
	}
	Pop=window.open(pagina,"popacon",dimentions_and_such);
}

function deleteItem(classe,id,campo){
	if (confirm("Deseja realmente excluir?")){
		document.getElementById("TMPiframe").src='deleteItem.php?classe='+classe+'&id='+id+'&campo='+campo;
	}
}

function removeRecord(field, value) {
	field.value = value;
	field.form.submit();
}

function toggleShowImages(objDiv)
{
	if(Galasse.$(objDiv).style.display == 'none' || Galasse.$(objDiv).style.display == '') {
		Galasse.$(objDiv).style.display = 'block';
		Galasse.$('imgAccordion').src = 'images/bt_accordion_on.gif';
		Galasse.$('btnAddImage').style.display = 'block';
	} else {
		Galasse.$(objDiv).style.display = 'none';
		Galasse.$('imgAccordion').src = 'images/bt_accordion_off.gif';
		Galasse.$('btnAddImage').style.display = 'none';
	}
}

var overAtual = 0;
function Over(param)
{
	switch(param)
	{
		case 1:
			pos = 'center';
			$("#box-contato").css('display','block');
			overAtual = 1;
			break;
		case 2:
			pos = 'bottom';
			$("#box-sobre").css('display','block');
			overAtual = 2;
			break;
		default:
			overAtual = 0;
			pos = 'top';
			break;
	}
	$(".info").css('background-position',pos);
}

function MouseOut(e) {
	e = e||window.event;
	target = e.target || e.srcElement;
	if(overAtual != 0) {
		if(target.id != 'box-contato' && target.id != 'box-sobre') {
			if(target.parentNode.id != 'box-contato' && target.parentNode.id != 'box-sobre' && target.parentNode.parentNode.id != 'box-contato')
			{
				if(target.id != ('item'+overAtual))
				{
					$('#box-contato').css('display','none');
					$('#box-sobre').css('display','none');
					$(".info").css('background-position','top');
				}
			}
		}
	}
}
document.onmousemove = MouseOut;

