/*#ONLOAD#*/
window.name = 'da_browser';

/*#NONE#*/
function none() {
}

/*# COUNT #*/
function count(objetoVC,targetVC) {
	window.open('codigos/count.asp?'+objetoVC,targetVC);
}

/*# IFRAME VIRTUAL #*/
function iframe_virtual(urlVC) {
	if (document.all.iframe_virtual)	{
		document.all.iframe_virtual.removeNode(true);
	}
	
	var tempIFrame					= document.createElement('iframe');
		tempIFrame.style.border		='0px';
		tempIFrame.style.width		='0%';
		tempIFrame.style.height		='0px';
		
		tempIFrame.setAttribute('id','iframe_virtual');
		tempIFrame.setAttribute('name','iframe_virtual');
		tempIFrame.setAttribute('src',urlVC);
	
	IFrameObj						= document.body.appendChild(tempIFrame);
}

/*#SO NUMERO#*/
function soNumero(e) {
	if (document.all) {
		var it_tecla	= event.keyCode;
	} else if(document.layers) {
		var it_tecla	= e.which;
	}
	
	if (it_tecla >= 48 && it_tecla <= 57) {
		return true;
	} else if (it_tecla != 8) {
		event.keyCode	= 0;
	} else {
		return true;
	}
		
	if (it_tecla >= 96 && it_tecla <= 105) {
		return true;
	} else if (it_tecla != 8) {
		event.keyCode	= 0;
	} else {
		return true;
	}
}

/*#MASCARA#*/
function mascara(vle,msk)	{
	var i	= vle.value.length;
	var s	= msk.substring(0,1);
	var t	= msk.substring(i)
	
	if (t.substring(0,1) != s)	{
		vle.value += t.substring(0,1);
	}
}

/*# VERIFICAR */
function pesquisa_verificar(){
	var mensagem1	= '';
	
	if (frm_pesquisa.pesquisa_termoVC.value.length < 2) {
	 	mensagem1	+= 'Preencha sua pesquisa com mais caracteres\npara podermos filtrar melhor o que você procura.\n';
	}

	if (mensagem1 != ''){
		alert(mensagem1);
		return false;
	} else {
		return true;
	}
}

/*#IMG CHANGER#*/
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

/*# POPUP #*/
function popup(it_largura,it_altura,vc_url) {
	var W	= it_largura; 	
	var H	= it_altura;
	var X	= Math.ceil( (window.screen.height - H) / 2 ) - 20;
	var Y	= Math.ceil( (window.screen.width - W) / 2 ) - 16;
	
	window.open(vc_url,'','width='+W+',height='+H+',top='+X+',left='+Y+',location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,toolbar=no');
}

/*# VERIFICA DATA #*/
function verificaData(vc_campo) { 
	if (vc_campo.value.length > 0) {  
		it_dia		= (vc_campo.value.substring(0,2)); 
		it_mes		= (vc_campo.value.substring(3,5)); 
		it_ano		= (vc_campo.value.substring(6,10)); 
		it_erro		= 0; 
		
		if ((it_dia < 01) || (it_dia < 01 || it_dia > 30) && (it_mes == 04 || it_mes == 06 || it_mes == 09 || it_mes == 11 ) || it_dia > 31) { 
			it_erro	= 1; 
		} 

		if (it_mes < 01 || it_mes > 12 ) { 
			it_erro	= 1; 
		} 

		if (it_mes == 2 && (it_dia < 01 || it_dia > 29 || (it_dia > 28 && (parseInt(it_ano / 4) != it_ano / 4)))) { 
			it_erro	= 1; 
		} 

		if ((it_ano < 1900) || (it_ano>2078)){
			it_erro	= 1;
		}
		
		if (it_erro == 1) { 
			alert("Por favor, preencha uma data válida!"); 
			vc_campo.value	= '';
			vc_campo.focus(); 
		}
	} 
}
//-->
