// Utility Functions
function popupWindow(url,width,height,scrollbars,name) {
	var handle;
	if(arguments.length < 4) {scrollbars = 'no';}
	if(arguments.length < 5) {name = 'popup';}
	if(handle != null && !handle.closed) {handle.close();}
	handle = window.open(url,name,'toolbar=no,location=no,directories=no,status=no,scrollbars='+scrollbars+',resizable=yes,width='+width+',height='+height);
	handle.focus();
}

// Require Flash 6 or higher
var flashOK = false;
if(navigator.plugins["Shockwave Flash"]) {
	var flashVersion = navigator.plugins["Shockwave Flash"].description.split('Shockwave Flash ')[1];
	if(flashVersion >= '6') { flashOK = true; }
} else if(window.ActiveXObject) {
	objFlash=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');");
	if(objFlash) { flashOK = true; }
}
function showFlash(url,width,height,base) {
	if(arguments.length < 4) {base = '.';}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab##version=6,0,29,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+url+'"><param name="quality" value="high"><param name="BASE" value="'+base+'"><embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" base="'+base+'"></embed></object>');
}

function focusSearch(t) { t.className='x_formelem'; t.value=''; }
function doSearch() { document.fSearch.submit(); }

function navOver(t,l) { if(arguments.length<2) l=''; t.className = 'x_navOver'+l; }
function navOut(t,l) { if(arguments.length<2) l=''; t.className = 'x_nav'+l; }
var allowGoTo = true;
function stopGoTo() { allowGoTo = false; }
function goToPage(id) { if(allowGoTo) window.location = relPath + 'index.cfm?p='+id; }
function goToURL(url) { if(allowGoTo) window.location = url; }

//rollover function

var	prevarrow = new Image();var	prevarrowon = new Image();
var nextarrow = new Image();var nextarrowon = new Image();
prevarrow.src = 'img/arrow_prev.gif';prevarrowon.src = 'img/arrow_prev_on.gif';
nextarrow.src = 'img/arrow_next.gif';nextarrowon.src = 'img/arrow_next_on.gif';

function navrollover(i) {
	if (i == 'prev') document.images["img_" + i].src = prevarrowon.src;
	else if (i == 'next') document.images["img_" + i].src = nextarrowon.src;
}
function navrollout(i) {
  if (i=='prev') document.images["img_" + i].src = prevarrow.src;
  else if (i=='next') document.images["img_" + i].src = nextarrow.src;
}
