function abre_janela(url,nome,parametros){

	nova_janela = window.open(url,nome,parametros);
	if (window.focus) {nova_janela.focus()}
	return false;
//exemplo: abre_janela('url.html','nome','height=200,width=150');

}


function chama_flash(tipo){
var tipo;
if(tipo == "home")
{

if (screen.width < 801)
{
LoadFlash("home_master_01.swf","755","95","left");
}
else if (screen.width < 1025)
{
LoadFlash("home_master_02.swf","963","160","left");
}
else if (screen.width < 1153)
{
LoadFlash("home_master_03.swf","1140","160","left");
}

else if (screen.width < 1281)
{
LoadFlash("home_master_04.swf","1211","160","left");
}

///////////////////////////////////////////////////////////////////////////////
}
else
{
///////////////////////////////////////////////////////////////////////////////

if (screen.width < 801)
{
LoadFlash("dentro_master_01.swf?letreiro=texto&area=contatos","755","95","left");
}
else if (screen.width < 1025)
{
LoadFlash("dentro_master_02.swf?letreiro=texto&area=empresa","963","123","left");
}
else if (screen.width < 1153)
{
LoadFlash("dentro_master_03.swf?area=solucoes&letreiro=contatos","1140","123","left");
}
else if (screen.width < 1281)
{
LoadFlash("dentro_master_04.swf?area=solucoes&letreiro=contatos","1211","123","left");
}


}

}

//------------- favoritos ---------------------------------------
function addFav(){
    var url        = "http://www.kconsulting.com.br";
    var title    = "Kraft Consulting - Consultoria, ERP, BI e Web";
    if (window.sidebar) window.sidebar.addPanel(title, url,"");
    else if(window.opera && window.print){
        var mbm = document.createElement('a');
        mbm.setAttribute('rel','sidebar');
        mbm.setAttribute('href',url);
        mbm.setAttribute('title',title);
        mbm.click();
    }
    else if(document.all){window.external.AddFavorite(url, title);}
}


//-------------- tamanho da fonte ---------------------------------

function sizeFont2 (elem, acao)
{
    // tamanho inicial da fonte (em px)
    var tamInic = 10;
    // Tamanho mínimo da fonte (em px)
    var tamMin = 10;
    // Tamanho máximo da fonte (em px)
    var tamMax = 22;
   // Pega o tamanho da fonte. Se não foi setada ainda (primeira vez
    // que a função é executada) terá como tamanho padrão 'tamInic'.
    if (document.getElementById(elem).style.fontSize == "") 
      var tamFonte = tamInic;
    else
      var tamFonte = parseInt(document.getElementById(elem).style.fontSize);
    switch (acao)
    {
      // Aumenta o tamanho, enquanto foi menor que 'tamMax'
      case '+':
        if (tamFonte < tamMax)
          document.getElementById(elem).style.fontSize = (tamFonte + 2) + "px";
      break;
      
      // Diminui o tamanbo, enquanto for maior que 'tamMin'
      case '-':
        if (tamFonte > tamMin)
          document.getElementById(elem).style.fontSize = (tamFonte - 2) + "px";
      break;
    }
}

//------------ usado no menu de utilitários ------------------------------

function mostra_esconde(valor,valor_02){
var valor = valor;
if(document.getElementById(valor).style.display == 'none'){
document.getElementById(valor).style.display = '';
//document.getElementById(valor_02).style.display = 'none';
}else{
document.getElementById(valor).style.display = 'none';
//document.getElementById(valor_02).style.display = '';
};
}


//---------------- menu principal ---------------------------------

<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			
		}
		
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

// --------------------- tira borda flash

function LoadFlash2(caminho)
{
	
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" >');
    document.write('<param name="movie" value="'+caminho+'">');
    document.write('<param name="quality" value="high">'); 
    document.write('<param name="wmode" value="transparent">');
    document.write('<param name="menu" value="false">');
    document.write('<param name="allowScriptAccess" value="sameDomain" />');
    document.write('<embed src="'+caminho+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%"></embed>');
    document.write('</object>');
}	


function LoadFlash(caminho,largura,altura,lado)
{
    document.write('<object style="float:'+lado+';" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'">');
    document.write('<param name="movie" value="'+caminho+'">');
    document.write('<param name="quality" value="high">'); 
    document.write('<param name="wmode" value="transparent">');
    document.write('<param name="menu" value="false">');
    document.write('<embed src="'+caminho+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
    document.write('</object>');
}






<!-- lixão 
/*if (screen)
{
if (screen.width < 641)
//document.write('<body background="small.gif">\n');
alert('menor que 641');
else if (screen.width < 801)
//document.write('<BODY BACKGROUND="bigger.gif">\n');
alert('menor que 801');
else if (screen.width < 1025)
//document.write('<BODY BACKGROUND="wowee.gif">\n');
alert('menor que 1025');
}
else
document.write('<body background="bigger.gif">\n');




function checa_formulario(icqlist){
if (icqlist.nome.value == ""){
alert("Por favor coloque seu nome !!!");
icqlist.nome.focus();
return (false);
}
if (icqlist.endereco.value == ""){
alert("O campo endereço está vazio !!!");
icqlist.endereco.focus();
return (false);
}
if (icqlist.email.value.indexOf('@', 0) == -1){
alert("O e-mail colocado é ivalido !!!");
icqlist.email.focus();
return (false);
}
if (icqlist.cidade.value == ""){
alert("O campo cidade está vazio !!!");
icqlist.cidade.focus();
return (false);
}
if (icqlist.estado.value == ""){
alert("Por favor selecione seu estado !!!");
icqlist.estado.focus();
return (false);
}
if (icqlist.fone.value == ""){
alert("O campo telefone está vazio !!!");
icqlist.fone.focus();
return (false);
}
if (icqlist.cep.value == ""){
alert("O campo CEP está vazio !!!");
icqlist.cep.focus();
return (false);
}
if (icqlist.assunto.value == ""){
alert("O campo assunto está vazio !!!");
icqlist.assunto.focus();
return (false);
}
if (icqlist.comentarios.value == ""){
alert("Por favor deixe seu comentário !!!");
icqlist.comentarios.focus();
return (false);
}
return (true);
}


//ajax
function clientSideInclude(id, url) {
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
} else if (window.ActiveXObject) {
// For Internet Explorer on Windows
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
req = false;
}
}
}
var element = document.getElementById(id);
if (!element) {
alert("Bad id " + id + 
"passed to clientSideInclude." +
"You need a div or span element " +
"with this id in your page.");
return;
}
if (req) {
// Synchronous request, wait till we have it all
req.open('GET', url, false);
req.send(null);
element.innerHTML = req.responseText;
} else {
element.innerHTML =
"Sorry, your browser does not support " +
"XMLHTTPRequest objects. This page requires " +
"Internet Explorer 5 or better for Windows, " +
"or Firefox for any system, or Safari. Other " +
"compatible browsers may also exist.";
}
}

*/
//-->

