﻿defaultStep=2 
step=defaultStep 

function scrollDivDown(id){ 
document.getElementById(id).scrollTop+=step; 
timerDown=setTimeout("scrollDivDown('"+id+"')",10) 
}

function scrollDivUp(id){ 
document.getElementById(id).scrollTop-=step;
timerUp=setTimeout("scrollDivUp('"+id+"')",10) 
}

function scrollDivLeft(id){
document.getElementById(id).scrollLeft-=step;
timerLeft=setTimeout("scrollDivLeft('"+id+"')",10)
} 

function scrollDivRight(id){ 
document.getElementById(id).scrollLeft+=step; 
timerRight=setTimeout("scrollDivRight('"+id+"')",10)
} 

function openWindow(url, windowname, width, height, toolbar){
        var sizestring = 'width=' + width + ',height=' + height;
	SmallWin = window.open(url,windowname,'scrollbars,resizable,' + sizestring +',toolbar='+toolbar+',location=0,status=0,directories=0,menubar='+toolbar);
	SmallWin.focus();
}


function openMap(sURL){
    document.getElementById("fraMapa").innerHTML = sURL;
}

function openVideo(sURL){
    document.getElementById("fraVideo").innerHTML = sURL;
}

function openGaleria(sURL){
    document.getElementById("fraGaleria").innerHTML = sURL;
}

function openIndique(sURL){
    document.getElementById("fraIndique").innerHTML = sURL;
}

function closeVideo(){
    document.getElementById("fraVideo").innerHTML = '';
}


function checkEnter(){
    if(event.keyCode==13){return false}
}

function ajustaTab(){
try{
    //document.getElementById("tblPrincipal").style.height = screen.availHeight
    document.getElementById("tblPrincipal").style.height = document.body.clientHeight;
    }catch(s){document.getElementById("tblPrincipal").style.height = window.innerHeight;}
}