<!--//
var ALIAS = "";
var PASSWORD = "";
var GROUPS = "";
var ROLE = "";
var RANK = "";
cookies = document.cookie.split("; ");
for(z=0;z<cookies.length;z++){
cookie = cookies[z].split("=");
if (cookie[0] == 'ALIAS'){ALIAS = replaceChars(cookie[1]);}
if (cookie[0] == 'PASSWORD'){PASSWORD = replaceChars(cookie[1]);}
if (cookie[0] == 'GROUPS'){GROUPS = replaceChars(cookie[1]);}
if (cookie[0] == 'ROLE'){ROLE = replaceChars(cookie[1]);}
if (cookie[0] == 'RANK'){ROLE = replaceChars(cookie[1]);}
}
var admissions_menu = Array("/admissions/why.html|Why Campbell",
"/admissions/application.html|Application",
"/admissions/financial_aid.html|Financial Aid",
"/admissions/visit.html|Campus Visit",
"/admissions/prep.html|PREP",
"/admissions/contact.html|Contact Us",
"/admissions/dean/index.html|From the Dean"
);
var academics_menu = Array("/academics/undergraduate.html|Undergraduate",
"/academics/graduate.html|Graduate",
"/academics/professional.html|Professional",
"/academics/postgraduate.html|Postgraduate",
"/academics/catalog.html|Academic Bulletin",
"/students/academic-support/index.html|Academic Support"
);
var students_menu = Array("/students/profiles.html|Profiles",
"/students/organizations.html|Organizations",
"/students/honor_code.html|Honor Code",
"/students/career_center.html|Career Center",
"http://campbell.bncollege.com|Bookstore"
);
var faculty_menu = Array("/faculty/administration.html|Administration",
"/faculty/pharmacy_practice.html|Pharmacy<br>Practice",
"/faculty/clinical_research.html|Clinical Research",
"/faculty/pharmaceutical_sciences.html|Pharmaceutical<br>Sciences",
"/faculty/residents.html|Residents",
"/academics/graduate/mspas/faculty.html|Physician Assistant<br>Program"
);
var alumni_menu = Array("/alumni/contact.html|Contact Us"
);
var campus_menu = Array("/campus/map.html|Campus Map",
"/campus/parking.html|Parking",
"/campus/housing.html|Housing");
var news_menu = Array("/news/current.html|Recent News",
"/news/gcal.html|Calendar",
"/news/employment.html|Employment"
);
var resources_menu = Array("/resources/assessment.html|Assessment",
"/resources/cont_ed.html|Continuing<br>Education",
"/resources/drug_info_center.html|Drug<br>Information<br>Center",
"/resources/exp_learn_program.html|Experiential<br>Education",
"/resources/pharm_sci_labs.html|CUPSI",
"/resources/sci_ed_outreach.html|Science<br>Education<br>Outreach",
"/resources/wellness_institute.html|Wellness<br>Institute",
"/resources/faculty-resources.html|Faculty<br>Resources",
"/resources/cucrc/index.html|Clinical Research<br>Center" 


);
var menu = Array();
var isdivopen =0;
var isdivactive = "";
var active_menu = "";
var active_open = "";
var spd = 25;
var spdAlpha = 7;
var fancy = 0;
if (navigator.appVersion.toUpperCase().split("MSIE 6.").length == 2){fancy = 0;}
//document.write(navigator.appVersion.toUpperCase().split("MSIE 6.").length);
var topCnt = 10;
var shadow_alpha = 50;
var shadow_size = 5;
//var debug = 0;
function showMenu(who){
if (who == active_menu){return;}
active_menu = who;
//document.all['admissions'].innerHTML = "";
//document.all['academics'].innerHTML = "";
//document.all['students'].innerHTML = "";
//document.all['faculty'].innerHTML = "";
//document.all['alumni'].innerHTML = "";
//document.all['campus'].innerHTML = "";
//document.all['news'].innerHTML = "";
//document.all['resources'].innerHTML = "";
//document.all[who].innerHTML = "";
document.getElementById(who).innerHTML = "";
topCnt = topCnt+1;
document.getElementById(who).style.zIndex = topCnt;
showMenuAnimated(who,0);
}//////////////////////////////////////////////////////////////////
function closeMenu(who,step){
if (!who){return;}
if (who == "admissions"){menu = admissions_menu;}
if (who == "academics"){menu = academics_menu;}
if (who == "students"){menu = students_menu;}
if (who == "faculty"){menu = faculty_menu;}
if (who == "alumni"){menu = alumni_menu;}
if (who == "campus"){menu = campus_menu;}
if (who == "news"){menu = news_menu;}
if (who == "resources"){menu = resources_menu;}
if (step < 0){
document.getElementById(who).innerHTML = "";
return;
}else{
document.getElementById(who).innerHTML = "";
per = Math.round((step*100)/menu.length);
perd = per/100;
//alert(per);
///////
per2 = shadow_alpha;
perd2 = shadow_alpha/100;
var shadColor = "#3A0402";
var shadSize = shadow_size;
var shadl = "";
var shadr = "";
var shadlb = "";
var shadrb = "";
if (fancy == 1){
shadl = "<td width="+shadSize+" style=\"background-image:url('/fade_l.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
shadr = "<td width="+shadSize+" style=\"background-image:url('/fade_r.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
shadlb = "<td width="+shadSize+" style=\"background-image:url('/fade_lc2.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
shadrb = "<td width="+shadSize+" style=\"background-image:url('/fade_rc2.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
}else{
shadl = "<td width=\"1\" height=\"1\" class=\"SHADOWOFF\">&nbsp;</td>";
shadr = "<td width=\""+shadSize+"\" class=\"SHADOW\">&nbsp;</td>";
}

for(var x=0;x<step;x++){
////////////document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadl+"<td class=\"NSMENU\" style=\"xxxfilter:alpha(opacity="+per+");-moz-opacity:"+perd+";opacity:"+perd+";\"><a class=\"NSMENU\" href=\""+menu[x].split("|")[0]+"\">"+menu[x].split("|")[1]+"</a></td>"+shadr+"</tr></table>\n";
if (fancy == 1){
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadl+"<td class=\"NSMENU\" style=\"xxxfilter:alpha(opacity="+per+");-moz-opacity:"+perd+";opacity:"+perd+";\"><a class=\"NSMENU\" href=\""+menu[x].split("|")[0]+"\">"+menu[x].split("|")[1]+"</a></td>"+shadr+"</tr></table>\n";
}else{
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadl+"<td class=\"NSMENU\"><a class=\"NSMENU\" href=\""+menu[x].split("|")[0]+"\">"+menu[x].split("|")[1]+"</a></td>"+shadr+"</tr></table>\n";
}
}
if (fancy == 1){
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadlb+"<td style=\"background-image:url('/fade_b.png');\"><img src=\"/cgi/trans.gif\" height="+shadSize+" width=5 border=0></td>"+shadrb+"</tr></table>\n";
}else{
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=\"7\" height=\"5\" class=\"SHADOWOFF\">&nbsp;</td><td height=\""+shadSize+"\" class=\"SHADOW\">&nbsp;</td>"+shadr+"</tr></table>\n";
}
/////////////
step = Math.round(step)-1;
//if (step >= 0){
setTimeout("closeMenu('"+who+"',"+step+");",spd);
//}
}
}//////////////////////////////////
function showMenuAnimated(who,y){
var showmenu = Array();
if (who == "admissions"){showmenu = admissions_menu;}
if (who == "academics"){showmenu = academics_menu;}
if (who == "students"){showmenu = students_menu;}
if (who == "faculty"){showmenu = faculty_menu;}
if (who == "alumni"){showmenu = alumni_menu;}
if (who == "campus"){showmenu = campus_menu;}
if (who == "news"){showmenu = news_menu;}
if (who == "resources"){showmenu = resources_menu;}
if (y > showmenu.length){
if ((who != "admissions")&&(document.getElementById('admissions').innerHTML)){document.getElementById('admissions').innerHTML = "";}
if ((who != "academics")&&(document.getElementById('academics').innerHTML)){document.getElementById('academics').innerHTML = "";}
if ((who != "students")&&(document.getElementById('students').innerHTML)){document.getElementById('students').innerHTML = "";}
if ((who != "faculty")&&(document.getElementById('faculty').innerHTML)){document.getElementById('faculty').innerHTML = "";}
if ((who != "alumni")&&(document.getElementById('alumni').innerHTML)){document.getElementById('alumni').innerHTML = "";}
if ((who != "campus")&&(document.getElementById('campus').innerHTML)){document.getElementById('campus').innerHTML = "";}
if ((who != "news")&&(document.getElementById('news').innerHTML)){document.getElementById('news').innerHTML = "";}
if ((who != "resources")&&(document.getElementById('resources').innerHTML)){document.getElementById('resources').innerHTML = "";}
active_open = "";
}else{
active_open = who;
document.getElementById(who).innerHTML = "";
per = Math.round((y*100)/showmenu.length);
perd = per/100;
per2 = shadow_alpha;
perd2 = shadow_alpha/100;
var shadColor = "#3A0402";
var shadSize = shadow_size;
//var shadSize = Math.floor(shadow_size*perd);
var shadl = "";
var shadr = "";
var shadlb = "";
var shadrb = "";
if (fancy == 1){
shadl = "<td width="+shadSize+" style=\"background-image:url('/fade_l.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
shadr = "<td width="+shadSize+" style=\"background-image:url('/fade_r.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
shadlb = "<td width="+shadSize+" style=\"background-image:url('/fade_lc2.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
shadrb = "<td width="+shadSize+" style=\"background-image:url('/fade_rc2.png');\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=5 border=\"0\"></td>";
}else{
shadl = "<td class=\"SHADOWOFF\" width=\"1\" height=\"1\">&nbsp;</td>";
//shadr = "<td width="+shadSize+" bgcolor="+shadColor+" style=\"xxxfilter:alpha(opacity="+per2+");-moz-opacity:"+perd2+";opacity:"+perd2+";\"><img src=\"/cgi/trans.gif\" width=\""+shadSize+"\" height=1 border=\"0\"></td>";
shadr = "<td class=\"SHADOW\" width=\""+shadSize+"\">&nbsp;</td>";
}
for(var x=0;x<y;x++){
if (fancy == 1){
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadl+"<td class=\"NSMENU\" style=\"xxxfilter:alpha(opacity="+per+");-moz-opacity:"+perd+";opacity:"+perd+";\"><a class=\"NSMENU\" href=\""+showmenu[x].split("|")[0]+"\">"+showmenu[x].split("|")[1]+"</a></td>"+shadr+"</tr></table>\n";
}else{
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadl+"<td class=\"NSMENU\"><a class=\"NSMENU\" href=\""+showmenu[x].split("|")[0]+"\">"+showmenu[x].split("|")[1]+"</a></td>"+shadr+"</tr></table>\n";
}
}
if (fancy == 1){
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"+shadlb+"<td style=\"background-image:url('/fade_b.png');\"><img src=\"/cgi/trans.gif\" height="+shadSize+" width=5 border=0></td>"+shadrb+"</tr></table>\n";
}else{
//document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=7><img src=/cgi/trans.gif width=7 height=5 border=0></td><td bgcolor="+shadColor+" style=\"xxxfilter:alpha(opacity="+per2+");-moz-opacity:"+perd2+";opacity:"+perd2+";\"><img src=\"/cgi/trans.gif\" height="+shadSize+" width=1 border=0></td>"+shadr+"</tr></table>\n";
document.getElementById(who).innerHTML += "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td class=\"SHADOWOFF\" width=\"7\" height=\""+shadSize+"\">&nbsp;</td><td class=\"SHADOW\">&nbsp;</td>"+shadr+"</tr></table>\n";
}
y = y+1;
setTimeout("showMenuAnimated('"+who+"',"+y+");",spd);
}
}//////////////////////////////////////////////////////////////////
function getActiveDiv(objt){
var actDiv = "";
if ((objt.nodeName == "DIV")){
actDiv = objt.id;
}
if (!actDiv){
chk = objt.parentNode;
var found = 0;
while(found != 1){
if (!chk){found = 1;}
if ((chk)&&(chk.nodeName == "DIV")){
found = 1;
actDiv = chk.id;
}
if (!found){chk = chk.parentNode;}
}
}
return actDiv;
}////////////////////////////////
function getActiveTD(objt){
var actTD = "";
if ((objt.nodeName == "TD")){
actTD = objt.id;
}
if (!actTD){
chk = objt.parentNode;
var found = 0;
while(found != 1){
if (!chk){found = 1;}
if ((chk)&&(chk.nodeName == "TD")){
found = 1;
actTD = chk.id;
}
if (!found){chk = chk.parentNode;}
}
}
return actTD;
}////////////////////////////////
function mmove(e){
var objt;
if (!e){
objt = window.event.srcElement;
}else{
objt = e.target;
}
var activeDiv = "";
var activeTD = "";
//if (debug == 1){document.forms['foo'].elements['activeDiv'].value = "well";document.forms['foo'].elements['activeTD'].value = "well";}
if (objt){
activeDiv = getActiveDiv(objt);
activeTD = getActiveTD(objt);
}
//if (debug == 1){document.forms['foo'].elements['activeDiv'].value = activeDiv;document.forms['foo'].elements['activeTD'].value = activeTD;}
//if (active_menu){return;}
if (activeTD.split("_")[1] != active_menu){
activeTD = activeTD.split("_")[1];
if (activeTD){
showMenu(activeTD);
return;
}
}
var closer = 0;
if (activeDiv){
if (active_menu != activeDiv){closer = 1;}
}
if ((!activeDiv)&&(!activeTD)){closer = 1;}
if (closer == 1){
if ((active_menu)&&(active_menu != "admissions")&&(document.getElementById('admissions').innerHTML)){document.getElementById('admissions').innerHTML = "";}
if ((active_menu)&&(active_menu != "academics")&&(document.getElementById('academics').innerHTML)){document.getElementById('academics').innerHTML = "";}
if ((active_menu)&&(active_menu != "students")&&(document.getElementById('students').innerHTML)){document.getElementById('students').innerHTML = "";}
if ((active_menu)&&(active_menu != "faculty")&&(document.getElementById('faculty').innerHTML)){document.getElementById('faculty').innerHTML = "";}
if ((active_menu)&&(active_menu != "alumni")&&(document.getElementById('alumni').innerHTML)){document.getElementById('alumni').innerHTML = "";}
if ((active_menu)&&(active_menu != "campus")&&(document.getElementById('campus').innerHTML)){document.getElementById('campus').innerHTML = "";}
if ((active_menu)&&(active_menu != "news")&&(document.getElementById('news').innerHTML)){document.getElementById('news').innerHTML = "";}
if ((active_menu)&&(active_menu != "resources")&&(document.getElementById('resources').innerHTML)){document.getElementById('resources').innerHTML = "";}
if (active_menu == "admissions"){closeMenu('admissions',admissions_menu.length);}
if (active_menu == "academics"){closeMenu('academics',academics_menu.length);}
if (active_menu == "students"){closeMenu('students',students_menu.length);}
if (active_menu == "faculty"){closeMenu('faculty',faculty_menu.length);}
if (active_menu == "alumni"){closeMenu('alumni',alumni_menu.length);}
if (active_menu == "campus"){closeMenu('campus',campus_menu.length);}
if (active_menu == "news"){closeMenu('news',news_menu.length);}
if (active_menu == "resources"){closeMenu('resources',resources_menu.length);}
active_menu = "";
}
}///////////////////////////////////
function isdefined( variable){
return (typeof(window[variable]) == "undefined")?  false: true;
}///////////////////////////////////////////////////////////////////////
var hoverDivLast = "";
function hoverDiv(who){
return;
if (document.all){
if (hoverDivLast){document.all("TD"+hoverDivLast).style.backgroundColor = '#FFFFFF';}
document.all("TD"+who).style.backgroundColor = '#FAFAFA';
} else if (!document.all && document.getElementById) {      
if (hoverDivLast){document.getElementById("TD"+hoverDivLast).style.backgroundColor = '#FFFFFF';}
document.getElementById("TD"+who).style.backgroundColor = '#FAFAFA';
}
hoverDivLast = who;
}///////////////////////////////////////////////////////////////////////
function showCalendarEvent(msg){
document.all(msg).style.visibility = 'visible';
raiseDivAlpha(msg,10);
//alert(document.getElementById(msg).innerHTML);
}///////////////////////////////////////////////////////////////////////
function hideCalendarEvent(msg){
document.all(msg).style.visibility = 'hidden';
//alert(document.getElementById(msg).innerHTML);
}///////////////////////////////////////////////////////////////////////
function copyDiv(FROM,TO){
if (isdivactive == FROM){return;}
if (isdivactive){
if (document.all){
//alert("MARK"+isdivactive);
//document.all("TD"+isdivactive).style.backgroundColor = '#FFFFFF';
document.all("MARK"+isdivactive).src = '/markoff.gif';
} else if (!document.all && document.getElementById) {      
//document.getElementById("TD"+isdivactive).style.backgroundColor = '#FFFFFF';
document.getElementById("MARK"+isdivactive).src = '/markoff.gif';
}
}
isdivactive = FROM;
isdivopen = 1;
if (document.all){
document.all(TO).filters.alpha.opacity = 0;
//document.all("TD"+FROM).style.backgroundColor = '#DDDDDD';
document.all("MARK"+FROM).src = '/mark.gif';
} else if (!document.all && document.getElementById) {      
document.getElementById(TO).style.MozOpacity = 0;
//document.getElementById("TD"+FROM).style.backgroundColor = '#DDDDDD';
document.getElementById("MARK"+FROM).src = '/mark.gif';
}
document.getElementById(TO).innerHTML = document.getElementById(FROM).innerHTML;
raiseDivAlpha("SIDEBAR",10);
}///////////////////////////////////////////////////////////////////
function raiseDivAlpha(WHO,AT){
AT = Math.floor(AT)+spdAlpha;
var ATM = AT/100;
if (document.all){
document.all(WHO).filters.alpha.opacity = AT;
} else if (!document.all && document.getElementById) {      
document.getElementById(WHO).style.MozOpacity = ATM;
}
if (AT < 100){
setTimeout("raiseDivAlpha('"+WHO+"','"+AT+"');",10);
}else{
isdivopen = 0;
}
}///////////////////////////////////////////////////////////////////
function replaceChars(entry) {
out = "+"; // replace this
add = " "; // with this
temp = "" + entry; // temporary holder
while (temp.indexOf(out)>-1) {
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + 
temp.substring((pos + out.length), temp.length));
}
return temp;
}////////////////////////////////////////////////////////
function WriteFLA(swf,wdth,hgth,nme){
//var wdth = 760;
//var hgth = 264;
//var nme = "static";
////document.write(swf);
document.write("<div id=fla style='position:relative;z-index:1;'><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='"+wdth+"' HEIGHT='"+hgth+"' id='"+nme+"' ALIGN=''>");
document.write("<PARAM NAME=movie VALUE='"+swf+"'>");
document.write("<EMBED src='"+swf+"' quality=high wmode=opaque bgcolor=#FFFFFF WIDTH='"+wdth+"' HEIGHT='"+hgth+"' NAME='"+nme+"' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'>");
document.write("<PARAM NAME=quality VALUE=high><param name=wmode value=opaque><PARAM NAME=bgcolor VALUE=#FFFFFF></EMBED></OBJECT></div>");
}////////////////////////////////////////////////////////
function daySelectOptions(days){
CUR = new Date;
var from = Math.round(CUR.getTime()/1000);
months = Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
//var content = "<option value=\""+from+"\">"+months[CUR.getMonth()]+" "+CUR.getDate()+" "+CUR.getYear();
var content = "";
for(x=1;x<=days;x++){
var fromli = from+(x*86400);
var thisdate = new Date();
thisdate.setTime(fromli*1000);
content = ""+content+"<option value=\""+fromli+"\">"+months[thisdate.getMonth()]+" "+thisdate.getDate()+" "+thisdate.getYear();
}
return content;
}////////////////////////////////////////////////////////
//-->
