// JavaScript Document

//==========================================================================
//		doStuff()
//==========================================================================
function doStuff() {
	}

//==========================================================================
//		ShowInWindow(theURL,winName,features)
//==========================================================================
function ShowInWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
	}

//==========================================================================
//		popupConfirmMsg(Message)
//	$PopupMessage = 'Are you sure you want to disable this account?';
//	$LinkString = "<a href=\"user_disable.php?user=5\" onclick=\"popupConfirmMsg('".$PopupMessage."');return document.MM_returnValue\">disable</a></td>\n";
//==========================================================================
function popupConfirmMsg(Message) {
        document.MM_returnValue = confirm(Message);
        return document.MM_returnValue;
        }

//==========================================================================
//		HandleDropdown(FormName)
//==========================================================================
function HandleDropdown(MenuName,baseURL) {
    var myIndex  = MenuName.selectedIndex
    var SelectedValue = MenuName.options[myIndex].value
    var redirectURL  = baseURL + SelectedValue
    window.location.href = redirectURL;
    return true;
        }

//==============================================================================
function selectionSearch() {
//==============================================================================
	selection = getSelText();
	var message = "Do you want to search Spotlight Online for " + selection + "?";
	var response = prompt(message,selection);
	if (response) {
		window.location = "search_main.php?searchtext=" + response;
		}
	}

//==============================================================================
function getSelText() {
//==============================================================================
    var txt = '';
     if (window.getSelection) {
        txt = window.getSelection();
        }
    else if (document.getSelection) {
        txt = document.getSelection();
        }
    else if (document.selection) {
        txt = document.selection.createRange().text;
        }
    else return;
	return txt;
	}