/* Page Control.  Written by Joe McCormack, 2006. */
/* RSS Based Detection.  Rest of RSS Event Code At Bottom. */
var footprint = location.href.toLowerCase();
/*
  Config: When Page Content Should Appear
  0 = before left side of flying boxes finishes
  1 = after left side of flying boxes finishes
  2 = after right side of flying boxes finishes
  3 = after top side of flying boxes finishes
*/
var adminid = 0;
var when = 1;
/* Config: CTA Ads */
CTA_ads = new Array();
CTA_ads[1] = "/templates/images/snapshots/promoicon_catalog.gif||/requestinfo/request_a_catalog.aspx||template6||cta||7||0";
CTA_ads[2] = "/templates/images/snapshots/promoicon_requestinfo.gif||/requestinfo/||template6||cta||7||0";
CTA_ads[3] = "/templates/images/snapshots/promoicon_showcase.gif||/showcase/||template8||cta||7||0";
CTA_ads[4] = "/templates/images/snapshots/promoicon_uattv.gif||/tv/||template8||cta||7||0";

/* zk added facebook promoicon and link*/
CTA_ads[5] = "/templates/images/snapshots/promoicon_facebook.gif||http://www.facebook.com/pages/Tempe-AZ/The-University-of-Advancing-Technology/44870336311||template8||cta||7||0";
CTA_ads[6] = "/templates/images/snapshots/promoicon_showcase01.gif||http://www.uat.edu/press||template8||cta||7||0";
CTA_ads[7] = "/templates/images/snapshots/promoicon_showcase02.gif||http://www.uat.edu/press||template8||cta||7||0";
CTA_ads[8] = "/templates/images/snapshots/promoicon_showcase03.gif||http://www.uat.edu/press||template8||cta||7||0";

/* Config: Domain Resolution */
var origination = false;
/* Config: Search */
var shShowMax = 10;				/* Max number of search results to show at a time */
var shBetween = " -- ";				/* Something that goes between previous and next */
var shPreviousLink = "<b>&lt;&lt; PREVIOUS</b>";
var shNextLink = "<b>NEXT &gt;&gt;</b>";
/* Config: Flash Objects Location */
var flashobj_path = "/templates/flash/";
/* Config: Random Images Path */
var random_img_path = "/webmedia/jpg/";
/* Config: Transition */
var transitionSpeed = 10;			/* Speed of transition */
var transitionStep = 15;			/* Opacity application per iteration */
transitionbgKey = new Array();			/* Body background color of each template */
transitionbgKey[1] = "template1,#788f40";
transitionbgKey[2] = "template2,#8c4336";
transitionbgKey[3] = "template3,#908f73";
transitionbgKey[4] = "template4,#6d8c88";
transitionbgKey[5] = "template5,#8a8131";
transitionbgKey[6] = "template6,#3d5360";
transitionbgKey[7] = "template7,#af7626";
transitionbgKey[8] = "template8,#1e1e1e";
/* Config: Flying Boxes */
boxes_xyposition = new Array();
var box_location_1_id = "left_img_swap";	/* ID of first image for flying boxes */
var box_location_2_id = "right_img_swap";	/* ID of second image for flying boxes */
var box_x_steprate = 10;			/* Pixel Progression Along X For Each Iteration */
var box_y_steprate = 10;			/* Pixel Progression Along Y For Each iteration */
var set_1_number_boxes = 16;			/* Number Of Boxes In Area 1 */
var set_2_number_boxes = 16;			/* Number Of Boxes In Area 2 */
var number_of_loops = 11;			/* Number Of Loops To Perform Box Movement In */
var box_move_rate = 10;				/* Iteration Rate In Milliseconds */
var left_name = "sblm_";			/* Left Series Box Prefix */
var right_name = "sbrm_";			/* Right Series Box Prefix */
var static_left_box_mname = "sbl_";		/* Left Static Box Matrix Prefix */
var static_right_box_mname = "sbr_";		/* Right Static Box Matrix Prefix */
var dyn_left_box_mname = "sblm_";		/* Left Dynamic Box Matrix Prefix */
var dyn_right_box_mname = "sbrm_";		/* Right Dynamic Box Matrix Prefix */
var left_num_horz_boxes = 4;			/* Number of Boxes Comprising 1 Left Row */
var right_num_horz_boxes = 4;			/* Number of Boxes Comprising 1 Right Row */
var left_boxes_width = 200;			/* Width Of Left Box Area */
var left_boxes_height = 200;			/* Height Of Left Box Area */
var right_boxes_width = 200;			/* Width Of Right Box Area */
var right_boxes_height = 200;			/* Height Of Right Box Area */
var mini_box_width = 50;			/* Width Of Box */
var mini_box_height = 50;			/* Height Of Box */
var left_bleed = -5;				/* Left Boundary Progression Buffer */
var right_bleed = 5;				/* Right Boundary Progression Buffer */
var top_bleed = -5;				/* Top Boundary Progression Buffer */
var btm_bleed = 5;				/* Bottom Boundary Progression Buffer */
/*
xpath,ypath,opacity,offset
xpath					1 = move right, 0 = no move, -1 = move left
ypath					1 = move down, 0 = no move, -1 = move up
opacity					Alpha value
offset					Amount to offset default progression rate
*/
/* LEFT MATRIX */
boxes_xyposition[1] = "0,0,0,0";
boxes_xyposition[2] = "0,0,100,0x	0,0,90,0x	0,0,80,0x	0,0,70,0x	0,0,60,0x	0,0,50,0x	0,0,40,0x	0,0,30,0x	0,0,20,0x	0,0,0,0x";
boxes_xyposition[3] = "0,0,100,0x	0,0,70,0x	0,0,40,0x	0,0,10,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x";
boxes_xyposition[4] = "0,0,0,0";
boxes_xyposition[5] = "0,0,0,0";
boxes_xyposition[6] = "1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,80,0x	1,0,70,0x	1,0,60,0x	1,0,0,0";
boxes_xyposition[7] = "-1,0,100,0x	-1,0,100,0x	-1,0,100,0x	-1,0,100,0x	-1,0,100,0x	-1,0,100,0x	-1,0,80,0x	-1,0,70,0x	-1,0,60,0x	-1,0,0,0";
boxes_xyposition[8] = "0,0,100,0x	0,0,70,0x	0,0,40,0x	0,0,10,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x	0,0,0,0x";
boxes_xyposition[9] = "1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,100,0x	1,0,80,0x	1,0,70,0x	1,0,60,0x	1,0,0,0";
boxes_xyposition[10] = "0,0,0,0";
boxes_xyposition[11] = "0,0,100,0x	0,0,90,0x	0,0,80,0x	0,0,70,0x	0,0,60,0x	0,0,50,0x	0,0,40,0x	0,0,30,0x	0,0,20,0x	0,0,0,0x";
boxes_xyposition[12] = "0,0,0,0";
boxes_xyposition[13] = "0,0,0,0";
boxes_xyposition[14] = "0,0,0,0";
boxes_xyposition[15] = "0,0,0,0";
boxes_xyposition[16] = "0,0,0,0";
/* RIGHT MATRIX */
boxes_xyposition[17] = "0,0,0,0";
boxes_xyposition[18] = "0,0,0,0";
boxes_xyposition[19] = "-1,0,100,3x	-1,0,100,3x	-1,0,100,3x	-1,0,100,3x	-1,0,100,3x	-1,0,100,3x	-1,0,80,3x	-1,0,70,3x	-1,0,60,3x	-1,0,0,3";
boxes_xyposition[20] = "-1,0,90,-5x	-1,0,80,-4x	-1,0,70,-4x	-1,0,60,-3x	-1,0,50,-3x	-1,0,40,-2x	-1,0,30,-2x	-1,0,20,-1x	-1,0,10,-1x	-1,0,0,0";
boxes_xyposition[21] = "1,0,100,-4x	1,0,100,-4x	1,0,100,-4x	1,0,100,-4x	1,0,100,-4x	1,0,100,-4x	1,0,80,-4x	1,0,70,-4x	1,0,60,-4x	1,0,0,-4";
boxes_xyposition[22] = "1,0,100,3x	1,0,100,3x	1,0,100,3x	1,0,100,3x	1,0,100,3x	1,0,100,3x	1,0,80,3x	1,0,70,3x	1,0,60,3x	1,0,0,3";
boxes_xyposition[23] = "0,0,0,0";
boxes_xyposition[24] = "0,0,0,0";
boxes_xyposition[25] = "1,0,100,2x	1,0,100,2x	1,0,100,2x	1,0,100,2x	1,0,100,2x	1,0,100,2x	1,0,100,2x	1,0,70,2x	1,0,60,2x	1,0,0,2";
boxes_xyposition[26] = "1,0,100,8x	1,0,100,8x	1,0,100,8x	1,0,100,8x	1,0,100,8x	1,0,100,8x	1,0,100,8x	1,0,70,8x	1,0,60,8x	1,0,0,8";
boxes_xyposition[27] = "0,0,0,0";
boxes_xyposition[28] = "0,0,0,0";
boxes_xyposition[29] = "0,0,0,0";
boxes_xyposition[30] = "0,1,100,0x	0,1,100,0x	0,1,90,0x	0,1,80,0x	-1,1,70,0x	-1,0,60,0x	-1,0,50,0x	-1,0,40,0x	-1,0,30,0x	-1,0,0,0";
boxes_xyposition[31] = "1,0,100,0x	1,0,100,0x	1,0,90,0x	1,0,80,0x	1,1,70,0x	0,1,60,0x	0,1,50,0x	0,1,40,0x	0,1,30,0x	0,1,0,0";
boxes_xyposition[32] = "0,0,70,0x	0,0,60,0x	0,0,50,0x	0,0,40,0x	0,0,30,0x	0,0,20,0x	0,0,10,0x	0,0,0,0x	0,0,0,0x	0,0,0,0";
boxes_xyposition[33] = "0,0,90,0x	0,0,80,0x	0,0,70,0x	0,0,60,0x	0,0,50,0x	0,0,40,0x	0,0,30,0x	0,0,20,0x	0,0,10,0x	0,0,0,0";
/* Config: Fringe Boxes */
var lslide_id = "ls_";				/* ID of left slide boxes */
var rslide_id = "rs_";				/* ID of right slide boxes */
var tslide_id = "ts_";				/* ID of top slide boxes */
var slide_rate = 1;				/* Recursion rate */
var left_slide_pause = 100;			/* Pause Before Starting First Slide */
var right_slide_pause = 200;			/* Pause Before Starting Second Slide */
var top_slide_pause = 300;			/* Pause Before Starting Third Slide */
var slide_start_yneg = 750;			/* Bottom Start When y is negative */
var slide_start_xneg = 750;			/* Right Start When x is negative */
var element_zindex = 5005;			/* Index value of Dup elements */
lslide = new Array();
/*
opacity, x, y, speed, stop location, current location
opacity :: final opacity value of box
x :: 0 = none, -1 = left, 1 = right
y :: 0 - none, -1 = up, 1 = down
speed :: pixel rate per iteration
stop location :: pixel position to stop at
current location :: current pixel location
*/
/* Left Slide */
// 5th element mod for even positioning
lslide[1] = "70,	0,	1,	100,	400,	0";
lslide[2] = "100,	0,	1,	20,	50,	0";
lslide[3] = "40,	0,	1,	60,	200,	0";
lslide[4] = "60,	0,	1,	40,	300,	0";
lslide[5] = "100,	0,	1,	50,	350,	0";
lslide[6] = "40,	0,	1,	60,	450,	0";
lslide[7] = "60,	0,	1,	80,	500,	0";
/* Right Slide */
lslide[8] = "80,	0,	-1,	150,	50,	550";
lslide[9] = "90,	0,	-1,	120,	250,	550";
lslide[10] = "40,	0,	-1,	40,	500,	550";
lslide[11] = "30,	0,	-1,	80,	100,	550";
lslide[12] = "50,	0,	-1,	70,	300,	550";
lslide[13] = "100,	0,	-1,	60,	350,	550";
lslide[14] = "30,	0,	-1,	50,	450,	550";
/* Top Side */
lslide[15] = "100,	0,	-1,	12,	0,	50";
lslide[16] = "70,	0,	-1,	14,	0,	50";
lslide[17] = "40,	0,	-1,	13,	0,	50";
lslide[18] = "90,	0,	-1,	17,	0,	50";
lslide[19] = "40,	0,	-1,	15,	0,	50";
lslide[20] = "30,	0,	1,	16,	50,	0";
lslide[21] = "20,	0,	1,	13,	50,	0";
/* Config: Mindmap */
var mindmap_xstart_offset = 4;			/* Relative location where final X-Axis left coordinate is placed */
var mindmap_classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";
var mindmap_codebase = "://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
var mindmap_id = "mindMapObj";
var mindmap_align = "center";
var mindmap_width = 498;
var mindmap_height = 300;
var mindmap_allowScriptAccess = "sameDomain";
var mindmap_quality = "high";
var mindmap_bgcolor = "#000000";
var mindmap_type = "application/x-shockwave-flash";
var mindmap_pluginspage = "://www.macromedia.com/go/getflashplayer";
/* Codebase/pluginspage reference for flash objects */
var flObjects_prefix = "http";
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
mindmap_codebase = flObjects_prefix + mindmap_codebase;
mindmap_pluginspage = flObjects_prefix + mindmap_pluginspage;

var mindmap_wmode = "transparent";
/* Mindmap Transition */
var spawn_time = 5;				/* Recursion rate; milliseconds */
var spawn_alpha_step = 2;			/* Amount To Increase Alpha Value By Per Iteration */
var spawn_box_grow_horz = 10;			/* Amount To Increase Box Value Per Iteration Horizontally */
var spawn_box_grow_vert = 6;			/* Amount To Increase Box Value Per Iteration Vertically */
/* Do Not Use */
var net_browser = 0;
var jump_data = "";
var mindmap_status = 0;
var mindmap_recurse = 0;
var mindmap_left_start = 0;
var mindmap_left_end = 0;
var mindmap_right_start = 0;
var mindmap_opacity = 10;
var has_whened = 0;
var source_link_target = "";
var source_link_position = "";
function cta_active(action, target) {
if (action == 1) {
	/* Over state of light */
	document.getElementById(target+"_txt").className = "cta_text_out";
	document.getElementById(target+"_img").style.visibility = "visible";
		 }
if (action == 2) {
	/* Over state of dark */
	document.getElementById(target+"_txt").className = "cta_text_out";
	document.getElementById(target+"_img").style.visibility = "visible";
		 }
if (action == 3) {
	/* Out state of light */
	document.getElementById(target+"_txt").className = "cta_text_over";
	document.getElementById(target+"_img").style.visibility = "hidden";
		 }
if (action == 4) {
	/* Out state of dark */
	document.getElementById(target+"_txt").className = "cta_text_over";
	document.getElementById(target+"_img").style.visibility = "hidden";
		 }
}
function wbrowsertype() {
/*
__ net_browser flag values based on OS/Browser __
	0 = Undetermined OS / Browser
	17 = Undetermined OS / Browser
MAC OS:
	2 = Unknown Browser
	3 = Internet Explorer
	4 = Safari
	5 = Firefox
	6 = Netscape
	7 = Opera
	8 = Camino
	9 = Firebird
	26 = Google Chrome
WINDOWS OS:
	10 = Unknown Browser
	11 = Internet Explorer
	12 = Firefox
	13 = Netscape
	14 = Opera
	15 = Camino
	16 = Firebird
	25 = Google Chrome
UNKNOWN OS:
	17 = Unknown Browser
	18 = Safari
	19 = Internet Explorer
	20 = Firefox
	21 = Netscape
	22 = Opera
	23 = Camino
	24 = Firebird
	27 = Google Chrome
*/
var btfound = 0; browser_detect = navigator.userAgent.toLowerCase();
if ((browser_detect.indexOf("konqueror") + 1)) { btfound = 1; net_browser = 1; }
if ((browser_detect.indexOf("mac_powerpc") + 1)) { btfound = 1; net_browser = 3; }
if (btfound == 0) {
	// MAC OS
	if ((browser_detect.indexOf("macintosh") + 1)) {
		if ((browser_detect.indexOf("safari") + 1)) { btfound = 1; net_browser = 4; }
		else if ((browser_detect.indexOf("firefox") + 1)) { btfound = 1; net_browser = 5; }
		else if ((browser_detect.indexOf("netscape") + 1)) { btfound = 1; net_browser = 6; }
		else if ((browser_detect.indexOf("opera") + 1)) { btfound = 1; net_browser = 7; }
		else if ((browser_detect.indexOf("camino") + 1)) { btfound = 1; net_browser = 8; }
		else if ((browser_detect.indexOf("firebird") + 1)) { btfound = 1; net_browser = 9; }
		else if ((browser_detect.indexOf("chrome") + 1)) { btfound = 1; net_browser = 26; }
		else { btfound = 1; net_browser = 2; }
						       }
	// Windows OS
	if ((browser_detect.indexOf("windows") + 1) && btfound == 0) {
		if ((browser_detect.indexOf("msie") + 1)) { btfound = 1; net_browser = 11; }
		else if ((browser_detect.indexOf("firefox") + 1)) { btfound = 1; net_browser = 12; }
		else if ((browser_detect.indexOf("netscape") + 1)) { btfound = 1; net_browser = 13; }
		else if ((browser_detect.indexOf("opera") + 1)) { btfound = 1; net_browser = 14; }
		else if ((browser_detect.indexOf("camino") + 1)) { btfound = 1; net_browser = 15; }
		else if ((browser_detect.indexOf("firebird") + 1)) { btfound = 1; net_browser = 16; }
		else if ((browser_detect.indexOf("chrome") + 1)) { btfound = 1; net_browser = 25; }
		else { btfound = 1; net_browser = 10; }
						     		     }
	// Unknown OS
	if (btfound == 0) {
		if ((browser_detect.indexOf("safari") + 1)) { net_browser = 18; }
		else if ((browser_detect.indexOf("msie") + 1)) { net_browser = 19; }
		else if ((browser_detect.indexOf("firefox") + 1)) { net_browser = 20; }
		else if ((browser_detect.indexOf("netscape") + 1)) { net_browser = 21; }
		else if ((browser_detect.indexOf("opera") + 1)) { net_browser = 22; }
		else if ((browser_detect.indexOf("camino") + 1)) { net_browser = 23; }
		else if ((browser_detect.indexOf("firebird") + 1)) { net_browser = 24; }
		else if ((browser_detect.indexOf("chrome") + 1)) { net_browser = 27; }
		else { net_browser = 17; }
			  }
		  }
/* In most cases, Google Chrome will behave the same as Firefox. If not you can remove these value overwrites. */
if (net_browser == 25) { net_browser = 12; }
else if (net_browser == 26) { net_browser = 5; }
else if (net_browser == 27) { net_browser = 20; }
origination = originate_check();
}
function originate_check() {
/* Returns true if visitor came from outside of root domain, false otherwise. */
/* 'start' as an array name seems to be reserved by IE.  Use 'starz' instead. */
var previous = document.referrer.toLowerCase();
var current = location.href.toLowerCase();
if (previous.length > 0) {
	starz = new Array(); var pfiltered = "";
	if (previous.match("http://") == "http://") { starz = previous.split("http://"); pfiltered = starz[1]; }
	else if (previous.match("https://") == "https://") { starz = previous.split("https://"); pfiltered = starz[1]; }
	if (pfiltered.charAt(0) == "/") { return false; }
	else {
	      tmp = new Array(); dots = new Array(); dotsb = new Array(); active = new Array();
	      var cfiltered = "", pfiltered_result = "", cfiltered_result = "";
	      if (current.match("http://") == "http://") { active = current.split("http://"); cfiltered = active[1]; }
	      else if (current.match("https://") == "https://") { active = current.split("https://"); cfiltered = active[1]; }
	      tmp = pfiltered.split("/");
	      dots = tmp[0].split(".");
	      pfiltered_result = dots[(dots.length - 2)] + "." + dots[(dots.length - 1)];
	      tmp = cfiltered.split("/");
	      dotsb = tmp[0].split(".");
	      cfiltered_result = dotsb[(dotsb.length - 2)] + "." + dotsb[(dotsb.length - 1)];
	      if (pfiltered_result == cfiltered_result) { return false; }
	      else { return true; }
	     }
			 }
else { return false; }
}
function pos_query(actor, ox, oy) {
var x_posi = 0, y_posi = 0;
var actor_top = 0, actor_left = 0;
if (document.all) { actor = document.all[actor]; }
else { actor = document.getElementById(actor); }
if (document.layers) {
		      actor_top = window.pageYOffset;
		      actor_left = window.pageXOffset;
		     }
else {
      actor_top = document.body.scrollTop;
      actor_left = document.body.scrollLeft;
     }
while (actor != null) {
		       x_posi += actor.offsetLeft - actor.scrollLeft;
		       y_posi += actor.offsetTop - actor.scrollTop;
		       /* Recycle */
		       actor = actor.offsetParent;
		      }
return((x_posi + ox) + "," + (y_posi + oy));
}

//the following javascript is taken directly from macromedia's site for flash detection
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}
var primary_nFlash = 0;
var secondary_nFlash = 0;
var tertiary_nFlash = 0;
// origination
function render_primary() {
wbrowsertype();
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
if (DetectFlashVer(9,0,0)) {
	/* Ghetto Flash Fix */
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"" + flObjects_prefix + "://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"650\" height=\"50\" id=\"primary\" align=\"middle\">")
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />")
	document.write("<param name=\"movie\" value=\""+flashobj_path+"primary.swf\" />")
	document.write("<param name=\"quality\" value=\"high\" />")
	document.write("<param name=\"wmode\" value=\"transparent\" />")
	document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />")
	document.write("<embed src=\""+flashobj_path+"primary.swf\" flashvars=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" wmode=\"transparent\" quality=\"high\" width=\"650\" height=\"50\" name=\"primary\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />")
	document.write("</object>")
			  }
else {
      primary_nFlash = 1;
      document.write("<table class='media_type_2_colored_shell' height='20' width='550'><tr>");
      document.write("<td width='100%' valign='center' align='center'>");
      document.write("<h1 style='padding-top:2px;margin-top:2px;'>This content requires Adobe Flash Player 9. ")
      if (net_browser == 1) { document.write("<a href='http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&P2_Platform=Linux&P3_Browser_Version=Netscape4' target='_blank'><span style='text-decoration:underline;'>Download the flash player here.</span></a>"); }
      else { document.write("<a href='http://www.adobe.com/products/flashplayer/' target='_blank'><span style='text-decoration:underline;'>Download the flash player here.</span></a>"); }
      document.write("</h1>");
      document.write("</td>");
      document.write("</tr></table>");
     }
}
function render_secondary() {
wbrowsertype();
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
if (DetectFlashVer(9,0,0)) {
	/* Ghetto Flash Fix */
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"" + flObjects_prefix + "://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"154\" height=\"185\" id=\"secondary\" align=\"middle\">")
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />")
	document.write("<param name=\"movie\" value=\""+flashobj_path+"secondary.swf\" />")
	document.write("<param name=\"quality\" value=\"high\" />")
	document.write("<param name=\"wmode\" value=\"transparent\" />")
	document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />")
	document.write("<embed src=\""+flashobj_path+"secondary.swf\" flashvars=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" wmode=\"transparent\" quality=\"high\" width=\"154\" height=\"185\" name=\"secondary\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />")
	document.write("</object>")
			   }
else {
      secondary_nFlash = 1;
      document.write("<div style='width:195;'><table class='media_type_2_colored_shell' width='195px'><tr><td valign='center' align='center'>");
      document.write("<h1 style='padding-top:2px;margin-top:2px;'>This content requires Adobe Flash Player 9. ");
      if (net_browser == 1) { document.write("<a href='http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&P2_Platform=Linux&P3_Browser_Version=Netscape4' target='_blank'><span style='text-decoration:underline'>Download the flash player here.</span></a>"); }
      else { document.write("<a href='http://www.adobe.com/products/flashplayer/' target='_blank'><span style='text-decoration:underline'>Download the flash player here.</span></a>"); }
      document.write("</h1>");
      document.write("</td></tr></table></div>");
     }
}
function render_trit() {
wbrowsertype();
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
if (DetectFlashVer(9,0,0)) {
	/* Ghetto Flash Fix */
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"" + flObjects_prefix + "://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"153\" height=\"240\" id=\"trit\" align=\"middle\">")
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />")
	document.write("<param name=\"movie\" value=\""+flashobj_path+"tertiary.swf\" />")
	document.write("<param name=\"quality\" value=\"high\" />")
	document.write("<param name=\"wmode\" value=\"transparent\" />")
	document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />")
	document.write("<embed src=\""+flashobj_path+"tertiary.swf\" flashvars=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" wmode=\"transparent\" quality=\"high\" width=\"153\" height=\"240\" name=\"trit\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />")
	document.write("</object>")
			   }
else {
      tertiary_nFlash = 1;
      document.write("<div style='width:195;'><table class='media_type_2_colored_shell' width='195px'><tr><td valign='center' align='center'>");
      document.write("<h1 style='padding-top:2px;margin-top:2px;'>This content requires Adobe Flash Player 9. ");
      if (net_browser == 1) { document.write("<a href='http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&P2_Platform=Linux&P3_Browser_Version=Netscape4' target='_blank'><span style='text-decoration:underline'>Download the flash player here.</span></a>"); }
      else { document.write("<a href='http://www.adobe.com/products/flashplayer/' target='_blank'><span style='text-decoration:underline'>Download the flash player here.</span></a>"); }
      document.write("</h1>");
      document.write("</td></tr></table></div>");
     }
}

function renderApply() 
{
    wbrowsertype();
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
    if (DetectFlashVer(9,0,0)) 
    {
	    /* Ghetto Flash Fix */
	    document.write("<div id='applyButtonDiv' style='position:absolute;top:40px;left:120px;z-index:1000;'>");
	    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"" + flObjects_prefix + "://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"160\" height=\"60\" id=\"apply\" align=\"middle\">");
	    document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
	    document.write("<param name=\"movie\" value=\""+flashobj_path+"ApplyButton.swf\" />");
	    document.write("<param name=\"quality\" value=\"high\" />");
	    document.write("<param name=\"wmode\" value=\"transparent\" />");
	    document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />");
	    document.write("<embed src=\""+flashobj_path+"ApplyButton.swf\" flashvars=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" wmode=\"transparent\" quality=\"high\" width=\"160\" height=\"60\" name=\"apply\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />");
	    document.write("</object>");
	    document.write("</div>");
	}
    else 
    {
        document.write("<div id='applyButtonDiv' style='position:absolute;top:50px;left:120px;z-index:1000;'>");
     	document.write("<a href='javascript:pgTransition(\"/admissions/how_to_apply.aspx\", \"template1\", \"apply\", \"0\", 0);' style='color:#ff0000;'><img src='/templates/images/applybutton/ApplyNow_"+template_type+".jpg' width='122' height='41' alt='' border='0' /></a>");
     	document.write("</div>");
    }
}

function renderRequestInfo() 
{
    wbrowsertype();
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
    if (DetectFlashVer(9,0,0)) 
    {
	    /* Ghetto Flash Fix */
	    document.write("<div id='requestinfoButtonDiv' style='position:absolute;top:40px;left:250px;z-index:1000;'>");
	    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"" + flObjects_prefix + "://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"160\" height=\"60\" id=\"apply\" align=\"middle\">");
	    document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
	    document.write("<param name=\"movie\" value=\""+flashobj_path+"RequestButton.swf\" />");
	    document.write("<param name=\"quality\" value=\"high\" />");
	    document.write("<param name=\"wmode\" value=\"transparent\" />");
	    document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />");
	    document.write("<embed src=\""+flashobj_path+"RequestButton.swf\" flashvars=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" wmode=\"transparent\" quality=\"high\" width=\"160\" height=\"60\" name=\"apply\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />");
	    document.write("</object>");
	    document.write("</div>");
	}
    else 
    {
        document.write("<div id='requestinfoButtonDiv' style='position:absolute;top:50px;left:260px;z-index:1000;'>");
     	document.write("<a href='javascript:pgTransition(\"/requestinfo/default.aspx\", \"template6\", \"requestinfo\", \"0\", 0);' style='color:#ff0000;'><img src='/templates/images/requestbutton/GetInfo_"+template_type+".jpg' width='122' height='41' alt='' border='0' /></a>");
     	document.write("</div>");
    }
}

function render_mindMap() {
/* Ghetto Flash Fix */
var compiled = "";
compiled = '<center><object classid="'+mindmap_classid+'" codebase="'+mindmap_codebase+'" width="'+mindmap_width+'" height="'+mindmap_height+'" id="'+mindmap_id+'" align="'+mindmap_align+'">';
compiled = compiled + '<param name="allowScriptAccess" value="' + mindmap_allowScriptAccess + '" />';
compiled = compiled + '<param name="movie" value="'+flashobj_path+'mindMap.swf'+'" />';
compiled = compiled + '<param name="quality" value="'+mindmap_quality+'" />';
compiled = compiled + '<param name="bgcolor" value="'+mindmap_bgcolor+'" />';
compiled = compiled + '<param name="wmode" value="'+mindmap_wmode+'" />';
compiled = compiled + '<embed src="'+flashobj_path+'mindMap.swf'+'" wmode="'+mindmap_wmode+'" quality="'+mindmap_quality+'" bgcolor="'+mindmap_bgcolor+'" width="'+mindmap_width+'" height="'+mindmap_height+'" name="'+mindmap_id+'" align="'+mindmap_align+'" allowScriptAccess="'+mindmap_allowScriptAccess+'" type="'+mindmap_type+'" pluginspage="'+mindmap_pluginspage+'" />';
compiled = compiled + '</object></center>';
document.getElementById("mindMap").innerHTML = compiled;
mindmap_status = 0;
}
/*
  Compensate for Firefox's "smart" page caching that causes javascripts and other page elements not to be recognized when the browser's backspace
  button is used.  No other web browser uses a "bfcache".
*/
function compensateForFirefoxClientStateCaching() {
/* Yep, basically just using the onunload call (common to all web browsers) takes care of Firefox's "smart" caching issue and allows javascript and other objects to be executed when a page in the cache is accessed. */
jump_data = "";
mindmap_status = 0;
mindmap_recurse = 0;
mindmap_left_start = 0;
mindmap_left_end = 0;
mindmap_right_start = 0;
mindmap_opacity = 10;
has_whened = 0;
source_link_target = "";
source_link_position = "";
box_mm = 1, box_x_step = 1;
mm_slides = 0, cslide_number = 1, cslide_completed = 0, cslide_max = 0;
cslide_min = 0, completed_slides = 0, callbacks = 0;
recursion = 0, cslide_target = "";
pageTarget = "", mkTimer = 0, mkStep = 0;
anchor_watcher = 0, anchor_activated = 0;
transloaded = 0;
transtrigger = 0;
}
function prep_render() {
var raw_url_string = "", net_url_string = "", net_anchor = "";
grabGoogle_Meta();
raw_url_string = location.href;
net_url_string = raw_url_string.substring((raw_url_string.indexOf('#')) + 1);
if (net_url_string != location.href) {
if (net_url_string.length > 0 && net_url_string != 'undefined' && net_url_string != 'null') {
		jump_data = unescape(net_url_string);
											    }
				     }
/* Continue */
wbrowsertype();
force_top_start();
extrasMake();
set_random_images();
set_boxes("sbl_", "sblm_", 1);
set_boxes("sbr_", "sbrm_", 1);
document.getElementById("left_img_swap").style.visibility = "visible";
document.getElementById("right_img_swap").style.visibility = "visible";
/* Dump Navigations For Users Without Flash Who Are Not Linux Based */
if (primary_nFlash == 1) { if (document.getElementById("PrimaryNFlash")) { document.getElementById("PrimaryNFlash").style.display = "inline"; } }
if (secondary_nFlash == 1) { if (document.getElementById("SecondaryNFlash")) { document.getElementById("SecondaryNFlash").style.display = "inline"; } }
if (tertiary_nFlash == 1) { if (document.getElementById("TertiaryNFlash")) { document.getElementById("TertiaryNFlash").style.display = "inline"; } }
/* RSS Call */
rss_feed_handle();

/* Spawn Flying Boxes And Everything Else */
// ** Executes the initialize function in "Overlay.JS" and make flying boxes if there is no error. - 8/22/07, DF **
if (!overlayInitialize())
{
	move_boxes();
}

}
function set_boxes(source, target, stage) {
var finished = 0, step = 0;
var x_current = 0, y_current = 0;
var xypos = ""; last_pos = new Array();
if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/
	do {
    	    step = step + 1;
    	    if (document.getElementById(source+step) && document.getElementById(target+step)) {
			xypos = pos_query(source+step, 0, 0); last_pos = xypos.split(",");
			x_current = parseInt(last_pos[0]); y_current = parseInt(last_pos[1]);
			document.getElementById(target+step).style.left = x_current;
			document.getElementById(target+step).style.top = y_current;
		if (stage == 1) { document.getElementById(target+step).style.visibility = "visible"; }
		else {
		      document.getElementById(target+step).style.visibility = "hidden";
       		      document.getElementById(target+step).filters.alpha.opacity = 1;
		     }
										      }
    	    else { finished = 1; }
   	   } while(finished != 1);
								}
else {
      /* FF Can't Handle inline DIVs.  Manually handle what the CSS inline property would do. */
      step = step + 1; var ffstep = 1;
      xypos = pos_query(source+"1", 0, 0); last_pos = xypos.split(",");
      x_current = parseInt(last_pos[0]); y_current = parseInt(last_pos[1]);
      if (stage == 1) {
		       /* Set Static */
		       document.getElementById(source+step).style.display = "block";
		       document.getElementById(source+step).style.position = "absolute";
		       document.getElementById(source+step).style.left = x_current;
		       document.getElementById(source+step).style.top = y_current;
		       /* Set Dynamic */
		       document.getElementById(target+step).style.left = x_current;
		       document.getElementById(target+step).style.top = y_current;
		       document.getElementById(target+step).style.visibility = "visible";
		      }
      else {
	    document.getElementById(target+step).style.visibility = "hidden";
       	    if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ document.getElementById(target+step).style.MozOpacity = .01; }
       	    else { /*W3C*/ document.getElementById(target+step).opacity = .01; }
	   }
      do {
	  step = step + 1; ffstep = ffstep + 1;
	  if (step <= 16) {
			   if (ffstep > 4) { ffstep = 1; x_current = x_current - 150; y_current = y_current + 50; }
			   else { x_current = x_current + 50; }
			   if (stage == 1) {
					    /* Set Static */
      					    document.getElementById(source+step).style.display = "block";
      					    document.getElementById(source+step).style.position = "absolute";
      					    document.getElementById(source+step).style.left = x_current;
      					    document.getElementById(source+step).style.top = y_current;
					    /* Set Dynamic */
					    document.getElementById(target+step).style.left = x_current;
					    document.getElementById(target+step).style.top = y_current;
					    document.getElementById(target+step).style.visibility = "visible";
					   }
			   else {
	    			 document.getElementById(target+step).style.visibility = "hidden";
       	    			 if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ document.getElementById(target+step).style.MozOpacity = .01; }
       	    			 else { /*W3C*/ document.getElementById(target+step).opacity = .01; }
				}
			  }
	  else { finished = 1; }
	 } while(finished != 1);
     }
}
/* Random Image Setting */
var first_chosen_img = "", second_chosen_img = "";
function set_random_images() {
var chosen_img = 1; var last_chosen = 1;
if (image_range_allowed.length == 0) {
	/* Rnd For 1st Image */
	chosen_img = gen_number(); last_chosen = chosen_img;
	first_chosen_img = random_img_path + random_images[chosen_img];
	/* Rnd For 2nd Image */
	chosen_img = gen_number();
	if (chosen_img == last_chosen) {
					do {
				    	    chosen_img = gen_number();
				   	   } while (chosen_img == last_chosen);
			       	       }
	second_chosen_img = random_img_path + random_images[chosen_img];
				     }
else {
      var passed = 0, imin = 0, imax = 0;
      bounds = image_range_allowed.split(",");
      imin = parseInt(bounds[0]); imax = parseInt(bounds[1]);
      /* Rnd For 1st Image */
      do {
	  chosen_img = gen_number();
	  if (chosen_img >= imin && chosen_img <= imax) {
		last_chosen = chosen_img;
		first_chosen_img = random_img_path + random_images[chosen_img];
		passed = 1;
							}
	 } while (passed == 0);
      passed = 0;
      /* Rnd For 2nd Image */
      do {
	  chosen_img = gen_number();
	  if (chosen_img >= imin && chosen_img <= imax && chosen_img != last_chosen) {
		last_chosen = chosen_img;
		second_chosen_img = random_img_path + random_images[chosen_img];
		passed = 1;
										     }
	 } while (passed == 0);
     }
document.getElementById("left_img_swap").style.backgroundImage = "url(" + first_chosen_img + ")";
document.getElementById("right_img_swap").style.backgroundImage = "url(" + second_chosen_img + ")";
}
function CTA_area() {
	var chosen_cta = 1; segments = new Array();
	chosen_cta = gen_numberCTA();
	segments = CTA_ads[chosen_cta].split("||");
	/*edited 5-30-07, Ben Reeves
	for some reason IE started to ignore the javascript pgTransition function if there was the href="#" tag in the link,
	so it needed to be removed for all instances of IE*/
	if(net_browser==3 || net_browser==11 || net_browser==19){
		document.write("<a onmousedown=\"pgTransition('"+segments[1]+"', '"+segments[2]+"', '"+segments[3]+"', '"+segments[4]+"', "+segments[5]+");\" target=\"_top\"><img src=\""+segments[0]+"\" alt=\"\" border=\"0\" width=\"142\" height=\"161\" /></a>");
	}
	else{
		document.write("<a href=\"#\" onmousedown=\"pgTransition('"+segments[1]+"', '"+segments[2]+"', '"+segments[3]+"', '"+segments[4]+"', "+segments[5]+");\" target=\"_top\"><img src=\""+segments[0]+"\" alt=\"\" border=\"0\" width=\"142\" height=\"161\" /></a>");
	}
}
function gen_numberCTA() {
var random_choice = Math.floor(Math.random() * CTA_ads.length);
if (random_choice <= 0) { random_choice = 1; }
if (random_choice > (CTA_ads.length - 1)) { random_choice = CTA_ads.length - 1; }
return random_choice;
}
function gen_number() {
var random_choice = Math.floor(Math.random() * random_images.length);
if (random_choice <= 0) { random_choice = 1; }
if (random_choice > (random_images.length - 1)) { random_choice = random_images.length - 1; }
return random_choice;
}
/* Flying Boxes */
var box_mm = 1, box_x_step = 1;
function move_boxes() {
if (net_browser == 4) {
		       /* Speed Nudge For Lil Safari */
		       box_x_steprate = box_x_steprate * 2;
		       box_y_steprate = box_y_steprate * 2;
		       box_move_rate = 1;
		      }
box_mm = setInterval("move_box_timed()", box_move_rate);
}
function move_box_timed() {
indi_chunk = new Array();
var xflag = 0, yflag = 0, aflag = 0, js_hold = "", mystep = 0;
var active_x = 0, active_y = 0, status_flag = 0, current_name = "", already_caught = 0, prstep = 0;
var xypos = "", left_x = 0, left_y = 0, right_x = 0, right_y = 0, outcome = 0, xval = 0, yval = 0;
if (box_x_step <= number_of_loops) {
xypos = pos_query(box_location_1_id, 0, 0); last_pos = xypos.split(",");
left_x = parseInt(last_pos[0]); left_y = parseInt(last_pos[1]);
xypos = pos_query(box_location_2_id, 0, 0); last_pos = xypos.split(",");
right_x = parseInt(last_pos[0]); right_y = parseInt(last_pos[1]);
	for (var i = 1; i <= parseInt(boxes_xyposition.length - 1); i++) {
		var data_chunk = "";
		js_hold = boxes_xyposition[i];
		if (js_hold.match("x") != "x") {
						data_chunk = js_hold.split(",");
						xflag = parseInt(data_chunk[0]); yflag = parseInt(data_chunk[1]); aflag = parseInt(data_chunk[2]); prstep = parseInt(data_chunk[3]);
					       }
		else {
		      data_chunk = js_hold.split("x");
		      try {
		      indi_chunk = data_chunk[(box_x_step - 1)].split(",");
		      xflag = parseInt(indi_chunk[0]); yflag = parseInt(indi_chunk[1]); aflag = parseInt(indi_chunk[2]); prstep = parseInt(indi_chunk[3]);
			  } catch(onerror) { /* */ }
		     }
		status_flag = 0; current_name = ""; outcome = 0; xval = 0; yval = 0; bxwidth = 0; bxheight = 0;
		if (i > set_1_number_boxes) {
			if (mystep <= set_2_number_boxes) {
					     		   if (already_caught == 0) { mystep = 0; already_caught = 1; }
					     		   mystep = mystep + 1;
					     		   current_name = right_name + mystep; outcome = 1;
							   xval = right_x; yval = right_y;
							   bxwidth = right_boxes_width; bxheight = right_boxes_height;
							  }
					    }
		else {
		      if (mystep <= set_1_number_boxes) {
							 mystep = mystep + 1;
							 current_name = left_name + mystep; outcome = 1;
							 xval = left_x; yval = left_y;
							 bxwidth = left_boxes_width; bxheight = left_boxes_height;
							}
		     }
		if (outcome == 1 && document.getElementById(current_name)) {
				   if (xflag > 0) { active_x = parseInt(document.getElementById(current_name).style.left) + (box_x_steprate + prstep); }
				   else if (xflag < 0) { active_x = parseInt(document.getElementById(current_name).style.left) - (box_x_steprate + prstep); }
				   else { active_x = parseInt(document.getElementById(current_name).style.left); }
				   if (yflag > 0) { active_y = parseInt(document.getElementById(current_name).style.top) + (box_y_steprate + prstep); }
				   else if (yflag < 0) { active_y = parseInt(document.getElementById(current_name).style.top) - (box_y_steprate + prstep); }
				   else { active_y = parseInt(document.getElementById(current_name).style.top); }
				   if (active_x < (xval + left_bleed)) { status_flag = 1; }
				   if (active_x > ((xval + bxwidth + right_bleed) - mini_box_width)) { status_flag = 1; }
				   if (active_y < (yval + top_bleed)) { status_flag = 1; }
				   if (active_y > ((yval + bxheight + btm_bleed) - mini_box_height)) { status_flag = 1; }
				   if (status_flag == 0) {
				       			  document.getElementById(current_name).style.left = active_x;
				       			  document.getElementById(current_name).style.top = active_y;
				   			  if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/ try { document.getElementById(current_name).filters.alpha.opacity = aflag; } catch(onerror) { /* Catch Overflow Error */ } }
				   			  else if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ try { document.getElementById(current_name).style.MozOpacity = aflag / 100; } catch(onerror) { /* Catch Overflow Error */ } }
				   			  else { /*W3C*/ try { document.getElementById(current_name).opacity = aflag / 100; } catch(onerror) { /* Catch Overflow Error */ } }
				       			 }
				   else {
					 document.getElementById(current_name).style.visibility = "hidden";
					}
				  }
									   }
	box_x_step = box_x_step + 1;
				   }
else {
      box_x_step = 1;
      box_mm = clearInterval(box_mm);
      set_boxes("sbl_", "sblm_", 0);
      set_boxes("sbr_", "sbrm_", 0);
      if (when == 0 && has_whened == 0) { has_whened = 1; document.getElementById("content_control").style.visibility = "visible"; }
      left_slide();
     }
}
/* Fringe Boxes */
var mm_slides = 0, cslide_number = 1, cslide_completed = 0, cslide_max = 0;
var cslide_min = 0, completed_slides = 0, callbacks = 0;
var recursion = 0, cslide_target = "";
function spawn_slides_set(target, min, max) {
cslide_target = target;
cslide_number = min;
cslide_min = min;
cslide_max = max;
if (recursion == 0) {
		     recursion = 1;
		     box_mm = setInterval("slide_area()", slide_rate);
		    }
}
function slide_area() {
callbacks = callbacks + 1;
var sx = 0, sy = 0, speed = 0, slocation = 0, clocation = 0, completed = 0, opacity = 0, copacity = 0;
var cslide_diff = (cslide_max - cslide_min) + 1;
data_chunk = new Array();
data_chunk = lslide[cslide_number].split(",");
opacity = parseInt(data_chunk[0]);
sx = parseInt(data_chunk[1]);
sy = parseInt(data_chunk[2]);
speed = parseInt(data_chunk[3]);
slocation = parseInt(data_chunk[4]);
clocation = parseInt(data_chunk[5]);
if (sx == 1 || sy == 1) {
	clocation = clocation + speed;
	if (clocation > slocation) { clocation = slocation; }
			}
else {
      clocation = clocation - speed;
      if (clocation < slocation) { clocation = slocation; }
     }
lslide[cslide_number] = opacity +","+ sx +","+ sy +","+ speed +","+ slocation +","+ clocation;
if (sx == 1 || sy == 1) {
	      		 if (slocation == clocation) { copacity = opacity; }
	      		 else { copacity = parseInt(Math.abs(((Math.abs(clocation) / Math.abs(slocation)) * 100) - (opacity / 100))); }
			}
else if (sx == -1 || sy == -1) {
	      		        if (slocation == clocation) { copacity = opacity; }
	      		        else { copacity = parseInt(Math.abs(((Math.abs(slocation) / Math.abs(clocation)) * 100) - (opacity / 100))); }
			       }
/* Special Exemption For Top Area */
if (cslide_target == tslide_id) {
		 if (document.getElementById("promo")) { document.getElementById("promo").style.visibility = "visible"; }
		 if (copacity < 15) { copacity = 15; }
			        }
if (!isNaN(copacity)) {
if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/ document.getElementById(cslide_target+cslide_number).filters.alpha.opacity = copacity; }
else if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ document.getElementById(cslide_target+cslide_number).style.MozOpacity = copacity / 100; }
else { /*W3C*/ document.getElementById(cslide_target+cslide_number).opacity = copacity / 100; }
		      }
if (sx == 1 || sx == -1) {
			  document.getElementById(cslide_target+cslide_number).style.left = clocation;
			 }
else {
      document.getElementById(cslide_target+cslide_number).style.top = clocation;
     }
document.getElementById(cslide_target+cslide_number).style.visibility = "visible";
for (x = cslide_min; x <= cslide_max; x++) {
	data_chunk = lslide[x].split(",");
	slocation = parseInt(data_chunk[4]);
	clocation = parseInt(data_chunk[5]);
	if (slocation == clocation) { completed = completed + 1; }
				           }
cslide_number = cslide_number + 1;
if (cslide_number > cslide_max) { cslide_number = cslide_min; }
if (callbacks == left_slide_pause) {
				    right_slide();
				    if (when == 1 && has_whened == 0) { has_whened = 1; document.getElementById("content_control").style.visibility = "visible"; search_start_render(); }
				   }
else if (callbacks == right_slide_pause) {
					  top_slide();
					  if (when == 2 && has_whened == 0) { has_whened = 1; document.getElementById("content_control").style.visibility = "visible"; search_start_render(); }
					 }
else if (callbacks == top_slide_pause) {
					box_mm = clearInterval(box_mm);
					if (when == 3) {
							document.getElementById("content_control").style.visibility = "visible";
							search_start_render();
						       }
					if (jump_data.length > 0) { location.hash = jump_data; }				        
				       }
}
function left_slide() {
spawn_slides_set("ls_", 1, 7);
}
function right_slide() {
spawn_slides_set("rs_", 8, 14);
}
function top_slide() {
spawn_slides_set("ts_", 15, 21);
}
/* Element Creator */
function extrasMake() {
/* Left Dynamic */ for (x = 1; x <= 16; x++) { eGenerator("div", ("sblm_"+x), ("sblm_"+x), ("sblm_"+x)); }
/* Right Dynamic */ for (x = 1; x <= 16; x++) { eGenerator("div", ("sbrm_"+x), ("sbrm_"+x), ("sbrm_"+x)); }
/* Left Slide */ for (x = 1; x <= 7; x++) { eGenerator("div", ("ls_"+x), ("ls_"+x), ("ls_"+x)); }
/* Right Slide */ for (x = 8; x <= 14; x++) { eGenerator("div", ("rs_"+x), ("rs_"+x), ("rs_"+x)); }
/* Top Slide */ for (x = 15; x <= 21; x++) { eGenerator("div", ("ts_"+x), ("ts_"+x), ("ts_"+x)); }
}
function eGenerator(a, b, c, d) {
elem = document.createElement(a);
if (b.length > 0) { elem.id = b; }
if (c.length > 0) { elem.name = c; }
if (d.length > 0) { elem.className = d; }
document.body.appendChild(elem);
}
/* Transition */
var pageTarget = "", mkTimer = 0, mkStep = 0;
function force_top_start() {
if (net_browser == 6 || net_browser == 13 || net_browser == 21) { location.hash = "start"; }
else { document.body.scrollTop = true; }
}
var anchor_watcher = 0, anchor_activated = 0;
function pgTransition(page, template, sl_target, sl_position, id) {
pageTarget = page;
if (anchor_watcher > 0) {
	if (id > 0) { pageTarget = pageTarget + "?adminID="+id+""; }
	else { pageTarget = pageTarget + "#"+anchor_watcher+""; }
			}
else {
      if (id > 0) { pageTarget = pageTarget + "?adminID="+id+""; }
     }
source_link_target = sl_target; source_link_position = sl_position;
force_top_start();
/* Build / Position Cover */
pgBuilder(template);
/* Make Transition */
mkTimer = setInterval("mkTransition()", transitionSpeed);
}
function ExecutePageTransition_Anchor(PageURL, TemplateID, Target, Anchor) {
	//if (anchor_activated == 0) {
		anchor_activated = 1;
		anchor_watcher = Anchor;
		pgTransition(PageURL, 'template' + TemplateID, 'content', '1', adminid);
	//			   }
}
// Used to execute page transitions for internal links.
function ExecutePageTransition(PageURL, TemplateID, Target) {
	//if (anchor_activated == 0) {
		anchor_activated = 1;
		// Check the target.  If the page should open in the existing window, use the pgTransition.
		if (Target == "_top") { pgTransition(PageURL, 'template' + TemplateID, 'content', '1', adminid); }
		// Otherwise, just open up the URL in a new window.
		else { window.open(PageURL); }
	//			   }
}
var transloaded = 0;
function transcount() {
transloaded = transloaded + 1;
}
var transtrigger = 0;
function mkTransition() {
if (transloaded == 7) {
	if (transtrigger == 0) {
		transtrigger = 1;
		/* Dump Objects */
		document.getElementById("content_control").style.visibility = "hidden";
		if (document.getElementById("promo")) {
			document.getElementById("promo").style.visibility = "hidden";
			document.getElementById("promo").src = "about:blank";
						      }
		document.getElementById("cta_shell").innerHTML = "";
		document.getElementById("signature_shell").innerHTML = "";
		/*
		  Catch for Firefox.  FF does not like it if you are trying to remove a flash object that is being clicked
		  on to call a javascript function.  IE works fine.
		*/
		if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/
			document.getElementById("primary_menu").style.visibility = "hidden";
			document.getElementById("secondary_nav").style.visibility = "hidden";
			document.getElementById("tert_nav").style.visibility = "hidden";
										}
		else { /*Other*/
		      /*
			Used to work in IE; but IE changed around 1.29.2007 and it no longer works.
		      document.getElementById("primary_menu").innerHTML = "";
		      document.getElementById("secondary_nav").innerHTML = "";
		      document.getElementById("tert_nav").innerHTML = "";
		      */
		      document.getElementById("primary_menu").style.visibility = "hidden";
		      document.getElementById("secondary_nav").style.visibility = "hidden";
		      document.getElementById("tert_nav").style.visibility = "hidden";
		     }
		document.getElementById("pgFlip").style.visibility = "visible";
			       }
	if (mkStep <= 99) {
		mkStep = mkStep + transitionStep;
		if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/ document.getElementById("pgFlip").filters.alpha.opacity = mkStep; }
		else if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ document.getElementById("pgFlip").style.MozOpacity = mkStep / 100; }
		else { /*W3C*/ document.getElementById("pgFlip").opacity = mkStep / 100; }
			  }
	else {
	      clearInterval(mkTimer);
	      var cookieMan = "";
	      var cookiedate = new Date();
	      cookiedate.setTime(cookiedate.getTime()); var lifetime = new Date(cookiedate.getTime());
	      cookieMan = "navPosition" + '=' + source_link_target + ';path=/';
	      document.cookie = cookieMan;
	      cookieMan = "slot" + '=' + source_link_position + ';path=/';
	      document.cookie = cookieMan;
	      try { window.location.href = pageTarget; }
	      catch(onerror) { location.href = pageTarget; }
	     }
		      }
}
function pgBuilder(template) {
chunks = new Array();
eGenerator("div", "pgFlip", "pgFlip", "pgFlip");
var content_height = 400;
for (x = 1; x < transitionbgKey.length; x++) {
	chunks = transitionbgKey[x].split(",");
	if (chunks[0] == template) { bcolor = chunks[1]; }
					     }
compiled = "<!-- START SHELL -->";
compiled = compiled + "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\"><tr><td width=\"100%\" height=\"100%\" valign=\"top\" style=\"background-color: "+bcolor+";\">";
compiled = compiled + "<!-- HEADER -->";
compiled = compiled + "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"1100\"><tr>";
compiled = compiled + "<td width=\"100\" height=\"150\" valign=\"top\" class=\"misc_fixed\">&nbsp;</td>";
compiled = compiled + "<td width=\"650\" height=\"150\" valign=\"top\">";
compiled = compiled + "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr>";
compiled = compiled + "		<td height=\"100\" valign=\"top\" class=\"misc_fixed\">&nbsp;</td>";
compiled = compiled + "		</tr><tr>";
compiled = compiled + "		<td height=\"50\" valign=\"top\">";
compiled = compiled + "			&nbsp;";
compiled = compiled + "		</td>";
compiled = compiled + "	</tr></table>";
compiled = compiled + "</td>";
compiled = compiled + "<td width=\"250\" height=\"150\" valign=\"top\">";
compiled = compiled + "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr>";
compiled = compiled + "		<td colspan=\"2\" width=\"250\" height=\"114\" valign=\"top\">";
compiled = compiled + "			<img src=\"/templates/images/"+template+"/right_side_logo.gif\" border=\"0\" onload=\"transcount();\" />";
compiled = compiled + "		</td>";
compiled = compiled + "		</tr><tr>";
compiled = compiled + "		<td width=\"153\" height=\"36\" valign=\"top\">";
compiled = compiled + "			<img src=\"/templates/images/"+template+"/search_box.gif\" border=\"0\" onload=\"transcount();\" />";
compiled = compiled + "		</td>";
compiled = compiled + "		<td width=\"97\" valign=\"top\"><img src=\"/templates/images/"+template+"/search_box_magnifier.gif\" border=\"0\" alt=\"Search\" width=\"97\" height=\"36\" onload=\"transcount();\" /></td>";
compiled = compiled + "	</tr></table>";
compiled = compiled + "</td>";
compiled = compiled + "<td width=\"100\" valign=\"top\" class=\"misc_fixed\">&nbsp;</td>";
compiled = compiled + "</tr></table>";
compiled = compiled + "<!-- MAIN -->";
compiled = compiled + "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"1000\"><tr>";
compiled = compiled + "<td width=\"100\" valign=\"top\" class=\"misc_fixed\">&nbsp;</td>";
compiled = compiled + "<td width=\"200\" valign=\"top\" style=\"background-image: url('/templates/images/"+template+"/left_side_content_strip.gif'); background-repeat: repeat;\">";
compiled = compiled + "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr>";
compiled = compiled + "		<td width=\"200\" valign=\"top\">";
compiled = compiled + "			<img src=\"/templates/images/"+template+"/left_side.gif\" border=\"0\" onload=\"transcount();\" />";
compiled = compiled + "		</td>";
compiled = compiled + "	</tr></table>";
compiled = compiled + "</td>";
compiled = compiled + "<td width=\"500\" valign=\"top\" style=\"background-image: url('/templates/images/"+template+"/center_content_strip.gif'); background-repeat: repeat;\">";
compiled = compiled + "	<img src=\"/templates/images/"+template+"/center_top_box_strip.gif\" border=\"0\" alt=\"\" width=\"500\" height=\"50\" onload=\"transcount();\" /><br clear=\"all\" />";
compiled = compiled + "		<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr><td class=\"txt_content\" height=\""+content_height+"\" valign=\"top\">";
compiled = compiled + "			&nbsp;";
compiled = compiled + "		</td></tr></table>";
compiled = compiled + "</td>";
compiled = compiled + "<td width=\"200\" valign=\"top\" style=\"background-image: url('/templates/images/"+template+"/right_side_content_strip.gif'); background-repeat: repeat;\">";
compiled = compiled + "	<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\"><tr>";
compiled = compiled + "		<td width=\"200\" valign=\"top\">";
compiled = compiled + "			<img src=\"/templates/images/"+template+"/right_side.gif\" border=\"0\" onload=\"transcount();\" />";
compiled = compiled + "		</td>";
compiled = compiled + "	</tr></table>";
compiled = compiled + "</td>";
compiled = compiled + "</tr></table>";
compiled = compiled + "<!-- FOOTER -->";
compiled = compiled + "<div id=\"footer_adj\" class=\"footer_adj\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"1100\"><tr>";
compiled = compiled + "<td width=\"100\" valign=\"top\" class=\"misc_fixed\">&nbsp;</td>";
compiled = compiled + "<td width=\"1000\" height=\"200\" valign=\"top\">";
compiled = compiled + "			<img src=\"/templates/images/"+template+"/all_bottom_strip.gif\" border=\"0\" onload=\"transcount();\" />";
compiled = compiled + "		</td>";
compiled = compiled + "	&nbsp;";
compiled = compiled + "</td>";
compiled = compiled + "</tr></table></div>";
compiled = compiled + "<!-- END SHELL -->";
compiled = compiled + "</td></tr></table>";
document.getElementById("pgFlip").innerHTML = compiled;
}
/* MindMap */
function mindMap() {
if (mindmap_status == 0) {
	mindmap_status = 1;
	var xypos = ""; last_pos = new Array();
	xypos = pos_query("right_img_swap", 0, 0); last_pos = xypos.split(",");
	mindmap_left_start = parseInt(last_pos[0]); mindmap_top_start = parseInt(last_pos[1]);
	xypos = pos_query("cstart", 0, 0); last_pos = xypos.split(",");
	mindmap_left_end = parseInt(last_pos[0]);
	if (!document.getElementById("mindMap")) { eGenerator("div", "mindMap", "mindMap", "mindMap"); }
	document.getElementById("mindMap").style.left = mindmap_left_start - 50;
	document.getElementById("mindMap").style.top = mindmap_top_start;
	document.getElementById("mindMap").style.width = 50;
	document.getElementById("mindMap").style.height = 50;
	if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/ document.getElementById("mindMap").filters.alpha.opacity = 10; }
	else if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ document.getElementById("mindMap").style.MozOpacity = .1; }
	else { /*W3C*/ document.getElementById("mindMap").opacity = .1; }
	mindmap_opacity = 10;
	document.getElementById("mindMap").style.visibility = "visible";
	document.getElementById("content_control").style.visibility = "hidden";
	mindmap_recurse = setInterval("mindMap_build()", spawn_time);
			 }
if (mindmap_status == 2) {
	document.getElementById("mindMap").style.visibility = "hidden";
	document.getElementById("mindMap").innerHTML = "";
	document.getElementById("content_control").style.visibility = "visible";
	mindmap_status = 0;
			 }
}
function mindMap_build() {
var matches = 0;
var left = parseInt(document.getElementById("mindMap").style.left);
var top = parseInt(document.getElementById("mindMap").style.top);
var width = parseInt(document.getElementById("mindMap").style.width);
var height = parseInt(document.getElementById("mindMap").style.height);
mindmap_opacity = mindmap_opacity + spawn_alpha_step;
if (mindmap_opacity > 100) { mindmap_opacity = 99; }
left = left - spawn_box_grow_horz;
width = width + spawn_box_grow_horz;
height = height + spawn_box_grow_vert;
if (left <= mindmap_left_end) {
	if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/
		left = mindmap_left_end - mindmap_xstart_offset; width = mindmap_left_start - (mindmap_left_end + mindmap_xstart_offset);
									}
	else { /*FF*/
	      left = mindmap_left_end - (mindmap_xstart_offset * 2); width = (mindmap_left_start - mindmap_left_end) + mindmap_xstart_offset;
	     }
	matches = matches + 1;
			      }
if (height >= mindmap_height) { height = mindmap_height; matches = matches + 1; }
document.getElementById("mindMap").style.left = left;
document.getElementById("mindMap").style.top = top;
document.getElementById("mindMap").style.width = width;
document.getElementById("mindMap").style.height = height;
if (net_browser == 3 || net_browser == 11 || net_browser == 19) { /*IE*/ document.getElementById("mindMap").filters.alpha.opacity = mindmap_opacity; }
else if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/ document.getElementById("mindMap").style.MozOpacity = mindmap_opacity / 100; }
else { /*W3C*/ document.getElementById("mindMap").opacity = mindmap_opacity / 100; }
if (matches == 2) {
	mindmap_status = 2;
	clearInterval(mindmap_recurse);
	render_mindMap();
		  }
}
function shStandardize(StartString, FindString, ReplaceWith) {
if (StartString.indexOf(FindString) >= 0) {
	return shStandardize(StartString.replace(FindString, ReplaceWith), FindString, ReplaceWith);
					  }
else {
      return StartString;
     }
}
/* Search Results */
shResults = new Array();
var shCurrent = 0;
var shDirection = 1;
function search_start_render() {
var shFlag = 0;
if (document.getElementById("searchDisplay") && document.getElementById("searchEng")) {
	var tmp = document.getElementById("searchEng").innerHTML;
	/* Catch IE auto-conversions */
	tmp = shStandardize(tmp, "<BR /><BR />", "<br /><br />");
	tmp = shStandardize(tmp, "<BR><BR>", "<br /><br />");
	/* Catch FF auto-conversions */
	tmp = shStandardize(tmp, "<br><br>", "<br /><br />");
	if (tmp.indexOf("<br /><br />") > -1) {
		shResults = tmp.split("<br /><br />");
					      }
	shCurrent = 0; shDirection = 1;
	search_render(shCurrent, 1);
										      }
}
function search_render(start, flow) {
var compiled = "", leftie = "", rightie = "";
var shStep = 0, shSubStep = 0;
shDirection = flow;
shCurrent = start;
var shCurrent_next = "", shCurrent_previous = "";
if (shResults.length > 0) {
	for (x = shCurrent; x < shResults.length; x++) {
		shStep = shStep + 1;
		if (shStep <= shShowMax) {
			shSubStep = shSubStep + 1;
			compiled = compiled + shResults[x] + "<br /><br />";
					 }
						       }
	shCurrent_next = shCurrent + shSubStep;
	if (shCurrent_next >= shResults.length) { shCurrent_next = shResults.length; }
	shCurrent_previous = shCurrent_next - (shSubStep + shShowMax);
	if (shCurrent_previous >= 0) {
		leftie = "<a href=\"#\" onmousedown=\"search_render("+shCurrent_previous+", 0);\">"+shPreviousLink+"</a>";
				    }
	if (shCurrent_next < (shResults.length - 1)) {
		rightie = "<a href=\"#\" onmousedown=\"search_render("+shCurrent_next+", 1);\">"+shNextLink+"</a>";
						     }
	if (leftie.length > 0 && rightie.length > 0) {
		compiled = compiled + leftie + shBetween + rightie;
						     }
	else {
	      if (leftie.length > 0) { compiled = compiled + leftie; }
	      if (rightie.length > 0) { compiled = compiled + rightie; }
	     }
	if ((shResults.length-1) > 1) {
		compiled = compiled + "<br />"+(shResults.length-1)+" results were found.";
				      }
	else {
	      compiled = compiled + "<br />"+(shResults.length-1)+" result was found.";
	     }
			  }
else {
      compiled = compiled + "No search results could be found using that query.  Please try a different query.";
     }
document.getElementById("searchDisplay").innerHTML = compiled;
document.getElementById("searchDisplay").style.visibility = "visible";
}
function accordian(target) {
if (document.getElementById(target)) {
	if (document.getElementById(target).lang.toLowerCase() == "off") {
		document.getElementById(target).lang = "on";
		document.getElementById("content_"+target).className = "ncollapsible";
									}
	else {
	      document.getElementById(target).lang = "off";
	      document.getElementById("content_"+target).className = "collapsible";
	     }
				     }
}
/* RSS Based Page Handling...built to work with Student Blog Pages */
function makeAppear(divval, numdivs) 
{
	for (i = 1; i <= numdivs - 1; i++) 
	{
		if (i == divval) 
		{ 
			var tempContents;
			tempContents = document.getElementById("post"+i).innerHTML;
			tempContents = ReplaceImageHolder(tempContents, "|_|", "<img");
			document.getElementById("post"+i).innerHTML = tempContents;
			document.getElementById("post"+i).style.display = "inline";			
		}
		else 
		{ 
			document.getElementById("post"+i).style.display = "none"; 
		}
	}
}
// Replaces all instances of a string in a larger string. Modified By - Andre
function ReplaceImageHolder(StartString, FindString, ReplaceWith)
{
	// Check the index of the Find string.  If found, replace it with the Replace string.
	if (StartString.indexOf(FindString) >= 0)
	{ 
		return ReplaceImageHolder(StartString.replace(FindString, ReplaceWith), FindString, ReplaceWith);	
	}
	else
	{ 
		return StartString; 
	}
}
function topThree(numdivs) 
{
	for(i = 1; i <= numdivs; i++) 
	{
		if (document.getElementById("post"+i)) 
		{
			if(i > 3) 
			{ 
				document.getElementById("post"+i).style.display = "none"; 
			}
			else 
			{ 
				var tempContents;
				tempContents = document.getElementById("post"+i).innerHTML;
				tempContents = ReplaceImageHolder(tempContents, "|_|", "<img");
				document.getElementById("post"+i).innerHTML = tempContents;
				document.getElementById("post"+i).style.display = "inline"; 
			}
		}
	}
}
function rss_feed_handle() 
{
	if (footprint.indexOf("id=", 0) > 0) 
	{
		var blog_entry = 0, nomore = 0, steps = 0;
		tmp = new Array(); tmp1 = new Array();
		tmp = footprint.split("?");
		tmp1 = tmp[1].split("=");
		blog_entry = tmp1[1];
		if (blog_entry > 0) 
		{
			do 
			{
				steps = steps + 1;
				if (document.getElementById("post"+steps)) 
				{ 
					document.getElementById("post"+steps).style.display = "none"; 
				}
				else 
				{ 
					nomore = 1; 
				}
			} while (nomore == 0);
			if (document.getElementById("post"+blog_entry)) 
			{ 
				var tempContents;
				tempContents = document.getElementById("post"+blog_entry).innerHTML;
				tempContents = ReplaceImageHolder(tempContents, "|_|", "<img");
				document.getElementById("post"+blog_entry).innerHTML = tempContents;
				document.getElementById("post"+blog_entry).style.display = "inline"; 
			}
		}
	}
	else 
	{ 
		topThree(3); 
	}
}

// ** Added 8/28/07 - Function used to test for cookies. - DF **
function testForCookies()
{
	
	document.cookie = "testForCookie=Void";
	if(document.cookie.indexOf("testForCookie=") == -1)
	{
		alert("Cookies need to be enabled. If the problem persists, please contact webmaster@uat.edu");
		return false;
	}
}

// ** Added 11/6/07 - Grab Google Ad Data When Ads Are Pointing To Pages That Are Not Forms. - JM **
// ** Invoked in prep_render() **
function grabGoogle_Meta() {
if (location.href.indexOf("?gclid") > 0) {
					  var date = new Date();
					  var expires = 1;
					  var path = "";
					  var domain = "";
					  var name = "googleCatch";
					  var value = location.href.split("?gclid=")[1];
					  date.setTime(date.getTime());
					  if (expires) { expires = expires * 1000 * 60 * 60 * 24; }
					  var expires_date = new Date(date.getTime() + (expires));
					  if (value != null && value != "") {
									     document.cookie=name + "=" + escape(value) + 
									     ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
									     ( ( path ) ? ";path=" + path : "" ) + 
									     ( ( domain ) ? ";domain=" + domain : "" );
									    }
					 }
}