

if (document.images) 
{
// preload inactive images

	home = new Image();
	home.src = "/images/nav/menu-home.gif";
	lookbooks = new Image();
	lookbooks.src = "/images/nav/menu-lookbooks.gif";
	about = new Image();
	about.src = "/images/nav/menu-about.gif";
	locations = new Image();
	locations.src = "/images/nav/menu-locations.gif";
	partners = new Image();
	partners.src = "/images/nav/menu-partners.gif";
	register = new Image();
	register.src = "/images/nav/menu-register.gif";
	contact = new Image();
	contact.src = "/images/nav/menu-contact.gif";
	trelise = new Image();
	trelise.src = "/images/nav/menu-trelise.gif";
	brand = new Image();
	brand.src = "/images/nav/menu-brand.gif";
	luscious = new Image();
	luscious.src = "/images/nav/luscious.gif";
	doll = new Image();
	doll.src = "/images/nav/doll.gif";
	cooper = new Image();
	cooper.src = "/images/nav/cooper.gif";
	button1 = new Image();
	button1.src = "/images/but-win-03.gif";
		win2004 = new Image();
	win2004.src = "/images/hp-winter2004.gif";
		ss1 = new Image();
	ss1.src = "/images/tc-ss.gif";
	button2 = new Image();
	button2.src = "/images/nav/logo-winter.gif";
	button3 = new Image();
	button3.src = "/images/nav/logo-luscious.gif";
	button4 = new Image();
	button4.src = "/images/nav/logo-doll.gif";
	button5 = new Image();
	button5.src = "/images/nav/logo-cooper.gif";
	button6 = new Image();
	button6.src = "/images/photos/tc-win2003/video-butt.gif";
	button7 = new Image();
	button7.src = "/images/hp-summer2004.gif";
	button8 = new Image();
	button8.src = "/images/but-sum-06.gif";
	formsubmit = new Image();
	formsubmit.src = "/images/form-submit.gif";
	magnet = new Image();
	magnet.src = "/images/magnet.gif";
	
// preload active images 
	homeon = new Image();
	homeon.src = "/images/nav/menu-home-2.gif";
	lookbookson = new Image();
	lookbookson.src = "/images/nav/menu-lookbooks-2.gif";
	abouton = new Image();
	abouton.src = "/images/nav/menu-about-2.gif";
	locationson = new Image();
	locationson.src = "/images/nav/menu-locations-2.gif";
	partnerson = new Image();
	partnerson.src = "/images/nav/menu-partners-2.gif";
	registeron = new Image();
	registeron.src = "/images/nav/menu-register-2.gif";
	contacton = new Image();
	contacton.src = "/images/nav/menu-contact-2.gif";
	treliseon = new Image();
	treliseon.src = "/images/nav/menu-trelise-2.gif";
	lusciouson = new Image();
	lusciouson.src = "/images/nav/luscious-on.gif";
	dollon = new Image();
	dollon.src = "/images/nav/doll-on.gif";
	cooperon = new Image();
	cooperon.src = "/images/nav/cooper-on.gif";
		ss1on = new Image();
	ss1on.src = "/images/tc-ss-o.gif";
	button1on = new Image();
	button1on.src = "/images/but-win-03-on.gif";
	win2004on = new Image();
	win2004on.src = "/images/hp-winter2004-on.gif";
	button2on = new Image();
	button2on.src = "/images/nav/logo-winter-on.gif";
	button3on = new Image();
	button3on.src = "/images/nav/logo-luscious-on.gif";
	button4on = new Image();
	button4on.src = "/images/nav/logo-doll-on.gif";
	button5on = new Image();
	button5on.src = "/images/nav/logo-cooper-on.gif";
	button6on = new Image();
	button6on.src = "/images/photos/tc-win2003/video-butt-on.gif";
	button7on = new Image();
	button7on.src = "/images/hp-summer2004-on.gif";
	formsubmiton = new Image();
	formsubmiton.src = "/images/form-submit-on.gif";
	magneton = new Image();
	magneton.src = "/images/magnet-on.gif";
	brandon = new Image();
	brandon.src = "/images/nav/menu-brand-2.gif";
	 
	fibre = new Image();
	fibre.src = "/images/dot.gif";
	fibre1 = new Image();
	fibre1.src = "/images/photos/fibre1a.gif";
	fibre2 = new Image();
	fibre2.src = "/images/photos/fibre2a.gif";

}

//functions defined
function image_activate(imageName) {      
if (document.images) {
imageOn = eval(imageName + "on.src");
document [imageName].src = imageOn;
}
}

function image_inactivate(imageName) {
if (document.images) {
imageOff = eval(imageName + ".src");
document [imageName].src = imageOff;
}
}

/*
	Standards Compliant Rollover Script
	Author : Daniel Nolan
	http://www.bleedingego.co.uk/webdev.php
*/

function initRollovers() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('img');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgover') {
			var src = aImages[i].getAttribute('src');
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '-over'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = hsrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('-over'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
			}
		}
	}
}

window.onload = initRollovers;

