﻿function RI_jumpMenu(targ, selObj, restore) { //v3.0
    eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'");
    if (restore) selObj.selectedIndex = 0;
}
function printpage() {
    window.print();
}
function confirmDelete(obj) {
    if (confirm('Are you sure you want to delete this ' + obj + '?'))
        return true;
    else return false;
}
function confirmLeaveGroup() {
    if (confirm('Are you sure you want to leave this group?\n\rYou must wait 24 hours before you can rejoin a group after leaving.')) return true; else return false;
}
function confirmLeaveFriend() {
    if (confirm('Are you sure you want to remove this user as a friend?')) return true; else return false;
}

function confirmReport() {
    if (confirm('Are you sure you want to report this user?')) return true; else return false;
}
function confirmGroupRemove() {
    if (confirm('Are you sure you want to remove the selected member(s)?')) return true; else return false;
}
function mangle() {
    if (!document.getElementsByTagName && !document.createElement &&
		!document.createTextNode) return;
    var nodes = document.getElementsByTagName("span");
    for (var i = nodes.length - 1; i >= 0; i--) {
        if (nodes[i].className == "mailme") {
            var at = / at /;
            var dot = / dot /g;
            var node = document.createElement("a");
            var address = nodes[i].firstChild.nodeValue;

            address = address.replace(at, "@");
            address = address.replace(dot, ".");

            address = address.replace(at, "@");
            address = address.replace(dot, ".");
            node.setAttribute("href", "mailto:" + address);
            node.appendChild(document.createTextNode(address));

            var prnt = nodes[i].parentNode;
            for (var j = 0; j < prnt.childNodes.length; j++)
                if (prnt.childNodes[j] == nodes[i]) {
                if (!prnt.replaceChild) return;
                prnt.replaceChild(node, prnt.childNodes[j]);
                break;
            }
        }
    }
}
function checkAll() {
    var frm = document.forms[0];
    for (i = 0; i < frm.length; i++) {
        frm.elements[i].checked = true;
    }
}
function unCheckAll() {
    var frm = document.forms[0];
    for (i = 0; i < frm.length; i++) {
        frm.elements[i].checked = false;
    }
}
