var directory='http://www.uwplatt.edu/template_data/styleBase/';
//var directory="template_data/";
var path="";
var departmentName="";
var pageName="";
var contactName="";
var contactEmail="";
var backgroundImage="";
var crumbsList="";
var menuList="";
var showMenu="";
var firstCrumb="true";
var lastUpdated=document.lastModified;
var currentStyle="default";
var pageQuote="UWP...What College Should Be";
var template="";
var oldPage="";
var templateColor="";
var templateStyle="";

var searchBox="<div id='search'><form action='http://www.google.com/cse' id='cse-search-box'><fieldset><input type='hidden' name='cx' value='013148818429580281285:suupwg3jgw4' /><input type='hidden' name='ie' value='UTF-8' /><input type='text' id='query0' name='q' value='Search UWP' onclick='javascript:clearBox()' /><input type='submit' id='searchGo' name='sa' value='Go' /></fieldset></form></div><script type='text/javascript' src='http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en'></script>";
var skyBox="<div id='skybox'><ul><li class='first'><a href='http://www.uwplatt.edu' accesskey='u'><span class='acKey'>U</span>WP Homepage</a></li><li><a href='http://www.uwplatt.edu/go/email' accesskey='m'>E-<span class='acKey'>m</span>ail</a></li><li><a href='http://www.uwplatt.edu/go/acadtools' accesskey='a'><span class='acKey'>A</span>cademic Tools</a></li></ul></div>";
var quickLinks="<div id='quicklinks'><ul><li class='first'><a href='http://www.uwplatt.edu/academics'>Academics</a></li><li class='second'><a href='http://www.uwplatt.edu/admission'>Admission</a></li><li class='third'><a href='http://apply.wisconsin.edu'>Apply Online</a></li><li class='fourth'><a href='http://www.uwplatt.edu/registrar/calendars.html'>Calendar</a></li><li class='fifth'><a href='http://www.uwplatt.edu/contact'>Directories</a></li></ul></div>";
var minutusTop="<div id='minutus'><div id='minutusExtraTop'></div><ul>";
var minutusBottom="</ul><div id='minutusExtraBottom'></div></div>";
var skipTo="<p id='skiplink'><a href='#contentum'>Skip to content</a> or, if you would rather, <a href='#minutus'>Skip to navigation</a>.</p>";
var contentTop="<div id='contentum'><div id='contentumBuffer'>";
var contentBottom="</div></div>";
var topRule="<div id='topRule'><hr /></div>";
var bottomRule="<div id='bottomRule'><hr /></div>";
var copyrightInfo="Copyright &copy; 1995-2009 <a href='http://www.uwplatt.edu/contact'>University of Wisconsin-Platteville</a> and <a href='http://www.uwsa.edu/bor'>The Board of Regents - University of Wisconsin System</a><br /><a href='http://www.uwplatt.edu/contact'>1 University Plaza, Platteville, Wisconsin 53818-3099</a> - For more information, please call <a href='http://www.uwplatt.edu/contact'>1-800-362-5515</a><br />";
var validateLink=" - Last update: <a href='http://validator.w3.org/check/referer'>"+lastUpdated+"</a>";
var googleAnalytics="<script type='text/javascript' src='http://www.google-analytics.com/urchin.js'></script><script type='text/javascript'>_uacct = 'UA-1833434-1';urchinTracker();</script>";

function getTemplate () {
	if (template == ""){
		oldPage=true;
		if(templateColor=='orange'){template="classic-orange";}else{template="classic";}
	}
	template=template.toLowerCase();
	function addTemplate(templateName, templateType) {this.templateName=templateName; this.templateType=templateType;}

	var templateList=new Array();
	templateList[0]=new addTemplate('default');
	templateList[1]=new addTemplate('news');
	templateList[2]=new addTemplate('sax');
	templateList[3]=new addTemplate('cfa_old');
	templateList[4]=new addTemplate('classic');
	templateList[5]=new addTemplate('music');
	templateList[6]=new addTemplate('pioneerfarm');
	templateList[7]=new addTemplate('classic-orange');
	templateList[8]=new addTemplate('studentctr');
	templateList[9]=new addTemplate('cpr');
	templateList[10]=new addTemplate('webdev');
	templateList[11]=new addTemplate('steel');
	templateList[12]=new addTemplate('athletics');
	templateList[13]=new addTemplate('it');
	templateList[14]=new addTemplate('alumni');
	templateList[15]=new addTemplate('resnet');
	templateList[16]=new addTemplate('international');
	templateList[17]=new addTemplate('curvyblue');
	templateList[18]=new addTemplate('homecoming');
	templateList[19]=new addTemplate('biology');
	templateList[20]=new addTemplate('liquid');
	templateList[21]=new addTemplate('appeal');
	templateList[22]=new addTemplate('studyabroad');
	templateList[23]=new addTemplate('geography');
	templateList[24]=new addTemplate('heartland_old');
	templateList[25]=new addTemplate('counseling');
	templateList[26]=new addTemplate('swsbdc');
	templateList[27]=new addTemplate('distance');
	templateList[28]=new addTemplate('llc');
	templateList[29]=new addTemplate('library');
	templateList[30]=new addTemplate('admission');
	templateList[31]=new addTemplate('pers');
	templateList[32]=new addTemplate('finearts');
	templateList[33]=new addTemplate('education');
	templateList[34]=new addTemplate('cj');
	templateList[35]=new addTemplate('wep');
	templateList[36]=new addTemplate('pyf');
	templateList[37]=new addTemplate('aces');
	templateList[38]=new addTemplate('weather');
	templateList[39]=new addTemplate('homecoming2003');
	templateList[40]=new addTemplate('careercenter');
	templateList[41]=new addTemplate('tvservices');
	templateList[42]=new addTemplate('womencouncil');
	templateList[43]=new addTemplate('htcp');
	templateList[44]=new addTemplate('finaid');
	templateList[45]=new addTemplate('webevent');
	templateList[46]=new addTemplate('cup');
	templateList[47]=new addTemplate('humanities');
	templateList[48]=new addTemplate('photography');
	templateList[49]=new addTemplate('flag');
	templateList[50]=new addTemplate('homecoming2004');
	templateList[51]=new addTemplate('ee');
	templateList[52]=new addTemplate('philosophy');
	templateList[53]=new addTemplate('childrenc');
	templateList[54]=new addTemplate('english');
	templateList[55]=new addTemplate('regents');
	templateList[56]=new addTemplate('sponprog');
	templateList[57]=new addTemplate('homecoming2005');
	templateList[58]=new addTemplate('cfa');
	templateList[59]=new addTemplate('csse');
	templateList[60]=new addTemplate('homecoming2006');
	templateList[61]=new addTemplate('tutoring');	
	templateList[62]=new addTemplate('nohr');
	templateList[63]=new addTemplate('collaborative');
	templateList[64]=new addTemplate('ibrc');
	templateList[65]=new addTemplate('foundation1');
	templateList[66]=new addTemplate('industrial_studies');
	templateList[67]=new addTemplate('disability');
	templateList[68]=new addTemplate('heartland');
	templateList[69]=new addTemplate('homecoming2007');
	templateList[70]=new addTemplate('soa');
	templateList[71]=new addTemplate('homecoming2008');
	templateList[72]=new addTemplate('intercom');
	templateList[73]=new addTemplate('pacce');
	templateList[74]=new addTemplate('firstyear');
	templateList[75]=new addTemplate('ethnic');
	templateList[76]=new addTemplate('confucius');
	templateList[77]=new addTemplate('uts');
	templateList[78]=new addTemplate('watr');
	templateList[79]=new addTemplate('writing');
	templateList[80]=new addTemplate('tec');
	templateList[81]=new addTemplate('wsprogram');
	templateList[82]=new addTemplate('ethnicstudies');
	templateList[83]=new addTemplate('test');
	templateList[84]=new addTemplate('xxx');
	var found=false;
	for (var i=0; i < templateList.length; i++) {
		if (!found && template == templateList[i].templateName){found=true;}
	}
	if (!found){template="default";}
}

function initialize()
{
	getTemplate();
	path=directory+template;
	document.write("\n<link rel='stylesheet' type='text/css' href='http://www.uwplatt.edu/template_data/icon.css' media='screen' />");
	document.write("\n<link rel='stylesheet' type='text/css' href='http://www.uwplatt.edu/template_data/hcard/hcard.css' media='screen' />");
	document.write("\n<link rel='stylesheet' type='text/css' href='"+directory+"style.css' media='screen' />");
	document.write("\n<script type='text/java" + "script' src='"+path+"/layout.js'></script>");
	document.write("\n<style type='text/css' media='screen'>@import url("+path+"/layout.css);</style>");
	document.write("\n<link rel='stylesheet' type='text/css' href='"+directory+"print.css' media='print' />");
	document.write("\n<script type='text/java" + "script' src='http://www.uwplatt.edu/template_data/js/jquery/jquery-1.2.6.pack.js'></script>");
	document.write("\n<script type='text/java" + "script' src='http://www.uwplatt.edu/template_data/js/jquery/jquery.pngFix.pack.js'></script>");
	document.write("\n<link rel='stylesheet' type='text/css' media='screen' href='http://www.uwplatt.edu/emergency/cogs/emergency.css' />");
	document.write("\n<script type='text/java" + "script' src='http://www.uwplatt.edu/emergency/cogs/emergency.js'></script>");
	document.write("\n<script type='text/java" + "script'>$(document).ready(function(){$(document).pngFix();})</script>");
	if (showMenu == "no" || showMenu == "n") {
		document.write("\n<link rel='stylesheet' type='text/css' href='http://www.uwplatt.edu/template_data/nomenu.css' media='screen' />");
	}
}

function drawHeader() {document.write ("<script type='text/javascript' src='"+path+"/header.js'></script>");}
function drawFooter() {document.write ("<script type='text/javascript' src='"+path+"/footer.js'></script>");}
function hcardDownload() {document.write ("<div class='download'><a href='http://technorati.com/contacts/"+ document.location +"'>Add to Address Book</a></div>");}
function clearBox() {document.getElementById("query0").value='';}

//start old
function menuHeader(menuTitle) { menuList=menuList+"<li class='menuHeader'>"+menuTitle+"</li>";}
function menuEntry(menuTitle, menuAddress){menuList=menuList+"\n<li class='menuEntry'><a href='"+menuAddress+"'>"+menuTitle+"</a></li>\n";}
function menuButton(menuTitle, menuAddress){menuList=menuList+"\n<li class='menuButton'><a href='"+menuAddress+"'>"+menuTitle+"</a></li>\n";}
function menuAcronym(menuTitle, menuAddress, acronym){menuList=menuList+"<li><a href='"+menuAddress+"'><acronym title='"+acronym+"'>"+menuTitle+"</acronym></a></li>";}
function menuBreak(){menuList=menuList+"<li class='menuBreak'><hr /></li>";}
function addCrumb(title, website){if (firstCrumb == "true"){crumbsList="<a href='" + website + "'>" + title + "</a>";firstCrumb="false";}else crumbsList=crumbsList + "&nbsp;>&nbsp;<a href='" + website + "'>" + title + "</a>";}
function addCrumbAcronym(title, website, acronym){if (firstCrumb == "true"){crumbsList="<a href='" + website + "'><acronym title='"+ acronym +"'>" + title + "</acronym></a>";firstCrumb="false";}else crumbsList=crumbsList + "&nbsp;>&nbsp;<a href='" + website + "'><acronym title='"+ acronym +"'>" + title + "</acronym></a>";}
function getImg(dir){var maxA=10;var maxB=9;var maxC=9;var maxD=9;var maxE=8;var maxF=9;var maxG=6;if(dir != ""){dir=dir.toUpperCase();var width=(dir=="A")?125:(dir=="B")?175:(dir=="C")?100:(dir=="D")?200:(dir=="E")?175:(dir=="F")?225:(dir=="G")?250:0;var height=(dir=="A")?125:(dir=="B")?150:(dir=="C")?200:(dir=="D")?100:(dir=="E")?250:(dir=="F")?150:(dir=="G")?250:0;var rnd=eval("(Math.round(Math.random()*(max"+dir+")))");document.write("<img src='http://www.uwplatt.edu/image/template_data/random/" + dir + "/img" + rnd + ".jpg' border='1' width='" + width + "' height='" + height + "' alt='' />");}}

//Is this needed anymore?
function menuPopup(menuTitle, menuAddress){menuList=menuList+"<li><a href='"+menuAddress+"' target='new'>"+menuTitle+"</a></li>";}
function menuBreakout(menuTitle, menuAddress){menuList=menuList+"<li><a href='"+menuAddress+"' target='_top'>"+menuTitle+"</a></li>";}
function menuTarget(menuTitle, menuAddress, target){menuList=menuList+"<li><a href='"+menuAddress+"' target='"+target+"'>"+menuTitle+"</a></li>";}

//$(document).ready(function(){$(document).pngFix();}