/* Main Page Transitioner.  Written by Joe McCormack, 2006 */
var maintenance = 0;		/* 1 = show site maintenance message, 0 = don't show */
var pageid = 0;
var page_topic = "0";			/* Define the topic that the page is classified under (for Flash objects) */
var page_topic_name = "UAT Home";	/* Define the name of the topic that the page is classified under */
var adminid = 0;			/* AdminID, if present */
var template_type = "template0";	/* Define template type being used (for Flash Objects) */
var origination = false;
/* Config: General Flash Objects Location */
var flashobj_path = "/templates/flash/";
/* Config: Path Specifics For Main Page Flash Elements */
var flash_path = "homepage/";
var box_mm = 0, mkTimer = 0, mkStep = 0;
var source_link_target = "", source_link_position = "", pageTarget = "";
var anchor_watcher = 0, anchor_activated = 0;
var transloaded = 0; var transtrigger = 0;
//Editted the mainContent_name var to point to new Home Banner changed by zk on June/04/2009
//var mainContent_name = "main_preload_Davinci.swf";
//this is the original flash file
var mainContent_name = "main_preload.swf"; 
var mainContent_id = "tertiary5";
var mainContent_width = 1050;//1050
var mainContent_height = 376;
var mainCTA_name = "bottom_nav.swf";
var mainCTA_id = "ctaFlashHolder";
var mainCTA_width = 1050;
var mainCTA_height = 114;
/* 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";
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
WINDOWS OS:
	10 = Unknown Browser
	11 = Internet Explorer
	12 = Firefox
	13 = Netscape
	14 = Opera
	15 = Camino
	16 = Firebird
UNKNOWN OS:
	17 = Unknown Browser
	18 = Safari
	19 = Internet Explorer
	20 = Firefox
	21 = Netscape
	22 = Opera
	23 = Camino
	24 = Firebird
*/
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 { 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 { 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 { net_browser = 17; }
			  }
		  }
grabGoogle_Meta();
origination = originate_check();
/* Flag to display when site is under maintenance */
maintenance_Msg();
}
function maintenance_Msg() {
if (maintenance == 1) {
		   eGenerator("div", "maintenanceMsg", "maintenanceMsg", "");
		   document.getElementById("maintenanceMsg").style.zIndex = 5000;
		   document.getElementById("maintenanceMsg").style.position = "absolute";
		   document.getElementById("maintenanceMsg").style.display = "block";
		   document.getElementById("maintenanceMsg").style.top = "10px";
		   document.getElementById("maintenanceMsg").style.left = "10px";
		   document.getElementById("maintenanceMsg").style.width = "600px";
		   document.getElementById("maintenanceMsg").style.height = "35px";
		   document.getElementById("maintenanceMsg").style.backgroundColor = "#efd34e";
		   document.getElementById("maintenanceMsg").style.paddingTop = "10px";
		   document.getElementById("maintenanceMsg").style.borderStyle = "solid";
		   document.getElementById("maintenanceMsg").style.borderWidth = "2px";
		   document.getElementById("maintenanceMsg").style.borderColor = "#000000";
		   document.getElementById("maintenanceMsg").style.fontFamily = "Arial";
		   document.getElementById("maintenanceMsg").style.fontSize = "10pt";
		   document.getElementById("maintenanceMsg").style.fontWeight = "bold";
		   document.getElementById("maintenanceMsg").style.color = "#000000";
		   document.getElementById("maintenanceMsg").innerHTML = "<p style=\"margin: 0 0 0 0; padding: 0 0 0 0; text-align: center;\">This site is currently undergoing maintenance & hope to resume normal operation soon.</p>";
	 	 }
}
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;
	}
}

function renderApply() 
{
    if (DetectFlashVer(9,0,0)) 
    {
	    /* Ghetto Flash Fix */
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
	    document.write("<div id='applyButtonDiv' style='position:absolute;top:60px;left:260px;'>");
	    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("<span style='color:#ff0000;'>APPLY NOW!</span>");
	    document.write("</div>");
	}
    else 
    {
        document.write("<div id='applyButtonDiv' style='position:absolute;top:70px;left:275px;'>");
     	document.write("<a href='javascript:pgTransition(\"/admissions/how_to_apply.aspx\", \"template1\", \"apply\", \"0\", 0);' style='color:#ff0000;'><img src='/templates/images/applybutton/ApplyNow_Template0.jpg' width='122' height='41' alt='' border='0' /></a>");
     	document.write("</div>");
    }
}

function renderRequestInfo() 
{
    if (DetectFlashVer(9,0,0)) 
    {
	    /* Ghetto Flash Fix */
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
	    document.write("<div id='requestButtonDiv' style='position:absolute;top:60px;left:390px;'>");
	    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=\"requestinfo\" 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=\"requestinfo\" 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='requestButtonDiv' style='position:absolute;top:70px;left:420px;'>");
     	document.write("<a href='javascript:pgTransition(\"/requestinfo/default.aspx\", \"template6\", \"requestinfo\", \"0\", 0);' style='color:#ff0000;'><img src='/templates/images/requestbutton/GetInfo_Template0.jpg' width='122' height='41' alt='' border='0' /></a>");
     	document.write("</div>");
    }
}

function render_primary() {
if (DetectFlashVer(9,0,0)) {
	/* Ghetto Flash Fix */
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
	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 {
	document.write("<table height='100%' cellpadding='0' cellspacing='0' border='0' bgcolor='#1e1e1e'><tr><td>");
      	document.write("<td width='50'>&nbsp;</td>");
		document.write("<td width='76'><a href='javascript:pgTransition(\"/about_uat/default.aspx\", \"template5\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_about.gif' width='76' height='50' alt='About UAT' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_aboutOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_about.gif\";' /></a></td>");
		document.write("<td width='61'><a href='javascript:pgTransition(\"/majors/default.aspx\", \"template4\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_majors.gif' width='61' height='50' alt='Majors' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_majorsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_majors.gif\";' /></a></td>");
		document.write("<td width='101'><a href='javascript:pgTransition(\"/life_on_campus/default.aspx\", \"template2\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_campus.gif' width='101' height='50' alt='Campus Life' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_campusOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_campus.gif\";' /></a></td>");
		document.write("<td width='117'><a href='javascript:pgTransition(\"/student_services/default.aspx\", \"template7\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_student.gif' width='117' height='50' alt='Student Services' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_studentOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_student.gif\";' /></a></td>");
		document.write("<td width='84'><a href='javascript:pgTransition(\"/admissions/default.aspx\", \"template1\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_admissions.gif' width='84' height='50' alt='Admissions' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_admissionsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_admissions.gif\";' /></a></td>");
		document.write("<td width='77'><a href='javascript:pgTransition(\"/academics/default.aspx\", \"template3\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_academics.gif' width='77' height='50' alt='Academics' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_academicsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_academics.gif\";' /></a></td>");
		document.write("<td width='83'><a href='javascript:pgTransition(\"/technology/default.aspx\", \"template6\", \"primary\", \"0\", 0);'><img src='/templates/images/home_html/TopNav_technology.gif' width='83' height='50' alt='Technology' border='0' onMouseOver='this.src=\"/templates/images/home_html/TopNav_technologyOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/TopNav_technology.gif\";' /></a></td>");
     	document.write("</td></tr></table>");
     }
}
function render_mainContent() {
if (DetectFlashVer(9,0,0)) {
	/* Ghetto Flash Fix */
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
	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=\""+mainContent_width+"\" height=\""+mainContent_height+"\" id=\""+mainContent_id+"\" align=\"middle\">")
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />")
	document.write("<param name=\"movie\" value=\""+flash_path+mainContent_name+"\" />")
	document.write("<param name=\"quality\" value=\"high\" />")
	document.write("<param name=\"wmode\" value=\"transparent\" />")
	document.write("<param name=\"bgcolor\" value=\"#000000\" />")
	document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />")
	document.write("<embed src=\""+flash_path+mainContent_name+"\" FlashVars=\"template="+template_type+"&topic="+page_topic+"&id="+adminid+"&internal="+origination+"\" quality=\"high\" bgcolor=\"#000000\" width=\""+mainContent_width+"\" height=\""+mainContent_height+"\" name=\""+mainContent_id+"\" align=\"middle\" wmode=\"transparent\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />")
	document.write("</object>")
			   }
else {
	document.write("<table cellpadding='0' cellspacing='0' border='0'><tr><td>");
	document.write("<img src='/templates/images/home_html/Main_back.gif' width='1050' height='376' border='0' />");
    document.write("</td></tr></table>");
	document.write("<div style='position:absolute;top:174px;left:422px;'>");
	document.write("	<img src='/templates/images/home_html/Main_welcome.jpg' width='406px' height='306px' border='0' alt='Welcome'/></div>");
	document.write("<div style='position:absolute;top:174px;left:225px;'><a href='javascript:pgTransition(\"/technology/smart_nav.aspx\", \"template6\", \"homepage\", \"0\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_smartNav.gif' width='125px' height='50px' border='0' alt='Smart Nav' onMouseOver='this.src=\"/templates/images/home_html/Main_smartNavOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_smartNav.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:249px;left:150px;'><a href='javascript:pgTransition(\"/life_on_campus/meet_tour_guides.aspx\", \"template2\", \"homepage\", \"0\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_studentBlog.gif' width='100px' height='129px' border='0' alt='Student Blog' onMouseOver='this.src=\"/templates/images/home_html/Main_studentBlogOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_studentBlog.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:267px;left:297px;'><a href='javascript:pgTransition(\"/techforum\", \"template8\", \"homepage\", \"0\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_techForum.gif' width='105px' height='120px' border='0' alt='Tech Forum' onMouseOver='this.src=\"/templates/images/home_html/Main_techForumOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_techForum.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:400px;left:180px;'><a href='javascript:pgTransition(\"/showcase\", \"template8\", \"homepage\", \"31\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_showcase.gif' width='119px' height='49px' border='0' alt='Showcase' onMouseOver='this.src=\"/templates/images/home_html/Main_showcaseOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_showcase.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:450px;left:200px;'><a href='javascript:pgTransition(\"/tv\", \"template8\", \"homepage\", \"41\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_videoLibrary.gif' width='131px' height='50px' border='0' alt='Video Library' onMouseOver='this.src=\"/templates/images/home_html/Main_videoLibraryOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_videoLibrary.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:500px;left:300px;'><a href='javascript:pgTransition(\"/about_uat\", \"template5\", \"homepage\", \"51\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_aboutUAT.gif' width='129px' height='50px' border='0' alt='About UAT' onMouseOver='this.src=\"/templates/images/home_html/Main_aboutUATOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_aboutUAT.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:204px;left:900px;'><a href='javascript:pgTransition(\"/life_on_campus/web_cams.aspx\", \"template2\", \"homepage\", \"61\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_webCams.gif' width='88px' height='70px' border='0' alt='Live Web Cams' onMouseOver='this.src=\"/templates/images/home_html/Main_webCamsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_webCams.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:300px;left:850px;'>");
	document.write("	<img src='/templates/images/home_html/Main_geek2Geek.gif' width='135px' height='100px' border='0' alt='Geek 2 Geek' onMouseOver='this.src=\"/templates/images/home_html/Main_geek2GeekOver.gif\";this.style.cursor=\"hand\";' onMouseOut='this.src=\"/templates/images/home_html/Main_geek2Geek.gif\";' onMouseDown='liveChat();'/></a></div>");
	document.write("<div style='position:absolute;top:278px;left:1000px;'><a href='javascript:pgTransition(\"/press\", \"template8\", \"homepage\", \"71\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_UATNews.gif' width='65px' height='72px' border='0' alt='UAT News' onMouseOver='this.src=\"/templates/images/home_html/Main_UATNewsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_UATNews.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:400px;left:950px;'><a href='javascript:pgTransition(\"/admissions/campus_tour.aspx\", \"template1\", \"homepage\", \"92\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_tourUAT.gif' width='139px' height='99px' border='0' alt='Tour UAT' onMouseOver='this.src=\"/templates/images/home_html/Main_tourUATOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_tourUAT.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:452px;left:753px;'><a href='javascript:pgTransition(\"/tv/default.aspx?channel=49\", \"template8\", \"homepage\", \"101\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_freshmanDoc.gif' width='147px' height='76px' border='0' alt='Freshman Documentary' onMouseOver='this.src=\"/templates/images/home_html/Main_freshmanDocOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_freshmanDoc.gif\";' /></a></div>");
	document.write("<div style='position:absolute;top:500px;left:900px;'><a href='javascript:pgTransition(\"/our_students/parents.aspx\", \"template2\", \"homepage\", \"111\", 0);'>");
	document.write("	<img src='/templates/images/home_html/Main_parents.gif' width='104px' height='50px' border='0' alt='Parents' onMouseOver='this.src=\"/templates/images/home_html/Main_parentsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Main_parents.gif\";' /></a></div>");
     }
}
function render_mainCTA() {
if (DetectFlashVer(9,0,0)) {
	/* Ghetto Flash Fix */
if (location.href.toLowerCase().indexOf("https") > -1) { flObjects_prefix = "https"; } else { flObjects_prefix = "http"; }
	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=\""+mainCTA_width+"\" height=\""+mainCTA_height+"\" id=\""+mainCTA_id+"\" align=\"middle\">")
	document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\" />")
	document.write("<param name=\"movie\" value=\""+flash_path+mainCTA_name+"\" />")
	document.write("<param name=\"quality\" value=\"high\" />")
	document.write("<param name=\"wmode\" value=\"transparent\" />")
	document.write("<param name=\"bgcolor\" value=\"#000000\" />")
	document.write("<param name=\"flashvars\" value=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" />")
	document.write("<embed src=\""+flash_path+mainCTA_name+"\" FlashVars=\"template="+template_type+"&topic="+page_topic+"&pageid="+pageid+"&id="+adminid+"&internal="+origination+"\" quality=\"high\" bgcolor=\"#000000\" width=\""+mainCTA_width+"\" height=\""+mainCTA_height+"\" name=\""+mainCTA_id+"\" align=\"middle\" wmode=\"transparent\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"" + flObjects_prefix + "://www.macromedia.com/go/getflashplayer\" />")
	document.write("</object>")
			   }
else {
	document.write("<table width='1050' height='114' cellpadding='0' cellspacing='0' border='0'>");
	document.write("<tr><td width='49'><img src='/templates/images/home_html/Bottom_leftBlank.gif' width='49' height='114'/></td>");
	document.write("<td width='165'><a href='http://www.artificiallifedegree.com'>");
	document.write("<img src='/templates/images/home_html/Bottom_aLife.jpg' width='165' height='114' border='0' alt='Artificial Life' onMouseOver='this.src=\"/templates/images/home_html/Bottom_aLifeOver.jpg\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_aLife.jpg\";' /></a></td>");
	document.write("<td width='158'><a href='http://www.netsecuritydegree.com'>");
	document.write("<img src='/templates/images/home_html/Bottom_netSec.jpg' width='158' height='114' border='0' alt='Network Security' onMouseOver='this.src=\"/templates/images/home_html/Bottom_netSecOver.jpg\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_netSec.jpg\";' /></a></td>");
	document.write("<td width='160'><a href='http://www.gamedegree.com'>");
	document.write("<img src='/templates/images/home_html/Bottom_game.jpg' width='160' height='114' border='0' alt='Game Degree' onMouseOver='this.src=\"/templates/images/home_html/Bottom_gameOver.jpg\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_game.jpg\";' /></a></td>");
	document.write("<td width='153'><a href='javascript:pgTransition(\"/admissions/campus_tour.aspx\", \"template1\", \"primary\", \"0\", 0);'>");
	document.write("<img src='/templates/images/home_html/Bottom_tour.jpg' width='153' height='114' border='0' alt='Take A Tour' onMouseOver='this.src=\"/templates/images/home_html/Bottom_tourOver.jpg\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_tour.jpg\";' /></a></td>");
	document.write("<td width='58'><img src='/templates/images/home_html/Bottom_linksLeft.jpg' width='58' height='114'/></td>");
	document.write("<td width='167'><table width='167' height='114' cellpadding='0' cellspacing='0' border='0'><tr><td><img src='/templates/images/home_html/Bottom_linksTop.jpg' width='167' height='23' /></td></tr>");
	document.write("<tr><td><a href='javascript:pgTransition(\"/requestinfo\", \"template6\", \"primary\", \"0\", 0);'>");
	document.write("<img src='/templates/images/home_html/Bottom_requestInfo.gif' width='167' height='16' border='0' alt='Request Information' onMouseOver='this.src=\"/templates/images/home_html/Bottom_requestInfoOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_requestInfo.gif\";' /></a></td></tr>");
	document.write("<tr><td>");
	document.write("<img src='/templates/images/home_html/Bottom_chat.gif' width='167' height='17' border='0' alt='Chat With A Student' onMouseOver='this.src=\"/templates/images/home_html/Bottom_chatOver.gif\";this.style.cursor=\"hand\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_chat.gif\";' onMouseDown='liveChat();'/></a></td></tr>");
	document.write("<tr><td><a href='javascript:pgTransition(\"/life_on_campus/student_blogs.aspx\", \"template2\", \"primary\", \"0\", 0);'>");
	document.write("<img src='/templates/images/home_html/Bottom_blogs.gif' width='167' height='15' border='0' alt='Student Blogs' onMouseOver='this.src=\"/templates/images/home_html/Bottom_blogsOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_blogs.gif\";' /></a></td></tr>");
	document.write("<tr><td><a href='https://intranet.known-universe.com'>");
	document.write("<img src='/templates/images/home_html/Bottom_login.gif' width='167' height='18' border='0' alt='Student Faculty Login' onMouseOver='this.src=\"/templates/images/home_html/Bottom_loginOver.gif\";' onMouseOut='this.src=\"/templates/images/home_html/Bottom_login.gif\";' /></a></td></tr>");
	document.write("<tr><td><img src='/templates/images/home_html/Bottom_linksBottom.jpg' width='167' height='25' /></td></tr>");
	document.write("</table></td><td width='140'><img src='/templates/images/home_html/Bottom_rightBlank.jpg' width='140' height='114'/></td></tr></table>");
     }
}
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);
}
function force_top_start() {
if (net_browser == 6 || net_browser == 13 || net_browser == 21) { location.hash = "start"; }
else { document.body.scrollTop = true; }
}
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);
}
/*
  Compensate for Firefox's "smart" page caching that causes javascripts and other page elements not to be recognized when the browser's back
  button is used.  No other web browser uses a "bfcache" with Firefox 3.0.
*/
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. */
source_link_target = ""; source_link_position = ""; pageTarget = "";
mkStep = 0; transloaded = 0; transtrigger = 0; box_mm = 1;
try { clearInterval(mkTimer); } catch(onerror) {  }
}
// Used to execute page transitions for internal links.
function ExecutePageTransition(PageURL, TemplateID, Target) {
/* Make Hefty Mods/Tracking for changes that have been made to Firefox 3.6+ */
if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/
								 /*FF 3.x.?: Reset Page as last page state is being used from cache even though cache is being explicitly disabled.  Yay Firefox! */
								 if (document.getElementById("pgFlip")) {
													 /*Bring Back Objects*/
													 document.getElementById("signature_shell").style.visibility = "visible";
													 document.getElementById("cp1").style.visibility = "visible";
													 document.getElementById("cp2").style.visibility = "visible";
													 document.body.removeChild(document.getElementById("pgFlip"));
													}
								  else if (anchor_activated == 1) {
												   /*Bring Back Flash Objects*/
												   document.getElementById("signature_shell").style.visibility = "visible";
												   document.getElementById("cp1").style.visibility = "visible";
												   document.getElementById("cp2").style.visibility = "visible";
												  }
								  else if (anchor_activated == 0) {
												   if (box_mm == 1) {
														     /* Even though it seems otherwise by Firefox, the browser has, indeed, been to the previous page that is currently the active page */
														     /*Bring Back Flash Objects*/
														     document.getElementById("signature_shell").style.visibility = "visible";
														     document.getElementById("cp1").style.visibility = "visible";
														     document.getElementById("cp2").style.visibility = "visible";
														    }
												   else {
													 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); }
													}

												  }
								}
else {
      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); }
     }
}
function ExecutePageTransition_Anchor(PageURL, TemplateID, Target, Anchor) {
/* Make Hefty Mods/Tracking for changes that have been made to Firefox 3.6+ */
if (net_browser == 5 || net_browser == 12 || net_browser == 20) { /*FF*/
								 /*FF 3.x.?: Reset Page as last page state is being used from cache even though cache is being explicitly disabled.  Yay Firefox! */
								 if (document.getElementById("pgFlip")) {
													 /*Bring Back Flash Objects*/
													 document.getElementById("signature_shell").style.visibility = "visible";
													 document.getElementById("cp1").style.visibility = "visible";
													 document.getElementById("cp2").style.visibility = "visible";
													 document.body.removeChild(document.getElementById("pgFlip"));
													}
								  else if (anchor_activated == 1) {
												   /*Bring Back Flash Objects*/
												   document.getElementById("signature_shell").style.visibility = "visible";
												   document.getElementById("cp1").style.visibility = "visible";
												   document.getElementById("cp2").style.visibility = "visible";
												  }
								  else if (anchor_activated == 0) {
												   if (box_mm == 1) {
														     /* Even though it seems otherwise by Firefox, the browser has, indeed, been to the previous page that is currently the active page */
														     /*Bring Back Flash Objects*/
														     document.getElementById("signature_shell").style.visibility = "visible";
														     document.getElementById("cp1").style.visibility = "visible";
														     document.getElementById("cp2").style.visibility = "visible";
														    }
												   else {
													 anchor_activated = 1;
													 anchor_watcher = Anchor;
													 pgTransition(PageURL, 'template' + TemplateID, 'content', '1', adminid);
													}

												  }
								}
else {
      anchor_activated = 1;
      anchor_watcher = Anchor;
      pgTransition(PageURL, 'template' + TemplateID, 'content', '1', adminid);
     }
}
function transcount() {
transloaded = transloaded + 1;
}
function mkTransition() {
if (transloaded == 7) {
	if (transtrigger == 0) {
		transtrigger = 1;
		/* Dump Objects */
		//document.getElementById("signature_shell").innerHTML = "";
		document.getElementById("signature_shell").style.visibility = "hidden";
		/*
		  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("cp1").style.visibility = "hidden";
			document.getElementById("cp2").style.visibility = "hidden";
										}
		else { /*Other*/
		      /*
			An update to IE around 1/29/2007 made the following code generate an error; so use Firefox approach now.
		      document.getElementById("cp1").innerHTML = "";
		      document.getElementById("cp2").innerHTML = "";
		      */
		      document.getElementById("cp1").style.visibility = "hidden";
		      document.getElementById("cp2").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").style.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;
	      window.location.href = pageTarget;
	     }
		      }
}
var captureDoctypeLabel_Main = "", captureDoctypeType_Main = "", captureDoctypePath_Main = "", captureDocTypeFound_Main = 0;
function captureDocTypeDefinition_Main() {
if (navigator.userAgent.toLowerCase().indexOf("msie") > 0) {
							    for (x = 0; x < document.getElementsByTagName("!").length; x++) {
															     if (parseInt(document.getElementsByTagName("!")[x].nodeType) == 8) {
																								 if (document.getElementsByTagName("!")[x].nodeValue.toLowerCase().indexOf("doctype") > -1) {
																																			     tagData = new Array(); tagData = document.getElementsByTagName("!")[x].nodeValue.split("\"");
																																			     captureDoctypeLabel_Main = tagData[0].replace("DOCTYPE ", "").toUpperCase(); captureDoctypeType_Main = tagData[1]; captureDoctypePath_Main = tagData[3]; captureDocTypeFound_Main = 1;
																																			    }
																								}
															    }
							   }
else {
      /* All Other Browsers */
      for (x = 0; x < document.childNodes.length; x++) {
							if (parseInt(document.childNodes[x].nodeType) == 10) {
													      captureDoctypeLabel_Main = document.childNodes[x].name.toUpperCase();
													      captureDoctypeType_Main = document.childNodes[x].publicId;
													      captureDoctypePath_Main = document.childNodes[x].systemId;
													      captureDocTypeFound_Main = 1;
													     }
						       }
     }
}
function findPageDimensions() {
var shadeHeight = 0, shadeWidth = 0;
if (captureDocTypeFound_Main == 1) {
				    shadeHeight = ((document.height !== undefined) ? document.height : document.documentElement.scrollHeight);
				    shadeWidth = ((document.width !== undefined) ? document.width : document.documentElement.scrollWidth);
				    if (navigator.userAgent.toLowerCase().indexOf("msie") == -1) {
											          if (shadeHeight < parseInt((document.all) ? document.documentElement.offsetHeight : window.innerHeight)) { shadeHeight = parseInt((document.all) ? document.documentElement.offsetHeight : window.innerHeight); }
											          if (shadeWidth < parseInt((document.all) ? document.documentElement.offsetWidth : window.innerWidth)) { shadeWidth = parseInt((document.all) ? document.documentElement.offsetWidth : window.innerWidth); }
											         }
				   }
else {
      shadeHeight = ((document.height !== undefined) ? document.height : document.body.scrollHeight);
      shadeWidth = ((document.width !== undefined) ? document.width : document.body.scrollWidth);
      if (shadeHeight < parseInt((document.all) ? document.body.offsetHeight : window.innerHeight)) { shadeHeight = parseInt((document.all) ? document.body.offsetHeight : window.innerHeight); }
      if (shadeWidth < parseInt((document.all) ? document.body.offsetWidth : window.innerWidth)) { shadeWidth = parseInt((document.all) ? document.body.offsetWidth : window.innerWidth); }
     }
if (navigator.userAgent.toLowerCase().indexOf("msie") > 0 && captureDocTypeFound_Main == 0) {
											     /* Compensate for scrollbars */
											     shadeHeight = shadeHeight - 0;
											     shadeWidth = shadeWidth - 20;
										            }
var retCollection = shadeWidth + "," + shadeHeight;
return(retCollection);
}
function pgBuilder(template) {
chunks = new Array();
captureDocTypeDefinition_Main();
var dimensionsTemp = findPageDimensions();
var mainPageWidth = parseInt(dimensionsTemp.split(",")[0]); //2550
var mainPageHeight = parseInt(dimensionsTemp.split(",")[1]); //1933
if (navigator.userAgent.toLowerCase().indexOf("msie") <= 0) { mainPageWidth = mainPageWidth - 16; }
eGenerator("div", "pgFlip", "pgFlip", "pgFlip");
document.getElementById("pgFlip").style.width = mainPageWidth + "px";
document.getElementById("pgFlip").style.height = mainPageHeight + "px";
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;
}
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 : "" );
									    }
					 }
}
