
function hScroll(dir, spd, loop) {
	loop = true;
	direction = "d";
	speed = 10;
	scrolltimer = null; 
	//
	if (document.layers) {
		var page = eval(document.menuReal);
	} else { 
		if (document.getElementById) { //
									var page= eval("document.getElementById('menuReal').style");
		    } else { if (document.all) { alert ('yo');
		   							var page = eval(document.all.menuReal.style);  }
		 }
	} 
	
	direction = dir;
	speed = parseInt(spd);
	var x_pos = parseInt(page.left); 
	
 
	//if (loop == true) {
		
	  if (direction == "g") { page.left = (x_pos - (speed))+"px"; }
	 // if (direction == "g" && x_pos < -1) { document.getElementById('droi').style.display = 'inline'; }
	  //if (direction == "d" && x_pos > -1) { document.getElementById('droi').style.display = 'none'; }
	  if (direction == "g" && x_pos < -558 ) { stopScroll();  }
	  else { 
		   if (direction == "d" && x_pos < 0) {  page.left = (x_pos + (speed))+"px"; 		   		
		   } 
		   else { if (direction == "top") {  page.left = 0+"px"; }
	  }
	//} 
	scrolltimer = setTimeout("hScroll(direction,speed)", 1);
  }
} 

function stopScroll() {loop = false;clearTimeout(scrolltimer); } 
