function popup(url)
{
    betweenWin =window.open(url,'popup','scrollbars=yes,resizable=yes,width=830,height=600,status=no,location=no,toolbar=no');
}

function checkLength( el, maxLength, counterEl ) {
    if ((el.value.length) > (maxLength)) {
        el.value = el.value.substr( 0, (maxLength) );
    }

    if( document.getElementById( counterEl ) ) {
        document.getElementById( counterEl ).innerHTML = el.value.length;
    }
}

function printEvent( el )
{
    var els = $('searchResult').select('.result');
    for( var i = 0; i < els.length; i++ ) {
        if( el != 'null' && els[i] != el ) {
            els[i].addClassName( 'dontprint' );
        } else {
            els[i].removeClassName( 'dontprint' );
        }
    }

    window.print();
}

function printAllEvents()
{
    var els = $('searchResult').select('.result');
    for( var i = 0; i < els.length; i++ ) {
        els[i].removeClassName( 'dontprint' );
    }

    window.print();
}
