 function isArray(a)
 {
  return isObject(a) && a.constructor == Array;
 }

 function isObject(a)
 {
     return (typeof a == 'object' && !!a) || isFunction(a);
 }
  function isFunction(a)
 {
      return typeof a == 'function';
 }

 function pop(link){

	return window.open(link,'','width=730,height=600,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=' + ((screen.width-730)/2) + ',top=' + ((screen.height-600)/2) + ',scrollbars=yes');
} 


function ShowHide(id1, id2) {
  if (id1 != '') expMenu(id1);
  if (id2 != '') expMenu(id2);
}

function expMenu(id) {
  var itm = null;
  if (document.getElementById) {
    itm = document.getElementById(id); 
  } else if (document.all){
    itm = document.all[id];
  } else if (document.layers){
    itm = document.layers[id];
  }

  if (!itm) {
   // do nothing
  }
  else if (itm.style) {
    if (itm.style.display == "none") { itm.style.display = ""; }
    else { itm.style.display = "none"; }
  }
  else { itm.visibility = "show"; }
}

function ShowHide2(id1, id2) {
  if (id1 != '') expMenu2(id1);
  if (id2 != '') expMenu2(id2);

  

}

function expMenu2(id) {
  var itm = null;
  if (document.getElementById) {
    itm = document.getElementById(id);
  } else if (document.all){
    itm = document.all[id];
  } else if (document.layers){
    itm = document.layers[id];
  }

  if (!itm) {
   // do nothing
  }
  else if (itm.style) {
    if (itm.style.display == "none") { itm.style.display = ""; }
    else { itm.style.display = "none"; }
  }
  else { itm.visibility = "show"; }

  //modificacao
	document.getElementById('s'+id).value = '-1';

}

function showCreditos(){	
	document.getElementById('Creditos').style.display = "";
	document.getElementById('TextoCreditos').style.display = "";
}
function hideCreditos(){	
	document.getElementById('Creditos').style.display = "none";
	document.getElementById('TextoCreditos').style.display = "none";
}

