      var googleSearchIframeName = "cse-search-results";
      var googleSearchFormName = "cse-search-box";
      var googleSearchFrameWidth = 910;
      var googleSearchFrameHeight = 1000;
      var googleSearchDomain = "www.google.com.br";
      var googleSearchPath = "/cse";

      function randomAction()
      {
        var webmails = new Array("w2","w3","w4");
        document.form.action = "http://" + webmails[Math.floor(Math.random()*3)] + ".task.com.br/index.php";
        return true;
      }
      function escolheWebmail(opcao)
      {
	var webmail = opcao;
	// webmail 1 = antigo
	// webmail 2 = novo
	if(webmail==1){
	  document.getElementById("form_webmail_antigo").style.display = 'block';
	  document.getElementById("form_webmail_novo").style.display = 'none';
	}
	else{
	  document.getElementById("form_webmail_antigo").style.display = 'none';
	  document.getElementById("form_webmail_novo").style.display = 'block';
	}
        data = new Date();
        data.setTime(data.getTime()+(365*24*60*60*1000));
  	var o_cokie = "cookie_email= " + webmail + "; expires="+ data.toGMTString();
        document.cookie = o_cokie;
      }
      function trim(str)
      {
        return str.replace(/^\s+|\s+$/g,"");
      }
      function lerCookie()
      {
        var o_cookie = document.cookie;
        var quebra_de_linha = o_cookie.split(";");
	var o_webemail = 2;
	for (i in quebra_de_linha){
	  if  (trim(quebra_de_linha[i].split("=")[0])=="cookie_email"){
	    o_webemail = quebra_de_linha[i].split("=")[1];
	  }
        }
        return o_webemail;
      }

      function esconde_select(){
        var opcao = parseInt(lerCookie());
        escolheWebmail(opcao);
        if(trim(lerCookie()) == 1){
          document.getElementById("select_email_antigo").style.display = "block";
          document.getElementById("select_email_novo").style.display = "none";
        }else
        {
          document.getElementById("select_email_antigo").style.display = "none";
          document.getElementById("select_email_novo").style.display = "block";
        }
      }

      $(function() {
        $('#container').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'fast' });
        $('#container-1').tabs();
        $('#container-2').tabs();
        $('#container-3').tabs();

		$('#question_webmail').mouseover(function(){
			$('#balao_question_webmail').fadeIn();
		});
		$('#question_webmail').mouseout(function(){
			$('#balao_question_webmail').fadeOut();
		});
      });
