
function openWin( urlFile , winWidth , winHeight ) {

	window.open( urlFile , urlFile , '' );

}

function expandir( divId ) {

	// divName_link e divName_contents
	divIdLink = divId + '_link';
	divIdContents = divId + '_contents';
	divLink = document.getElementById(divIdLink);
	divContents = document.getElementById(divIdContents);
	
//	alert( divContents.style.display );
	
	if( divContents.style.display == 'none' )
	{
		divLink.style.display = 'none';
		divContents.style.display = 'block';
	}
	else
	{
		divLink.style.display = 'block';
		divContents.style.display = 'none';
	}
		
}

function formaPagto( divId ) {
	
	// Desabilita todos os formulárias de Pagamento
//	document.getElementById('pagtoVista').style.display = 'none';
	document.getElementById('pagtoBoleto').style.display = 'none';
	document.getElementById('pagtoCartao').style.display = 'none';
	
	// Habilita o formulário de pagamento específico
	if ( divId != null )
	{
		document.getElementById( divId ).style.display = 'block';
	}
	
}

function carregarCartao( cartao ) {

	// Especifica qual o icone e o id do layer cartao
	imgIcone = document.getElementById('icone');

	// Carrega o icone e o formulário especificado
	if( cartao == null || cartao == '' )
	{
		imgIcone.src = '';
		imgIcone.style.display = 'none';
	}
	else
	{
		imgIcone.src = 'images/compre/' + cartao + '.gif';
		imgIcone.style.display = 'block';
	}

}

function verMidias(exibir) {

	if( exibir )
	{
		document.getElementById('midias').style.display = 'block';
	}
	else
	{
		document.getElementById('midias').style.display = 'none';
	}

}

function teste() {
	
	objForm = document.forms[0];
	alertMsg = 'Formulário: \n';

	for( i=0 ; i<objForm.elements.length ; i++ )
	{
		alertMsg += '[' + i + '] ' + objForm.elements[i].name + ': ' + objForm.elements[i].type + '\n';
	}
	
	alertMsg = objForm.elements[15].value;

	alert( alertMsg );

}