function abrecadastro(url, name) {
popupWin = window.open("cadastro.asp", "CADASTRO", 'scrollbars=yes,toolbar=no,resizable,width=666,height=560');
}

function abrecadastro2(url, name) {
popupWin = window.open("../cadastro.asp", "CADASTRO", 'scrollbars=no,toolbar=no,resizable,width=650,height=560');
}

function abrecadastrocampanha(campanha) {
popupWin = window.open("../cadastro.asp?campanha="+campanha, "CADASTRO", 'scrollbars=yes,toolbar=no,resizable,width=666,height=560');
}

function lembrete(url, name) {
popupWin = window.open("lembrete.asp", "LEMBRETE", 'scrollbars=no,toolbar=no,resizable,width=650,height=350');
}

function SubDisable(dform) {
  if (document.getElementById) {
   for (var sch = 0; sch < dform.length; sch++) {
    if (dform.elements[sch].type.toLowerCase() == "submit") dform.elements[sch].disabled = true;
   }
  }
	return true;
}

<!--
//Get picture source location and picture name
var newwindow = null; //This should stop that error message.
var MAXH = 1300; // Maximum Height, default is 1024, change setting in the asp section at the top of this document
var MAXW = 1200; // Maximum Width, default is 768, change setting in the asp section at the top of this document
function viewPic(img, bktl)
{    
   //Use picture name to set as page title
   this.title = bktl
   picfile = new Image(); 
   //get image source
   picfile.src =(img);
   //check image source
   fileCheck(img);
       
}
function fileCheck(img)
//Make sure file exists
{    
   if( (picfile.width!=0) && (picfile.height!=0) )
   { 
       makeWindow(img); 
   }
   else 
   {
       funzione="fileCheck('"+img+"')"; 
       intervallo=setTimeout(funzione,8); 
   }
}
function clearimgld(){   
   newwindow.document.all["slowScreenSplash"].style.display = "none";
}
function makeWindow(img)
//Generate window based on size of picture and settings.
{    
   var wd = picfile.width; 
   var ht = picfile.height;
	// resizing is optional, of course 
	if ( ht > MAXH ) 
		{ 
		wd = wd * MAXH / ht; 
		ht = MAXH; 
		} 
	if ( wd > MAXW ) 
		{ 
		ht = ht * MAXW / wd
		wd = MAXW; 
		} 
   var args= "height=" + ht + ",width=" + wd;
   if (window.screen) 
   { 
       var xcen = (screen.width - wd) / 2; 
       var ycen = (screen.height - ht) / 2;
       args += ",left=" + xcen +",top=" + ycen + ",resizable=yes,scrollbars=no";    
   }
   newwindow=window.open(img, 'x', args); 
   newwindow.document.clear();
   newwindow.focus();
   newwindow.document.writeln('<html><head><title>' + this.title + '<\/title><\/head><body bgcolor="#FFFFFF" leftmargin="10" rightmargin="10" topmargin="0" bottommargin="0"><DIV ID="slowScreenSplash" STYLE="position:absolute;z-index:5;top:40%;left:15%;color:#FFFFFF;font-size:24px;" align="center">Carregando imagem...<\/DIV><center>');
   newwindow.document.writeln('<img src=' + img + ' width=' + wd + ' height=' + ht + '>');
   newwindow.document.writeln('<\/center><\/body><\/html>');
   newwindow.document.close();
   newwindow.focus();
   window.setTimeout('clearimgld()',500);
}

//Close any open windows when the users leaves the gallery.
function tidy() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}
//-->