// JavaScript Document
// Copyright 2005-2006, DeskWeb consultancy, All rights reserved

function clearCharGroup(PnID) {
    LoCheck = document.getElementById("ignore" + PnID);
    
    if (LoCheck && LoCheck.checked) {
        LsName  = "lup_" + PnID + "_";
        LaElems = document.forms[0];
        
        for (n=0; n < LaElems.length; n++) {
            LoElem = LaElems[n];
            
            if (LoElem.name.substring(0, LsName.length) == LsName) {
                if (LoElem.checked)
                    LoElem.checked = false;
            }
        }
    }
}

function clearCharIgnore(PnID) {
    LoCheck = document.getElementById("ignore" + PnID);
    
    if (LoCheck) {
        LbCheck = false;
        
        LsName  = "lup_" + PnID + "_";
        LaElems = document.forms[0];
        
        for (n=0; n < LaElems.length; n++) {
            LoElem = LaElems[n];
            
            if (LoElem.name.substring(0, LsName.length) == LsName) {
                LbCheck = LbCheck || LoElem.checked;
            }
        }
        
        LoCheck.checked = ! LbCheck;
    }
}

function openPhoto(PnID) {
    LsURL = '/album/' + PnID;

    LoWindow = window.open(LsURL, 'pedit', 'height=425, width=655');
    LoWindow.focus();
}

function checkDate(PnID) {
    LoField = $(PnID);
}

function confirmNav(PsURL, PsQuestion) {
    if (confirm(PsQuestion)) {
        document.location = PsURL;
    }
}
