var iPath  = 'images/nav/';
var iExt   = 'gif';
var suffix = new Array('off', 'on');

function preLoad(){
	if(document.images){
		var argLen = arguments.length;
		for(var i = 0; i < argLen; i++){
			var arg = arguments[i];
			var sufLen = suffix.length;
			for(j = 0; j < sufLen; j++){
				var suf = suffix[j]
				self[arg + '_' + suf] = new Image();
				self[arg + '_' + suf].src = iPath + arg + '_' + suf + '.' + iExt;
			}
		}
	}
}

function rollOver(iName, iState){
	if(document.images && self[iName + '_' + iState]){
		document.images[iName].src = self[iName + '_' + iState].src;
	}
	return true;
}

function preloadHomepage(){
	preLoad('homepage-theVibe','homepage-theShop','homepage-theWork','homepage-theContact');
}

function preloadTheVibe(){
	preLoad('theVibe-theVibe','theVibe-theShop','theVibe-theWork','theVibe-theContact');
}

function preloadTheShop(){
	preLoad('theShop-theVibe','theShop-theShop','theShop-theWork','theShop-theContact');
}

function preloadTheWork(){
	preLoad('theWork-theVibe','theWork-theShop','theWork-theWork','theWork-theContact','classics','recent');
}

function preloadTheContact(){
	preLoad('theContact-theVibe','theContact-theShop','theContact-theWork','theContact-theContact');
}
