//*written by Voov (www.voov.hu), copyright 2007*//


function gotoUrl(url) {
  document.location.href = mainurl + url;
  return true;
}

function news_item_off(e) {
	e.style.backgroundColor='#ffffff';
	e.style.cursor = 'pointer';
}

function news_item_on(e) {
	e.style.backgroundColor='#f2f2f2';
	e.style.cursor = 'pointer';
}

function cover_off(e) {
	e.style.cursor = 'pointer';
}

function cover_on(e) {
	e.style.cursor = 'pointer';
}

function image_off(e) {
	e.style.cursor = 'pointer';
	e.style.border='1px solid #d1d1d1';
}

function image_on(e) {
	e.style.cursor = 'pointer';
	e.style.border='1px solid #666666';
}

function RedirectTo(url) {
	window.location = "http://" + document.domain + "/" + url;
}

function RedirectToNo(url) {
	window.location = url;
}

function scrollNext() {
	var scrolling = document.getElementById("thumbnails");
	var current_left = parseInt(scrolling.offsetLeft);
	var holder_width = $("#thumbnails_holder").width();
	var scrolling_width = $("#thumbnails").width();
	var max_left = (scrolling_width - holder_width) * -1;
	var steps = 80;
	if (current_left - steps < max_left) steps = current_left - max_left;
	/*alert(steps);*/
	if (current_left <= max_left || isNaN(current_left)) return false;
	current_left -= steps;
	$("#thumbnails").animate({left: current_left + "px"}, 400);
	return false;
}

function scrollPrev() {
	var scrolling = document.getElementById("thumbnails");
	var current_left = parseInt(scrolling.offsetLeft);
	var steps = 80;
	if (current_left + steps > 0) steps = current_left * -1; 
	if (current_left >= 0 || isNaN(current_left)) return false;
	current_left += steps;
	$("#thumbnails").animate({left: current_left + "px"}, 400);
	return false;
}

function submenu_off(e) {
	document.getElementById("submenu_" + e).style.backgroundPosition="top left";
	document.getElementById("submenu_" + e).style.cursor = 'pointer';
	document.getElementById("submenu_" + e).style.color="#a9a9a9";
}

function submenu_on(e) {
	document.getElementById("submenu_" + e).style.backgroundPosition="bottom left";
	document.getElementById("submenu_" + e).style.cursor = 'pointer';
	document.getElementById("submenu_" + e).style.color="#ffffff";
}
function cat_off(e) {
	e.style.backgroundPosition="top left";
	e.style.cursor = 'pointer';
	e.style.color="#a9a9a9";
	e.style.border='1px solid #343434';
}

function cat_on(e) {
	e.style.backgroundPosition="bottom left";
	e.style.cursor = 'pointer';
	e.style.color="#ffffff";
	e.style.border='1px solid #ffffff';
}

function product_off(e) {
	e.style.border='1px solid #323232';
	e.style.cursor = 'pointer';
}

function product_on(e) {
	e.style.border = '1px solid #ffffff';
	e.style.cursor = 'pointer';
}

function designer_off(e) {
	e.style.border='1px solid #323232';
	e.style.cursor = 'pointer';
}

function designer_on(e) {
	e.style.border = '1px solid #ffffff';
	e.style.cursor = 'pointer';
}
