<!--

if (document.layers) document.write("<link rel='Stylesheet' href='styles/ns4.css' type='text/css'>")

function getLayer(id) {
        if (document.getElementById)
                return document.getElementById(id).style
        else if (document.all)
                return document.all[id].style
        else if (document.layers)
                return document.layers[id]
}

function show(id) {
        hideall()
        l=getLayer(id)
        l.visibility="visible"
}

function hide(id) {
        l=getLayer(id)
        l.visibility="hidden"
}

function hideall() {
        hide('m1');hide('m2');hide('m3');hide('m5')
}

function popup(url,width,height) {
        var winleft=(screen.width - width)/2
        var winUp=(screen.height - height)/2
        winProp='width='+width+',height='+height+',left='+winleft+',top='+winUp+',screenX='+winleft+',screenY='+winUp+',scrollbars=yes,toolbar=no,location=no,menubar=no,resizable'
        Win = window.open("http://"+location.hostname+"/"+url,"",winProp)
        if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}

function comment(sid, iid) {
        popup("comments/add?sectionID="+sid+"&itemID="+iid,500,500)
}

function reply(pid) {
        popup("comments/add?parentID="+pid,500,500)
}

function quote(cid) {
        popup("comments/quote?ID="+cid,500,500)
}

function edit(cid) {
        popup("comments/edit?ID="+cid,500,500)
}

function deletecom(cid) {
        popup("comments/?action=delete&ID="+cid,500,500)
}

function user(uid) {
        popup("users/"+uid+"?action=info",340,300)
}

function email(sid, iid) {
        popup("linkmailer?sectionID="+sid+"&itemID="+iid,450,425)
}

function submitonce(theform) {
        if (document.all || document.getElementById) {
                for (i=0;i<theform.length;i++) {
                        var tempobj=theform.elements[i];
                        if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
                                tempobj.disabled=true;
}        }        }

function checkAll(elm,name){
  for (var i = 0; i < elm.form.elements.length; i++)
          if (elm.form.elements[i].name.indexOf(name) == 0)
            elm.form.elements[i].checked = elm.checked;
}
// -->
