// JavaScript Document
//_____________________________
	var ostat = false;
	function scrollstop() {
	rulo_noticias.scrollAmount = 0;
	ostat = true;
	}
	
	function scrollplay() {
		rulo_noticias.scrollAmount = 2;
		ostat = false;
	}

	function scrolldir() {
		mid = screen.width / 2;
		mouse = event.y;
		if(mouse > mid) {
			if(ostat == false) {
				speed = ((mouse - mid) / 25) + 2;
				rulo_noticias.scrollAmount = speed;
			}
//			rulo_noticias.direction = "right";
			rulo_noticias.direction = "down";
		}
		else {
			if(ostat == false) {
				speed = ((mid - mouse) / 25) + 2;
				rulo_noticias.scrollAmount = speed;
			}
//			rulo_noticias.direction = "left";
			rulo_noticias.direction = "up";
		}
	}

//_____________________________

// ancho
 var marqueewidth=170
// alto
if (res_alta) {
	var marqueeheight=450
} else {
	var marqueeheight=200
}
// velocidad
var speed=3
// contenido del scroll

if (document.all){
//	document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')
//2	document.write('<marquee id="rulo_noticias" name="rulo_noticias" direction="up" scrollAmount='+speed+' width="200" style="height:'+marqueeheight+'" behavior="scroll" onMouseOver="scrollstop()" onmouseout="scrollplay()" onMouseMove="scrolldir()">'+marqueecontents+'</marquee>')
	document.write('<marquee id="rulo_noticias" name="rulo_noticias" direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'" behavior="scroll" onMouseOver="scrollstop()" onmouseout="scrollplay()" onMouseMove="scrolldir()">'+marqueecontents+'</marquee>')
}
	

function regenerate(){
	window.location.reload()
}

function regenerate2(){
	if (document.layers){
		setTimeout("window.onresize=regenerate",100)
		intializemarquee()
	}
}

function intializemarquee(){
	document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
	document.cmarquee01.document.cmarquee02.document.close()
	thelength=document.cmarquee01.document.cmarquee02.document.height
	scrollit()
}

function scrollit(){
	if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
		document.cmarquee01.document.cmarquee02.top-=speed
		setTimeout("scrollit()",100)
	}
	else{
		document.cmarquee01.document.cmarquee02.top=marqueeheight
		scrollit()
	}
}

window.onload=regenerate2
