//todo think about moving to another file or renaming this file
function setContextHelp(e) {
    //alert("in context sensitive help");

    var targ;
    if (!e) {
	var e=window.event;
    }
    if (e.target) {
	targ=e.target;
    } else if (e.srcElement) {
	targ=e.srcElement;
    }
    if (targ.nodeType==3) { // defeat Safari bug
	targ = targ.parentNode;
    }


    /*
    var tname;
    tname=targ.tagName;
    alert("You clicked on a " + tname + " element.");
    */


    //alert(targ.className);
    //var tname;
    //tname=targ.tagName;
    if(targ.className == "suburbOption" || targ.className == "textfield") {  //for some reason ei has targ.className == "textfield", don't know why
	displayContextHelp("asdf");
	//alert("You clicked on a " + targ.className);
    }else {
	hideContextHelp();
    }
    //alert("3");


}

function hideContextHelp() {
    document.getElementById("contextHelp").style.display = "none"
}

function displayContextHelp(text) {
    document.getElementById("contextHelp").style.display = "block"
}
