function showContent(id, option) {
    // Show, Hide or Toggle a document element
    // option = 'show', 'hide' or 'toggle'
    if (document.getElementById) {
        obj = document.getElementById(id);
        switch(option){
        case 'show':
            obj.style.display='';
            break;
        case 'hide':
            obj.style.display='none';
            break;
        case 'toggle':
        default:
            if (obj.style.display == 'none') {
                obj.style.display = '';
            } else {
                obj.style.display = 'none';
            }
        }
    }
}
function newPopup(url) {
    // Open new window - as used for the 118 video
	popupWindow = window.open(
     	url,'popUpWindow','height=230,width=290,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}

// ==== openModalWin support ====
// Allow opening of a modal window (supports IE and Firefox)
// Note: Does not allow remote urls to be opened (IE does not return a window handler if Protected Mode is on for the url's zone (internet/intranet/trusted etc.).
var w=0;
function openModalWin(url, wWidth, wHeight){
	if(w!=0 && !w.closed){
	    w.focus();
	} else {
		w = window.open(url, 'modalPopup', 'width=' + wWidth + ',height=' + wHeight + ',left=' + (screen.availWidth-wWidth)/2 + ',screenX=' + (screen.availWidth-wWidth)/2 + ',top=' + (screen.availHeight-wHeight)/2 + ',screenY=' + (screen.availHeight-wHeight)/2 + ',scrollbars=yes,resizable=yes,menubar=no');
	}
}
function focusModalWin(){
    // This function is called whenever a mouse key is pressed. It only does anything if the modal window is open.
	if(w!=0 && !w.closed){
	    w.focus();
	}
}
document.onmouseup = focusModalWin;
// ==== /openModalWin support ====
