    
	var eid = get_eid();
	var url="http://www.greatseats.com/feeds/SearchTicketsByEventID2.asp?tixloc=sq&EventID="+eid + "&rend=" + Math.random();   
    
	function get_eid()
	{
		var urlSplit = window.location.href.split('/');
		return urlSplit[urlSplit.length-2];
	}
	
	function showtickets1()
	{
		 framework.filter.apply({params:{ga:0}});
		 $('div_ticket_filter_header_empty').hide();
		 $('div_ticket_filter_header').show();
		 $('div_ticket_filter_header').show();
		 $('div_tab_tickets').setStyle({background: '#FFFFFF'});
		 $('div_tab_tickets').setStyle('border-bottom: 0px');
		 $('div_tab_parking').setStyle({background: '#DAE0EB'});
		 $('div_tab_parking').setStyle('border-bottom: 1px solid #8BB3FF');
    }
	
	function showparking1()
	{
		framework.filter.apply({params:{ga:2}});
		$('div_ticket_filter_header_empty').show();
		$('div_ticket_filter_header').hide();
		$('div_ticket_filter_header').hide();
		$('div_tab_tickets').setStyle({background: '#DAE0EB'});
		$('div_tab_tickets').setStyle('border-bottom: 1px solid #8BB3FF');
		$('div_tab_parking').setStyle({background: '#FFFFFF'});
		$('div_tab_parking').setStyle('border-bottom: 0px');
	}
	
	
	var orgBColor = "";
    var backColor = "#FFFF00";
    var preEl = null;
    //BOGDAN don't use addClassName, because it is slow in IE8
    function HighLightTR(el){
      if(preEl != null && typeof(preEl)!='undefined') {
	     if(el==preEl) return false;
	     if($(preEl)!=null) 
		 {
			//$(preEl).removeClassName('HighlightedTableItem');
			$(preEl).setStyle({backgroundColor:orgBColor});
		 }
      }
      if(!el) return false;
      orgBColor = $(el).getStyle('backgroundColor');
      $(el).setStyle({backgroundColor:backColor});
	  //$(el).addClassName('HighlightedTableItem');
      preEl = el;
      return true;
    }
		

		
    function seatquest_seat_selected(id,type,manual)
    {
	    var tr = $("cls_" + id);
        if (tr!=null)
        {
            
            //undo_change_zoom_button();
            HighLightTR(tr);
            if(manual==true)
            {
                    if (type=='not_on_map' || type == 'GA' || type == 'parking'){id=type;}
                    framework.zoomer.highlight_ticket(id);
                    return;
            } 
		    
            firstTableOffset = $('div_ticket_list').down().offsetTop;
            $('div_ticket_list').scrollTop = tr.offsetParent.offsetTop - firstTableOffset + tr.offsetTop - $('div_ticket_list').offsetHeight/2;
		    return;
            
        } 
        
    }	

        function seat_selected(id,type,manual)
        {
            ///<sumary>zoomer callback - fires when the user selects a seat in the zoomer</sumarry>
            ///<param name="id">the ticket id</param>
            
            // ELI the rest of the parameters are not passed by the zoomer, they were added since we use them in our seatquest table,
            //    unrelated to the framework.
            seatquest_seat_selected(id,type,manual);
        }
		
		
        
        function get_values()
        {
            ///<sumary>this function will be called by the filter class to collect 
            ///the values for the filter operation. fitres everytime framework.filter.apply() is executed.</sumarry>
            ///<return name="params">you must return a params object with all the values listed below.</return>       
            var params= {
                min:            $('input_min') ? $('input_min').value : null,   //ELI minimum price, range (0-999999)             
                max:            $('input_max') ? $('input_max').value : null,   //ELI maximum price, range (0-999999) 
                quantity:       $('select_qauntity') ? ($('select_qauntity').value == '?' ? 0:$('select_qauntity').value) : null,   //ELI quantity of ticket sets to show, range (''-all,1-999999)  
                ticket_type:    '3',   //ELI ticket board to show, range (''-all,1-TicketsNow,2-TicketNetwork,3-
                fees:           false, //ELI show seller fees, range(true,false)
                ga:             0,    //ELI show tickets from a category of, range [0-all tickets except ga types, 1-ga (ga type), 2-parking (ga type)]
                sort:null                              //ELI column to sort, range ('price','available','row','section')
            }
            return params;
        }
        
        function set_values(params)
        {
            ///<sumary>fires when you call framework.filter.reset().</sumarry>
            ///<return name="params">you must return a params object (see reference in get_values) with all the values listed below.</return>       
			
			return;
            //ELI zero everything out.
            if(params.min!=null && $('input_min'))            $('input_min').value=params.min;
            if(params.max!=null && $('input_max'))            $('input_max').value=params.max;
            if(params.quantity!=null && $('select_qauntity')) $('select_qauntity').value=params.quantity;
            if(params.ticket_type!=null && $('select_tb'))    $('select_tb').value=params.ticket_type;
            if(params.fees!=null && $('input_show_fees'))     $('input_show_fees').checked=params.fees;
            if(params.ga!=null) select_tab(params.ga==2 ? 1:0);
                    
        }

        function pre_filter()
        {
            ///<sumary>fires before a filtering operation starts. fires only when you use framewrok.filter.apply()</sumarry>
        
            //ELI optional - DISABLE ELEMENTS
            //disable_elements(true);
            
            //ELI optional - show filtering message
            //show_message("Filtering...");
        }
        
        function post_filter(stats)
        {
            ///<sumary>fires after a filtering operation has ended. fires only when you use framewrok.filter.apply()</sumarry>
            ///<param name="stats">stats object contains the current values in filter class memory plus extra statistical data that will
            ///will help you to display extra information about the last filter operation.
            ///var stats={
            ///    params{min:int,max:int,quantity:string,ticket_type:string,fees:boolean,ga:int,sort:string,
            ///           sorting_options:{
            ///             id:string       //current sort column
            ///             order:string    //current sorting order ('ascending','descending')
            ///           }
            ///          }}
            /// NOTE: the stat object will have more values in the future, such as the amount of rows or tickets shown after last filtering opperation.
            ///</param> 

            //ELI optional - ENABLE ELEMENTS
            //disable_elements(false);
               
            //change_sorting_arrow(stats);
                    
            
            //ELI optional - hide filtering message
            //hide_message();
            //loading_tickets = false;
			//BOGDAN parking tab
			if(stats.xsl.num_of_parking > 0)
			{
				// $('javascriptnotenabledAlert').hide();
				$('div_tab_parking').show();
				$('div_tab_parking').innerHTML = '<div style="float:left;margin-left:20px;"><a href="javascript:void(0);" onclick="showparking1()" style="display:block;"><img src="/images/parking_pass_car.gif" border="0"></a></div><div style="float:right;margin-right:20px;"><span class="black16bold"><a href="javascript:void(0);" onclick="showparking1()" style="display:block;">Parking Passes</a></span></div>';
				$('div_tab_parking').setStyle({background: '#DAE0EB'});
				$('div_tab_parking').setStyle('border-top: 1px solid #8BB3FF');
				$('div_tab_parking').setStyle('border-left: 1px solid #8BB3FF');
				$('div_ticket_tab_container').setStyle('border-right: 1px solid #8BB3FF');
			}
			else
			{
				 $('div_tab_parking').innerHTML = '';
				 $('div_tab_parking').setStyle('border-bottom: 1px solid #8BB3FF');
				 $('div_tab_parking').setStyle('border-top: 0px');
				 $('div_tab_parking').setStyle('border-left: 0px');
				 $('div_tab_parking').setStyle('border-right: 0px');
				 $('div_tab_parking').setStyle({background: '#FFFFFF'});
				 $('div_tab_parking').setStyle('height: 26px');
				 $('div_tab_parking').setStyle('width: 201px');
				 $('div_tab_tickets').innerHTML = '<span class="black16bold">Tickets</span>';
			}
            //alert(stats.xsl.num_of+parking);
            //BOGDAN display message if the resulting list is empty
            //if(stats.xsl.num_of_rows == 0) 
            //{
            //    show_message('<br><br>No tickets are available');
            //    hide_loader();
            //}
        }
        
               
        //ELI start the framework.
        var args={
            filter:{
                id:'div_ticket_list',                           //ELI id of the DIV that will contain the ticket list.
                xml_url:url,                                    //ELI link to the ticket XML
                xsl_url:"/seatquest/live/customer_api.xsl",                //ELI link to the table template XSL.
                get_values:get_values,                          //ELI callback to your get_values function.
                set_values:set_values,                          //ELI callback to your set_values function.
                pre_filter:pre_filter,                          //ELI callback to your pre_filter function.
                post_filter:post_filter,                        //ELI callback to your post_filter function.
                convert_from_tb:'tickets_solutions',               //ELI indicate which ticketboard to convert incoming XML from.    
                string_params:{'cls_seatquest_table':'data', 
							   'willcallstatus':willcallstatus,
							   'islocal':islocal,
							   'onlygstickets':onlygstickets},   //ELI set <table> class name of ticket list.
                show_all:true,                                   //ELI show all tickets and ignore the sq_coords and sq_ga flags in XML.
				parking_tab:true,								//BOGDAN parking passes are not shown in tickets list if true. Overrides show_all for sq_ga flag
				no_filtering_for_parking:true
            },

            zoomer:{
                id:'flashcontent',                  //ELI id of the DIV that will contain the zoomer object.
                seat_selected:seat_selected,        //ELI callback to your seat_selected function.
                help:0,                             //ELI add/remove the help message when the zoomer loads.
                zoom_ratio:1.5,                     //ELI control the zoom ratio of the zoom_in(), zoom_out() operations.
                swf_url:'http://origin-webservice2.seatquest.com/all/zoomer_api_253.swf',             //ELI URL to the swf object of the zoomer.
                map_xml:'http://origin-webservice2.seatquest.com/all/generate_l.aspx%3F'+eid+'%2C8096%2C1',  //ELI URL to the zoomer configuration XML.
                theme:'0xE6EDF9',                                                    //ELI specify color for dialogs in the zoomer
                stmap:stmap_link,     //ELI URL to static map to show in the zoomer instead of SeatQuest's venue map.
				sc:'0xC08181',
				callback:null
            }
        }
        framework.load(args);

