// style.js
// ž

// class MENIU

var colorBgrOn = "#0000ff";
var colorBgrOff = "transparent";

var colorFontOn = "#ffffff";
var colorFontOff = "#ffffff";



function openSubMenu(x, y) {
	hoverMeniuOn(x, y);
	if (y) {
		var subLayer = document.getElementById(y);
		if (subLayer) { subLayer.style.visibility = "visible"; }
	}
}

function closeSubMenu(x, y) {
	hoverMeniuOut(x, y);
	if (y) {
		var subLayer = document.getElementById(y);
		if (subLayer) { subLayer.style.visibility = "hidden"; }
	}
}


function hoverMeniuOn(x, y) {
	if (x) {
		x.style.backgroundColor = colorBgrOn;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorBgrOn;
		linkObj.style.color = colorFontOn;
		initSubMeniuLastPadding(y);
	}
}
function initSubMeniuLastPadding(o) {
   var lastObj = document.getElementById('last'+o);
   if (lastObj) {
     if (!lastObj.style.paddingRight) {
           var point = 650 - lastObj.offsetLeft;
           lastObj.style.paddingRight = point+'px';
       }
   }
} 

function hoverMeniuOut(x, y) {
	if (x) {
		x.style.backgroundColor = colorBgrOff;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorBgrOff;
		linkObj.style.color = colorFontOff;
	}
}



// class MENIUHOT

//var colorHotBgrOn = "#b2b2b2";
//var colorHotBgrOff = "#5e696f";
//var colorHotFontOn = "#ffffff";
//var colorHotFontOff = "#ffffff";


var colorHotBgrOn = "#b2b2b2";
var colorHotBgrOff = "#b2b2b2";
var colorHotFontOn = "#ffffff";
var colorHotFontOff = "#ffffff";



function openHotSubMenu(x, y) {
	hoverHotMeniuOn(x, y);
	if (y) {
		var subLayer = document.getElementById(y);
		if (subLayer) { subLayer.style.visibility = "visible"; }
	}
}

function closeHotSubMenu(x, y) {
	hoverHotMeniuOut(x, y);
	if (y) {
		var subLayer = document.getElementById(y);
		if (subLayer) { subLayer.style.visibility = "hidden"; }
	}
}


function hoverHotMeniuOn(x, y) {
	return 0;
	if (x) {
		x.style.backgroundColor = colorHotBgrOn;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorHotBgrOn;
		linkObj.style.color = colorHotFontOn;
	}
}

function hoverHotMeniuOut(x, y) {
	return 0;
	if (x) {
		x.style.backgroundColor = colorHotBgrOff;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorHotBgrOff;
		linkObj.style.color = colorHotFontOff;
	}
}






// PARDUOTUVE

function openCloseSubMenu(x, y) {
	if (y) {
		var subLayer = document.getElementById(y);
		if (subLayer) {
			subLayer.style.display = (subLayer.style.display == "") ? 'none' : '';
		}
	}
}

var colorPBgrOn = "#0000ff";
var colorPBgrOff = "#5e696f";
var colorPFontOn = "#ffffff";
var colorPFontOff = "#ffffff";


function hoverPMeniuOn(x, y) {
	if (x) {
		x.style.backgroundColor = colorPBgrOn;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorPBgrOn;
		linkObj.style.color = colorPFontOn;
	}
}

function hoverPMeniuOut(x, y) {
	if (x) {
		x.style.backgroundColor = colorPBgrOff;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorPBgrOff;
		linkObj.style.color = colorPFontOff;
	}
}



var colorPSubBgrOn = "#0000ff";
var colorPSubBgrOff = "#ffffff";
var colorPSubFontOn = "#ffffff";
var colorPSubFontOff = "#5e696f";


function hoverPSubMeniuOn(x, y) {
	if (x) {
		x.style.backgroundColor = colorPSubBgrOn;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorPSubBgrOn;
		linkObj.style.color = colorPSubFontOn;
	}
}

function hoverPSubMeniuOut(x, y) {
	if (x) {
		x.style.backgroundColor = colorPSubBgrOff;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorPSubBgrOff;
		linkObj.style.color = colorPSubFontOff;
	}
}



// PARDUOTUVE HOT

function openCloseHotSubMenu(x, y) {
	if (y) {
		var subLayer = document.getElementById(y);
		if (subLayer) {
			subLayer.style.display = (subLayer.style.display == "") ? 'none' : '';
		}
	}
}

var colorHotPBgrOn = "#b2b2b2";
var colorHotPBgrOff = "#b2b2b2";
var colorHotPFontOn = "#ffffff";
var colorHotPFontOff = "#ffffff";


function hoverHotPMeniuOn(x, y) {
	if (x) {
		x.style.backgroundColor = colorHotPBgrOn;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorHotPBgrOn;
		linkObj.style.color = colorHotPFontOn;
	}
}

function hoverHotPMeniuOut(x, y) {
	if (x) {
		x.style.backgroundColor = colorHotPBgrOff;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorHotPBgrOff;
		linkObj.style.color = colorHotPFontOff;
	}
}



var colorHotPSubBgrOn = "#b2b2b2";
var colorHotPSubBgrOff = "#b2b2b2";
var colorHotPSubFontOn = "#ffffff";
var colorHotPSubFontOff = "#ffffff";


function hoverHotPSubMeniuOn(x, y) {
	if (x) {
		x.style.backgroundColor = colorHotPSubBgrOn;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorHotPSubBgrOn;
		linkObj.style.color = colorHotPSubFontOn;
	}
}

function hoverHotPSubMeniuOut(x, y) {
	if (x) {
		x.style.backgroundColor = colorHotPSubBgrOff;
	}
	if (y) {
		var linkObj = document.getElementById(y+'_link');
		linkObj.style.backgroundColor = colorHotPSubBgrOff;
		linkObj.style.color = colorHotPSubFontOff;
	}
}

function submitBrandChange(cat_id, theme_txt){
	var selBrand = document.getElementById('sel_brand');
	document.location = "/"+theme_txt+"/category/"+cat_id+"/brand/"+selBrand.value+"/";
}


function showPic(id1, id2) {
	var thumb = document.getElementById(id1);
	var photo = document.getElementById(id2);
	photo.src = thumb.src;
	photo.alt = thumb.alt;
}





// __END__
