// show dropDownbox
// objID is the id to display the report under
function dropDown(objID){
	  var reportPickerDivID = "ddPicker";	
		var targetField = document.getElementsByName (objID).item(0);
		displayBelowThisObject=targetField;
		
		if(displayBelowThisObject==null){
				displayBelowThisObject=document.getElementById(objID);
		}
				
		// get x and y coords
		var x = displayBelowThisObject.offsetLeft;
		var y = displayBelowThisObject.offsetTop + displayBelowThisObject.offsetHeight ;
		
		// deal with elements inside tables and such
		var parent = displayBelowThisObject;
		while (parent.offsetParent) {
			parent = parent.offsetParent;
			x += parent.offsetLeft;
			y += parent.offsetTop ;
		}	 
		
		// create a new div if it doesn't exist
  	if (!document.getElementById(reportPickerDivID)) {		
	    var newNode = document.createElement("div");
	    newNode.setAttribute("id", reportPickerDivID);
	    newNode.setAttribute("style", "visibility: hidden;");
	    document.body.appendChild(newNode);			
    }
    
	  // move the reportPicker div to the proper x,y coordinate and toggle the visiblity
	  var pickerDiv = document.getElementById(reportPickerDivID);
	  pickerDiv.style.visibility = "visible";
	  pickerDiv.style.position = "absolute";
	  pickerDiv.style.left = x + "px";
	  pickerDiv.style.top = y + "px";	  
	  pickerDiv.style.background="#ddd";
	  pickerDiv.style.border="1pt solid #bbb";
	  pickerDiv.style.fontFamily="arial";
	  pickerDiv.style.padding="5px";
	  pickerDiv.style.fontSize="10pt";
	  pickerDiv.style.zIndex = 1000;   
	  
	  pickerDiv.onmouseover=function(){
	  	document.getElementById(reportPickerDivID).style.visibility="visible";	
			document.getElementById("preschoolNav").style.background="url(http://www.nbson.com/images/orangeFade.jpg)";	  	
			document.getElementById("preschoolNav").style.color="#000";
	  }	  
	  pickerDiv.onmouseout=function(){
	  	document.getElementById(reportPickerDivID).style.visibility="hidden";	
	  	document.getElementById("preschoolNav").style.background="#070707";
	  	document.getElementById("preschoolNav").style.color="#fff";
	  }
    
    var html="";
    html="<a style='color:#000;' href='curriculum.htm'>Curriculum</a><br>";
    html+="<a style='color:#000;' href='currentEvents.htm'>Current Events</a><br>";
    html+="<a style='color:#000;' href='admissions.htm'>Admissions</a><br>";
    html+="<a style='color:#000;' href='calendar.htm'>Calendar</a><br>";
    html+="<a style='color:#000;' href='about.htm'>About</a><br>";
    
    pickerDiv.innerHTML=html;

}