
var base_url='http://collegist.com/';var comparison_url='http://collegist.com/compare/?c=';var images_url=base_url+'build/1.1/images/';var licenses=Array();licenses[4]=Array();licenses[4]['name']='Creative Commons Attribution';licenses[4]['url']='http://creativecommons.org/licenses/by/2.0/';licenses[5]=Array();licenses[5]['name']='Creative Commons Attribution/Share Alike';licenses[5]['url']='http://creativecommons.org/licenses/by-sa/2.0/';var live_searches=Array();live_searches['school']=Array();live_searches['school']['in_border_color']='#152335';live_searches['school']['in_border_width']='1px';live_searches['school']['in_border_style']='solid';live_searches['school']['in_border_color_highlight']='#9cbee7';live_searches['school']['in_border_width_highlight']='2px';live_searches['school']['in_border_style_highlight']='solid';live_searches['school']['in_value']='Search';live_searches['school']['in_value_highlight']='';live_searches['school']['in_color']='#ccc';live_searches['school']['in_color_highlight']='#000';live_searches['school']['res_border_color_highlight']='#152335';live_searches['school']['res_border_width_highlight']='2px';live_searches['school']['res_border_style_highlight']='solid';live_searches['location']=Array();live_searches['location']['in_border_color']='#9cbee7';live_searches['location']['in_border_width']='1px';live_searches['location']['in_border_style']='solid';live_searches['location']['in_border_color_highlight']='#9cbee7';live_searches['location']['in_border_width_highlight']='2px';live_searches['location']['in_border_style_highlight']='solid';live_searches['location']['in_value']='start typing...';live_searches['location']['in_value_highlight']='';live_searches['location']['in_color']='#ccc';live_searches['location']['in_color_highlight']='#000';live_searches['location']['res_border_color_highlight']='#152335';live_searches['location']['res_border_width_highlight']='2px';live_searches['location']['res_border_style_highlight']='solid';function ls_highlightIn(id){var el_in=document.getElementById('live_search_'+id+'_in');if(el_in!=null){el_in.value=live_searches[id]['in_value_highlight'];el_in.style.color=live_searches[id]['in_color_highlight'];el_in.style.borderWidth=live_searches[id]['in_border_width_highlight'];el_in.style.borderColor=live_searches[id]['in_border_color_highlight'];el_in.style.borderStyle=live_searches[id]['in_border_style_highlight'];}}
function ls_unhighlightIn(id){var el_in=document.getElementById('live_search_'+id+'_in');if(el_in!=null){el_in.value=live_searches[id]['in_value'];el_in.style.color=live_searches[id]['in_color'];el_in.style.borderWidth=live_searches[id]['in_border_width'];el_in.style.borderColor=live_searches[id]['in_border_color'];el_in.style.borderStyle=live_searches[id]['in_border_style'];}
ls_hideLoading(id);ls_unhighlightRes(id);}
function ls_highlightRes(id){var el_res=document.getElementById('live_search_'+id+'_res');if(el_res!=null){el_res.style.display='block';el_res.style.borderWidth=live_searches[id]['res_border_width_highlight'];el_res.style.borderColor=live_searches[id]['res_border_color_highlight'];el_res.style.borderStyle=live_searches[id]['res_border_style_highlight'];}}
function ls_unhighlightRes(id){var el_res=document.getElementById('live_search_'+id+'_res');if(el_res!=null){el_res.style.display='none';}}
function ls_showLoading(id){var el_loading=document.getElementById('live_search_'+id+'_loading');if(el_loading!=null){el_loading.innerHTML='Loading suggestions...';el_loading.style.display='block';}}
function ls_hideLoading(id){var el_loading=document.getElementById('live_search_'+id+'_loading');if(el_loading!=null){el_loading.style.display='none';}}
if(document.getElementById('live_search_school_loading')!=null){var ls_school_server=base_url+"misc/live_search_school.php";var ls_school_schema=["\n","\t"];var ls_school_ds=new YAHOO.widget.DS_XHR(ls_school_server,ls_school_schema);ls_school_ds.responseType=YAHOO.widget.DS_XHR.TYPE_FLAT;ls_school_ds.scriptQueryParam="s";ls_school_ds.maxCacheEntries=50;ls_school_ds.queryMatchSubset=false;ls_school_ds.queryMatchContains=false;ls_school_ds.connTimeout=5000;var ls_school_ac=new YAHOO.widget.AutoComplete("live_search_school_in","live_search_school_res",ls_school_ds);ls_school_ac.queryDelay=0;ls_school_ac.maxResultsDisplayed=8;ls_school_ac.minQueryLength=2;ls_school_ac.autoHighlight=false;ls_school_ac.highlightClassName="highRow";ls_school_ac.animVert=false;ls_school_ac.textboxFocusEvent.subscribe(function(){ls_highlightIn('school')});ls_school_ac.textboxBlurEvent.subscribe(function(){ls_unhighlightIn('school')});var ls_school_dh_req=function(){ls_highlightRes('school');ls_showLoading('school');};ls_school_ac.dataRequestEvent.subscribe(ls_school_dh_req);var ls_school_dh_ret=function(){ls_hideLoading('school');}
ls_school_ac.dataReturnEvent.subscribe(ls_school_dh_ret);var itemSelectHandler=function(sType,aArgs){var aData=aArgs[2];live_searches['school']['in_value']=aData[0];ls_unhighlightIn('school');ls_unhighlightRes('school');var el_slug=document.getElementById('live_search_school_slug');if(el_slug!=null){el_slug.value=aData[2];}
document.live_search_school_form.submit();return true;};ls_school_ac.itemSelectEvent.subscribe(itemSelectHandler);ls_school_ac.formatResult=function(aResultItem,sQuery){return aResultItem[0]+'<br /><span class="res_right">'+aResultItem[1]+'</span>';};}
if(document.getElementById('live_search_location_loading')!=null){var ls_location_server=base_url+"misc/live_search_location.php";var ls_location_schema=["\n","\t"];var ls_location_ds=new YAHOO.widget.DS_XHR(ls_location_server,ls_location_schema);ls_location_ds.responseType=YAHOO.widget.DS_XHR.TYPE_FLAT;ls_location_ds.scriptQueryParam="s";ls_location_ds.maxCacheEntries=50;ls_location_ds.queryMatchSubset=false;ls_location_ds.queryMatchContains=false;ls_location_ds.connTimeout=5000;var ls_location_ac=new YAHOO.widget.AutoComplete("live_search_location_in","live_search_location_res",ls_location_ds);ls_location_ac.queryDelay=0;ls_location_ac.maxResultsDisplayed=8;ls_location_ac.minQueryLength=2;ls_location_ac.autoHighlight=false;ls_location_ac.highlightClassName="highRow";ls_location_ac.animVert=false;ls_location_ac.textboxFocusEvent.subscribe(function(){ls_highlightIn('location')});ls_location_ac.textboxBlurEvent.subscribe(function(){ls_unhighlightIn('location')});var ls_location_dh_req=function(){ls_highlightRes('location');ls_showLoading('location');};ls_location_ac.dataRequestEvent.subscribe(ls_location_dh_req);var ls_location_dh_ret=function(){ls_hideLoading('location');}
ls_location_ac.dataReturnEvent.subscribe(ls_location_dh_ret);var itemSelectHandler=function(sType,aArgs){var aData=aArgs[2];live_searches['location']['in_value']=aData[0];ls_unhighlightIn('location');ls_unhighlightRes('location');var el_slug=document.getElementById('live_search_location_slug');if(el_slug!=null){el_slug.value=aData[1];}
document.live_search_location_form.submit();return true;};ls_location_ac.itemSelectEvent.subscribe(itemSelectHandler);ls_location_ac.formatResult=function(aResultItem,sQuery){return aResultItem[0];};}
function showFlash(msg,level){var flash_el=document.getElementById('flash');if(flash_el!=null){var levels=Object;levels[-1]='warn';levels[0]='neutral';levels[1]='good';if(levels[level]==null){level=0;}
flash_el.innerHTML='<div id="flash"><div id="flash_'+levels[level]+'"><a href="#" id="flash_close" onClick="closeFlash();"><span>close</span></a> '+msg+'</div></div>';flash_el.style.display='block';}}
function flashAni(){var flashMsg=document.getElementById('flash');if(flashMsg!==null){function flashMsgAniOnCompleteHandler(){flashMsg.style.display='none';}
var flashMsgAniAttributes={opacity:{to:0,from:1}};var flashMsgAni=new YAHOO.util.ColorAnim('flash',flashMsgAniAttributes,8);flashMsgAni.animate();flashMsgAni.onComplete.subscribe(flashMsgAniOnCompleteHandler);}}
function closeFlash(){var flash=document.getElementById('flash');if(flash!=null){flash.style.display='none';}}
stored_vals=Array();function focusMe(el_id){var el=document.getElementById(el_id);if(el!=null){stored_vals[el_id]=el.value;el.value='';}}
function blurMe(el_id){var el=document.getElementById(el_id);if(el!=null){if(el.value==''){el.value=stored_vals[el_id];}
else{stored_vals[el_id]=el.value;}}}
function toggle(el,obj){if(YAHOO.util.Dom.getStyle(obj,'display')!='none'){YAHOO.util.Dom.setStyle(obj,'display','none');}
else{YAHOO.util.Dom.setStyle(obj,'display','block');}}
function activate(el,obj){if(obj!=null){obj.focus();}}
function in_array(needle,haystack){var i;if(haystack==undefined||haystack==null){return false;}
else{for(var k in haystack){if(haystack[k]==needle){return k;}}}
return false;}
function array_unique(arr){if(arr==undefined||arr==null){return false;}
else{var tmp_arr=Array();for(var v in arr){tmp_arr[arr[v]]=0;}
var out_arr=Array();for(var k in tmp_arr){out_arr.push(k);}
return out_arr;}}
function changeHex(hex_in,change_val){if(change_val==null){change_val=-2;}
hex_in=hex_in.replace('#','');if(hex_in.length==6){var out_hex_arr=Array();var hex_vals=Array(0,1,2,3,4,5,6,7,8,9,'a','b','c','e','f','g');var hex_in_arr=hex_in.split('');for(var k in hex_in_arr){var m=in_array(hex_in_arr[k],hex_vals);if(m!==false){var hk=parseInt(m)+parseInt(change_val);if(hk>hex_vals.length-1||hk<0){hk=parseInt(m);}
out_hex_arr.push(hex_vals[hk]);}}
return'#'+out_hex_arr.join('');}
return false;}
function rand_int(seed,max){if(seed!=null&&max==null){max=seed;seed=0;}
else{if(seed==null){seed=0;}
if(max==null){max=100;}}
return seed+Math.floor(Math.random()*(max-seed));}
function strrev(str){var str_arr=str.split('');var rev_str_arr=str_arr.reverse();return rev_str_arr.join('');}
function updateNumDelComp(){if(filter_vals!=null){var n_deleted=0;var n_compared=0;for(var k in filter_vals){var fk=k.split('_');if(fk.length>0){if(fk[0]=='school'){if(filter_vals[k]=='delete'){n_deleted++;}
else if(filter_vals[k]=='compare'){n_compared++;}}}}
var el_n_deleted=document.getElementById('n_deleted');if(el_n_deleted!=null){el_n_deleted.innerHTML=n_deleted;}
var el_n_compared=document.getElementById('n_compared');if(el_n_compared!=null){el_n_compared.innerHTML=n_compared;}}}
var active_tab_more=Array();function activateTab(ev,el,reset){if(reset!=true){var content_display_inside=document.getElementById('content_display_inside');if(content_display_inside!=null){if(content_display_inside.className!=null){var org_elem=document.getElementById(content_display_inside.className);if(org_elem!=null){org_elem.innerHTML=content_display_inside.innerHTML;}}}}
var tab_lis=YAHOO.util.Dom.getElementsByClassName('nav_2',null,'nav_2');for(var t in tab_lis){var m=tab_lis[t].innerHTML.match(/href=\"\#([A-Za-z_]{0,})\"/);if(m!=null&&m.length>0){var el_content=document.getElementById(m[1]);if(m[1]==el.id){tab_lis[t].id='nav_2_active';if(el_content!=null){var el_content_display=document.getElementById('content_display');if(el_content_display!=null){el_content_display.innerHTML='<div class="'+el.id+'" id="content_display_inside">'+el_content.innerHTML+'</div>';el_content.innerHTML='';}}
if(active_tab_more[el.id]!=null){eval(active_tab_more[el.id]);}}
else{tab_lis[t].id='';}}}
loadTabsViewMore();if(typeof makeToggle!='undefined'){makeToggle();}}
var tabs=Array();function loadTabs(reset){var tab_lis=YAHOO.util.Dom.getElementsByClassName('nav_2',null,'nav_2');for(var t in tab_lis){var m=tab_lis[t].innerHTML.match(/id=[\"]{0,1}([A-Za-z0-9_]{0,})[\"]{0,1}[\s]{0,1}href=\"#([A-Za-z0-9_]{0,})\"/);if(m!=null&&m.length>0){var el_n=document.getElementById(m[1]);var el_c=document.getElementById(m[2]);if(el_n!=null&&el_c!=null){YAHOO.util.Event.addListener(el_n,'click',activateTab,el_c);el_c.style.display='none';}
tabs.push(m[2]);var tmp=tab_lis[t].innerHTML.replace(/\"#([A-Za-z0-9_]{0,})\"/,'"#content_display"');}}
var el_active_id=tabs[0];var a=window.location.hash;if(a!=null&&in_array(a.substr(1,a.length-1),tabs)){el_active_id=a.substr(1,a.length-1);}
var el_active=document.getElementById(el_active_id);if(el_active!=null){activateTab(null,el_active,reset);}}
function loadTabsViewMore(){var tab_lis=YAHOO.util.Dom.getElementsByClassName('view_more','a','content_display');for(var t in tab_lis){var m=tab_lis[t].href.match(/#([a-zA-z0-9]{0,})$/);if(m!=null&&m.length>0){var new_id=tab_lis[t].id+'_'+rand_int(1000);tab_lis[t].id=new_id;var el_n=document.getElementById(tab_lis[t].id);var el_c=document.getElementById(m[1]);if(el_n!=null&&el_c!=null){YAHOO.util.Event.addListener(el_n,'click',activateTab,el_c);}}}}
var location_change=document.getElementById('location_change');var live_search_location=document.getElementById('live_search_location');var live_search_location_in=document.getElementById('live_search_location_in');if(location_change!=null&&live_search_location!=null&&live_search_location_in!=null){YAHOO.util.Event.addListener(location_change,'click',toggle,live_search_location);YAHOO.util.Event.addListener(location_change,'click',activate,live_search_location_in);}