NewsScroller = function (id,speed) {

	var self  = this;
	var container = document.getElementById(id);
	var boxheight = container.style.height.replace('px','');
	var heighttmp = container.scrollHeight;
	var height = parseInt(container.scrollHeight);
	var _timer;
	
	container.innerHTML =  container.innerHTML +  container.innerHTML; 
	
	this.scrollSpeed = (parseInt(speed)>0) ? speed : 70;
	
	this.doScroll = function () { 
		if(container.scrollTop>height) {

			container.scrollTop=1;
		}else{
		container.scrollTop=container.scrollTop+1;		
		}
	};
	
	this.start = function() {
		_timer = window.setInterval(self.doScroll, this.scrollSpeed);
	};
		
	this.stop = function () { 
		if (_timer) window.clearInterval(_timer);
	};
	
	this.start();
};

function menuon(menuName) {
	if (document.getElementById) {
		if (document.getElementById(menuName).className != 'menu-select') {
			document.getElementById(menuName).style.background = '#a31318';
		}
	}
}

function menuoff(menuName) {
	if (document.getElementById) {
		if (document.getElementById(menuName).className != 'menu-select') {
			document.getElementById(menuName).style.background = '#c4161c';
		}
	}
}

function dmenuSelect(menuName) {
	if (document.getElementById) {
		document.getElementById(menuName).className = 'dmenu-select';
	}
}

function dmenuon(menuName) {
	if (document.getElementById) {
		if (document.getElementById(menuName).className != 'dmenu-select') {
			document.getElementById(menuName).style.background = '#D0CFCF';
		}
	}
}

function dmenuoff(menuName) {
	if (document.getElementById) {
		if (document.getElementById(menuName).className != 'dmenu-select') {
			document.getElementById(menuName).style.background = 'transparent';
		}
	}
}

function showmenu(divName) {
	if (document.getElementById) {
		document.getElementById(divName).style.display = 'block';
	}
}

function hidemenu(divName) {
	if (document.getElementById) {
		document.getElementById(divName).style.display = 'none';
	}
}