// Redimensiona a janela;

var largura=0;
var altura=0;
var largura=screen.width;
var altura=screen.height;
document.write('<body scroll="no">');
resizeTo(largura, altura);

function abre_chat(URL) {

    var width_chat=328;
    var height_chat=344;
    var left_chat=(largura-width_chat)/2;
    var top_chat=(altura-height_chat)/2;

    window.open(URL,'index','width='+width_chat+', height='+height_chat+', top='+top_chat+', left='+left_chat+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');

};

function vertical() {

   var navItems = document.getElementById("nav").getElementsByTagName("li"); 
    
   for (var i=0; i< navItems.length; i++) { 
      if(navItems[i].className == "submenu") { 
         navItems[i].onmouseover=function() {this.getElementsByTagName('ul')[0].style.display="block";
      }

         navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";} 
      } 
   } 
}


function isTouchDevice(){
	try{
		document.createEvent("TouchEvent");
		return true;
	}catch(e){
		return false;
	}
}
function touchScroll(id){
	if(isTouchDevice()){ //if touch events exist...
		var el=document.getElementById(id);
		var scrollStartPos=0;
 
		document.getElementById(id).addEventListener("touchstart", function(event) {
			scrollStartPos=this.scrollTop+event.touches[0].pageY;
//			event.preventDefault();
		},false);
 
		document.getElementById(id).addEventListener("touchmove", function(event) {
			this.scrollTop=scrollStartPos-event.touches[0].pageY;
			event.preventDefault();
		},false);
	}
}
 
