// JavaScript Document

function col_omo(id) {
		document.getElementById(id).style.color = "#021e29";
		document.getElementById(id).style.backgroundColor = "#fff"; 
}
function col_nor(id) {
		document.getElementById(id).style.color = "#fff";
		document.getElementById(id).style.backgroundColor = "#021e29"; 
}
function col_hover(id) {
	if(document.getElementById(id).style.display == "none") {
		this.style.backgroundColor = "#fff";
		this.style.color = "#021e29";
	} else {
		this.style.backgroundColor = "#fff";
		this.style.color = "#021e29";
	}		
}
function col_hover_neg(id) {
	if(document.getElementById(id).style.display == "block") {
		this.style.backgroundColor = "#fff";
		this.style.color = "#021e29";
	} else {
		this.style.backgrundColor = "#021e29";
		this.style.color = "#fff";
	}
}

function dOp(id) {
		document.getElementById(id).style.display = "block"; 
}
function dCl(id) {
		document.getElementById(id).style.display = "none"; 
}
function divswitch(id) {
	if(document.getElementById(id).style.display == "none") { 
		document.getElementById(id).style.display = "block"; 
	} else { 
		if(document.getElementById(id).style.display == "block") { 
			document.getElementById(id).style.display = "none";
		}
	}
}
function divclose(id) {
	if(document.getElementById(id).style.display == "none") { 
		document.getElementById(id).style.display = "none"; 
	} else { 
		if(document.getElementById(id).style.display == "block") { 
			document.getElementById(id).style.display = "none";
		}
	}
}

var scrolling = null;

function scroll_top(id) {
	var d = document.getElementById(id);

	d.scrollTop = d.scrollTop - 2000;

	scrolling = window.setTimeout(function() {
		scroll_top(id);
	}, 100);
}

function scroll_bottom(id) {
	var d = document.getElementById(id);

	d.scrollTop = d.scrollTop + 2000;

	scrolling = window.setTimeout(function() {
		scroll_bottom(id);
	}, 100);
}

function scroll_up(id) {
	var d = document.getElementById(id);

	d.scrollTop = d.scrollTop - 10;

	scrolling = window.setTimeout(function() {
		scroll_up(id);
	}, 100);
}

function scroll_down(id) {
	var d = document.getElementById(id);

	d.scrollTop = d.scrollTop + 10;

	scrolling = window.setTimeout(function() {
		scroll_down(id);
	}, 100);
}

function stop_scroll() {
	window.clearTimeout(scrolling);
}
