function goNewPage(windowParams, url) {
    wnd = window.open(url, "", windowParams);
}

function photo_view($path, $pid, $isPhoto, $width, $height) {
    window.open($path+"?action=previewimg&pid="+$pid+"&isPhoto="+$isPhoto, null, "top=10, left=10, width="+$width+", height="+$height+", location=no, resizable=no, directories=no, menubar=no, scrollbars=no, status=yes, titlebar=no, toolbar=no");
}

function checkAllCheckboxes(form, namePrefix, checkAll) {
    if(typeof checkAll == "undefined") checkAll = true;

    for (i = 0; i < form.elements.length; i++) {
        e = form.elements[i];

        if(e.name.slice(0, namePrefix.length) == namePrefix) {
            e.checked = checkAll;
        }
    }
}

function whoOnline() {
    window.open("/script/who_online.php", "FF_ONLINE", "top=40px, left="+(screen.width-320)+"px, width=290px, height="+(screen.height-320)+"px, location=no, resizable=yes, directories=no, menubar=no, scrollbars=no, status=no, titlebar=no, toolbar=no");
}

function sendSMS() {
    window.open("/sms.html", "FF_SMS", "top=40px, left="+(screen.width-500)+"px, width=420px, height=490px, location=no, resizable=yes, directories=no, menubar=no, scrollbars=no, status=no, titlebar=no, toolbar=no");
}

function emo(code) {
	document.comm.comment.value += code+" ";
	document.comm.comment.focus();
}


