/*
-----------------------------------------------
Campus Explorer Widget 3.3
http://widget.campusexplorer.com/js/widget.js
Copyright (c) 2009-2010, Campus Explorer, All rights reserved
----------------------------------------------- */
if(typeof(CampusExplorer)=="undefined"){var CampusExplorerQ=CampusExplorerQ||[];(function(){var CE={};CE.Util={combineArrays:function(a,b){a=a||[];b=b||[];var temp=[];for(var index=0;index<a.length;index++){temp.push(a[index]);}
a=temp;for(var index=0;index<b.length;index++){a.push(b[index]);}
return a;},getArray:function(list){var a=[];for(var index=0;index<list.length;index++){a.push(list[index]);}
return a;}};CE.Browser={_browser:null,_isIE:null,_isIE6:null,_isIE7:null,_isIE8:null,get:function(){if(this._browser==null){this._browser={};var isMSIE=/*@cc_on!@*/false;if(isMSIE){this._browser.name="Explorer";this._browser.version=parseFloat(navigator.appVersion.split("MSIE")[1])||"unknown";}else{this._browser.name="unknown";this._browser.version="unknown";}}
return this._browser;},isIE:function(){if(this._isIE==null){var browser=this.get();this._isIE=(browser.name=="Explorer");}
return this._isIE;},isIE6:function(){if(this._isIE6==null){var browser=this.get();this._isIE6=(browser.name=="Explorer"&&browser.version>=6&&browser.version<7);}
return this._isIE6;},isIE7:function(){if(this._isIE7==null){var browser=this.get();this._isIE7=(browser.name=="Explorer"&&browser.version>=7&&browser.version<8);}
return this._isIE7;},isIE8:function(){if(this._isIE8==null){var browser=this.get();this._isIE8=(browser.name=="Explorer"&&browser.version>=8&&browser.version<9);}
return this._isIE8;}};CE.QueryString={_obj:null,getValue:function(key){if(this._obj==null){this._obj=this.from(window.location.search.substring(1));}
return this._obj["campusexplorer-"+key]||CE.Hash.getValue(key);},from:function(queryString){if(queryString.length<=0)return{};var obj={};var pairs=queryString.split("&");for(var index=0;index<pairs.length;index++){var nextPair=pairs[index].split("=");if(nextPair.length>1){obj[nextPair[0]]=decodeURIComponent(nextPair[1]);}}
return obj;}};CE.Hash={_obj:null,getValue:function(key){if(this._obj==null){this._obj=this.from(window.location.hash.substring(1));}
return this._obj[key];},from:function(hash){if(hash.length<=0)return{};var obj={};var values=hash.split("/");if(values[0]==""){values=values.splice(1);}
if(values[0]=="campusexplorer"){for(var index=1;index<values.length;index++){var nextValue=values[index];if(nextValue.indexOf(".")>=0||nextValue.indexOf(":")>=0){obj.host=nextValue;}else if(nextValue!=null&&nextValue!=""){obj[nextValue]=true;}}}
return obj;}};CE.Console={initialize:function(){if(CE.QueryString.getValue("debug")!=null||CE.QueryString.getValue("qa")!=null){if(window.console&&window.console.log){this.log=function(message){window.console.log("Campus Explorer Widget: "+message);};}
CE.Console.log("Console is active.");}},log:function(){}};CE.Console.initialize();CE.Form={getData:function(form){var data={};var elements=form.getElementsByTagName("*");function addValue(name,value){if(data[name]!=null){if(typeof(data[name])=="string"){data[name]=[data[name]];}
if(data[name].push!=null){data[name].push(value);}}else{data[name]=value;}}
for(var index=0;index<elements.length;index++){var element=elements[index];if(!element.disabled&&element.name&&element.name.length>0){var tagName=element.tagName.toLowerCase();if(tagName=="input"||tagName=="textarea"){if(element.type=="text"||element.type=="password"||element.type=="hidden"||((element.type=="checkbox"||element.type=="radio")&&element.checked)){addValue(element.name,element.value);}}else if(tagName=="select"){addValue(element.name,element.options[element.selectedIndex].value);}}}
return data;}};CE.Element={addListener:function(element,eventName,handler){if(element.addEventListener){element.addEventListener(eventName,handler,false);}else{element.attachEvent("on"+eventName,handler);}},fireEvent:function(element,eventName){if(document.createEvent){var e=document.createEvent("HTMLEvents");e.initEvent(eventName,true,true);return!element.dispatchEvent(e);}else if(document.createEventObject){var e=document.createEventObject();return element.fireEvent("on"+eventName,e);}},getOneElementByClassName:function(contextElement,className){if(contextElement.getElementsByClassName){var elements=contextElement.getElementsByClassName(className);return elements[0];}
var elements=contextElement.getElementsByTagName("*");var length=elements.length;for(var index=0;index<length;index++){if(CE.Element.hasClassName(elements[index],className)){return elements[index];}}
return;},getAllElementsByClassName:function(contextElement,className){if(contextElement.getElementsByClassName){return CE.Util.getArray(contextElement.getElementsByClassName(className));}
var elements=contextElement.getElementsByTagName("*");var length=elements.length;var list=[];for(var index=0;index<length;index++){if(hasClassName(elements[index],className)){list.push(elements[index]);}}
return list;},getOneElementByName:function(contextElement,name,tagName){if(tagName==null)tagName="*";if(contextElement.querySelector){return contextElement.querySelector(tagName+"[name="+name+"]");}
if(document.evaluate){var result=document.evaluate("//"+tagName+"[@name='"+name+"']",contextElement,null,XPathResult.ANY_UNORDERED_NODE_TYPE,null);return result.singleNodeValue;}
var elements=contextElement.getElementsByTagName(tagName);var length=elements.length;for(var index=0;index<length;index++){if(elements[index].name==name){return elements[index];}}
return;},getAllElementsByName:function(contextElement,name,tagName){if(tagName==null)tagName="*";if(contextElement.querySelector){return CE.Util.getArray(contextElement.querySelectorAll(tagName+"[name="+name+"]"));}
var elements=contextElement.getElementsByTagName(tagName);var length=elements.length;var found=[];for(var index=0;index<length;index++){if(elements[index].name==name){found.push(elements[index]);}}
return found;},getOneSelectElementByName:function(contextElement,name){return CE.Element.getOneElementByName(contextElement,name,"select");},getAncestor:function(contextElement,tagName){tagName=String(tagName).toLowerCase();var ancestor=contextElement.parentNode;while(ancestor&&String(ancestor.nodeName).toLowerCase()!=tagName){ancestor=ancestor.parentNode;}
if(!ancestor)return;if(String(ancestor.nodeName).toLowerCase()==tagName)return ancestor;},getSubmitButtons:function(contextElement){if(!contextElement)return;var submitButtons=[];var button=null;var buttons=CE.Util.getArray(contextElement.getElementsByTagName("button"));if(!buttons||buttons.length<=0)buttons=contextElement.getElementsByTagName("input");if(buttons&&buttons.length>0){for(var index=0;index<buttons.length;index++){var container=CE.Element.getAncestor(buttons[index],"p");if(!container)container=CE.Element.getAncestor(buttons[index],"ul");if(container){if(CE.Element.hasClassName(container,"submit")){submitButtons.push(buttons[index]);}}}}
if(submitButtons.length>0){return submitButtons;}},addClassName:function(element,className){if(CE.Element.hasClassName(element,className))return;var existingClassName=(element.className==null||element.className=="")?"":element.className+" ";element.className=existingClassName+className;},removeClassName:function(element,className){element.className=CE.Element.strip(element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)")," "));},strip:function(str){return str.replace(/^\s+/,"").replace(/\s+$/,"");},hasClassName:function(element,className){var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)));},getCumulativeOffset:function(element){var top=0;var left=0;do{top+=element.offsetTop||0;left+=element.offsetLeft||0;element=element.offsetParent;}while(element);return{top:top,left:left};},getStyle:function(element,property){var value="";if(document.defaultView&&document.defaultView.getComputedStyle){value=document.defaultView.getComputedStyle(element,"").getPropertyValue(property);}
else if(element.currentStyle){property=property.replace(/\-(\w)/g,function(match,p1){return p1.toUpperCase();});value=element.currentStyle[property];}
return value;}};CE.Event={preventDefault:function(e){if(e.preventDefault)e.preventDefault();e.returnValue=false;},stopPropagation:function(e){if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true;e.returnValue=false;}};CE.EventDispatcher=function(){var listenerStack=null;function addListener(eventType,eventHandler){if(listenerStack==null){listenerStack=[];}
var listener={type:eventType,handler:eventHandler};listenerStack.push(listener);return listener;};function dispatchEvent(eventType){if(listenerStack!=null){for(var index=0;index<listenerStack.length;index++){var nextListener=listenerStack[index];if(nextListener.type==eventType){nextListener.handler({type:eventType,target:this});}}}};return{addListener:addListener,dispatchEvent:dispatchEvent};};CE.Page={cssFiles:[],insertCSS:function(urls,host){if(typeof(urls)=="string"){urls=[urls];}
var css={};var stylesheets=document.getElementsByTagName("link");for(var index=0;index<stylesheets.length;index++){if(stylesheets[index].rel=="stylesheet"){css[stylesheets[index].getAttribute("href")]=true;}}
var head=(document.getElementsByTagName("head")[0]||document.body||document.documentElement);var https=(/^https/i.test(window.location.protocol));for(var i=0;i<urls.length;i++){var path="";if(!(/^http/i.test(urls[i]))){path=(https?"https://":"http://")+host;}
if(css[path+urls[i]]==true){CE.Console.log("skipping already loaded css: "+urls[i]);continue;}
var tag=document.createElement("link");tag.type="text/css";tag.rel="stylesheet";tag.href=path+urls[i];head.appendChild(tag);CE.Page.cssFiles.push(tag);}},resetCSS:function(){for(var index=0;index<CE.Page.cssFiles.length;index++){CE.Page.cssFiles[index].parentNode.removeChild(CE.Page.cssFiles[index]);}
CE.Page.cssFiles=[];},insertJS:function(urls,host){var https=(/^https/i.test(window.location.protocol));for(var i=0;i<urls.length;i++){var path="";if(!(/^http/i.test(urls[i]))){path=(https?"https://":"http://")+host;}
new CE.Page.JSONPRequest(path+urls[i]);}},JSONPRequest:function(url){var tag=document.createElement("script");tag.type="text/javascript";tag.charset="utf-8";var tempurl=url+"";tag.src=tempurl;var now=new Date();var random=Math.floor(Math.random()*1000001);var id=tag.id="campusexplorer"+now.getTime()+random;(document.getElementsByTagName("head")[0]||document.body||document.documentElement).appendChild(tag);},removeScripts:function(html){return html.replace(new RegExp("<script[^>]*>([\\S\\s]*?)<\/script>","img"),"");},getScripts:function(html){var matches=html.match(new RegExp("<script[^>]*>([\\S\\s]*?)<\/script>","img"))||[];var scripts=[];for(var index=0;index<matches.length;index++){var match=matches[index].match(new RegExp("<script[^>]*>([\\S\\s]*?)<\/script>","im"))||["",""];scripts.push(match[1]);}
return scripts;},getViewportDimensions:function(){var width=0;var height=0;try{if(window.innerWidth){width=window.innerWidth;height=window.innerHeight;}else{if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientWidth>0){width=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}else{width=document.body.clientWidth;height=document.body.clientHeight;}}}catch(e){}
return{width:width,height:height};},getDimensions:function(){var width=0;var height=0;try{var pageDimensions={width:document.body.offsetWidth,height:document.body.offsetHeight};if(document.body.scrollHeight>pageDimensions.height){pageDimensions={width:document.body.scrollWidth,height:document.body.scrollHeight};}
var viewportDimensions=CE.Page.getViewportDimensions();if(viewportDimensions.width>pageDimensions.width){width=viewportDimensions.width+CE.Page.getScrollOffsets().left;}else{width=pageDimensions.width;}
if(viewportDimensions.height>pageDimensions.height){height=viewportDimensions.height+CE.Page.getScrollOffsets().top;}else{height=pageDimensions.height;}}catch(e){}
return{width:width,height:height};},getScrollOffsets:function(){var top=0;var left=0;try{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){top=document.body.scrollTop;left=document.body.scrollLeft;}
if(document.documentElement.scrollTop>top){top=document.documentElement.scrollTop;left=document.documentElement.scrollLeft;}}catch(e){}
return{top:top,left:left};}};var doQuit=false;(function(){var host=CE.QueryString.getValue("host");if(host==null&&(CE.QueryString.getValue("qa")!=null||CE.QueryString.getValue("debug")!=null)){host="stg.campusexplorer.com";}
if(host!=null){var widgetPath="/js/widget.js";var scripts=document.getElementsByTagName("script");var widgetScripts=[];for(var index=0;index<scripts.length;index++){if(scripts[index].src.indexOf(widgetPath)>=0){widgetScripts.push(scripts[index]);}}
var thisFileHost=widgetScripts[0].src.replace(/http(s)?:\/\//,"").replace(widgetPath,"");if(thisFileHost!=host){for(var index=0;index<widgetScripts.length;index++){widgetScripts[index].parentNode.removeChild(widgetScripts[index]);}
if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){CE.Page.insertJS([widgetPath],host);},false);}else{var temp=window.onload;window.onload=function(){CE.Page.insertJS([widgetPath],host);if(temp)temp();};}
function push(element,config){var widget;CampusExplorerQ.push(function(){widget=new CampusExplorerWidget(element,config);});return{show:function(){widget.show();},hide:function(){widget.hide();},reset:function(){widget.reset();},update:function(){widget.update();},addListener:function(){widget.addListener();}};};window.CampusExplorerWidget=push;window.CampusExplorerProgramsWidget=push;window.CampusExplorerCollegeWidget=push;doQuit=true;}}})();if(doQuit)return;CE.WidgetManager=function(){var dispatcher=new CE.EventDispatcher();var addListener=dispatcher.addListener;var dispatchEvent=dispatcher.dispatchEvent;var widgets=[];var initialized=false;var concentrationsData=null;function initialize(){if(initialized)return;initialized=true;if(typeof(CampusExplorerQ)!="undefined"){for(var index=0;index<CampusExplorerQ.length;index++){fulfillQueueItem(CampusExplorerQ[index]);}}};function fulfillQueueItem(item){if(item){if(typeof(item)=="function"){item();}else{createWidget(item);}}else{CE.Console.log("NOTICE: createWidget() was called without any parameters.");}};function createWidget(config){try{var element=config.element;var attributes=config;delete attributes["element"];if(element!=null){new CE.Widget(element,attributes);}else{new CE.Widget(attributes);}}catch(e){CE.Console.log("ERROR: "+e);}};function registerWidget(widget,id){widgets[id]=widget;};function getWidget(id){return widgets[id];};function showWidget(id){var widget=getWidget(id);if(widget)widget.show();};function hideWidget(id){var widget=getWidget(id);if(widget){widget.hide();widget.reset();}};function updateWidget(json){if(json.redirect){window.location=json.redirect;}else{if(json.stash.concentrations){setConcentrationsData(json.stash.concentrations);}
var widget=getWidget(json.stash.element);widget.update(json);}};function setConcentrationsData(data){concentrationsData=data;};function getConcentrationsData(){return concentrationsData;};function requestConcentrations(){var request;if(window.XMLHttpRequest){request=new XMLHttpRequest();}else{request=new ActiveXObject("Microsoft.XMLHTTP");}
request.onreadystatechange=function(){if(request.readyState==4&&request.status==200){var responseText=request.responseText;var json=eval("("+String(responseText)+")");if(typeof(json)!="object"){return CE.Console.log("failed to get json object from:"+responseText);}
setConcentrationsData(json);dispatchEvent("concentrations:loaded");}};request.open("GET","/api/concentrations/2/?format=json",true);request.send(null);};return{initialize:initialize,fulfillQueueItem:fulfillQueueItem,createWidget:createWidget,registerWidget:registerWidget,showWidget:showWidget,hideWidget:hideWidget,updateWidget:updateWidget,getWidget:getWidget,getConcentrationsData:getConcentrationsData,requestConcentrations:requestConcentrations,addListener:addListener};}();var SummaryText=function(element){if(typeof(element)=="String")element=document.getElementById(element);if(!element)return;var originalWords;function initialize(){if(!moreThanTwoLines())return;var words=document.createElement("span");words.innerHTML=element.innerHTML;originalWords=element.innerHTML;element.innerHTML="";element.appendChild(words);var ellipses=document.createTextNode("… ");element.appendChild(ellipses);var button=document.createElement("a");element.appendChild(button);button.href="#campusexplorer-read-more";var label=document.createTextNode("Read More");button.appendChild(label);if(button.addEventListener){button.addEventListener("click",onButtonClick,false);}else{button.attachEvent("on"+"click",onButtonClick);}
while(moreThanTwoLines()){words.innerHTML=removeWord(words);}};function onButtonClick(e){if(e.preventDefault)e.preventDefault();e.returnValue=false;element.innerHTML=originalWords;};function moreThanTwoLines(){var height=element.offsetHeight;element.style.lineHeight="1.25em";element.style.height="2.5em";element.style.overflow="hidden";var newHeight=element.offsetHeight;element.style.height="auto";element.style.overflow="visible";return(newHeight<height);};function removeWord(element){var text=element.innerHTML;while(text[text.length-1]==" "){text=text.substring(0,text.length-2);}
var words=text.split(" ");words.pop();return words.join(" ");};initialize();};CE.Type={COLLEGE:"college",PROGRAMS:"programs"};CE.Widget=function(){var dispatcher=new CE.EventDispatcher();var addListener=dispatcher.addListener;var dispatchEvent=dispatcher.dispatchEvent;var placeholder=null;var id=null;var element=null;var selectionsLightbox=null;var config={};var type=null;var lightbox=false;var requestFormPath="/widget/lead-request/";var spinner=null;var errorMessage=null;var prefilledValues={};var host="www.campusexplorer.com";var loaded=false;var hidden=false;var areaOfStudy=null;var iframe;var shadow;var requestTimer=null;var selectLists=[];var fieldPrefix;var submitted=false;var userCancelled=false;var domainClassName=null;var useAjax=true;var testgroup=null;var lastRequestFormArgs=null;var rendered=false;var queue=[];var selectionsLightboxActive=false;var initialized=null;var structureInitialized=false;var selectionsLightboxCenteredVertically=false;var checkedCount=0;for(var index=0;index<2&&index<arguments.length;index++){if(typeof(arguments[index])=="string"){id=arguments[index];}else if(typeof(arguments[index])=="object"){config=arguments[index];if(!id)id=config.element;}}
function initialize(){CE.Console.log("Widget.initialize()");if(config.popup&&config.popup==true){config.lightbox=true;}
if(config.widget_header!=null){config.headertext=config.widget_header;}
if(config.widget_intro!=null){config.introtext=config.widget_intro;}
if(config.host!=null)host=config.host;if(config.lightbox!=null)lightbox=config.lightbox;if(config.loaded!=null)loaded=config.loaded;if(config.ajax!=null)useAjax=config.ajax;if(!lightbox){placeholder=document.getElementById(id);if(!placeholder){setTimeout(initialize,500);return;}
var next=placeholder;do{next=next.nextSibling;}while(next&&next.nodeType!=1);if(next&&next.className&&(String(next.className).indexOf("poweredby")>=0)){placeholder=placeholder.parentNode;var style={"marginTop":CE.Element.getStyle(placeholder,"margin-top"),"marginRight":CE.Element.getStyle(placeholder,"margin-right"),"marginBottom":CE.Element.getStyle(placeholder,"margin-bottom"),"marginLeft":CE.Element.getStyle(placeholder,"margin-left"),"width":CE.Element.getStyle(placeholder,"width"),"cssFloat":CE.Element.getStyle(placeholder,"float"),"styleFloat":CE.Element.getStyle(placeholder,"styleFloat")};for(var prop in style){if(style[prop]!=null&&style[prop]!=""){placeholder.style[prop]=style[prop];}}
var codes=config.source.split("-");id="campusexplorer"+codes[codes.length-1];while(document.getElementById(id)){id=id+"-"+String(Math.floor(Math.random()*101));}
placeholder.id=id;}
domainClassName=window.location.host.replace("www.","");domainClassName=domainClassName.replace(/\./g,"-");CE.Element.addClassName(placeholder,domainClassName);}
try{var skipThisWidget=false;(function(){var MD5=function(string){function RotateLeft(lValue,iShiftBits){return(lValue<<iShiftBits)|(lValue>>>(32-iShiftBits));}
function AddUnsigned(lX,lY){var lX4,lY4,lX8,lY8,lResult;lX8=(lX&0x80000000);lY8=(lY&0x80000000);lX4=(lX&0x40000000);lY4=(lY&0x40000000);lResult=(lX&0x3FFFFFFF)+(lY&0x3FFFFFFF);if(lX4&lY4){return(lResult^ 0x80000000^ lX8^ lY8);}
if(lX4|lY4){if(lResult&0x40000000){return(lResult^ 0xC0000000^ lX8^ lY8);}else{return(lResult^ 0x40000000^ lX8^ lY8);}}else{return(lResult^ lX8^ lY8);}}
function F(x,y,z){return(x&y)|((~x)&z);}
function G(x,y,z){return(x&z)|(y&(~z));}
function H(x,y,z){return(x^ y^ z);}
function I(x,y,z){return(y^ (x|(~z)));}
function FF(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(F(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function GG(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(G(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function HH(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(H(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function II(a,b,c,d,x,s,ac){a=AddUnsigned(a,AddUnsigned(AddUnsigned(I(b,c,d),x),ac));return AddUnsigned(RotateLeft(a,s),b);};function ConvertToWordArray(string){var lWordCount;var lMessageLength=string.length;var lNumberOfWords_temp1=lMessageLength+8;var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1%64))/64;var lNumberOfWords=(lNumberOfWords_temp2+1)*16;var lWordArray=Array(lNumberOfWords-1);var lBytePosition=0;var lByteCount=0;while(lByteCount<lMessageLength){lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=(lWordArray[lWordCount]|(string.charCodeAt(lByteCount)<<lBytePosition));lByteCount++;}
lWordCount=(lByteCount-(lByteCount%4))/4;lBytePosition=(lByteCount%4)*8;lWordArray[lWordCount]=lWordArray[lWordCount]|(0x80<<lBytePosition);lWordArray[lNumberOfWords-2]=lMessageLength<<3;lWordArray[lNumberOfWords-1]=lMessageLength>>>29;return lWordArray;};function WordToHex(lValue){var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;for(lCount=0;lCount<=3;lCount++){lByte=(lValue>>>(lCount*8))&255;WordToHexValue_temp="0"+lByte.toString(16);WordToHexValue=WordToHexValue+WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);}
return WordToHexValue;};function Utf8Encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}
else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128);}
else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128);}}
return utftext;};var x=Array();var k,AA,BB,CC,DD,a,b,c,d;var S11=7,S12=12,S13=17,S14=22;var S21=5,S22=9,S23=14,S24=20;var S31=4,S32=11,S33=16,S34=23;var S41=6,S42=10,S43=15,S44=21;string=Utf8Encode(string);x=ConvertToWordArray(string);a=0x67452301;b=0xEFCDAB89;c=0x98BADCFE;d=0x10325476;for(k=0;k<x.length;k+=16){AA=a;BB=b;CC=c;DD=d;a=FF(a,b,c,d,x[k+0],S11,0xD76AA478);d=FF(d,a,b,c,x[k+1],S12,0xE8C7B756);c=FF(c,d,a,b,x[k+2],S13,0x242070DB);b=FF(b,c,d,a,x[k+3],S14,0xC1BDCEEE);a=FF(a,b,c,d,x[k+4],S11,0xF57C0FAF);d=FF(d,a,b,c,x[k+5],S12,0x4787C62A);c=FF(c,d,a,b,x[k+6],S13,0xA8304613);b=FF(b,c,d,a,x[k+7],S14,0xFD469501);a=FF(a,b,c,d,x[k+8],S11,0x698098D8);d=FF(d,a,b,c,x[k+9],S12,0x8B44F7AF);c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);a=FF(a,b,c,d,x[k+12],S11,0x6B901122);d=FF(d,a,b,c,x[k+13],S12,0xFD987193);c=FF(c,d,a,b,x[k+14],S13,0xA679438E);b=FF(b,c,d,a,x[k+15],S14,0x49B40821);a=GG(a,b,c,d,x[k+1],S21,0xF61E2562);d=GG(d,a,b,c,x[k+6],S22,0xC040B340);c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);b=GG(b,c,d,a,x[k+0],S24,0xE9B6C7AA);a=GG(a,b,c,d,x[k+5],S21,0xD62F105D);d=GG(d,a,b,c,x[k+10],S22,0x2441453);c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);b=GG(b,c,d,a,x[k+4],S24,0xE7D3FBC8);a=GG(a,b,c,d,x[k+9],S21,0x21E1CDE6);d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);c=GG(c,d,a,b,x[k+3],S23,0xF4D50D87);b=GG(b,c,d,a,x[k+8],S24,0x455A14ED);a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);d=GG(d,a,b,c,x[k+2],S22,0xFCEFA3F8);c=GG(c,d,a,b,x[k+7],S23,0x676F02D9);b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);a=HH(a,b,c,d,x[k+5],S31,0xFFFA3942);d=HH(d,a,b,c,x[k+8],S32,0x8771F681);c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);a=HH(a,b,c,d,x[k+1],S31,0xA4BEEA44);d=HH(d,a,b,c,x[k+4],S32,0x4BDECFA9);c=HH(c,d,a,b,x[k+7],S33,0xF6BB4B60);b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);d=HH(d,a,b,c,x[k+0],S32,0xEAA127FA);c=HH(c,d,a,b,x[k+3],S33,0xD4EF3085);b=HH(b,c,d,a,x[k+6],S34,0x4881D05);a=HH(a,b,c,d,x[k+9],S31,0xD9D4D039);d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);b=HH(b,c,d,a,x[k+2],S34,0xC4AC5665);a=II(a,b,c,d,x[k+0],S41,0xF4292244);d=II(d,a,b,c,x[k+7],S42,0x432AFF97);c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);b=II(b,c,d,a,x[k+5],S44,0xFC93A039);a=II(a,b,c,d,x[k+12],S41,0x655B59C3);d=II(d,a,b,c,x[k+3],S42,0x8F0CCC92);c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);b=II(b,c,d,a,x[k+1],S44,0x85845DD1);a=II(a,b,c,d,x[k+8],S41,0x6FA87E4F);d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);c=II(c,d,a,b,x[k+6],S43,0xA3014314);b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);a=II(a,b,c,d,x[k+4],S41,0xF7537E82);d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);c=II(c,d,a,b,x[k+2],S43,0x2AD7D2BB);b=II(b,c,d,a,x[k+9],S44,0xEB86D391);a=AddUnsigned(a,AA);b=AddUnsigned(b,BB);c=AddUnsigned(c,CC);d=AddUnsigned(d,DD);}
var temp=WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);return temp.toLowerCase();}
var hostname=window.location.hostname.replace("www.","");var query=window.location.pathname+window.location.search;var pageURL=MD5(hostname+query);var skipThese={"0797cfe9242b2bad839652ac113792ce":1,"d315b4fd98afd99bcae6d95ed32c7ff6":1,"8a9a6e272653d091b411eb23d2426e15":1,"debdd104b9d108f03e4bfcccd3437b66":1,"1a7b8728c34e8115f80a3b087c82d5ce":1,"a8d420d84232fbe20f5db247a7eba185":1,"d6d28b3b7284a1f4bb856e126fd5dfc9":1,"15b96d0eb637505a2977b7334bdb3391":1,"e2fedd5ccc5f9df053ff4f25f941759c":1,"8012347349e92fb8ef9fbfc37755bf48":1,"ab5a6e0e631b01337813218b781f3fdd":1,"5cdcbe1fc6729bf94f9234cdd8f9f9ac":1,"a21e070776ab85b5483398d77b738eb3":1,"21729e96bd0a7b03b365fdfe7dc042e1":1,"cc192c00e922ad25b0b7f37ad491dcf3":1,"cdeea8e70708c8b21dd19d3adfd7ea06":1,"2eddbf5fee5b10560f4e62ca935e9592":1,"196a88aad5754a294e2fb1f52e8bf981":1,"dc385a0879a5205ce1c8941cd3d5b4de":1,"7e5df95f2cfaf9ef0692c24e422f4695":1,"0e4fea1d101bf7fb115e05e7d716f735":1,"ed49b5a563f389838d6af8280c84cea6":1,"b7c91f8d012023823cb423d44b1ae247":1,"3b7f5bdd83f6b982ae0e6b47a47d2fc7":1,"7360750c2fb636261f4a06a058cc6d01":1,"c926d0ac113cb4cc6c5995bff039632d":1,"16768c99fbbcf58d4204671518238a9b":1,"1cf65a7fe9a4ee413bc49054e4a1e0de":1,"bc3a50d85c88f8387586a4ce27928cce":1};if(skipThese[pageURL]){skipThisWidget=true;if(placeholder)placeholder.innerHTML="";}})();if(skipThisWidget)return;}catch(e){}
var maps={phone:"phone_preferred",emailaddr:"email_address"};var names=["first_name","last_name","phone","phone_preferred","phone_preferred_confirm","emailaddr","email_address","address","zip_cd","area_of_study","concentration","planned_start_date_code","high_school_graduation_year","highest_education_level","highest_education_level_registered_nurse","is_online_preference_code","how_likely_to_enroll_in_6_months"];var now=new Date();var randomNumber=now.getTime()+Math.floor(Math.random()*1000001);var testValues={first_name:"John",last_name:"Doe",phone_preferred:"(310) 111-1111",phone_preferred_confirm:"(310) 111-1111",email_address:"test-"+randomNumber+"@campusexplorer.com",address:"123 Test Drive",zip_cd:"12345",area_of_study:"52B1C90B",concentration:"D1856498",planned_start_date_code:"1",high_school_graduation_year:"2010",highest_education_level:"high_school",is_online_preference_code:"2",how_likely_to_enroll_in_6_months:"Very likely"};for(var index=0;index<names.length;index++){var name=names[index];if(config[name]){if(maps[name]){prefilledValues[maps[name]]=config[name];}else{prefilledValues[name]=config[name];}}
if(CE.QueryString.getValue("prefill")!=null||CE.QueryString.getValue("qa")!=null){if(prefilledValues[name]==null&&testValues[name]!=null){prefilledValues[name]=testValues[name];}}}
if(CE.QueryString.getValue("host")!=null){host=CE.QueryString.getValue("host");}else if(CE.QueryString.getValue("qa")!=null||CE.QueryString.getValue("debug")!=null){host="stg.campusexplorer.com";}
if(!lightbox){_initialize();}
CE.Element.addListener(document,"keydown",function(e){if((e&&e.keyCode==27)&&(lightbox||selectionsLightboxActive)){userCancelled=true;hide();reset();}});};function _initialize(args){if(initialized)return;initialized=true;if(type==null){if(config.college_id!=null||config.ipeds_id!=null){type=CE.Type.COLLEGE;}else{type=CE.Type.PROGRAMS;}}
if(type==CE.Type.PROGRAMS){requestFormPath="/widget/programs/lead-request/";}
CE.WidgetManager.registerWidget(publicInterface,id);if(!loaded&&!lightbox){requestForm();}
if(loaded){initializeStructure();var scripts=CE.Page.getScripts(element.innerHTML);for(var index=0;index<scripts.length;index++){if(!scripts[index])continue;try{eval(scripts[index]);}catch(e){CE.Console.log("Error when loading inline script:"+e.message);};}
addBehaviour();CE.WidgetManager.requestConcentrations();enableSubmitButtons();postProcessHTML(getMainElement());}};function postProcessHTML(target){if(!target)return;var formTarget=target;if(String(formTarget.nodeName)!="form"&&String(formTarget.nodeName)!="fieldset"){var forms=formTarget.getElementsByTagName("form");var fieldsets=formTarget.getElementsByTagName("fieldset");if(forms&&forms.length>0){formTarget=forms[0];}else if(fieldsets&&fieldsets.length>0){formTarget=fieldsets[0];}else{return;}}
addShortLabelGroups(formTarget);function endsWith(contextString,targetString){var lastIndex=contextString.lastIndexOf(targetString);return(lastIndex!=-1)&&(lastIndex+targetString.length==contextString.length);};var labels=target.getElementsByTagName("label");for(var index=0;index<labels.length;index++){var spans=labels[index].getElementsByTagName("span");if(spans.length<=0)return;var label=spans[0];if(endsWith(String(label.innerHTML),"?")){label.className=label.className+" question";}}
function isField(candidate){if(!candidate||candidate.nodeType!=1)return false;var labels=candidate.getElementsByTagName("label");return(labels.length&&labels.length>0);}
var submitButtons=target.getElementsByTagName("button");for(var index=0;index<submitButtons.length;index++){var submit=CE.Element.getAncestor(submitButtons[index],"p");if(!submit)continue;var candidate=submit.previousSibling;if(!candidate)continue;while((candidate.nodeType!=1||!isField(candidate))&&candidate.previousSibling){candidate=candidate.previousSibling;}
if(isField(candidate)){CE.Element.addClassName(candidate,"field-before-submit");}}};function addShortLabelGroups(target){if(!target)return;var fields=[];var isMSIE=/*@cc_on!@*/false;var version=-1;if(isMSIE)version=parseFloat(navigator.appVersion.split("MSIE")[1])||-1;var next=target.firstChild;do{if(String(next.nodeName).toLowerCase()=="p"){fields.push(next);}else if(String(next.nodeName).toLowerCase()=="fieldset"){addShortLabelGroups(next);}}while(next=next.nextSibling);for(var index=0;index<fields.length-1;index++){var thisField=fields[index];var nextField=fields[index+1];if(thisField.className.indexOf("short-label")>=0&&nextField.className.indexOf("short-label")>=0&&thisField.style.display!="none"){var div=document.createElement("div");div.className="short-label-group";thisField.parentNode.insertBefore(div,thisField);thisField.parentNode.removeChild(thisField);if(isMSIE&&version>=6&&version<7){thisField.className=thisField.className+" first";}
nextField.parentNode.removeChild(nextField);div.appendChild(thisField);div.appendChild(nextField);index++;}}
if(isMSIE&&version>=6&&version<7){for(var index=0;index<fields.length;index++){var field=fields[index];if(field.className.indexOf("short-field")>=0&&field.className.indexOf("text")>=0){field.className=field.className+" short-field-text";}
var inputs=field.getElementsByTagName("input");for(var j=0;j<inputs.length;j++){if(inputs[j].name.indexOf("zip_cd")>=0){CE.Element.addClassName(inputs[j],"zip_cd");}}}}}
function show(args){if(config.college_id||config.ipeds_id||(args&&(args.college_id||args.ipeds_id))){type=CE.Type.COLLEGE;}else{type=CE.Type.PROGRAMS;}
if(args&&args.params){config.params=args.params;}
if(args&&args.request){config.request=args.request;}
_initialize();requestForm(args);};function requestForm(args){lastRequestFormArgs=args;if(config.request){requestFormPath=config.request;}
if(lightbox){showProgress();}
var data={widget_element:id||"campusexplorer",widget_prefix:"campusexplorer_",json:"1"};if(config.college_id)data.college=config.college_id;if(config.ipeds_id)data.ipeds_id=config.ipeds_id;if(args&&args.college_id)data.college=args.college_id;if(args&&args.ipeds_id)data.ipeds_id=args.ipeds_id;if(config.source)data.source=config.source;if(config.tracking)data.tracking=config.tracking;if(config.callback)data.callback=config.callback;if(lightbox)data.lightbox=1;if(config.headertext)data.widget_header=config.headertext;if(config.introtext)data.widget_intro=config.introtext;if(config.buttontext)data.widget_button=config.buttontext;if(config.submittext)data.widget_submit=config.submittext;if(config.privacylink)data.privacylink=1;if(config.noaction)data.noaction=1;if(config.ce_user_id)data.ce_user_id=config.ce_user_id;if(config.form_context)data.form_context=config.form_context;if(config.params){for(var prop in config.params){if(!data[prop]){data[prop]=config.params[prop];}else{CE.Console.log("NOTICE: Found a conflicting parameter: "+prop+" : "+config.params[prop]);}}}
data=addTestGroup(data);if(config.inhouse)data.inhouse=1;var requestBase="";var useCDN=false;if(useCDN&&host=="www.campusexplorer.com"&&document.location.protocol!="https:"){requestBase="http://widget.campusexplorer.com";}else if(useCDN&&host=="stg.campusexplorer.com"&&document.location.protocol!="https:"){requestBase="http://stg-widget.campusexplorer.com";}else if(!requestFormPath.match(/^http/)){requestBase=((document.location.protocol=="https:")?"https:":"http:")+"//"+host;}
var url;if((testgroup==null)&&(!config.inhouse)){url="/widget/get-testgroups/";var waitSeconds=0.3;setTimeout(function(){if(testgroup==null){update({"stash":{"testgroup":[]}});}},waitSeconds*1000);}else{url=requestFormPath;}
url=requestBase+url;request(url,data);};function addTestGroup(data){if(testgroup&&testgroup.length){for(var index=0;index<testgroup.length;index++){data[testgroup[index][0]]=testgroup[index][1];}}
return data;};function request(url,data){userCancelled=false;data.widget_element=id;data.json="1";data=addTestGroup(data);var parameters=[];for(key in data){if(data[key]!=null&&data[key].push!=null){for(var index=0;index<data[key].length;index++){parameters.push(key+"="+encodeURIComponent(data[key][index]));}}else{parameters.push(key+"="+encodeURIComponent(data[key]));}}
var parameters=parameters.join("&");var firstChar=(url.indexOf("?")>=0)?"&":"?";url=url+firstChar+parameters;if(requestTimer!=null)clearTimeout(requestTimer);requestTimer=setTimeout(onRequestTimeout,15000);new CE.Page.JSONPRequest(url);};function update(json){if(requestTimer!=null){clearTimeout(requestTimer);requestTimer=null;}
hideErrorMessage();hideProgress();if(json.stash.testgroup){if(testgroup!=null)return;testgroup=json.stash.testgroup;requestForm(lastRequestFormArgs);if(json.body){var container=document.createElement("span");container.innerHTML=json.body;container.style.position="absolute";if(document.body.firstChild)document.body.insertBefore(container,document.body.firstChild);}}else{if(json.stash.css_files!=null&&!config.styled){CE.Page.insertCSS(json.stash.css_files,host);}
setTimeout(function(){initializeStructure();_update(json);},200);}};function initializeStructure(){if(structureInitialized){rendered=true;return;}
structureInitialized=true;if(loaded){var childElement=placeholder.firstChild;while(childElement!=null&&childElement.nodeType!=1){childElement=childElement.nextSibling;}
element=childElement;}else{buildContainer();}
rendered=true;for(var index=0;index<queue.length;index++){queue[index]();}};function buildContainer(){if(element==null){var className;element=document.createElement("div");if(lightbox){var div=document.createElement("div");if(!document.getElementById(id))div.id=id;document.body.appendChild(div);element.className="lightbox wide";div.appendChild(element);}else{element.className=(placeholder.offsetWidth>=300)?"wide":"tall";element.className="embedded "+element.className;placeholder.innerHTML="";placeholder.appendChild(element);}
element.style.visibility="hidden";}};function buildSelectionsLightbox(){if(selectionsLightbox==null){var div=document.createElement("div");div.id=id+"-selections";document.body.appendChild(div);if(domainClassName){CE.Element.addClassName(div,domainClassName);}
selectionsLightbox=document.createElement("div");selectionsLightbox.className="lightbox";div.appendChild(selectionsLightbox);selectionsLightbox.style.visibility="hidden";}};function _update(json){if(json.body.indexOf("error-message")>0&&typeof(config.onError)=="function"){var startTag='<div class="error-message">';var endTag='<form';var start=json.body.indexOf(startTag)+startTag.length;var end=json.body.indexOf(endTag);var errorMessage=json.body.substring(start,end);config.onError(errorMessage);hideProgress();return;}
if(userCancelled)return;if(json.stash.ajax&&(json.stash.ajax==0||json.stash.ajax=="0")){useAjax=false;}else{useAjax=true;}
if(json.stash.first_step){if(lightbox||selectionsLightboxActive){hide();}
reset();}else if(json.stash.next_step){if(lightbox)hide();buildSelectionsLightbox();selectionsLightboxActive=true;}
updateHTML(json.body);addBehaviour(json);postProcessHTML(getMainElement());if(json.stash.js_files!=null){CE.Page.insertJS(json.stash.js_files,host);}
_show();dispatchEvent("update");setTimeout(function(){afterRender();dispatchEvent("afterrender");},200);if(json.stash.requestsuccess){dispatchEvent("requestsuccess");}
if(json.stash.complete){dispatchEvent("complete");}};function afterRender(){if(lightbox||selectionsLightboxActive){setTimeout(updateIframe,200);}};function updateHTML(html){selectLists=[];var scripts=CE.Page.getScripts(html);html=CE.Page.removeScripts(html);var div=document.createElement("div");var htmlContainer=document.createElement("div");htmlContainer.className="campusexplorer-widget";htmlContainer.innerHTML=html;div.appendChild(htmlContainer);if(lightbox||selectionsLightboxActive){(function(){var header=document.createElement("div");header.className="lightbox-header";htmlContainer.insertBefore(header,htmlContainer.firstChild);var headline=document.createElement("h2");headline.appendChild(document.createTextNode("Campus Explorer"));header.appendChild(headline);var p=document.createElement("p");p.className="close";header.appendChild(p);var closeButton=document.createElement("a");closeButton.href="#close";closeButton.appendChild(document.createTextNode("Close"));p.appendChild(closeButton);})();}
var targetElement=(!selectionsLightboxActive)?element:selectionsLightbox;div.className=targetElement.className;targetElement.parentNode.replaceChild(div,targetElement);if(selectionsLightboxActive)selectionsLightbox=div;else element=div;errorMessage=null;for(var index=0;index<scripts.length;index++){if(!scripts[index])continue;try{eval(scripts[index]);}catch(e){CE.Console.log("Error when loading inline script:"+e.message);};}};var AutoSubmit=function(element){if(!element)return;function initialize(){var fields=element.getElementsByTagName("input");for(var index=0;index<fields.length;index++){if(fields[index].type=="radio"){CE.Element.addListener(fields[index],"click",function(e){setTimeout(function(){submitForm();},1);});}}
fields=element.getElementsByTagName("select");for(var index=0;index<fields.length;index++){CE.Element.addListener(fields[index],"change",function(e){setTimeout(function(){submitForm();},1);});}};initialize();};function addBehaviour(json){var form=getForm();if(!form&&!(json&&json.stash&&json.stash.complete)){setTimeout(function(){addBehaviour(json);},100);return;}
trackSubmitButtons();if(form&&form.id.indexOf("signup")<0&&form.id.indexOf("login")<0&&form.id.indexOf("simpletuition")<0){CE.Element.addListener(form,"submit",onSubmit);prefillValues();var buttons=CE.Element.getSubmitButtons(getMainElement());if(buttons!=null){for(var index=0;index<buttons.length;index++){(function(){var button=buttons[index];CE.Element.addListener(button,"click",function(e){CE.Event.preventDefault(e);submitForm(button);});})();}}
var divisions=form.getElementsByTagName("div");for(var index=0;index<divisions.length;index++){if(String(divisions[index].className).indexOf("disclaimer")>=0||String(divisions[index].className).indexOf("truste")>=0){var links=divisions[index].getElementsByTagName("a");for(var j=0;j<links.length;j++){links[j].target="_blank";}}}
if(CE.Element.hasClassName(form,"autosubmit")){new AutoSubmit(form);}
if(CE.Browser.isIE6()||CE.Browser.isIE7()||CE.Browser.isIE8()){var selects=form.getElementsByTagName("select");for(var index=0;index<selects.length;index++){new AutoWidthSelect(selects[index]);}}}
if(lightbox||selectionsLightboxActive){var links=getMainElement().getElementsByTagName("a");for(var index=0;index<links.length;index++){if(links[index].href.indexOf("#close")>=0){CE.Element.addListener(links[index],"click",onCloseClick);}}}
(function(){var links;var header=CE.Element.getOneElementByClassName(getMainElement(),"header");if(header){links=header.getElementsByTagName("a");for(var index=0;index<links.length;index++){links[index].target="_blank";}}
var footer=CE.Element.getOneElementByClassName(getMainElement(),"footer");if(footer){links=footer.getElementsByTagName("a");for(var index=0;index<links.length;index++){links[index].target="_blank";}}
var privacy=CE.Element.getOneElementByClassName(getMainElement(),"privacy");if(privacy){links=privacy.getElementsByTagName("a");for(var index=0;index<links.length;index++){links[index].target="_blank";}}})();if(selectionsLightboxActive){var selectionsContainer=CE.Element.getOneElementByClassName(getMainElement(),"selections");disableSubmitButtons();var checkboxes=[];var submitButton=CE.Element.getOneElementByClassName(getMainElement(),"get-information");function updateSelectionsContainer(){checkedCount=0;for(var index=0;index<checkboxes.length;index++){if(checkboxes[index].checked){checkedCount++;}}
if(checkedCount>0){CE.Element.addClassName(selectionsContainer,"active");enableSubmitButtons();}else{CE.Element.removeClassName(selectionsContainer,"active");disableSubmitButtons();}}
var colleges=selectionsLightbox.getElementsByTagName("div");for(var index=0;index<colleges.length;index++){if(colleges[index].className.indexOf("college")>=0){(function(){var college=colleges[index];var checkbox=college.getElementsByTagName("input")[0];checkboxes.push(checkbox);var select=college.getElementsByTagName("select")[0];var p=document.createElement("p");p.className="select-button";college.appendChild(p);var button=document.createElement("button");button.innerHTML="<span>Select</span>";p.appendChild(button);CE.Element.addListener(button,"click",function(e){CE.Event.preventDefault(e);if(button._updateGradient!=null){onClick(e);}});CE.Element.addClassName(college,"inactive");function onClick(e){if(!e)e=window.event;var target=e.target||e.srcElement;if(String(target.nodeName).toLowerCase()=="input"||String(target.nodeName).toLowerCase()=="select"||String(target.nodeName).toLowerCase()=="optgroup"||String(target.nodeName).toLowerCase()=="option"||String(target.nodeName).toLowerCase()=="fieldset"||String(target.nodeName).toLowerCase()=="label"){return;}
checkbox.checked=!checkbox.checked;if(checkbox.checked){CE.Element.addClassName(college,"active");CE.Element.removeClassName(college,"inactive");if(button){button.innerHTML="<span>Selected</span>";if(button._updateGradient){setTimeout(button._updateGradient,1);}}
updateSelectionsContainer();}else{CE.Element.removeClassName(college,"active");CE.Element.addClassName(college,"inactive");if(button){button.innerHTML="<span>Select</span>";if(button._updateGradient){setTimeout(button._updateGradient,1);}}
updateSelectionsContainer();}}
CE.Element.addListener(college,"click",onClick);college.style.cursor="pointer";})();}}}
setTimeout(function(){var buttons=getMainElement().getElementsByTagName("button");for(var index=0;index<buttons.length;index++){buttons[index]._behaviours=buttons[index]._behaviours||{};if(buttons[index]._behaviours["GradientButton"])continue;new Gradient(buttons[index],true);if(!(config.usevml==false)){new GradientButton(buttons[index]);}
buttons[index]._behaviours["GradientButton"]=true;}
var header=CE.Element.getOneElementByClassName(getMainElement(),"header");if(header)new Gradient(header);},100);};function _show(){hidden=false;if(selectionsLightboxActive){selectionsLightbox.style.position="absolute";selectionsLightbox.style.zIndex="999";selectionsLightbox.style.visibility="visible";}else{element.style.visibility="visible";if(lightbox){element.style.position="absolute";element.style.zIndex="999";}}
if(lightbox||selectionsLightboxActive){center();updateShadow();setTimeout(updateIframe,200);}
if(submitted){var y=CE.Element.getCumulativeOffset(getMainElement()).top;var scroll=CE.Page.getScrollOffsets();if(scroll.top>y){window.scrollTo(scroll.left,y-50);}}};function getMainElement(){return(selectionsLightboxActive)?selectionsLightbox:element;};function center(){centerVertically();centerHorizontally();};function centerVertically(){var scroll=CE.Page.getScrollOffsets();var dimensions=CE.Page.getViewportDimensions();var top=scroll.top+Math.floor((dimensions.height-getMainElement().offsetHeight)/2);if(getMainElement().offsetHeight>dimensions.height){top=(scroll.top+50);}
getMainElement().style.position="absolute";getMainElement().style.top=String(top)+"px";};function centerHorizontally(){var scroll=CE.Page.getScrollOffsets();var dimensions=CE.Page.getViewportDimensions();var left=scroll.left+Math.floor((dimensions.width-getMainElement().offsetWidth)/2);if(getMainElement().offsetWidth>dimensions.width){left=(scroll.left+50);}
getMainElement().style.position="absolute";getMainElement().style.left=String(left)+"px";};function isErrorCloseButton(button){var container=CE.Element.getAncestor(button,"p");return(container&&CE.Element.hasClassName(container,"error-message"));};function isChromeCloseButton(button){var container=CE.Element.getAncestor(button,"div");return(container&&CE.Element.hasClassName(container,"lightbox-header"));};function errorMessageExists(){return(CE.Element.getOneElementByClassName(getMainElement(),"error-message"));};function onCloseClick(e){CE.Event.preventDefault(e);var target=e.target||e.srcElement;if(selectionsLightboxActive){var eventLabel="close_2";if(isErrorCloseButton(target)){eventLabel="close_3";}else if(isChromeCloseButton(target)){if(errorMessageExists()){eventLabel="close_4";}else{eventLabel="close_1";}}
dispatchTrackingEvent(["Lead Form","Close Window",eventLabel]);if(checkedCount>0){dispatchTrackingEvent(["Lead Form","Exit Lightbox with Schools"]);}
var form=getForm();var input=document.createElement("input");input.type="hidden";input.name="user_cancelled";input.value="1";form.appendChild(input);submitForm();}else{hide();reset();dispatchEvent("complete");}};function hide(args){hideProgress();if(lightbox||selectionsLightboxActive){if(shadow)shadow.style.display="none";if(iframe)iframe.style.display="none";}
if(lightbox){if(element)element.style.visibility="hidden";if(element)element.style.left="-99999px";}
if(selectionsLightboxActive){if(selectionsLightbox)selectionsLightbox.style.visibility="hidden";if(selectionsLightbox)selectionsLightbox.style.left="-99999px";selectionsLightboxActive=false;}
hidden=true;};function reset(){if(!lightbox){element.style.visibility="visible";}
hidden=false;if(lightbox)rendered=false;selectionsLightboxActive=false;};function destroy(){if(shadowID){if(shadow)shadow.parentNode.removeChild(shadow);if(iframe)iframe.parentNode.removeChild(iframe);}
if(selectionsLightbox!=null){selectionsLightbox.parentNode.removeChild(selectionsLightbox);}
element.parentNode.removeChild(element);};function updateShadow(){if(hidden||!(lightbox||selectionsLightboxActive))return;if(!shadow){shadow=document.createElement("div");shadow.className="shadow";if(getMainElement()==null){progressIndicator.parentNode.insertBefore(shadow,progressIndicator);}else{getMainElement().parentNode.insertBefore(shadow,getMainElement());}
shadow.style.display="none";shadow.style.position="absolute";shadow.style.top="0";shadow.style.left="0";shadow.style.zIndex="999";shadow.style.backgroundColor="#000000";shadow.style.opacity="0.5";shadow.style.filter="alpha(opacity=50)";}
var dimensions=CE.Page.getDimensions();if(getMainElement()!=null){var widgetDimensions={height:getMainElement().offsetHeight+Number(String(getMainElement().style.top).replace("px","")),width:getMainElement().offsetWidth+Number(String(getMainElement().style.left).replace("px",""))};var padding=100;if(widgetDimensions.height>dimensions.height){dimensions.height=widgetDimensions.height+padding;}
if(widgetDimensions.width>dimensions.width){dimensions.width=widgetDimensions.width+padding;}}
if(shadow){shadow.style.display="block";shadow.style.width="100%";shadow.style.height=dimensions.height+"px";}};function updateIframe(){if(hidden||!(lightbox||selectionsLightboxActive)||CE.Hash.getValue("noiframe"))return;if(!iframe){iframe=document.createElement("iframe");getMainElement().parentNode.insertBefore(iframe,getMainElement());iframe.frameBorder="0";iframe.src="javascript:false";iframe.style.display="none";iframe.style.position="absolute";iframe.style.borderWidth="0";iframe.style.padding="0";iframe.style.marginLeft="5px";iframe.style.opacity="0";iframe.style.filter="alpha(opacity=0)";}
var position=CE.Element.getCumulativeOffset(getMainElement());if(iframe){iframe.style.display="block";iframe.style.top=position.top+"px";iframe.style.left=position.left+"px";iframe.style.width=getMainElement().offsetWidth+"px";iframe.style.height=getMainElement().offsetHeight+"px";}};function isEmpty(field){return(field.type=="text"&&field.value=="")||(String(field.nodeName).toLowerCase()=="select"&&field.options[field.selectedIndex].value=="");};function findFirstEmptyFieldByName(elements,prefix,name){for(var index=0;index<elements.length;index++){var field=elements[index];if(field.name&&field.name==name){if(isEmpty(field))return field;}}
for(var index=0;index<elements.length;index++){var field=elements[index];if(field.name&&String(field.name).indexOf(name)>=0){if(isEmpty(field))return field;}}
return null;};function prefillValues(){if(!fieldPrefix)fieldPrefix=getFieldPrefix();var elements=CE.Util.combineArrays(getMainElement().getElementsByTagName("select"),getMainElement().getElementsByTagName("input"));for(name in prefilledValues){if(!prefilledValues[name])continue;var el=findFirstEmptyFieldByName(elements,fieldPrefix,name);if(!el&&name=="phone_preferred"){el=findFirstEmptyFieldByName(elements,fieldPrefix,"phone");}
if(el){var container=CE.Element.getAncestor(el,"p");if(!container)container=CE.Element.getAncestor(el,"div");if(CE.Element.hasClassName(container,"multi"))continue;if(el.type=="text"){el.value=prefilledValues[name];CE.Element.fireEvent(el,"change");}else if(String(el.nodeName).toLowerCase()=="select"){for(var index=0;index<el.options.length;index++){if(el.options[index].value==prefilledValues[name]){el.selectedIndex=index;CE.Element.fireEvent(el,"change");}}}}}};function getFieldPrefix(){var fields=CE.Util.combineArrays(getMainElement().getElementsByTagName("select"),getMainElement().getElementsByTagName("input"));try{var candidate;var matches=0;for(var index=0;index<fields.length;index++){if(String(fields[index].nodeName).toLowerCase=="select"||fields[index].type!="hidden"){var thisPrefix=fields[index].name.split("_")[0]+"_";if(candidate&&candidate==thisPrefix){matches++;}else{candidate=thisPrefix;}
if(matches>=2){return candidate;}}}}catch(e){CE.Console.log("ERROR: "+e);}
return"";}
function showInput(el,wrapper){if(el)
el.disabled=false;if(wrapper)
wrapper.style.display="block";setTimeout(function(){afterRender();dispatchEvent("afterrender");},200);};function hideInput(el,wrapper){if(wrapper)
wrapper.style.display="none";if(el)
el.disabled=true;setTimeout(function(){afterRender();dispatchEvent("afterrender");},200);};function onSubmit(e){CE.Event.preventDefault(e);submitForm();};function getForm(){var target=(selectionsLightboxActive)?selectionsLightbox:element;if(target==null)return;var form=(target.getElementsByTagName("form"));if(!form||form.length<=0)return;form=form[0];return form;};function submitForm(target){submitted=true;userCancelled=false;showProgress();var form=getForm();var data=CE.Form.getData(form);if(target&&target.nodeName.toLowerCase()=="button"){var name=target.getAttribute("name");var value=target.getAttribute("value");if(!data[name])data[name]=value;}
if(useAjax){request(form.getAttribute("action"),data);}else{form.submit();}};function showProgress(){disableSubmitButtons();if(CE.Browser.isIE6()){(function(){var mainElement=getMainElement();if(mainElement){var selects=mainElement.getElementsByTagName("select");for(var index=0;index<selects.length;index++){selects[index].style.visibility="hidden";}}})();}
var mainElement=getMainElement();var color="#000000";var size=100;if(!rendered){mainElement=document.body;color="#ffffff";size=150;}else{if(mainElement.style.position!="absolute"){mainElement.style.position="relative";}}
progressIndicator=document.createElement("div");progressIndicator.className="progress-indicator";mainElement.appendChild(progressIndicator);progressIndicator.style.width="100px";progressIndicator.style.height="100px";spinner=new Spinner(progressIndicator,{size:size,color:color});progressIndicator.style.position="absolute";progressIndicator.style.zIndex="999";progressIndicator.style.top=String(Math.round((mainElement.offsetHeight-progressIndicator.offsetHeight)/2))+"px";progressIndicator.style.left=String(Math.round((mainElement.offsetWidth-progressIndicator.offsetWidth)/2))+"px";if(!rendered){hidden=false;updateShadow();var scroll=CE.Page.getScrollOffsets();var dimensions=CE.Page.getViewportDimensions();var top=scroll.top+Math.floor((dimensions.height-size)/2);progressIndicator.style.top=String(top)+"px";}};function hideProgress(){enableSubmitButtons();if(spinner){spinner.stop();if(progressIndicator&&progressIndicator.parentNode){progressIndicator.parentNode.removeChild(progressIndicator);progressIndicator=null;}}};function disableSubmitButtons(){return;var buttons=CE.Element.getSubmitButtons(getMainElement());if(buttons!=null){for(var index=0;index<buttons.length;index++){buttons[index].disabled=true;buttons[index].style.opacity="0.5";buttons[index].style.cursor="default";if(CE.Browser.isIE()){buttons[index].style.filter="alpha(opacity = 50)";}
if(buttons[index]._updateGradient){setTimeout(buttons[index]._updateGradient,1);}}}};function trackSubmitButtons(){var buttons=CE.Element.getSubmitButtons(getMainElement());if(buttons!=null){for(var index=0;index<buttons.length;index++){try{var button=buttons[index];var eventData=button.getAttribute("trackevent");var altCondition;var altTrackingData;if(!eventData){if(CE.Element.hasClassName(button,"next-step")){eventData=["Lead Form","Step 1 Button"];}else if(CE.Element.hasClassName(button,"submit")){eventData=["Lead Form","Step 2 Button"];}else if(CE.Element.hasClassName(button,"get-information")){altCondition=function(){return(checkedCount<=0);};altTrackingData=["Lead Form","No Program Selected"];var container=CE.Element.getAncestor(button,"div");if(container&&CE.Element.hasClassName(container,"aside")){eventData=["Lead Form","Lead Request","info_1"];}else{eventData=["Lead Form","Lead Request","info_2"];}}}
if(eventData){trackButton(button,eventData,altCondition,altTrackingData);}}catch(e){}}}};function trackButton(button,defaultTrackingData,altCondition,altTrackingData){if((config.analytics||config.inhouse)&&window.trackEvent){CE.Element.addListener(button,"click",function(e){if(typeof(altCondition)=="function"&&altCondition()==true&&altTrackingData){dispatchTrackingEvent(altTrackingData);}else if(defaultTrackingData){dispatchTrackingEvent(defaultTrackingData);}});}};function dispatchTrackingEvent(trackingData){if(window.trackEvent)window.trackEvent.apply(window,trackingData);};function enableSubmitButtons(){var buttons=CE.Element.getSubmitButtons(getMainElement());if(buttons!=null){for(var index=0;index<buttons.length;index++){buttons[index].disabled=false;buttons[index].style.opacity="1";buttons[index].style.cursor="pointer";if(CE.Browser.isIE()){buttons[index].style.filter="alpha(opacity = 100)";}
if(buttons[index]._updateGradient){setTimeout(buttons[index]._updateGradient,1);}}}};function onRequestTimeout(){hideProgress();showErrorMessage("Our server is taking a long time to respond to your request, and it may not have been received. Please <a href=\"http://"+host+"/company/contact/\">contact us for assistance</a>.");};function showErrorMessage(message){var form=getForm();if(!form)return;if(errorMessage==null){errorMessage=document.createElement("p");errorMessage.className="error-message";var buttons=CE.Element.getSubmitButtons(getMainElement());if(buttons!=null){CE.Element.getAncestor(buttons[0],"p").appendChild(errorMessage);}}
errorMessage.innerHTML=message;};function hideErrorMessage(){if(errorMessage!=null){errorMessage.parentNode.removeChild(errorMessage);errorMessage=null;}};var publicInterface={show:show,hide:hide,reset:reset,update:update,addListener:addListener};initialize();return publicInterface;};var AutoWidthSelect=function(element){if(!element)return;var isMSIE=/*@cc_on!@*/false;if(!isMSIE)return;var parent;var defaultParentHeight;var defaultWidth;var defaultOffsetWidth;var version=parseFloat(navigator.appVersion.split("MSIE")[1])||"unknown";var dimensionsCalculated=false;function initialize(){addListener(element,"mousedown",onFocus);addListener(element,"change",onBlur);addListener(element,"blur",onBlur);};function calculateDimensions(){if(dimensionsCalculated)return;dimensionsCalculated=true;parent=getAncestor(element,"p");if(!parent)parent=getAncestor(element,"div");defaultParentHeight=(parent.currentStyle)?parent.currentStyle.height:parent.style.height;defaultWidth=(element.currentStyle)?element.currentStyle.width:element.style.width;defaultMinWidth=(element.currentStyle)?element.currentStyle.minWidth:element.style.minWidth||0;defaultOffsetWidth=element.offsetWidth;};function onFocus(e){calculateDimensions();if(defaultOffsetWidth==0)defaultOffsetWidth=element.offsetWidth;parent.style.height=parent.offsetHeight+"px";element.style.position="absolute";element.style.minWidth=defaultOffsetWidth+"px";element.style.width="auto";if(element.offsetWidth<defaultOffsetWidth){}};function onBlur(e){calculateDimensions();parent.style.height=defaultParentHeight;element.style.position="static";element.style.width=defaultWidth;element.style.minWidth=defaultMinWidth||"1px";};function getAncestor(contextElement,tagName){tagName=String(tagName).toLowerCase();var ancestor=contextElement.parentNode;while(ancestor&&String(ancestor.nodeName).toLowerCase()!=tagName){ancestor=ancestor.parentNode;}
if(String(ancestor.nodeName).toLowerCase()==tagName)return ancestor;};function addListener(element,eventName,handler){if(element.addEventListener){element.addEventListener(eventName,handler,false);}else{element.attachEvent("on"+eventName,handler);}};initialize();};var Spinner=function(element){if(typeof(element)=="String")element=document.getElementById(element);if(!element)return;var c={innerRadius:35,outerRadius:60,spokeCount:12,spokeWidth:12,color:"#000000",opacity:"0.5",size:null};var defaultSize=Math.ceil((c.outerRadius*2)+(c.spokeWidth*2));function extend(destination,source){for(var property in source)destination[property]=source[property];return destination;}
extend(c,arguments[1]||{});var scale=1;var spokes=[];var spokeOpacities=[];var interval;if(c.size!=null){scale=c.size/defaultSize;}
var isMSIE=/*@cc_on!@*/false;var version=-1;if(isMSIE){version=parseFloat(navigator.appVersion.split("MSIE")[1])||-1;var coordsize=1000;var shapesize=Math.round(1000*scale);c.spokeWidth=Math.round(c.spokeWidth*scale);}
function initialize(){render();start();}
function supportsSVG(){return!!(document.createElementNS&&document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect);}
function render(){var beta=2*Math.PI/c.spokeCount;var cx=c.outerRadius+c.spokeWidth;var cy=c.outerRadius+c.spokeWidth;var containerSize=Math.ceil(((c.outerRadius*2)+(c.spokeWidth*2))*scale);if(!supportsSVG()&&isMSIE){if(!window.CampusExplorerVML){document.createStyleSheet().addRule(".cevml","behavior:url(#default#VML)");window.CampusExplorerVML=true;}
var div=document.createElement("div");div.style.position="absolute";div.style.clip="rect(0px "+containerSize+"px "+containerSize+"px 0px)";div.style.width=containerSize+"px";div.style.height=containerSize+"px";div.style.overflow="hidden";element.appendChild(div);}else{var svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("width",containerSize);svg.setAttribute("height",containerSize);element.appendChild(svg);var g=document.createElementNS("http://www.w3.org/2000/svg","g");g.setAttribute("transform","scale("+scale+")");svg.appendChild(g);}
for(var index=0;index<c.spokeCount;index++){var alpha=beta*index-Math.PI/2;var cos=Math.cos(alpha);var sin=Math.sin(alpha);var spokeCommand={m:{x:cx+c.innerRadius*cos,y:cy+c.innerRadius*sin},l:{x:cx+c.outerRadius*cos,y:cy+c.outerRadius*sin}};var spoke=createSpoke(spokeCommand,c.spokeWidth,c.color,c.opacity);spokeOpacities[index]=1/c.spokeCount*index;if(!supportsSVG()&&isMSIE){div.appendChild(spoke.group);}else{g.appendChild(spoke);}
spokes.push(spoke);}};function createSpoke(command,width,color,opacity){if(!supportsSVG()&&isMSIE){var group=createIENode("group");group.style.position="absolute";group.style.width="1000px";group.style.height="1000px";group.style.top="0";group.style.left="0";group.setAttribute("coordsize",String(coordsize)+","+String(coordsize));var shape=createIENode("shape");shape.style.width=shapesize+"px";shape.style.height=shapesize+"px";group.setAttribute("coordsize",String(coordsize)+","+String(coordsize));shape.setAttribute("filled","f");shape.setAttribute("stroked","t");shape.setAttribute("strokecolor",color);shape.setAttribute("strokeweight",String(c.spokeWidth*0.75)+"pt");var d="m"+Math.round(command.m.x)+","+Math.round(command.m.y)+" l"+Math.round(command.l.x)+","+Math.round(command.l.y)+" e";shape.setAttribute("path",d);group.appendChild(shape);var fill=createIENode("fill");shape.appendChild(fill);var stroke=createIENode("stroke");stroke.setAttribute("miterlimit","8");stroke.setAttribute("endcap","round");shape.appendChild(stroke);return{group:group,shape:shape,fill:fill,stroke:stroke};}else{var path=document.createElementNS("http://www.w3.org/2000/svg","path");path.setAttribute("fill","none");path.setAttribute("stroke",color);path.setAttribute("stroke-width",width);path.setAttribute("stroke-opacity",opacity);path.setAttribute("stroke-linecap","round");var d="M"+command.m.x+","+command.m.y+"L"+command.l.x+","+command.l.y;path.setAttribute("d",d);return path;}};function spin(){spokeOpacities.unshift(spokeOpacities.pop());for(var index=0;index<spokes.length;index++){if(!supportsSVG()&&isMSIE){spokes[index].fill.opacity=spokeOpacities[index];spokes[index].stroke.opacity=spokeOpacities[index];}else{spokes[index].setAttribute("opacity",spokeOpacities[index]);}}};if(!supportsSVG()&&isMSIE){try{if(!document.namespaces.cevml)document.namespaces.add("cevml","urn:schemas-microsoft-com:vml");function createIENode(tagName){return document.createElement("<cevml:"+tagName+" class='cevml'>");};}catch(e){function createIENode(tagName){return document.createElement("<"+tagName+" xmlns='urn:schemas-microsoft.com:vml' class='cevml'>");};}}
function start(){spin();interval=setInterval(spin,Math.round(1000/c.spokeCount));}
function stop(){if(interval!=null){clearInterval(interval);interval=null;}}
initialize();return{start:start,stop:stop};};function toRGB(color){if(color.indexOf("rgb")>=0){var regexp=new RegExp(/(\d+)[^\d]+(\d+)[^\d]+(\d+)/);var result=regexp.exec(color);var r=parseInt(result[1]);var g=parseInt(result[2]);var b=parseInt(result[3]);}else if(color.indexOf("#")>=0){color=color.replace("#","");var r=parseInt(color.substring(0,2),16);var g=parseInt(color.substring(2,4),16);var b=parseInt(color.substring(4),16);}else{return color;}
return[r,g,b];};function toHex(color){if(color.indexOf("#")>=0)return color;var rgb=toRGB(color);var r=rgb[0];var g=rgb[1];var b=rgb[2];function leadingZero(string){return(string.length<2)?"0"+string:string;}
var hex=leadingZero(r.toString(16))+leadingZero(g.toString(16))+leadingZero(b.toString(16));return"#"+hex;};function brighten(color,intensity){var rgb=toRGB(color);var r=rgb[0];var g=rgb[1];var b=rgb[2];r=Math.round(r*intensity);g=Math.round(g*intensity);b=Math.round(b*intensity);if(r>255)r=255;if(g>255)g=255;if(b>255)b=255;return toHex("rgb("+r+","+g+", + "+b+")");};function darken(color,intensity){return brighten(color,1/intensity);};function getStyle(element,style){var value=element.style[style];if(!value&&element.currentStyle){value=element.currentStyle[style];}
if(!value){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;}
return value;};/* Base64 conversion methods.
 * Copyright (c) 2006 by Ali Farhadi.
 * released under the terms of the Gnu Public License. */
function base64Encode(data){if(typeof(btoa)=='function')return btoa(data);var b64_map='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';var byte1,byte2,byte3;var ch1,ch2,ch3,ch4;var result=new Array();var j=0;for(var i=0;i<data.length;i+=3){byte1=data.charCodeAt(i);byte2=data.charCodeAt(i+1);byte3=data.charCodeAt(i+2);ch1=byte1>>2;ch2=((byte1&3)<<4)|(byte2>>4);ch3=((byte2&15)<<2)|(byte3>>6);ch4=byte3&63;if(isNaN(byte2)){ch3=ch4=64;}else if(isNaN(byte3)){ch4=64;}
result[j++]=b64_map.charAt(ch1)+b64_map.charAt(ch2)+b64_map.charAt(ch3)+b64_map.charAt(ch4);}
return result.join('');}
var Gradient=function(element,hover){if(!element)return;if(hover==null)hover=false;function supportsCssGradients(){var div=document.createElement("div");div.style.cssText="background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(red), to(blue));"+
"background-image:-moz-linear-gradient(left, red, blue);";if(div.style.backgroundImage){return true;}else{return false;}};function supportsSVG(){return!!(document.createElementNS&&document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect);}
if(supportsCssGradients()||!supportsSVG())return;try{var color={top:getStyle(element,"scrollbarHighlightColor"),bottom:getStyle(element,"scrollbarBaseColor")};if(String(color.top).toLowerCase()=="#ffffff"&&(String(color.bottom).toLowerCase()=="#ffffff"||String(color.bottom).toLowerCase()=="#000000"||String(color.bottom).toLowerCase()=="#333333"))return;var hoverColor={top:brighten(color.top,1.1),bottom:brighten(color.bottom,1.1)};var background=getBackground(color.top,color.bottom);var backgroundHover=getBackground(hoverColor.top,hoverColor.bottom);function getBackground(top,bottom){var svg='<?xml version="1.0" ?>'+
'<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%" xmlns:xlink="http://www.w3.org/1999/xlink">'+
'<defs>'+
'<linearGradient id="gradient" x1="0%" y1="0%" x2="0%" y2="100%" spreadMethod="pad">'+
'<stop offset="0%"   stop-color="'+top+'"    stop-opacity="1"/>'+
'<stop offset="100%" stop-color="'+bottom+'" stop-opacity="1"/>'+
'</linearGradient>'+
'</defs>'+
'<rect width="100%" height="100%" style="fill:url(#gradient);" />'+
'</svg>';return"url(data:image/svg+xml;charset=utf-8;base64,"+base64Encode(svg)+")";};function showHover(){element.style.background=backgroundHover;};function showDefault(){element.style.background=background;};if(hover){element.addEventListener("mouseover",showHover,false);element.addEventListener("mouseout",showDefault,false);element.addEventListener("focus",showHover,false);element.addEventListener("blur",showDefault,false);}
showDefault();}catch(e){}};var GradientButton=function(button){if(!button)return;var isMSIE=/*@cc_on!@*/false;if(!isMSIE)return;var version=parseFloat(navigator.appVersion.split("MSIE")[1])||-1;if(version>=9)return;var shapeContainer;var color;var hoverColor;var fill;var shape;var rendered=false;function onMouseover(){fill.color2=hoverColor.top;shape.fillcolor=hoverColor.bottom;};function onMouseout(){fill.color2=color.top;shape.fillcolor=color.bottom;};function render(){color={top:toHex(getStyle(button,"scrollbarHighlightColor")),bottom:toHex(getStyle(button,"scrollbarBaseColor"))};hoverColor={top:brighten(color.top,1.1),bottom:brighten(color.bottom,1.1)};if(color.top=="#ffffff"&&(color.bottom=="#000000"||color.bottom==toHex(getStyle(button,"color"))))return;var width=button.offsetWidth;var height=button.offsetHeight;var radius=5;if(!window.CampusExplorerVML){document.createStyleSheet().addRule(".cevml","behavior:url(#default#VML)");window.CampusExplorerVML=true;}
try{if(!document.namespaces.cevml)document.namespaces.add("cevml","urn:schemas-microsoft-com:vml");function createIENode(tagName){return document.createElement("<cevml:"+tagName+" class='cevml'>");};}catch(e){function createIENode(tagName){return document.createElement("<"+tagName+" xmlns='urn:schemas-microsoft.com:vml' class='cevml'>");};}
shapeContainer=document.createElement("span");shapeContainer.style.display="inline-block";shapeContainer.style.width=width+"px";shapeContainer.style.height=height+"px";shapeContainer.style.position="relative";shapeContainer.className="vml-shape-container";button.parentNode.insertBefore(shapeContainer,button);shape=createIENode("shape");shape.style.position="absolute";shape.style.left="0";shape.style.cursor=button.disabled?"default":"pointer";if(button.disabled){shape.style.filter="alpha(opacity=50)";}
shape.style.width=width+"px";shape.style.height=height+"px";shape.setAttribute("coordsize",String(width)+","+String(height));shape.setAttribute("coordorigin","1,1");shape.setAttribute("filled","t");shape.setAttribute("fillcolor",color.bottom);shape.setAttribute("stroked","f");var start=0;var pathHeight=height-(radius);var pathWidth=width-(radius);var path="m"+start+","+radius+" "+
"l"+start+","+pathHeight+" "+
"qy"+radius+","+Number(pathHeight+radius)+" "+
"l"+pathWidth+","+Number(pathHeight+radius)+" "+
"qx"+Number(pathWidth+radius)+","+pathHeight+
"l"+Number(pathWidth+radius)+","+radius+
"qy"+pathWidth+","+start+
"l"+radius+","+start+
"qx"+start+","+radius+
"e";shape.setAttribute("path",path);shapeContainer.appendChild(shape);fill=createIENode("fill");fill.setAttribute("color2",color.top);fill.setAttribute("type","gradient");shape.appendChild(fill);var textbox=createIENode("textbox");textbox.innerHTML="<span class=\"vml-textbox\">"+button.innerHTML+"</span>";textbox.style.color=button.currentStyle.color;textbox.style.fontSize=button.currentStyle.fontSize;textbox.style.fontFamily=button.currentStyle.fontFamily;textbox.style.fontWeight=button.currentStyle.fontWeight;textbox.style.textTransform=button.currentStyle.textTransform;textbox.style.textAlign="center";shape.appendChild(textbox);if(version>=8){var shadow=createIENode("shadow");shadow.setAttribute("on","True");shadow.setAttribute("color","#000000");shadow.setAttribute("opacity","0.25");shadow.setAttribute("offset","0,1pt");shape.appendChild(shadow);}
textbox.style.borderTop="1px solid transparent";var version=parseFloat(navigator.appVersion.split("MSIE")[1])||"unknown";if(version>=6&&version<7){var padding=height-button.currentStyle.fontSize.replace("px","")-5;textbox.setAttribute("inset","0, "+String(padding/2)+"px, 0, 0");textbox.style.borderTopWidth="0";}
shape.attachEvent("onclick",function(){button.click();});shape.attachEvent("onmouseover",onMouseover);shape.attachEvent("onmouseout",onMouseout);setTimeout(onMouseout,10);rendered=true;}
try{render();if(!rendered)return;button._updateGradient=function(){shapeContainer.parentNode.removeChild(shapeContainer);button.style.position="static";button.style.width="auto";render();button.style.position="absolute";};button.attachEvent("onfocus",onMouseover);button.attachEvent("onblur",onMouseout);button.style.position="absolute";button.style.left="-99999px";button.style.width="1px";button.className=button.className+"vml-button-replaced";}catch(e){if(!rendered)return;button.style.position="static";button.style.left="auto";if(shapeContainer)shapeContainer.parentNode.removeChild(shapeContainer);}};CE.ElementSelectList=function(element,config){var dispatcher=new CE.EventDispatcher();var addListener=dispatcher.addListener;var dispatchEvent=dispatcher.dispatchEvent;var element;var allOptions;var showIf;if(!config)config={};var dependents=config.dependents;function initialize(){var id=element;showIf=(config&&config.showIf)?config.showIf:[];if(config&&config.showIfConfig){for(var index=0;index<config.showIfConfig.length;index++){addShowIf.apply(this,config.showIfConfig[index]);}}
if(typeof(element)=="string"){element=document.getElementById(id);}
if(!element){return CE.Console.log("MISSING ELEMENT: "+id);}
if(!dependents){dependents=[];}
CE.Element.addListener(element,"change",onChange);saveOptions();updateDependents();updateShowIfs();};function addShowIf(name,test){var form=CE.Element.getAncestor(element,"form");try{var field=CE.Element.getOneElementByName(form,name);if(field){var container=CE.Element.getAncestor(field,"fieldset");if(!container)container=CE.Element.getAncestor(field,"p");}
if(container){showIf.push({element:container,test:test});}}catch(e){if(window.console&&window.console.error)window.console.error(e);}};function submitForm(){if(config.parentForm){config.parentForm.submit();}};function updateDependents(){var value=element.options[element.selectedIndex].value;for(var i=0;i<dependents.length;i++){var dependent=dependents[i];if(!dependent.esl){dependent.esl=new CE.ElementSelectList(dependent.element,dependent.attr);dependent.esl.addListener("change",function(){dispatchEvent("change");});}
dependent.esl.setAvailableValues((value)?dependent.options[value]:[]);dependent.esl.triggerOnChange();}};function updateShowIfs(){for(var i=0;i<showIf.length;i++){if(!showIf[i]||!showIf[i].element||!showIf[i].test){continue;}
showIf[i].element.style.display=showIf[i].test()?"block":"none";dispatchEvent("change");}};function setAvailableValues(requestedOptions){if(!(requestedOptions&&requestedOptions.length>0)){element.disabled=true;return;}
element.disabled=false;var showValues={};for(var i=0;i<requestedOptions.length;i++){showValues[requestedOptions[i]]=true;}
var currentValue=element.options[element.selectedIndex].value;var newIndex=null;var currentIndex=0;var temp=element.getElementsByTagName("option");var options=[];for(var index=0;index<temp.length;index++){options.push(temp[index]);}
for(var index=0;index<options.length;index++){options[index].parentNode.removeChild(options[index]);}
for(var i=0;i<allOptions.length;i++){var option=allOptions[i];if(showValues.hasOwnProperty(option[0])){var op=document.createElement("option");op.innerHTML=option[1];op.value=option[0];element.appendChild(op);if(option[0]==currentValue)
newIndex=currentIndex;currentIndex=currentIndex+1;}}
element.selectedIndex=newIndex;};function saveOptions(){if(element&&!allOptions){allOptions=[];var options=element.getElementsByTagName("option");for(var index=0;index<options.length;index++){allOptions.push([options[index].value,options[index].innerHTML]);}}};function onChange(){if(config.parentForm){submitForm();return true;}
updateDependents();updateShowIfs();dispatchEvent("change");};function triggerOnChange(){onChange();}
var publicInterface={setAvailableValues:setAvailableValues,addListener:addListener,triggerOnChange:triggerOnChange};initialize();return publicInterface;};window.CampusExplorerWidgetManager=CE.WidgetManager;window.CampusExplorerWidget=CE.Widget;window.CampusExplorerSelectList=CE.ElementSelectList;window.CampusExplorerResetCSS=CE.Page.resetCSS;window.CampusExplorerCollegeWidget=CampusExplorerWidget;window.CampusExplorerProgramsWidget=CampusExplorerWidget;window.CampusExplorerGradientButton=GradientButton;CE.WidgetManager.initialize();CampusExplorerQ={push:function(item){CE.WidgetManager.fulfillQueueItem(item);}};window.CampusExplorer=true;})();}
