var IMG_PATH = '/pictures/ekt_pictures/';

var hatImages = Array ('hat_right_1.jpg', 'hat_right_1_.jpg', 'hat_right_2.jpg', 'hat_right_3.jpg', 'hat_right_4.jpg');

var needImages = Array ('menu_arrow_.gif');
var preloads = new Object;

function preloadImages()
{
    for (i=0;i<needImages.length;i++)
    {
        preloads[i] = new Image;
        preloads[i].src = IMG_PATH + needImages[i];
    }
}

function setHatImage(id)
{
	var img_obj_1;
	var is_with_banner = (img_obj_1 = document.getElementById('img_hat_right_1_'));
	if (!is_with_banner) img_obj_1 = document.getElementById('img_hat_right_1');
	img_obj_2 = document.getElementById('img_hat_right_2');
	img_obj_3 = document.getElementById('img_hat_right_3');
	img_obj_4 = document.getElementById('img_hat_right_4');
	
	if (!img_obj_1 || !img_obj_2 || !img_obj_3 || !img_obj_4) return false;
	
	img_obj_1.src = IMG_PATH+id+'_'+( is_with_banner ? hatImages[1] : hatImages[0]);
	img_obj_2.src = IMG_PATH+id+'_'+hatImages[2];
	img_obj_3.src = IMG_PATH+id+'_'+hatImages[3];
	img_obj_4.src = IMG_PATH+id+'_'+hatImages[4];
}

function menuOver(img_id)
{
	var img_obj = document.getElementById('menu_arrow_pic_'+img_id);
	if (!img_obj) return;
	img_obj.src = IMG_PATH + 'menu_arrow_.gif';
}

function menuOut(img_id)
{
	var img_obj = document.getElementById('menu_arrow_pic_'+img_id);
	if (!img_obj) return;
	img_obj.src = IMG_PATH + 'menu_arrow.gif';
}

function menu2Over(obj)
{
	if (!obj) return;
	obj.parentNode.style.backgroundColor = '#db1103';
}

function menu2Out(obj)
{
	if (!obj) return;
	obj.parentNode.style.backgroundColor = 'transparent';
}
