﻿function clearSearch() {
    var objSearch = document.getElementById("ctl00_cntHeader_objHeader_txtSearch");
    
    //  Clear search if it has not been adjusted.
    if ( objSearch.value == "Search" ) {
        objSearch.value = "";
    }
}

function enlargeImage( strImage ) {
    
    //  Open a new window.
    objWin = window.open( "http://www.selc.ie/app/enlarge-image.aspx?imagefilename=" + strImage, "mywin", "status=0, toolbar=0, location=0, menubar=0, resizable=0, scrollbars=0, height=440, width=500" );
    objWin.focus();
}

function gotoURL( strURL ) {

    //  Change URL.
    window.location = strURL;
}

function setAction( strActionName, strActionValue, strConfirm ) {
    var bConfirm;


    //  Request confirmation if necessary.
    if ( strConfirm != null ) {
        bConfirm = confirm( strConfirm );
    } else {
        bConfirm = true;
    }
    
    if ( bConfirm == true ) {

        //  Set the action.
        document.getElementById( "action_name" ).value = strActionName;
        document.getElementById( "action_value" ).value = strActionValue;

        //  Submit the form.
        document.getElementById( "aspnetForm" ).submit();
    }
}