
//rollovers

var imgPath = null;
var oldRef = null;
var oldSrc = null;
var is_safari = (document.childNodes)&&(!document.all)&&(!navigator.taintEnabled)&&(!navigator.accentColorName)?true:false;
var is_macIE = (!window.print)?true:false;
var rightNowWeb = /(.*).custhelp.com(.*)/.test(document.location.href);

function preloadImages()
{
	// if the document has images
	if(document.images) {
	
		// if the imageArray doesn't exist then create it
		if(!document.imageArray) document.imageArray = new Array();
	
		// loop through all the images in the page and look for
		// the string "_up." - i added the period(.) to avoid confusion
		// with _up appearing in the id/name (e.g. sign_up_up.gif)
		// and replace "_up." with "_over." and create a new Image
		for(var i=0; i<document.images.length; i++) {
	
			imgSrc = document.images[i].src;
			if(imgSrc.lastIndexOf("-o.") != -1) {
				document.imageArray[i] = new Image();
				document.imageArray[i].src = document.images[i].src.replace("-b.", "-o.");
			}
		}			
	}	
}

function rollOut() 
{
	//abort rollovers if we are on Right Now Web and the browser is Safari or Mac IE (they do not recognize the sources base href)
	if (rightNowWeb && (is_safari || is_macIE)) {
		return;
	}
	
	if(document.images) {
		document.images[oldRef].src = oldSrc;
	}
}

function rollOver(imgRef)
{
	//abort rollovers if we are on Right Now Web and the browser is Safari or Mac IE (they do not recognize the sources base href)
	if (rightNowWeb && (is_safari || is_macIE)) {
		return;
	}
     
	if(document.images) {
		oldRef = imgRef;
		oldSrc = document.images[imgRef].src;
		document.images[imgRef].src = document.images[imgRef].src.replace("-b.", "-o.");
	}
}


