///*
//DezinerFolio.com Simple Accordians.

//Author  : G.S.Navin Raj Kumar
//Website : http://dezinerfolio.com

//*/

///*
//* The Variable names have been compressed to achive a higher level of compression.
//*/

//// Prototype Method to get the element based on ID
//function $(d){
//	return document.getElementById(d);
//}

//// set or get the current display style of the div
//function dsp(d,v){
//	if(v==undefined){
//		return d.style.display;
//	}else{
//		d.style.display=v;
//	}
//}

//// set or get the height of a div.
//function sh(d,v){
//	// if you are getting the height then display must be block to return the absolute height
//	if(v==undefined){
//		if(dsp(d)!='none'&& dsp(d)!=''){
//			return d.offsetHeight;
//		}
//		viz = d.style.visibility;
//		d.style.visibility = 'hidden';
//		o = dsp(d);
//		dsp(d,'block');
//		r = parseInt(d.offsetHeight);
//		dsp(d,o);
//		d.style.visibility = viz;
//		return r;
//	}else{
//		d.style.height=v;
//	}
//}
///*
//* Variable 'S' defines the speed of the accordian
//* Variable 'T' defines the refresh rate of the accordian
//*/
//s=7;
//t=10;

////Collapse Timer is triggered as a setInterval to reduce the height of the div exponentially.
//function ct(d){
//	d = $(d);
//	if(sh(d)>0){
//		v = Math.round(sh(d)/d.s);
//		v = (v<1) ? 1 :v ;
//		v = (sh(d)-v);
//		sh(d,v+'px');
//		d.style.opacity = (v/d.maxh);
//		d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');';
//	}else{
//		sh(d,0);
//		dsp(d,'none');
//		clearInterval(d.t);
//	}
//}

////Expand Timer is triggered as a setInterval to increase the height of the div exponentially.
//function et(d){
//	d = $(d);
//	if(sh(d)<d.maxh){
//		v = Math.round((d.maxh-sh(d))/d.s);
//		v = (v<1) ? 1 :v ;
//		v = (sh(d)+v);
//		sh(d,v+'px');
//		d.style.opacity = (v/d.maxh);
//		d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');';
//	}else{
//		sh(d,d.maxh);
//		clearInterval(d.t);
//	}
//}

//// Collapse Initializer
//function cl(d){
//	if(dsp(d)=='block'){
//		clearInterval(d.t);
//		d.t=setInterval('ct("'+d.id+'")',t);
//	}
//}

////Expand Initializer
//function ex(d){
//	if(dsp(d)=='none'){
//		dsp(d,'block');
//		d.style.height='0px';
//		clearInterval(d.t);
//		d.t=setInterval('et("'+d.id+'")',t);
//	}
//}

//// Removes Classname from the given div.
//function cc(n,v){
//	s=n.className.split(/\s+/);
//	for(p=0;p<s.length;p++){
//		if(s[p]==v+n.tc){
//			s.splice(p,1);
//			n.className=s.join(' ');
//			break;
//		}
//	}
//}
////Accordian Initializer
//function Accordian(d,s,tc){
//	// get all the elements that have id as content
//	l=$(d).getElementsByTagName('div');
//	c=[];
//	for(i=0;i<l.length;i++){
//		h=l[i].id;
//		if(h.substr(h.indexOf('-')+1,h.length)=='content'){c.push(h);}
//	}
//	sel=null;
//	//then search through headers
//	for(i=0;i<l.length;i++){
//		h=l[i].id;
//		if(h.substr(h.indexOf('-')+1,h.length)=='header'){
//			d=$(h.substr(0,h.indexOf('-'))+'-content');
//			d.style.display='none';
//			d.style.overflow='hidden';
//			d.maxh =sh(d);
//			d.s=(s==undefined)? 7 : s;
//			h=$(h);
//			h.tc=tc;
//			h.c=c;
//			// set the onclick function for each header.
//			h.onmouseover = function(){
//				for(i=0;i<this.c.length;i++){
//					cn=this.c[i];
//					n=cn.substr(0,cn.indexOf('-'));
//					if((n+'-header')==this.id){
//						ex($(n+'-content'));
//						n=$(n+'-header');
//						cc(n,'__');
//						n.className=n.className+' '+n.tc;
//					}else{
//						cl($(n+'-content'));
//						cc($(n+'-header'),'');
//					}
//				}
//			}
//			if(h.className.match(/selected+/)!=undefined){ sel=h;}
//		}
//	}
//	if(sel!=undefined){x.onmouseover();}
//}

function $(d){
	return document.getElementById(d);
}

// set or get the current display style of the div
function dsp(d,v){
	if(v==undefined){
		return d.style.display;
	}else{
		d.style.display=v;
	}
}

// set or get the height of a div.
function sh(d,v){
	// if you are getting the height then display must be block to return the absolute height
	if(v==undefined){
		if(dsp(d)!='none'&& dsp(d)!=''){
			return d.offsetHeight;
		}
		viz = d.style.visibility;
		d.style.visibility = 'hidden';
		o = dsp(d);
		dsp(d,'block');
		r = parseInt(d.offsetHeight);
		dsp(d,o);
		d.style.visibility = viz;
		return r;
	}else{
		d.style.height=v;
	}
}
/*
* Variable 'S' defines the speed of the accordian
* Variable 'T' defines the refresh rate of the accordian
*/
s=7;
t=10;

//Collapse Timer is triggered as a setInterval to reduce the height of the div exponentially.
function ct(d){
	d = $(d);
	if(sh(d)>0){
		v = Math.round(sh(d)/d.s);
		v = (v<1) ? 1 :v ;
		v = (sh(d)-v);
		sh(d,v+'px');
		d.style.opacity = (v/d.maxh);
		d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');';
	}else{
		sh(d,0);
		dsp(d,'none');
		clearInterval(d.t);
	}
}

//Expand Timer is triggered as a setInterval to increase the height of the div exponentially.
function et(d){
	d = $(d);
	if(sh(d)<d.maxh){
		v = Math.round((d.maxh-sh(d))/d.s);
		v = (v<1) ? 1 :v ;
		v = (sh(d)+v);
		sh(d,v+'px');
		d.style.opacity = (v/d.maxh);
		d.style.filter= 'alpha(opacity='+(v*100/d.maxh)+');';
	}else{
		sh(d,d.maxh);
		clearInterval(d.t);
	}
}

// Collapse Initializer
function cl(d){
	if(dsp(d)=='block'){
		clearInterval(d.t);
		d.t=setInterval('ct("'+d.id+'")',t);
	}
}

//Expand Initializer
function ex(d){
	if(dsp(d)=='none'){
		dsp(d,'block');
		d.style.height='0px';
		clearInterval(d.t);
		d.t=setInterval('et("'+d.id+'")',t);
	}
}

// Removes Classname from the given div.
function cc(n,v){
	s=n.className.split(/\s+/);
	for(p=0;p<s.length;p++){
		if(s[p]==v+n.tc){
			s.splice(p,1);
			n.className=s.join(' ');
			break;
		}
	}
}
//Accordian Initializer
function Accordian(d,s,tc){
	// get all the elements that have id as content
	l=$(d).getElementsByTagName('div');
	c=[];
	for(i=0;i<l.length;i++){
		h=l[i].id;
		if(h.substr(h.indexOf('-')+1,h.length)=='content'){c.push(h);}
	}
	sel=null;
	//then search through headers
	for(i=0;i<l.length;i++){
		h=l[i].id;
		if(h.substr(h.indexOf('-')+1,h.length)=='header'){
			d=$(h.substr(0,h.indexOf('-'))+'-content');
			d.style.display='none';
			d.style.overflow='hidden';
			d.maxh =sh(d);
			d.s=(s==undefined)? 7 : s;
			h=$(h);
			h.tc=tc;
			h.c=c;
			// set the onclick function for each header.
			h.onclick = function(){
				for(i=0;i<this.c.length;i++){
					cn=this.c[i];
					n=cn.substr(0,cn.indexOf('-'));
					if((n+'-header')==this.id){
						ex($(n+'-content'));
						n=$(n+'-header');
						cc(n,'__');
						n.className=n.className+' '+n.tc;
					}else{
						cl($(n+'-content'));
						cc($(n+'-header'),'');
					}
				}
			}
			if(h.className.match(/selected+/)!=undefined){ sel=h;}
		}
	}
	if(sel!=undefined){sel.onclick();}
}

/*

//MENU 1 (Home)
var menu1=new Array()
menu1[0]='<a href="homepage.htm">Individual Career Counseling</a>'
menu1[1]='<a href="http://www.freewarejava.com">Freewarejava.com</a>'
menu1[2]='<a href="http://codingforums.com">Coding Forums</a>'
menu1[3]='<a href="http://www.cssdrive.com">CSS Drive</a>'

//MENU 2 (Alumni)
var menu2=new Array()
menu2[0]='<a href="http://cnn.com">CNN</a>'
menu2[1]='<a href="http://msnbc.com">MSNBC</a>'
menu2[2]='<a href="http://news.bbc.co.uk">BBC News</a>'

//MENU 3 (Biomedical Grad Students)
var menu3=new Array()
menu3[0]='<a href="bgsSites.asp">Career Development</a>'
menu3[1]='<a href="bgsResume.asp">Career Resources</a>'
menu3[2]='<a href="http://www.drexelmed.edu/DepartmentsCentersandInstitutes/AdministrativeDepts/AcademicPublishingServices/tabid/2667/Default.aspx">Academic Publishing Services (APS)</a>'
menu3[3]='<a href="bgsFunding.asp">Funding Resources</a>'
menu3[4]='<a href="bgsArchive.asp">Professional Development Workshop Archives</a>'
menu3[5]='<a href="bgs_programs_events.pdf">Programs and Events</a>'
menu3[6]='<a href="bgslibrary.asp">Career Development Center Library</a>'

//MENU 4 (Medical Students)
var menu4=new Array()
menu4[0]='<a href="medAdvice.asp">Advice from Upperclassmen</a>'
menu4[1]='<a href="med4thyear.asp">Planning Fourth Year</a>'
menu4[2]='<a href="medResPlan.asp">Residency Planning Process</a>'
menu4[3]='<a href="medMatchProg.asp">Matching Programs</a>'
menu4[4]='<a href="medAppServ.asp">Application Services</a>'
menu4[5]='<a href="medMatchRes.asp">Match Results</a>'
menu4[6]='<a href="medInternational.asp">International Opportunities</a>'
menu4[7]='<a href="http://www.drexelmed.edu/BiomedicalGraduateStudies/Programs/CombinedMDPhD/OfficeofMedicalStudentResearch/tabid/688/Default.aspx">Research</a>'
menu4[8]='<a href="medResources.asp">Resources</a>'
menu4[9]='<a href="medVideoArchive.asp">Archived Online Videotaped Seminars And Workshops</a>'
menu4[10]='<a href="medLibrary.asp">Career Development Center Library</a>'


//MENU 5 (Unused)
var menu5=new Array()


//MENU 6 (Professional Studies Programs)
var menu6=new Array()
menu6[0]='<a href="pspExp.asp">Career Exploration</a>'
menu6[1]='<a href="pspResSer.asp">Career Resources and Services</a>'
menu6[2]='<a href="pspPro.asp">Career Programs and Workshops</a>'
menu6[3]='<a href="pspDev.asp">Career Development Center Library</a>'
menu6[4]='<a href="pspProgArch.asp">Program Archives</a>'
menu6[5]='<a href="pspRes.asp">Resources</a>'
menu6[6]='<a href="pspAdditional.asp">Additional Resources</a>'

//Add menus here if more are needed, using menu7, menu8, etc.
//Use menu#[#]= ... as the template for sublinks

var menuwidth='200px' //placeholder value, won't change anything
var menubgcolor='lightyellow' //placeholder value, won't change anything
var disappeardelay=250  //Menu disappear speed onMouseout (in miliseconds) (default = 250)
var hidemenu_onclick="yes" //Hide menu when user clicks within menu (default = yes)

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onlick="clearhidemenu()"></div>')

//How the menu is displayed
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

//Hides and unhides the menu upon mousemovements
function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

//Test if IE works
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

//Make sure it doesn't go off the edge of the page
function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

//Write in the menu for displaying
function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

//Action, drop menu
function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

function highlight(which,color){
if (document.all||document.getElementById)
which.style.backgroundColor=color
}



matchColumns=function(){ 

     var divs,contDivs,maxHeight,divHeight,d; 
	
     // get all <div> elements in the document 

     divs=document.getElementsByTagName('div'); 

     contDivs=[]; 

     // initialize maximum height value 

     maxHeight=0; 

     // iterate over all <div> elements in the document 

     for(var i=0;i<divs.length;i++){ 

          // make collection with <div> elements with class attribute 'container' 

          if(/\bcolumn\b/.test(divs[i].className)){ 

                d=divs[i]; 

                contDivs[contDivs.length]=d; 

                // determine height for <div> element 

                if(d.offsetHeight){ 

                     divHeight=d.offsetHeight; 					

                } 

                else if(d.style.pixelHeight){ 

                     divHeight=d.style.pixelHeight;					 

                } 

                // calculate maximum height 

                maxHeight=Math.max(maxHeight,divHeight); 

          } 

     } 

     // assign maximum height value to all of container <div> elements 

     for(var i=0;i<contDivs.length;i++){ 

          contDivs[i].style.height=maxHeight + "px"; 

     } 

} 

// Runs the script when page loads 

window.onload=function(){ 

     if(document.getElementsByTagName){ 

          matchColumns();		

     } 

} 


*/
