// JavaScript Document

im = new Array ();
im[0] = 0;
im[1] = 1;
im[2] = 2;

arr = new Array ();
arr[0] = 'malta';
arr[1] = 'autobavaria';
//arr[2] = 'dankostroi';
arr[2] = 'muzschool';
arr[3] = 'abcprofi';
arr[4] = 'shinomobile';
arr[5] = 'exroad';
arr[6] = 'fotoidea';
arr[7] = 'tlog';

for (i = 0; i < arr.length; i++){
	image = new Image ();
	image.src = 'files/logo_' + arr[i] + '_gray.gif';
}

for (i = 0; i < arr.length; i++){
	image = new Image ();
	image.src = 'files/logo_' + arr[i] + '_color.gif';
}

function f (obj, value){
	if (obj.value == value){
	obj.value = '';
	}
}

function b (obj, value){
	if (obj.value.length == 0){
		obj.value = value;
	}
}

function m_out (obj,id){
	var im1 = im[id];
	obj.src = 'files/logo_' + arr[im1] + '_gray.gif';
}
function m_over (obj, id){
	var im1 = im[id];
	obj.src = 'files/logo_' + arr[im1] + '_color.gif';
}

function focuss (){


	len = arr.length;
	
	im[0]++;
	im[1]++;
	im[2]++;
	
	if (im[0] == len) im[0] = 0;
	if (im[1] == len) im[1] = 0;
	if (im[2] == len) im[2] = 0;

	
	
	document.getElementById('im1').src = 'files/logo_' + arr[im[0]] + '_gray.gif';
	document.getElementById('im2').src = 'files/logo_' + arr[im[1]] + '_gray.gif';
	document.getElementById('im3').src = 'files/logo_' + arr[im[2]] + '_gray.gif';
	
	document.getElementById('ref1').setAttribute("href", "works.php#" + arr[im[0]]);
	document.getElementById('ref2').setAttribute("href", "works.php#" + arr[im[1]]);
	document.getElementById('ref3').setAttribute("href", "works.php#" + arr[im[2]]);
	
	document.getElementById('ref11').setAttribute("href", "works.php#" + arr[im[0]]);
	document.getElementById('ref22').setAttribute("href", "works.php#" + arr[im[1]]);
	document.getElementById('ref33').setAttribute("href", "works.php#" + arr[im[2]]);
}


function focuss2 (){


	len = arr.length;
	
	im[0]--;
	im[1]--;
	im[2]--;
	
	if (im[0] == -1) im[0] = len-1;
	if (im[1] == -1) im[1] = len-1;
	if (im[2] == -1) im[2] = len-1;

	
	
	document.getElementById('im1').src = 'files/logo_' + arr[im[0]] + '_gray.gif';
	document.getElementById('im2').src = 'files/logo_' + arr[im[1]] + '_gray.gif';
	document.getElementById('im3').src = 'files/logo_' + arr[im[2]] + '_gray.gif';
	
	document.getElementById('ref1').setAttribute("href", "works.php#" + arr[im[0]]);
	document.getElementById('ref2').setAttribute("href", "works.php#" + arr[im[1]]);
	document.getElementById('ref3').setAttribute("href", "works.php#" + arr[im[2]]);
	
	document.getElementById('ref11').setAttribute("href", "works.php#" + arr[im[0]]);
	document.getElementById('ref22').setAttribute("href", "works.php#" + arr[im[1]]);
	document.getElementById('ref33').setAttribute("href", "works.php#" + arr[im[2]]);
}


