
function writeFlash( targetFlash, widthFlash, heightFlash, backFlash  ) {
	document.write( '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + widthFlash + '" height="' + heightFlash + '">');
	document.write( '<param name="allowScriptAccess" value="sameDomain" />' );
	document.write( '<param name="movie" value="' + targetFlash + '">' );
	document.write( '<param name="quality" value="high">' );
	document.write( '<param name="menu" value="false">' );
	
	if ( backFlash ) {
		document.write( '<param name="bgcolor" value="' + backFlash + '">' );
		document.write( '<embed src="' + targetFlash + '" quality="high" bgcolor="' + backFlash + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + widthFlash + '" height="' + heightFlash + '"></embed>' );
	} else {
		document.write( '<param name="wmode" value="transparent">' );
		document.write( '<embed src="' + targetFlash + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + widthFlash + '" height="' + heightFlash + '"></embed>' );
	}
		
	document.write( '</object>' );
}


function conta(max){ 
      document.getElementById("ctl00_ContentPlaceHolder1_caracteres").value=document.getElementById("ctl00_ContentPlaceHolder1_txt_Mensagem").value.length - 1;
      
      if (document.getElementById("ctl00_ContentPlaceHolder1_caracteres").value < 0)
            (document.getElementById("ctl00_ContentPlaceHolder1_caracteres").value = 0)
      
       if (document.getElementById("ctl00_ContentPlaceHolder1_txt_Mensagem").value.length > max)
            {
                alert("Numero de caracteres maximo excedido!");
                //alert(document.forms[0].txt_Mensagem.value.substr(document.forms[0].txt_Mensagem.length));
                document.getElementById("ctl00_ContentPlaceHolder1_txt_Mensagem").value = document.getElementById("ctl00_ContentPlaceHolder1_txt_Mensagem").value.substring(0, max);
            }
        
            
} 

function gotoPage(itemMenu)
{ 
    switch (itemMenu)
    {
        case 1:     // Home
            window.location = 'Default.aspx';
            break;
        case 2:     // A concessionária
            window.location = 'nova_empresa.html'
            break;
        case 3:     // Localização (Temporariamente sera usada a tela de concessionaria).
            window.location = 'novo_localizacao.html'
            break;
        case 4:     // Veículo Seminovos
            window.location = 'pgveiculoseminovo.aspx'
            break;
        case 5:     // Veículo novos
            window.location = 'pgVeiculoNovo.aspx'
            break;
        case 6:     // Peças Acessórios
            window.location = 'pecasacessorios.html'
            break;
        case 7:     // Fale Conosco
            window.location = 'pgfaleconosco.aspx'
            break;
        default : alert("outros");
    }

}

function go(link)
{
	window.location(link);
}
    
    