if (typeof(pathprefix) != "string"){
	var pathprefix = '';	
}

if(jQuery){
	var $j = jQuery.noConflict();
}

// these items can be redefined in global_vars.js
var menu_pause = 250;
var anim_menus = 1;
var menu_speed = .25;
var use_overview_pages = 0;
var use_select_btn = 0;
var section_subs = 0;
var menu_dir;
var otherBtns = new Array();
var otherImages = new Array();


// Browser & Platform Check
var isIE = (document.all) ? true : false;
var isNS4 = (document.layers) ? true : false;
var isNS6 = (document.getElementById && !isIE) ? true : false;
var isSafari = (navigator.userAgent.indexOf("Safari") >= 0) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

var isMAC = (navigator.appVersion.toLowerCase().indexOf("mac") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;

//remove transparency from menus to avoid conflict with flash plugin in FF2/Mac
if(isMAC && (navigator.userAgent.indexOf('Firefox/2') > 0)){ document.write('<style type="text/css">#nav_menus div, #ql_menu{ opacity:1 !important; -moz-opacity:1 !important; }</style>'); }

//remove transparency from menus in FF/Win to avoid issues with ClearType
if(isWin && (navigator.userAgent.indexOf('Firefox') > 0)){ document.write('<style type="text/css">#nav_menus div, #ql_menu{ opacity:1 !important; -moz-opacity:1 !important; }</style>');}

//fix for display of dropdown menus with transparent backgrounds in IE 8 
if( navigator.userAgent.indexOf('MSIE 8.0') > 0 ){ document.write('<style type="text/css">#nav_menus a,#ql_menu a{ position:relative; filter:alpha(opacity=100); }</style>') }

//button variables
var sectionId = "";
var sectionBtn = "";
var thisMenu = "";
var fsMenuName = "";
var xBtn = "";
var xBtnImg = "";
var wait;
var fsLinks = new Array();
var buttons = new Array();


//onLoad functions
addOnloadEvent(preLoad);

// Use this to add a function to the onload event
function addOnloadEvent(fnc){
  if ( typeof window.addEventListener != "undefined" )
    window.addEventListener( "load", fnc, false );
  else if ( typeof window.attachEvent != "undefined" ) {
    window.attachEvent( "onload", fnc );
  }
  else {
    if ( window.onload != null ) {
      var oldOnload = window.onload;
      window.onload = function ( e ) {
        oldOnload( e );
        window[fnc]();
      };
    }
    else
      window.onload = fnc;
  }
}

// Button Object Constructor
function btnObj(btnName,menuName,pageId,offSrc,onSrc,selectSrc) {
	this.btnName = btnName;
	if( menuName.indexOf("|") != -1 ){
		this.menuName = menuName.split("|")[0];
		this.menuDirection = menuName.split("|")[1];
	}else{
		this.menuName = menuName;
	}
	this.pageId = pageId;
	this.offSrc = offSrc;
	this.onSrc = onSrc;
	this.selectSrc = selectSrc;
}


function preLoad(){
	
	//colorLink();
	setStyle();
	//gaTrackLinks();
	//fsLinkRedirect();
	hideContentDivsOnLoad();
	if(isIE){ fixContentHeight(); }
	
	
	//------------------------ Create fsLinks buttons -----------------//

	//get all <a> tags
	fsLinks = document.getElementsByTagName('a');
	
	
	//test for fsbtn class and add button events
	for(i=0; i < fsLinks.length; i++)
	{
		if( fsLinks[i].className.toLowerCase() == 'menulink' )
		{
			//get page id from href
			//var search_str = fsLinks[i].search.split('&');
			//var search_str = fsLinks[i].id;
			//alert(search_str);
			//for(j=0;j<search_str.length;j++)
			//{
				
				fsLinks[i].pid = fsLinks[i].id.split('_')[1]; //add a pid attribute to <a> tag and assign id value
				//alert(fsLinks[i].pid);
				/*
				if(search_str[j].split('=')[0] == '?p'){
					fsLinks[i].pid = search_str[j].split('=')[1]; //add a pid attribute to <a> tag and assign id value
				}else{
					//this is for links other than "page.cfm"
					fsLinks[i].pid = "btn"+i; //add a generic id
				}
				*/
			//}
			
			//create menu reference
			//alert("dhtmlmenu_"+fsLinks[i].pid);
			fsLinks[i].menu = "dhtmlmenu_"+fsLinks[i].pid;
			
			// change style from "visibility:hidden" to "display:none"
			if( anim_menus && document.getElementById(fsLinks[i].menu))
			{
				document.getElementById(fsLinks[i].menu).style.display = "none";
				document.getElementById(fsLinks[i].menu).style.visibility = "visible";
			}

			//check if there is anything in the <a> tag besides text
			if(fsLinks[i].childNodes[0].tagName)
			{ 
				fsLinks[i].childNodes[0].id = "dhtmlbtn_"+fsLinks[i].pid; //add ID to the image			
				fsLinks[i].childNodes[0].onSrc = fsLinks[i].childNodes[0].src.replace(/\.(gif|jpg|png)/,"_on.$1"); //create onSrc and add to image
				
				if(use_select_btn)
				{
					fsLinks[i].childNodes[0].selectSrc = fsLinks[i].childNodes[0].src.replace(/\.(gif|jpg|png)/,"_select.$1"); //create selectSrc and add to image
				}
				else
				{
					fsLinks[i].childNodes[0].selectSrc = fsLinks[i].childNodes[0].src.replace(/\.(gif|jpg|png)/,"_on.$1"); //create selectSrc and add to image
				}
				buttons[fsLinks[i].childNodes[0].id] = new btnObj(fsLinks[i].childNodes[0].id, fsLinks[i].menu, fsLinks[i].pid,fsLinks[i].childNodes[0].src, fsLinks[i].childNodes[0].onSrc, fsLinks[i].childNodes[0].selectSrc);
				
				fsLinks[i].onmouseover = function (){ fsBtn(this.childNodes[0].id); }
				fsLinks[i].onmouseout = function (){ fsBtn(this.childNodes[0].id,'off'); }

			}else{
				fsLinks[i].id = "dhtmlbtn_"+fsLinks[i].pid; //add ID to the a tag
				buttons[fsLinks[i].id] = new btnObj(fsLinks[i].id,fsLinks[i].menu,fsLinks[i].pid,'','');
				fsLinks[i].onmouseover = function (){ showSubs(this.id); this.className = "fsBtn_on"; }
				fsLinks[i].onmouseout = function (){ mnuOut(this.id); }
			}
		
			if(use_overview_pages && document.getElementById(fsLinks[i].menu)){ fsLinks[i].href = document.getElementById(fsLinks[i].menu).getElementsByTagName('a')[0].href; }
		
			//turn on section button here
			for(n=0;n<pagearray.length;n++){
				if( fsLinks[i].pid == pagearray[n] ){
					fsLinks[i].className = "fsBtn_on";
					sectionId = fsLinks[i].pid;
					sectionBtn = fsLinks[i].id;
				}
			}
		
		
		}//end fsBtn check
		
		//Auto generate ql_btn code
		if( fsLinks[i].className.toLowerCase() == 'qlbtn' ){
			
			// change style from "visibility:hidden" to "display:none"
			if( anim_menus && document.getElementById('ql_menu')){
				document.getElementById('ql_menu').style.display = "none";
				document.getElementById('ql_menu').style.visibility = "visible";
			}
			
			if(fsLinks[i].childNodes[0].tagName){ 
				fsLinks[i].childNodes[0].id = "ql_btn"; //add ID to the image			
				fsLinks[i].childNodes[0].onSrc = fsLinks[i].childNodes[0].src.replace(/\.(gif|jpg|png)/,"_on.$1"); //create onSrc and add to image
				buttons['ql_btn'] = new btnObj('ql_btn','ql_menu','0',fsLinks[i].childNodes[0].src,fsLinks[i].childNodes[0].onSrc);			
				fsLinks[i].onmouseover = function (){ fsBtn('ql_btn'); }
				fsLinks[i].onmouseout = function (){ fsBtn('ql_btn','off'); }
			}else{
				fsLinks[i].id = "ql_btn"; //add ID to the a tag
				buttons['ql_btn'] = new btnObj('ql_btn','ql_menu','0','','');
				fsLinks[i].onmouseover = function (){ showSubs('ql_btn'); }
				fsLinks[i].onmouseout = function (){ mnuOut('ql_btn'); }
				
				document.getElementById('ql_menu').onmouseover = function(){ clearTimeout(wait); }
				document.getElementById('ql_menu').onmouseout = function(){ mnuOut('ql_btn','ql_menu'); }
		
				
			}
		}
	}//end loop through fsLinks
	
	//add otherBtns
	if(otherBtns.length>0){
		for(i=0;i<otherBtns.length;i++){
			btnAttrs = otherBtns[i].split(',');
			buttons[btnAttrs[0]] = new btnObj(btnAttrs[0],btnAttrs[1],btnAttrs[2],btnAttrs[3],btnAttrs[4]);
		}
	}

	//preLoad loops through the buttons array and pre-loads all of the onSrc's
	//Also defines sectionID & sectionBtn & turns on section button
/*
	if(document.images){
		var myImages = new Array();
		var i=0;
		for (this.btnName in buttons) {
			if (buttons[this.btnName].onSrc){
				myImages[i] = new Image();
				myImages[i].src = buttons[this.btnName].onSrc;
				i++;
				var n = 0;
				for (n in pagearray) { // loop through pagearray to match pageid
					if (pagearray[n] == buttons[this.btnName].pageId) {
						if(use_select_btn){
							document.images[this.btnName].src = buttons[this.btnName].selectSrc;
						}else{
							document.images[this.btnName].src = buttons[this.btnName].onSrc;
						}
						sectionId = buttons[this.btnName].pageId;
						sectionBtn = buttons[this.btnName].btnName;
					}
					n++;
				}
			}
		}
	
	if(otherImages){
		var oi = new Array();
		for(i=0; i < otherImages.length; i++){
			oi[i] = new Image(); oi[i].src = otherImages[i];
		}
	}
	
	}
*/
} //end preLoad


function fsBtn(btn,state,alt_onSrc){
	if(alt_onSrc){
		if(alt_onSrc.indexOf(",") != -1){ //check if there is a comma list with btn_name and src
			ob = alt_onSrc.split(",");
			xBtn = ob[0];
			xBtnImg = ob[1];
			swapImage(btn);
		}else{
			// if there is just an alt src then only that button will be changed
				// this function may no longer be needed but is included for backwards compatiblity
			document.images[btn].src = alt_onSrc;
		}
	}else if(state == "off"){
		imgRestore(btn);
	}else{ swapImage(btn); }
}

function swapImage(btn){
	//swapImage creates a roll-over effect from onSrc when passed the name of the button
	//Also shows sub-menus if specified
	if(buttons[btn].pageId != sectionId){ // btn src will not change if it is in the section, this preserves the selectSrc
		document.images[btn].src = buttons[btn].onSrc; //Turn button on
	}
	
	//check btnID against sectionId and section_menu variable before turning on sub menus
	if( buttons[btn].menuName && document.getElementById(buttons[btn].menuName) ){
	//Turn on menus if section sub option is on or the button pageId does not equal the sectionId
		showSubs(btn);
	}else if( (thisMenu.length>0) && (thisMenu != buttons[btn].btnName) ){
		clearSubs(thisMenu);
	}
	
	if(xBtn){ document.images[xBtn].src = xBtnImg; }
	
} //end swapImage

function imgRestore(btn){
	// turns button off unless it is the section button or has a menu
	if(buttons[btn].menuName && document.getElementById(buttons[btn].menuName)){
		mnuOut(btn);
	}else if(buttons[btn].pageId != sectionId){
		document.images[btn].src = buttons[btn].offSrc;
		if(xBtn){ document.images[xBtn].src = buttons[xBtn].offSrc; }
	}
}


//Sub Menu Functions
function showSubs(btn)
{
	if( (thisMenu.length > 0) && (thisMenu != buttons[btn].btnName) )
	{ //turn off any current menus unless we are still on the same button
		clearSubs(thisMenu);
	}
	// set offsets based on browser			 
	
	var mDir = (buttons[btn].menuDirection) ? buttons[btn].menuDirection : menu_dir;
	
	var mName = document.getElementById(buttons[btn].menuName);
	var bName = document.getElementById(buttons[btn].btnName);
	//alert(buttons[btn].menuName);
	//alert(btn)
	//alert(buttons[btn].pageId);
	//alert(sectionId);
	
	//if(section_subs == 1 || (buttons[btn].pageId != sectionId))
	//{ //Test for section subs option and section ID

		// mName.style.left = findPosX(bName) + "px";
		
		mName.style.left = $j('#'+ buttons[btn].btnName ).offset().left + 'px';
		menuTop = $j('#'+ buttons[btn].btnName ).offset().top;
		//alert(menuTop);
		//alert(mName.style.left);
		mName.style.curson = 'hand';

		if( mDir == "up" )
		{ 
			mName.style.top = (findPosY(bName) - mName.scrollHeight) + "px";
		}
		else if( mDir == "center" )
		{ 
			mName.style.top = (findPosY(bName) - (mName.scrollHeight / 2) + (bName.scrollHeight/2)) + "px";
		}
		else
		{ 
			mName.style.top = (findPosY(bName) + bName.scrollHeight) + "px"; 
		}

		if(anim_menus && mDir != "up")
		{
			if(thisMenu != buttons[btn].btnName)
			{
				 //new Effect.BlindDown(buttons[btn].menuName,{ duration:menu_speed, queue: {position:'end', scope: btn} });
				$j('#'+buttons[btn].menuName).slideDown(menu_speed*1000);
			}
		}
		else
		{
			mName.style.visibility = 'visible';
		}	

		thisMenu = buttons[btn].btnName; //add menu to close later
	//}
	
	clearTimeout(wait);
} //end showSubs


function mnuOut(btn)
{
	wait = setTimeout("clearSubs('"+ btn +"')", menu_pause);
}

function clearSubs(btn) 
{ //clears open menu
	var mDir = (buttons[btn].menuDirection) ? buttons[btn].menuDirection : menu_dir;
	if(buttons[btn].menuName){
		if(anim_menus && mDir != "up"){
			//new Effect.BlindUp(buttons[btn].menuName,{ duration:menu_speed,afterFinish:function(){btnOff(btn)}, queue: {position:'end', scope: btn} });
			$j('#'+buttons[btn].menuName).slideUp(menu_speed*1000,function(){btnOff(btn)});
		}else{
			document.getElementById(buttons[btn].menuName).style.visibility='hidden';
			btnOff(btn);
		}
		thisMenu="";
	}else{
		btnOff(btn);
	}
	if(document.getElementById(btn).className=="fsBtn_on" && buttons[btn].pageId != sectionId){ document.getElementById(btn).className="fsBtn"; }
}

function btnOff(btn){
	if(buttons[btn].pageId != sectionId && buttons[btn].offSrc){
			document.images[btn].src = buttons[btn].offSrc; //turn button back off
			}else if(buttons[btn].selectSrc){
				document.images[btn].src = buttons[btn].selectSrc;
			}
	if(xBtn){ document.images[xBtn].src = buttons[xBtn].offSrc; }
}


//Automatically find x,y positions of objects
function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }
//end Sub Menus

// ----------------------------------------------

function fsMenu (btnName,menuName,menuPause) {
	var menuClear;
	
	var mp = menuPause ? menuPause : menu_pause;
	
	$j(btnName).hover(
		function(){ //over
		
			if(fsMenuName && menuName != fsMenuName){ $j(fsMenuName).hide(); }
		
			$j(menuName).css('top', Number($j(btnName).offset().top) + Number($j(btnName).height()) + 'px');
			$j(menuName).css('left', $j(btnName).offset().left + 'px');
			$j(menuName).show();
			$j(menuName).addClass('fsMenuOn');
			$j(btnName).addClass('fsBtnOn');
			
			//set thisMenu here to know what to turn off
			fsMenuName = menuName;
			
			clearTimeout(menuClear);
		},
		function() { //out
			menuClear = setTimeout( "$j('"+menuName+"').hide().removeClass('fsMenuOn'); fsMenuName=''; $j('.fsBtnOn').removeClass('fsBtnOn')", mp );
		}
	);
	
	$j(menuName).hover(
		function(){ //over
			clearTimeout(menuClear);
		},
		function() { //out
			menuClear = setTimeout( "$j('"+menuName+"').hide().removeClass('fsMenuOn'); fsMenuName=''; $j('.fsBtnOn').removeClass('fsBtnOn')", mp );
		}
	);
} //end fsMenu

function fsContentSlider(target,contentList,fsContentDelay,fsContentSpeed,random,showControls){

	// the following variables must be in jQuery format (#idname, .classname, tagname)
	// they are required
	// target is the container that will receive the news items
	// contentList is the class of the containers with the news items

	// the following variables must be time in milliseconds (1000 = 1 second)
	// fsContentDelay is the length of time that each item is displayed (default = 4500)
	// fsContentSpeed is the speed of the fade between items (default = 250)

	// random (true/false) determines if it should pick a random item to stop on (default = false)

/*
	Updating for news project

	- add mouseover for popup option (or move to other function)
	- add navigation output (boxes, numbers, fwd/back arrows)
	
*/

	var fd = fsContentDelay && fsContentDelay != 0 ? fsContentDelay : 4500;
	var fs = fsContentSpeed ? fsContentSpeed : 250;
	var cn =  random ? Math.floor( $j(contentList).length * Math.random()) : 0;
	var contentInterval;
	var timerRunning;
	
	//add the necessary elements and load first content block into target
	$j(target).html( '<div class="contentControls"></div><div class="contentSlider">' + $j(contentList).eq(cn).html() + '</div>' );

	if(typeof showControls != undefined && showControls == false){
		$j(target + ' .contentControls').hide();
	}

	// only process the rest of it if there is more than one item
	if($j(contentList).length > 1){

		// $j(target).mouseenter(function(){ stopSlider(); })
		// $j(target).mouseleave(function(){ startSlider(); })

		// add "previous" control box 
		$j(target + ' .contentControls').append('<div class="cboxPrev">&laquo;</div>');
		$j(target + ' .contentControls .cboxPrev').click(function(){

			cn = cn-1 >= 0 ? cn-1 : $j(contentList).length-1;

			clearInterval(contentInterval);
			elementFade($j(target + ' .contentSlider'),$j(contentList).eq(cn).html(),fs);
			$j(target + ' .contentControls div').removeClass('on');
			$j(target + ' .cbox_'+cn ).addClass('on');
			return false;
		});

		//build the numbered control boxes
		$j(contentList).each(function(i){

			// this if statement was used on Harper to allow for customizing the look of certain posts
			// this could be worked into the general output to allow color coding items
			if( $j(this).text().search(/alert:/i) != -1 ){
				$j(this).wrapInner('<span class="newsAlert"></span>');
			}

			$j(target + ' .contentControls').append('<div class="cbox_'+i+'" cid="'+i+'">'+(i+1)+'</div>');
			$j(target + ' .cbox_'+i ).click( function(){
				cn = $j(this).attr('cid');
				clearInterval(contentInterval);
				elementFade($j(target + ' .contentSlider'),$j(contentList).eq(cn).html(),fs);
				$j(target + ' .contentControls div').removeClass('on');
				$j(target + ' .cbox_'+i ).addClass('on');
				return false;
			});
		});
		
		// add "next" control
		$j(target + ' .contentControls').append('<div class="cboxNext">&raquo;</div>');
		$j(target + ' .contentControls .cboxNext').click(function(){
			cn = cn < $j(contentList).length-1 ? Number(cn)+1 : 0;
			clearInterval(contentInterval);
			elementFade($j(target + ' .contentSlider'),$j(contentList).eq(cn).html(),fs);
			$j(target + ' .contentControls div').removeClass('on');
			$j(target + ' .cbox_'+cn ).addClass('on');
			return false;
		});

		// turn on the first box and start the auto-rotation
		$j(target + ' .cbox_'+cn).addClass('on');		

		if(fsContentDelay!=0){
			contentInterval = setInterval( function(){
				// go to the next one
				cn = cn < $j(contentList).length-1 ? cn+1 : 0;
				elementFade($j(target + ' .contentSlider'),$j(contentList).eq(cn).html(),fs);
				$j(target + ' .contentControls div').removeClass('on');
				$j(target + ' .cbox_'+cn ).addClass('on');
			
			},fd);
		}
	} //end contentList length check
} //end fsContentSlider

function elementFade(elementName,newContent,fadeSpeed){
	if(isIE){
		elementName.css('visibility','hidden');
		elementName.html( newContent );
		elementName.css('visibility','visible');
	}else{
		elementName.animate({opacity:'.1'},fadeSpeed,function(){
			elementName.html( newContent );
			elementName.animate({opacity:'1'},fadeSpeed);
		});	
	}
}

function swapStyle(title) {
	document.getElementById('contentdiv').className = title;
	createCookie("cfstyle", title);
}

function setStyle() {
	//var style = readCookie("cfstyle");
	//if (style != null && document.getElementById('contentdiv')) { swapStyle(style);}
}


// ----------------------------------------------
// Cookie functions
// ----------------------------------------------

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = ";expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+";path=/;";
}

// ----------------------------------------------

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

//Colorize parent links in banner navigation module
function colorLink(){
	var links = new Array();
	
	if( document.getElementById('leftbanner') ){
		links = document.getElementById('leftbanner').getElementsByTagName('a');	
		for(i=0;i < links.length;i++){
			for(j=2; j<pagearray.length;j++){
				rExp = new RegExp( "p=" + pagearray[j] + "$" , "i" );
				if( links[i].href.search(rExp) > 0 ){ 
					links[i].className = 'nav_history';
				}
			}
		}		
	}
}

function fixContentHeight(){ //use to fix the height of the content table in IE
	if($j('#contentdiv').length > 0){
		var h = $j('#contentdiv').parents('td').attr('offsetHeight');
		var pt = Number($j('#contentdiv').css('padding-top').replace(/[^0-9]/g,''));
		var pb = Number($j('#contentdiv').css('padding-bottom').replace(/[^0-9]/g,''));
		var bt = Number($j('#contentdiv').css('border-top-width').replace(/[^0-9]/g,''));
		var bb = Number($j('#contentdiv').css('border-bottom-width').replace(/[^0-9]/g,''));
		h = h-pt-pb-bt-bb;
		$j('#contentdiv').parents('table').eq(0).css('height', h + "px");		
	}
}

/*
	fsRedirect accepts a desitination URL to redirect the browser to and,
	optionally, a warn message which will produce a confirmation dialog
*/
function fsRedirect(l,warn){
	if(!parent.topframe){
		if(warn){
			if(confirm(warn)){document.location.replace(l);}else{return false;}
		}else{
			document.location.replace(l);
		}
	}
}

//fsLinksRedirect will highjack links listed in the fsRedirects array based on pageid
// syntax: "pageid,newUrl,target(optional)"
// example: "2,http://www.cnn.com/,_blank"

var fsRedirects = new Array();

function fsLinkRedirect (){
	fsLinks = document.getElementsByTagName('a');	
	if (fsRedirects.length > 0) {
		for (var i=0; i < fsLinks.length; i++) {
			if(fsLinks[i].href.search('page.cfm') > -1 && fsLinks[i].search.split(/p=/)[1]){ //limit to page.cfm links and check for p=
				id = fsLinks[i].search.split(/p=/)[1].split(/&/)[0]; // get the page id in each link
				for( var j=0; j < fsRedirects.length; j++){ //loop through redirects list
					reID = fsRedirects[j].split(',')[0]; //get the id from the redirect list
					if(reID == id){
						//use jQuery to rewrite the link attributes here
						$j('a').eq(i).attr('href',fsRedirects[j].split(',')[1]);
						$j('a').eq(i).attr('target',fsRedirects[j].split(',')[2]);
					}
				}
			}
		};		
	};		
	//if page id's match then change attributes or apply click function
}
