function ShowPicture(FileName) {
    open("/img/library/" + FileName, "popupPicture", "scrollbars=yes,width=600,height=500,status=0,toolbar=1,menubar=0,resizable=1"); 
} //ShowPicture

function ShowReviewPicture(FileName) {
    open("/img/reviews/" + FileName, "popupPicture", "scrollbars=yes,width=600,height=500,status=0,toolbar=1,menubar=0,resizable=1"); 
} //ShowReviewPicture

function onShowMap(chPostcode, chTitle) {
    open('http://www.multimap.com/map/browse.cgi?pc=' + escape( chPostcode ) +	'&GridE=&GridN=&scale=10000&title=' + escape( chTitle ) + '&cat=h', 'MapWindow', "scrollbars=yes,status=1,toolbar=1,menubar=1,resizable=1");
} //onShowMapp	

function IsValidDate(strStartDate) {
    if (strStartDate.length != 0) {
        //var patDate = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;
        //var patDate = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
        var patDate = /^(\d{1,2})(\/)(\d{1,2})\2(\d{4})$/;
        var aryMatch = strStartDate.match(patDate);
        
        if (aryMatch == null) {
            alert("Start Date is not in a valid format.")
            return false;
        } //end if
        
        intMonth = aryMatch[3];
        intDay = aryMatch[1];
        intYear = aryMatch[4];
        
        if ((intMonth < 1) || (intMonth > 12)) {
            alert("Month must be between 1 and 12.");
            return false;
        } //end if
        
        if ((intDay < 1) || (intDay > 31)) {
            alert("Day must be between 1 and 31.");
            return false;
        } //end if
        
        if (((intMonth == 4) || (intMonth == 6) || (intMonth == 9) || (intMonth == 11)) && (intDay == 31)) {
            alert("Month "+intMonth+" doesn't have 31 Days!")
            return false
        } //end if
        
        if (intMonth == 2) { 
            var blnblnIsLeap = (((intYear % 4) == 0) && (((intYear % 100) != 0) || ((intYear % 400) == 0)));
            if ((intDay > 29) || ((intDay == 29) && (!blnIsLeap))) {
                alert("February " + intYear + " doesn't have " + intDay + " Days!");
                return false;
            } //end if
        } //end if
    } //end if
                        
    return true;
} //IsValidDate

