﻿
function SwapImage(pobj, pstrLoc) {

    // swap the image
    pobj.src = pstrLoc

}


function EnlargeImage(pstrURL) {

    window.open("images.aspx?url=" + pstrURL.replace('_thumbmid.', '_thumbbig.'), null, "height=650, width=550, left=100, top=100, scrollbars=yes", false)

}

function MaxLength(pintMax, pobjTextbox) {

    if (pobjTextbox.value.length >= pintMax) {
        return false;
    }

}

function forceClick(e, elemId) {
    var elem = document.getElementById(elemId);
    var evt = (e) ? e : window.event;
    var intKey = (evt.which) ? evt.which : evt.keyCode;
    
    if(intKey == 13) {
        elem.click();
        return false;
    }

    return true;
}
