var colors = new Array(	"#444444", "#777777", "#e9e9e9");
var basicColor = "#3f4a4f";
var curColIdx = 0;
var kurzelem;
var mousePosX = 0;
var mousePosY = 0;
var speed = 1;

function viber(){
if (!document.layers){
	document.onmouseover = tagdet;
	document.onmouseout = end_vibr;
	allapot();}
	}

function end_vibr(){
	if (kurzelem){
	kurzelem.style.color = basicColor;
	curColIdx = 0;
	kurzelem = false;}
	}

function start_vibr(ez){
if (!kurzelem) return;
	ez = kurzelem;
	tempCol = ez.style.color;

if (tempCol == basicColor){
	curColIdx = 0;}

if (!tempCol){
	curColIdx = 0;
	tempCol = basicColor;}
else{
	cucca = colors.length;

for (f = 0; f < cucca; f++){
if (colors[f] == tempCol){
if (f >= (cucca-1)){
	curColIdx = 0;}
else{
	curColIdx = f + 1;}
	}
	}
	}
	ez.style.color = colors[curColIdx];}

function tagdet(){
	ez = window.event.srcElement;
	mousePosX = window.event.offsetX;
	mousePosY = window.event.offsetY;
	tag = ez.tagName;

if (tag == "A"){
if (kurzelem){
	kurzelem = false;
	return;}
	kurzelem = ez;}
else{
	kurzelem = false;}
	}

function allapot(){
if (kurzelem){
	start_vibr();}

if (!kurzelem) end_vibr();
	window.setTimeout("allapot()", speed);}