// nocciolina.com: Navigation Javascripts

normal = new Array();
rollover = new Array();
img_path = "images/nav/";
bt_active = -1;


normal[0] = new Image();
normal[0].src = img_path+"nav_idee.gif";
rollover[0] = new Image();
rollover[0].src = img_path+"nav_idee_over.gif";

normal[1] = new Image();
normal[1].src = img_path+"nav_sortiment.gif";
rollover[1] = new Image();
rollover[1].src = img_path+"nav_sortiment_over.gif";

normal[2] = new Image();
normal[2].src = img_path+"nav_kontakt.gif";
rollover[2] = new Image();
rollover[2].src = img_path+"nav_kontakt_over.gif";




function over(img, bt_index) {
	img.src = rollover[bt_index].src;
}

function out(img, bt_index) {
	if (bt_active != bt_index) {
		img.src = normal[bt_index].src;
	}
}

function stay(img, bt_index) {
	if (bt_active != bt_index) {
		if (bt_active != -1) {
			act_image = eval(bt_active_name);
			act_image.src = normal[bt_active].src;
		}

	img.src = rollover[bt_index].src;
}

	bt_active = bt_index;
	bt_active_name = img;
}

function reset_nav() {
	if (bt_active != -1) {
		act_image = eval(bt_active_name);
		act_image.src = normal[bt_active].src;
	}
	bt_active = -1;
}

function displayStatus(statustext) {
  status=statustext;
}



function imagePopUp(name, width, height, category) {
	url = "images/" + category + "/" + name + ".jpg";
	winl = (screen.width - width) / 2;
	wint = (screen.height - height) / 2;
    eval("nocciolinaPopup = window.open(url, 'PopupWindow', 'scrollbars=no,toolbar=no,location=no,top='+wint+',left='+winl+'directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,width="+ width +",height="+ height +"');");
    nocciolinaPopup.focus();
}
