function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else {
    alert("Press CTRL-D (Netscape/Mozilla) or CTRL-T (Opera) to bookmark");
  }
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function NewWindow(mypage, myname, w, h, scroll) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
    win = window.open(mypage, myname, winprops)
    if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function ClickClear(thisfield, defaulttext) {
    if (thisfield.value == defaulttext) {
        thisfield.value = "";
    }
}

function ClickRecall(thisfield, defaulttext) {
    if (thisfield.value == "") {
        thisfield.value = defaulttext;
    }
}

function update_link(linkID,newLink) {
    document.getElementById(linkID).href = newLink;
    return;
}

function toggle(id) {
    if(isVisible(id)) {
        hideElement(id);
        changeClass('q_'+id,'off');
    } else {
        showElement(id);
        changeClass('q_'+id,'on');
    }
}

function isVisible(id) {
    var visible = true;
    if(document.getElementById) {
        if(document.getElementById(id).style.display == 'none') {
            visible = false;
        }
    } else {
        if(document.layers) {
            if(document.id.display == 'none') {
                visible = false;
            }
		} else {
            if(document.all.id.style.display == 'none') {
                visible = false;
            }
		}
    }
    return visible;
}

function hideElement(id) {
    //safe function to hide an element with a specified id
	if(document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	} else {
		if(document.layers) { // Netscape 4
			document.id.display = 'none';
		} else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showElement(id) {
    //safe function to show an element with a specified id	  
	if(document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	} else {
		if(document.layers) { // Netscape 4
			document.id.display = 'block';
		} else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function changeClass(id,className) {
    identity = document.getElementById(id);
    identity.className = className;
}