/*
    Open and close an optional portion of the page.
    @param div_id string The ID of the <div> to open or close.
    @param marker_id string The ID of the <img> to change. (Shows whether
      it's opened or closed.)
    @param marker_opened_url string The URL of the image to display when
      the section is opened.
    @param marker_closed_url string The URL of the image to display when the
      section is closed.
    @return null.
*/
function dropDownText(div_id, marker_id, marker_opened_url, marker_closed_url) {
    var divElement = document.getElementById(div_id);
    if (divElement.style.display == "block") {
        divElement.style.display = "none";
        document.getElementById(marker_id).src = marker_closed_url;
    } else {
        divElement.style.display = "block";
        document.getElementById(marker_id).src = marker_opened_url;
    }
}


/*
	Place the cursor in the (default) edit text box of one of the search forms.
	To make this work:
	1. The text form element must be assigned the ID: default_select
	2. The function must be invoked: <body onload="selectDefaultText()">
*/
function selectDefaultText() {
    // select (place the cursor in) the form input text element
    var elem = document.getElementById("default_select");
    if (elem) { 
    	elem.select();
    }
}
function getTarget(evt) {
	//equalize IE & W3C event models (see Cookbook p. 227)
	evt = (evt) ? evt : event;
	//get elem receiving event in model-independent way (see JavaScript & DHTML Cookbook p. 239)
	var target = (evt.target) ? evt.target : evt.srcElement;
	return target;
}


