// JavaScript Document


<!-- FORMULARIO -->
function inFocus(el) {
    if(el.value == "Nome")
        el.value = "";
    if(el.value == "E-mail")
        el.value = "";
    if(el.value == "Telefone")
        el.value = "";
}

function outFocus(el) {
    if(el.value == "") {
        if(el.name == "txtNome")
            el.value = "";
        if(el.name == "txtEmail")
            el.value = "";
        if(el.name == "txtTelefone")
            el.value = "";
    }
}

function submitForm(frm) {
    for(i=0; i < frm.elements.length; i++) {
        var item = frm.elements[i];
        if( ( item.type == "text" && item.value == "" ) ||
            ( frm["txtNome"].value == "Nome" || frm["txtEmail"].value == "E-mail" || frm["txtTelefone"].value == "Telefone" ) ) {
            alert("Preencha todos os campos para contato.");
            return false;
        }
    }
    document.getElementById("btnSubmit").disabled = "disabled";
}

function openWindow(url, name)
{ var winWidth = 488;
  var winHeight = 548;
  var winTop = parseInt((screen.availHeight - winHeight) / 2);
  var winLeft = parseInt((screen.availWidth - winWidth) / 2);
                                 
  popupWin = window.open(url,name,"width=" + winWidth + ",height=" + winHeight + ",top=" + winTop + ",left=" + winLeft + ",resizable=no,scrollbars=no,statusbar=no");
  if (popupWin.opener == null) popupWin.opener = self;
}

function fechaBanner(id) {
	document.getElementById(id).style.display = "none";
}

function abreBanner(id) {
	document.getElementById(id).style.display = "block";
}

function gambiFlash(param1, param2) {
	abreBanner(param1);
	fechaBanner(param2);
}

function myJSGotoAndStop(obj1, param1, obj2) {
	
	alert([obj1, param1]);

	abreBanner(obj1);
	
	var div = document.getElementById(obj1),
		flash1 = div.getElementsByTagName("object")[0];

    flash1.SetVariable("_root.goStop", param1);
	fechaBanner(obj2);
	
    return false;
}

/*
banner
getURL("javascript:myJSGotoAndStop('splash','true','banner','false')");

splash
getURL("javascript:myJSGotoAndStop('banner','true','splash','false')");
*/

/*
Correctly handle PNG transparency in Win IE 5.5 & 6.
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.

Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!–[if lt IE 7]>
<script defer type=”text/javascript” src=”pngfix.js”></script>
<![endif]–>
*/


