<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
<!-- Permutar uma imagem
function Permut (flag,img) {
	if (document.images) {
		if (document.images[img].permloaded) {
			if (flag==1) document.images[img].src = document.images[img].perm.src
			else document.images[img].src = document.images[img].perm.oldsrc
		}
	}
}
function preloadPermut (img,adresse) {
	if (document.images) {
		img.onload = null;
		img.perm = new Image ();
		img.perm.oldsrc = img.src;
		img.perm.src = adresse;
		img.permloaded = true;
	}
}

function SendPrint(action){
  var ids="";
  for (i=1; i < 16; i++){
    if (document.all["regscheck" + i] != undefined && document.all["regscheck" + i].checked==true){
        if (ids==""){
          ids = i;
        }
        else{
          ids += "," + i;
        }
    }
  }
  if (ids != ""){
    if (action=="send"){
      window.open('/templates/resultado_enviar.aspx'+ location.search +'&ids='+ids ,'Enviar','width=400,heigth=400,scrollbars=yes');
    }
    else{
      window.open('/templates/resultado_imprimir.aspx'+ location.search +'&ids='+ids,'Enviar','width=400,heigth=400,scrollbars=yes');
    }
  }
  else{
    if (action=="send"){
      alert('Selecione os registros que deseja enviar por e-mail.');
    }
    else{
      alert('Selecione os registros que deseja imprimir.');
    }
  }
}

//função para desabilitar o Ctrl+qq tecla e o Shif+qq tecla
function Desabilitar(e) 
{
  var name = navigator.appName;
  var teclaS= e.keyCode; //ctrl=17 | Shift=16 | Ins=45 

  if(teclaS == 17||teclaS == 45){

       alert('Não é possível copiar e colar\nFavor digitar novamente.');

        if(name=="Nestscape")
        {
           e.preventDefault();
        }
        else
        {
           e.keyCode=0; 
           e.returnValue=false;
        }
    }
}
//-->
function InstalarToolbar(){
    if(document.all){
        location.href="/templates/toolbar_instal.aspx";
    }
    else{
       location.href="https://addons.mozilla.org/en-US/firefox/downloads/file/11542/telelistas_toolbar-1.0.5-fx.xpi";
    }
}