function res(){

ob = MM_findObj("regulhei")
minheight = 190
initKLayers()
var vH = getDocumentHeight() - 300
vvH = getWindowHeight()
mhei = vvH - 300;
if (mhei > minheight && mhei > vH){
ob.style.height = mhei + "px"   //document.body.scrollTop- se hao scroll ou nao - netscape=window.pageYOffset
}
}


function abrir(pag,jan,wid,hei,scroll,full,toob){

if (full == 1){
var wid = screen.availWidth - 50;
var hei = screen.height - 110;
var lef = 0;
var too = 0;
}else{
var widsc = screen.availWidth;
var heisc = screen.height;
var lef = (widsc-wid) / 2;
var too = (heisc- hei) / 2 - 20;
}
if (too < 0){too = 0}
window.open(pag,jan,"width=" + wid + ",height=" + hei + ",top=" + too + ",left=" + lef + ",scrollbars=" + scroll + ",location=0,Directories=0,menubar=" + toob + ",tollbar=0,resizable=yes")
}


function pag(p){
document.paginacao.pg.value = p
document.paginacao.submit()
}



function MM_findObj(n, d) { //v4.01
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 && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}



function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    return true;
}



var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}



/* netscape = "";
ver = navigator.appVersion; len = ver.length;
for(iln = 0; iln < len; iln++) if (ver.charAt(iln) == "(") break;
netscape = (ver.charAt(iln+1).toUpperCase() != "C");
function envia(){
k = (netscape) ? DnEvents.which : window.event.keyCode;
if (k == 13) {document.logar.submit()}
}
document.onkeydown = envia;
if (netscape) document.captureEvents(Event.KEYDOWN|Event.KEYUP); */

