<!--
function doesNameStartWith(itemName, itemPrefix) {
  return itemName.indexOf(itemPrefix) == 0;
}

function checkAll(frm, checkboxesPrefix, checked) {
  for (var i = 0; i < frm.elements.length; i++) {
    if (doesNameStartWith(frm.elements[i].name, checkboxesPrefix)) {
      frm.elements[i].checked = checked;
    }
  }
}

var tam=11;
function sizeFont(tipo){
    if (tipo=="mais"){
        if (tam < 36){
            tam+=5;
        }
    }else{
        if (tam > 6){
            tam-=5;
        }
    }

    document.getElementById('tx').style.fontSize=tam+'px' ;
}

function MuralPostar () {
    $('homeMural_recados').style.display = "none";
    $('homeMural_postar').style.display = "";
}

function MuralPostarClose () {
    $('homeMural_recados').style.display = "";
    $('homeMural_postar').style.display = "none";
}

function janelaSmiles(){
	$("jansmile").style.width = 250;
	$("jansmile").style.height = 85;
    $("jansmile").style.display = '';
    $("recado").style.display = 'none';
    $("jansmile").innerHTML = '<iframe src="smiles.html" name="janela_smiles" width="250" marginwidth="0" height="85" marginheight="0" scrolling="no" frameborder="0"></iframe>';
}

function janelaSmilesComents(){
	$("jansmile").style.width = 193;
	$("jansmile").style.height = 85;
    $("jansmile").style.display = '';
    $("recado").style.display = 'none';
    $("jansmile").innerHTML = '<iframe src="smiles.html" name="janela_smiles" width="193" marginwidth="0" height="85" marginheight="0" scrolling="no" frameborder="0"></iframe>';
}

function fechajansmile(){
    parent.$("recado").style.display = '';
	parent.$("jansmile").style.display = 'none';
	parent.$('recado').focus();
}

function smile(text) {
    if (document.forms[0].recado.createTextRange && document.forms[0].recado.caretPos) {
        var caretPos = document.forms[0].recado.caretPos;
        caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?
        text + '' : text;
    } else {
        document.forms[0].recado.value += text;
        document.forms[0].recado.focus(caretPos);
    }
    
    $("recado").style.display = '';
	$('recado').value=texto+img;
	$('recado').focus();
	$("jansmile").style.display = 'none';
	
	$("jansmile").innerHTML =  '<span id="jansmile" style="position:relative; left:0px; top:0px; width:10px; height:10px; z-index:2; background-color: #FFFFFF; display: none;"></span>';
}

function enviasmile(img){
	var texto = parent.$('recado').value;
	img = ' ' + img + ' ';
	parent.$('recado').value=texto+img;
	
	parent.$("recado").style.display = '';
	parent.$("jansmile").style.display = 'none';
	parent.$('recado').focus();
}
function $(s) {
	return document.getElementById(s);
}
function AbrirJanela(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openCobertura(id) {
  window.open("galeria.php?id="+id,"zm_flyer","width=780,height=650,top=10,left=50");
}
function abrirpopupcentralizado(vUrl,vName,vPosFimX,vPosFimY,vScrollBars,vResizable,vRetorno)
{
  //calcula posição de abertura da janela em relação à tela
  vPosIniX=((screen.availWidth/2)-(vPosFimX/2));
  vPosIniY=((screen.availHeight/2)-(vPosFimY/2));
  //abre a janela pop up
  window.open(vUrl,vName,'toolbar=0,location=0,directories=0,menubar=0,scrollbars='+vScrollBars+',resizable='+vResizable+',top='+vPosIniY+',left='+vPosIniX+',width='+vPosFimX+',height='+vPosFimY+'');
  if (vRetorno==null)
  {
    //não retorna nada
  }
  else
  {
    //retorna qualquer coisa que você definir em vRetorno 
    //obs.: aplicavel ao caso de querer retornar uma outra função ou o valor de outra função
    return vRetorno;
  };
};
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

