var myTable,pageCount=200,currentArray; function loadFlashJSONTickets(a,b,d,c){var e=(new Date).getTime();e=new Ajax.Request("/javascript/jsontix_v2.shtml?productionId="+a,{method:"get",onSuccess:function(f){pageData=f.responseText.evalJSON();ticketArray=pageData.tickets;initGroupHash();buildTable();swfobject.embedSWF("http://www.vividseats.com/flash9/VividSeatsMap_V6.swf?eventId="+b+"&venueId="+d+"&productionId="+a+c,"nflashcontent","510","725","9","expressInstall.swf",flashvars,params,attributes)},onFailure:function(){window.location= "http://www.vividseats.com/shop/viewTicketsStatic.shtml?productionId="+a}})} function loadNoFlashJSONTickets(a,b){var d=document.getElementById("notes_container");d.parentNode.removeChild(d);var c=new Ajax.Request("/javascript/jsontix_noflash_v2.shtml?productionId="+a,{method:"get",onSuccess:function(e){pageData=e.responseText.evalJSON();ticketArray=pageData.tickets;flashEnabled=false;document.getElementById("guarantee_container").style.display="";document.getElementById("venue_image").innerHTML='<img src="'+b+'" width="500" height="500" style="padding-top:40px"/>';document.getElementById("venue_image").appendChild(d); buildTable();document.getElementById("venue_image").style.height="650px";document.getElementById("ticketlist").style.height="637px";document.getElementById("innerb_id").style.height="630px";d.style.margin="75px 0px 0px 4px";d.style.width="98%"},onFailure:function(){window.location="http://www.vividseats.com/shop/viewTicketsStatic.shtml?productionId="+a}})}function setPageCount(a){pageCount=a;buildTable(currentArray,0)} function resetTable(){pfit=false;document.getElementById("qty").selectedIndex=0;buildTable();document.getElementById("sectionHeader").style.backgroundImage="none";document.getElementById("priceHeader").style.backgroundImage="url(http://www.vividseats.com/v2/ticketpages/sortArrow_"+pageTheme+".gif)"}var pfit=false; function setPriceFilter(a){try{var b=a[0].price.replace(",",""),d=a[a.length-1].price.replace(",","");a=0;document.getElementById("minprice").options.length=0;opt=document.createElement("OPTION");document.getElementById("fmaxprice").options.length=0;var c=parseInt(b/50),e=Math.round(d/50+50);for(a=c;a<=e;a++){opt=document.createElement("OPTION");b=a*50;var f=document.getElementById("minprice");f.options[f.options.length]=new Option(b,b);var h=document.getElementById("fmaxprice");h.options[f.options.length]= new Option(b,b);if(a*50>=1E3)a+=9}document.getElementById("minprice").selectedIndex=0;document.getElementById("fmaxprice").selectedIndex=document.getElementById("fmaxprice").options.length-1}catch(g){}}var flashMovie;function init(){if(document.getElementById)flashMovie=document.getElementById("nflashcontent")}var sectionList=new ArrayList;function toggleSection(a,b){if(b){b=sectionList.IndexOf(a,0);b<0&&sectionList.Add(a)}else{b=sectionList.IndexOf(a,0);b>=0&&sectionList.RemoveAt(b)}} var groupList=new ArrayList;function toggleGroup(a,b){if(b){b=groupList.IndexOf(a,0);b<0&&groupList.Add(a)}else{b=groupList.IndexOf(a,0);b>=0&&groupList.RemoveAt(b)}} function updateCA(){currentArray=[];for(i=0;i<ticketArray.length;i++){var a=ticketArray[i],b=false,d=false;if(sectionList.Count()>0){b=true;if(sectionList.IndexOf(a.d,0)>=0)d=true}var c=false;if(groupList.Count()>0){b=true;a=groupHash.get(a.d);if(a!=undefined&&groupList.IndexOf(a,0)>=0)c=true}b&&!c&&!d||(currentArray[currentArray.length]=ticketArray[i])}}function resetMap(){sectionList.Clear();groupList.Clear();applyFilters()} function flashHover(a){if(flashEnabled){init();flashMovie.flashHover(a)}}function flashOut(a){if(flashEnabled){init();flashMovie.flashOut(a)}}var groupHash=new Hash,ntGroups=new ArrayList;function initGroupHash(){for(i=0;i<pageData.sections.length;i++)groupHash.set(pageData.sections[i].i,pageData.sections[i].g);for(i=0;i<pageData.groups.length;i++)pageData.groups[i].t=="1"&&ntGroups.Add(pageData.groups[i].i)}function updateSeatGrid(){applyFilters()} function pageJump(a,b){buildTable(a,(b-1)*pageCount)} function buildTable(a,b){var d=(new Date).getTime();docBody=document.getElementById("ticketlist");resDiv=document.getElementById("results");docBody.innerHTML="";currentArray=a==null?ticketArray.slice(0):a.slice(0);if(b==null)b=0;if(showFeatured==false&&pageData.sections&&b==0){mappedList=[];unmappedList=[];notixList=[];for(i=0;i<currentArray.length;i++){var c=currentArray[i];a=groupHash.get(c.d);if(ntGroups.IndexOf(a,0)>=0&&sectionList.IndexOf(c.d,0)<0){c.notix=true;notixList.push(c)}else c.d=="0"? unmappedList.push(c):mappedList.push(c)}currentArray=mappedList.concat(notixList,unmappedList)}if(!pfit){setPriceFilter(currentArray);pfit=true}count=currentArray.length;myTable=document.createElement("table");myTable.width="100%";myTable.className="gray_sm";myTable.cellPadding="0";myTable.cellSpacing="0";myTable.style.paddingBottom="5px";myTable.style.margin="0px";a=0;d=b+pageCount;if(d>currentArray.length)d=currentArray.length;myTableFooter=document.createElement("tfoot");row=document.createElement("tr"); cell=document.createElement("td");cell.colSpan="6";cell.align="left";var e=currentArray.length%pageCount;c=(currentArray.length-e)/pageCount;if(e>0)c+=1;e=b%pageCount;e=(b-e)/pageCount;e+=1;var f="Page "+e+" of "+c;if(c>1){f+=" | Page: ";for(i=1;i<=c;i++)f=i!=e?f+'<a href="javascript:pageJump(currentArray,'+i+')">'+i+"</a>&nbsp;":f+"<b>"+i+"</b>&nbsp;"}cell.style.padding="5px 0px 5px 5px";cell.innerHTML=f;row.appendChild(cell);myTableFooter.appendChild(row);myTable.appendChild(myTableFooter);myTableBody= document.createElement("tbody");e=document.createElement("tr");f=document.createElement("td");f.colSpan="6";var h=document.createElement("div");h.className="innerb";h.id="innerb_id";var g=document.createElement("table");g.className="gray_sm";g.cellPadding="0";g.cellSpacing="0";g.style.paddingBottom="5px";g.style.margin="0px";myInnerTableBody=document.createElement("tbody");c="ticketrow_light";var j=false,k=false;for(i=b;i<d;i++){c=currentArray[i];a++;if(pageData.sections&&c.d=="0"&&!j&&!showFeatured){row= document.createElement("tr");cell=document.createElement("td");cell.colSpan=6;cell.style.paddingTop="5px";cell.style.fontSize="14px";cell.style.paddingTop="4px";cell.innerHTML="<b><u>UNMAPPED LISTINGS</u></b>";row.appendChild(cell);myInnerTableBody.appendChild(row);j=true}else if(pageData.sections&&c.notix==true&&!k&&!showFeatured){row=document.createElement("tr");cell=document.createElement("td");cell.colSpan=6;cell.style.paddingTop="5px";cell.style.fontSize="14px";cell.style.paddingTop="4px";cell.innerHTML= "<b><u>PARKING AND OTHER NON-TICKET LISTINGS</u></b>";row.appendChild(cell);myInnerTableBody.appendChild(row);k=true}myInnerTableBody.appendChild(createRow(c))}g.appendChild(myInnerTableBody);h.appendChild(g);f.appendChild(h);e.appendChild(f);myTableBody.appendChild(e);myTable.appendChild(myTableBody);docBody.appendChild(myTable);_rz="Showing "+new Number(b+1)+" - "+d+" of "+currentArray.length+" groups.";if(!flashEnabled){docBody.style.height="637px";h.style.height="630px"}resDiv.innerHTML=_rz} var currentClass=""; function createRow(a){row=document.createElement("tr");if(currentClass=="ticketrow_light"){currentClass="ticketrow_dark";row.className="ticketrow_dark"}else{currentClass="ticketrow_light";row.className="ticketrow_light"}var b="flashHover("+a.d+")";row.onmouseover=new Function(b);b="flashOut("+a.d+")";row.onmouseout=new Function(b);cell=document.createElement("td");cell.width="30";cell.style.textAlign="center";if(a.f=="0"){sec=document.createElement("b");sec.appendChild(document.createTextNode(" "))}else{sec=document.createElement("img"); sec.border="0";sec.src="https://www.vividseats.com/v2/newimages/featuredTicket.jpg";sec.width="16";sec.height="16";sec.alt="Preferred Seller"}cell.appendChild(sec);row.appendChild(cell);cell=document.createElement("td");cell.width="70";cell.style.textAlign="center";cell.appendChild(document.createTextNode(a.s));if(a.s.indexOf("..")>0)cell.innerHTML="<span onmouseover=\"javascript:return overlib('"+a.l.toUpperCase()+'\');" onmouseout="javascript:return nd();">'+a.s+"</span>";row.appendChild(cell); cell=document.createElement("td");myDiv=document.createElement("div");myDiv.style.width="65px";cell.width="65";cell.style.textAlign="center";a.r==""?myDiv.appendChild(document.createTextNode(" ")):myDiv.appendChild(document.createTextNode(a.r));cell.appendChild(myDiv);row.appendChild(cell);cell=document.createElement("td");cell.width="33";cell.style.textAlign="center";if(a.n!="")cell.innerHTML='<img src="https://www.vividseats.com/v2/newimages/featured/notepad.gif" width="21" height="18" border="0" onmouseover="javascript:return overlib(\''+ a.n.toUpperCase()+'\');" onmouseout="javascript:return nd();"> ';else cell.appendChild(document.createTextNode(" "));row.appendChild(cell);cell=document.createElement("td");cell.width="74";cell.style.textAlign="center";b=parseFloat(a.p.replace(",",""));cell.appendChild(document.createTextNode("$"+a.p));row.appendChild(cell);cell=document.createElement("td");cell.style.width="130px";cell.style.textAlign="center";frm=document.createElement("form");frm.action="https://www.vividseats.com/checkout/addItemToCart.shtml"; frm.method="GET";sel=document.createElement("select");sel.name="quantity";sel.style.width="43px";b=a.q;if(b%2==0&&b!=1)for(qt=b;qt>=2;qt-=2)sel.options[sel.options.length]=new Option(qt,qt);else{sel.options[sel.options.length]=new Option(b,b);for(qt=b-2;qt>=1;qt--)sel.options[sel.options.length]=new Option(qt,qt)}frm.appendChild(sel);img=document.createElement("INPUT");img.type="image";img.value="Submit";img.alt="Add to Cart";img.title="Add to Cart";img.src=buyButton;img.style.margin="0px 0px 0px 18px"; img.style.verticalAlign="bottom";frm.appendChild(img);qinp=document.createElement("INPUT");qinp.type="hidden";qinp.name="ticketId";qinp.value=a.i;frm.appendChild(qinp);qinp=document.createElement("INPUT");qinp.type="hidden";qinp.name="productionId";qinp.value=pageData.global[0].productionId;frm.appendChild(qinp);cell.appendChild(frm);row.appendChild(cell);return row}function sortprice(a){a?currentArray.sort(sortByPriceAsc):currentArray.sort(sortByPriceDesc);buildTable(currentArray)} function sortsection(a){a?currentArray.sort(sortBySectionAsc):currentArray.sort(sortBySectionDesc);buildTable(currentArray)}function sortByQty(a,b){var d=a.q,c=b.q;return showFeatured?a.f==b.f?d<c?-1:d>c?1:0:a.f=="1"?-1:1:d<c?-1:d>c?1:0}function sortByPriceDesc(a,b){var d=parseFloat(a.p.replace(",","")),c=parseFloat(b.p.replace(",",""));return showFeatured?a.f==b.f?d<c?-1:d>c?1:0:a.f=="1"?-1:1:d<c?-1:d>c?1:0} function sortByPriceAsc(a,b){var d=parseFloat(a.p.replace(",","")),c=parseFloat(b.p.replace(",",""));return showFeatured?a.f==b.f?c<d?-1:c>d?1:0:a.f=="1"?-1:1:c<d?-1:c>d?1:0}function sortBySectionDesc(a,b){var d=a.s.toLowerCase(),c=b.s.toLowerCase();return showFeatured?a.f==b.f?d<c?-1:d>c?1:0:a.f=="1"?-1:1:d<c?-1:d>c?1:0}function sortBySectionAsc(a,b){var d=a.s.toLowerCase(),c=b.s.toLowerCase();return showFeatured?a.f==b.f?c<d?-1:c>d?1:0:a.f=="1"?-1:1:c<d?-1:c>d?1:0} function filterQty(a){var b=[];for(i=0;i<currentArray.length;i++)if(currentArray[i].q-a==0||1-(currentArray[i].q-a)%2&&currentArray[i].q-a>0)b[b.length]=currentArray[i];buildTable(b)}var priceSort=true,priceDesc=false;priceSort=true;var secDesc=false; function doPriceSort(){priceSort=true;if(priceDesc){document.getElementById("list_cate1").style.backgroundImage="none";document.getElementById("list_cate4").style.backgroundImage="url(http://www.vividseats.com/v2/ticketpages/sortArrow_"+pageTheme+"_up.gif)";priceDesc=false}else{document.getElementById("list_cate1").style.backgroundImage="none";document.getElementById("list_cate4").style.backgroundImage="url(http://www.vividseats.com/v2/ticketpages/sortArrow_"+pageTheme+".gif)";priceDesc=true}applyFilters()} function doSectionSort(){priceSort=false;if(secDesc){document.getElementById("list_cate4").style.backgroundImage="none";document.getElementById("list_cate1").style.backgroundImage="url(http://www.vividseats.com/v2/ticketpages/sortArrow_"+pageTheme+"_up.gif)";secDesc=false}else{document.getElementById("list_cate4").style.backgroundImage="none";document.getElementById("list_cate1").style.backgroundImage="url(http://www.vividseats.com/v2/ticketpages/sortArrow_"+pageTheme+".gif)";secDesc=true}applyFilters()} var oqty=0,showFeatured=false;function updatePreferred(){if(showFeatured==false&&document.getElementById("showFeatured").checked||showFeatured==true&&!document.getElementById("showFeatured").checked)applyFilters()} function applyFilters(){showFeatured=document.getElementById("showFeatured").checked?true:false;updateCA();var a=[],b=parseFloat(document.getElementById("minprice").value),d=parseFloat(document.getElementById("fmaxprice").value);if(b==null||isNaN(b))b=0;if(d==null||d==0||isNaN(d))d=999999999;var c=parseInt(document.getElementById("qty").value);if(c!=oqty){b=0;d=99999999}for(i=0;i<currentArray.length;i++)if((currentArray[i].q-c==0||c==0||isOdd(currentArray[i].q)&&isOdd(c)&&c<currentArray[i].q||!isOdd(currentArray[i].q)&& currentArray[i].q-c>1)&&(parseFloat(currentArray[i].p.replace(",",""))<=d||d==7E3)&&parseFloat(currentArray[i].p.replace(",",""))>=b)a[a.length]=currentArray[i];if(a.length==0)noResults();else{currentArray=a.slice(0);if(c!=oqty){setPriceFilter(a);oqty=c}if(priceSort&&priceDesc)sortprice(true);else if(priceSort&&!priceDesc)sortprice(false);else if(secDesc)sortsection(true);else secDesc||sortsection(false)}}function isOdd(a){return 1-a%2} function noResults(){docBody=document.getElementById("ticketlist");docBody.innerHTML='<br><strong><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size=3>No results found. Please try and modify your filter selections.</font></strong>';resDiv.innerHTML="No results found."}function togglePopup(a,b){b=b?"none":"block";document.getElementById(a).style.display=b}$(document).ready(function(){$("#help_info_text").load("http://www.vividseats.com/static/helpprod.htm")});
