// JavaScript Document

function drawInput(type) {
	var obj = '';
	switch(type) {
		case 1: 
			obj = '<input type="text" size="15" class="inputTexto">';
		break;
		case 2:
			obj = '<textarea cols="63" rows="9" class="inputTexto"></textarea>';
		break;
		case 3:
			obj = '<input type="reset" value="limpar" class="botao">';
		break;
		case 4:
			obj = '<input type="submit" value="enviar" class="botao">';		
		break;
	}
	document.write('<table  border="0" cellspacing="0" cellpadding="0"><tr><td><img src="imagens/upLeft.gif" alt=""></td>')
	document.write('<td valign="top"><img src="imagens/1x1W.gif" height="1" width="100%" alt=""></td>')
	document.write('<td><img src="imagens/upRight.gif" alt=""></td></tr>')
	document.write('<tr><td style="border-left:1px solid #FFFFFF;">&nbsp;</td>')
    document.write('<td align="center">' + obj + '</td><td style="border-right:1px solid #FFFFFF">&nbsp;</td></tr>')	
	document.write('<tr><td><img src="imagens/downLeft.gif" alt=""></td>')
	document.write('<td valign="bottom"><img src="imagens/1x1W.gif" height="1" width="100%"  alt=""></td>')
	document.write('<td><img src="imagens/downRight.gif"  alt=""></td></tr></table>')
}

function drawMenu(type) {
	var obj = '';
	switch(type) {
		case 1:
			obj = '<p style="width:143px;"><a href="javascript:void(0);" class="aMenu" onClick="divEstado.style.visibility=\'visible\'">estados</a></p>';
		break;
	}
	document.write('<table  border="0" cellspacing="0" cellpadding="0"><tr><td><img src="imagens/upLeftL.gif" alt=""></td>')
	document.write('<td valign="top"><img src="imagens/1x1W.gif" height="1" width="100%" alt=""></td>')
	document.write('<td><img src="imagens/upRightL.gif" alt=""></td></tr>')
	document.write('<tr><td style="border-left:1px solid #FFFFFF;">&nbsp;</td>')
    document.write('<td align="center">' + obj)
	document.write('</td><td style="border-right:1px solid #FFFFFF">&nbsp;</td></tr>')	
	document.write('<tr><td><img src="imagens/downLeftL.gif" alt=""></td>')
	document.write('<td valign="bottom"><img src="imagens/1x1W.gif" height="1" width="100%"  alt=""></td>')
	document.write('<td><img src="imagens/downRightL.gif"  alt=""></td></tr></table>')	
}

// opção para desenhar separados topo, objeto e rodapé

function drawTopo(cor) {
	if(cor=='v') {
		upLeft='upLeft.gif';
		upRight='upRight.gif';
	}
	else if(cor=='l') {
		upLeft='upLeftL.gif';
		upRight='upRightL.gif'
	}
	document.write('<table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="imagens/' + upLeft + '" alt=""></td>')
	document.write('<td valign="top"><img src="imagens/1x1W.gif" height="1" width="100%" alt=""></td>')
	document.write('<td><img src="imagens/' + upRight + '" alt=""></td></tr>')
	document.write('<tr><td style="border-left:1px solid #FFFFFF;"><img src="imagens/1x1T.gif" width="1" alt=""></td><td align="center" height="1">')
}

function drawRodape(cor) {
	if(cor=='v') {
		downLeft='downLeft.gif';
		downRight='downRight.gif';
	}
	else if(cor=='l') {
		downLeft='downLeftL.gif';
		downRight='downRightL.gif';
	}
	document.write('</td><td style="border-right:1px solid #FFFFFF"><img src="imagens/1x1T.gif" width="1" alt=""></td></tr><tr><td><img src="imagens/'+ downLeft + '" alt=""></td>')
	document.write('<td valign="bottom"><img src="imagens/1x1W.gif" height="1" width="100%" alt=""></td>')
	document.write('<td><img src="imagens/'+ downRight + '"  alt=""></td></tr></table>')
}