inicia = function(){
	alertSize();
}

window.onload = inicia;

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    myWidth = document.body.clientWidth;
  }
  if (myWidth < 1024){
	if (document.getElementById('topo')){document.getElementById('topo').style.marginTop = '0'};
	if (document.getElementById('footer')) {document.getElementById('footer').style.paddingBottom = '0'};
	} 
}

ainda_nao = function(){
alert("Ainda não estamos com clientes cadastrados. Em breve esta área estará disponível.");
return false;
}

  function veja_submenu(qual){
  some_todos();
		if (qual.parentNode.getElementsByTagName('span')[0].style.display == "block"){
		qual.parentNode.getElementsByTagName('span')[0].style.display = "none";
		qual.parentNode.style.backgroundImage = "url(http://hc-assessoriacontabil.com.br/imagens/seta-menu.gif)";
		} else {
		qual.parentNode.getElementsByTagName('span')[0].style.display = "block";
		qual.parentNode.style.backgroundImage = "url(http://hc-assessoriacontabil.com.br/imagens/seta-menu-baixo.gif)";
		}
	}
	
	function some_todos(){
		if(document.getElementById('menu_admin')){
		var num_li = document.getElementById('menu_admin').getElementsByTagName('li').length;
			for(i=0;i<num_li;i++){
				if(document.getElementById('menu_admin').getElementsByTagName('li')[i].getElementsByTagName('span')[0]){
				document.getElementById('menu_admin').getElementsByTagName('li')[i].getElementsByTagName('span')[0].style.display = "none";
				document.getElementById('menu_admin').getElementsByTagName('li')[i].style.backgroundImage = "url(http://hc-assessoriacontabil.com.br/imagens/seta-menu.gif)";
				}
			}
		}
	}


/////////// non XTO functions abaixo
function on(src) 
  {
   src.style.background = '#3B9FD2';
   src.style.cursor = 'hand';
}
function off(src) {

    
   src.style.background = '#4F7282';
}


//envio de form
function enviar()
{
frm = document.forms[0];
frm.texto.value = GetHtml();

frm.tipo.value = 'send';
frm.submit();

}

function showhide(what,what2){
var thisLevel = document.getElementById( what );
if(what2)
  var thisimage = document.getElementById( what2 );
if (thisLevel.style.display=='none'){
thisLevel.style.display= 'block';
//if(what2) thisimage.src=Open.src;
}
else{
thisLevel.style.display='none'
//if(what2) thisimage.src=Closed.src;
}
 
}