function GE(objid){return document.getElementById(objid);}

function confirmDelete(SrcForm) {
	if (confirm("Tem certeza de que deseja excluir o registro?")) {
		SrcForm.dbAction.value = 'delete';
		SrcForm.submit();
	};
}

function popup(x,w,h,s) {
	var l = ( (window.screen.width  - w) / 2 );
	var t = ( (window.screen.height - h) / 2 );
	if(s == 'undefined') s = 'no';
    newWin = window.open(x,'fundo','leftmargin=0,topmargin=0,marginheight=0,marginwidth=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+s+',resizable=no,top='+t+',left='+l+',screenX='+l+',screenY='+t+',copyhistory=no,height='+h+',width='+w+'');
	newWin.focus()
}

function checkImg(str, chk){
	if(chk != 1 || str != ""){
		strA = str.split(".");
		if(strA[strA.length - 1] != "jpg" && strA[strA.length - 1] != "jpeg" && strA[strA.length - 1] != "JPG" && strA[strA.length - 1] != "JPEG"){
			return false;
		}
	}
	return true;
}

function checkPDF(str, chk){
	if(chk != 1 || str != ""){
		strA = str.split(".");
		if(strA[strA.length - 1] != "pdf" && strA[strA.length - 1] != "PDF"){
			return false;
		}
	}
	return true;
}


function goTo(lnk){	window.location.href = lnk; }
