/*-----------------------------------------------------------
User interface - rollovers

This script contains all the code needed to manage the key
rollover states on the navigation

version: 	1.0
author: 	Robin Layfield
date:		06-June-2006
email: 		Robin@Karyx.co.uk
website:	http://www.karyx.co.uk
-------------------------------------------------------------*/

/* image declarations */

newson			= new Image(116,47);
newson.src		= "/images/nav/news_on.gif";
newsoff			= new Image(116,47);
newsoff.src		= "/images/nav/news_off.gif";

biogon				= new Image(111,47)
biogon.src			= "/images/nav/biog_on.gif";
biogoff 				= new Image(111,47);
biogoff.src			= "/images/nav/biog_off.gif";

galleryon				= new Image(136,47);
galleryon.src			= "/images/nav/gallery_on.gif";
galleryoff				= new Image(136,47);
galleryoff.src			= "/images/nav/gallery_off.gif";

musicon				= new Image(128,47);
musicon.src			= "/images/nav/music_on.gif";
musicoff				= new Image(128,47);
musicoff.src			= "/images/nav/music_off.gif";

contacton				= new Image(115,47);
contacton.src			= "/images/nav/contact_on.gif";
contactoff				= new Image(115,47);
contactoff.src			= "/images/nav/contact_off.gif";

/* rollover / rolloff functions */
function rollover(imgName){ document.getElementById(imgName).src = eval(imgName + "on.src"); }
function rolloff(imgName){ document.getElementById(imgName).src = eval(imgName + "off.src"); }

/* image swap function for portfolio element pages */
function swap(imgName, lnktag){ 
	document.getElementById("scr").className="whiteback";
	document.getElementById("brd").className="whiteback";
	document.getElementById("prt").className="whiteback";
	lnktag.className="redback";
	document.getElementById("pf_pic").src = eval(imgName + ".src"); 
}

/* pop-up link opener */
function win(url){
	myWindow = window.open(url,"external","width=860,height=660,scrollbars=yes");	
	myWindow.focus();
}
