// --------------------------------------------------\\
// Parameters are passed to the function instead of including them in the function.
// URL parameter is replaced with "src", which references the link in the DOM, and uses the specified URL

function LinkPopup(src,width,height,xdistance,ydistance,resize,scroll) {

	var OpenString = "'" + 'toolbar=0,'
	+ 'location=0,'
	+ 'directories=0,'
	+ 'status=0,'
	+ 'menubar=0,'
	+ 'scrollbars=' + scroll + ','
	+ 'resizable=' + resize + ','
	+ 'width=' + width + ','
	+ 'height=' + height + ','
	+ 'left=' + xdistance + ','
	+ 'top=' + ydistance + ','
	+ 'screenX=' + xdistance + ','
	+ 'screenY=' + ydistance + "'";
	
	var theWindow = window.open(src.getAttribute('href'),"_blank",OpenString)
	theWindow.focus();
	return theWindow;

}

// --------------------------------------------------\\
// Basic image-based navigation rollover
// expects that files are named "filename.gif" and "filename_on.gif", respectively for states

function ImageNavRollover(obj) {
	var src = obj.src;
	if(src.indexOf('_on.gif') == -1) {
		// rollover
		src = src.replace(/\.gif/,"_on.gif");
	}
	else {
		// rollout
		src = src.replace(/\_on.gif/,".gif");
	}
	obj.src = src;
}