﻿// JScript File

    
        // re-implement contains method for non - IE browsers
        function re_implement1()
        {
            try
            {
                if (window.Node && Node.prototype && !Node.prototype.contains)
                {
	                Node.prototype.contains = function (arg) {
		                return !!(this.compareDocumentPosition(arg) & 16)
	                }
                }
             }
             catch(e)
             {
                 // alert('TicketTypeUC.js, on load Error: ' + e.message + ' occurred.'); 
             }   
        }
        _nwBodyOnLoadFunctionNames.push("re_implement1");
      
        
        
    function SaveCheckedTicket(oRadio) {
        try
        {
            // mark current radio as selected        
            SelectTicket(oRadio);
            
            // save current radio values
            document.getElementById("hidCheckedTicket").value = oRadio.getAttribute("TicketId");
            document.getElementById("hidCheckedTicketId").value = oRadio.id;
         }
        catch(e)
        {
             // alert('TicketTypeUC.js, SaveCheckedTicket  Error: ' + e.message + ' occurred.'); 
        }   
    }
    
    function SelectTicket(oRadio) {
        return;
        var oTicketsTable = oRadio.parentNode.parentNode.parentNode;
        
        // enphase current chosen ticket
        for(var iIndx = 0; iIndx < oTicketsTable.rows.length; iIndx ++) {
            var oLabelCell = oTicketsTable.rows[iIndx].cells[1];
            if(!oTicketsTable.rows[iIndx].cells[0].contains(oRadio))
                oLabelCell.style.color = "silver";
            else
                oLabelCell.style.color = "black";
        }
    }

