	// JavaScript Document
<!--

function buyTickets(performanceKey)
{
	//window.open("http://www.ticketmaster.com/event/" + performanceKey);
	
	
	
	//window.location.href="cyp_wednesday.aspx";
	
	//alert("should call webservice and buy tickets for event " + performanceKey);
	
	window.location = "https://www.woodruffcentertickets.org/symphony/ticket/reserve.aspx?perf="+performanceKey;
}

function buyTMTickets(performanceKey)
{
	window.open("http://www.ticketmaster.com/event/" + performanceKey + "&majorcatid=10002&minorcatid=203");
}


function getArtistWebsite(url)
{
	window.location= url;
	//alert("should go to " + url);
	
	
}

function flip(unit,state) {
	if(document.images){
	document.images[unit].src = '/assets/images/calendarandtickets/v2/' + unit + state + '.gif';
	}
}

function setCurrentMonth(monthId)
{

//	alert("current month should be " + monthId);
	parent.currentMonthFrame.location.href = "setCurrentMonth.aspx?currentMonth="+monthId
}


function openProgramLink(theURL)
{
	window.location=theURL;
}

function openNewURL(theURL)
{
	alert("the url is " +theURL);
	
	//window.open(theURL);
}


function getEventDetails(eventId)
{
	window.location= "/calendarandtickets/eventdetails.aspx?eventId=" +eventId;
	//alert("should be opening EventDetails.aspx?performanceId="+ performanceId );
}

function getChastainEvent(performanceId)
{
	//alert("should go to chastain");
	window.location = "http://www.classicchastain.com/EventDetails.aspx?performanceId=" + performanceId;
}

function handleError(message)
{
	alert("An error occurred: " + message );
}

function openSubscriptionSeries()
{
	window.location = "/calendarandtickets/concertseries/default.aspx";
}

function openNewToTheSymphony()
{
	window.location = "/calendarandtickets/planyourvisit/newtothesymphony.aspx";
}

function openPlanYourVisit()
{
	window.location = "/calendarandtickets/planyourvisit/default.aspx";
}

function openCalendar(monthId)
{
		window.location= "/calendarandtickets/default.aspx?monthId="+monthId;
}


function openPrintableCalendar()
{
	window.location= "/calendarandtickets/calendarhtml.aspx";
}


function processStaffPick(eventId)
{
	
	window.location= "/calendarandtickets/concertseries/staffpicks.aspx";
	
}

function openInviteFriends(eventId)
{
	window.location= "http://www.artsdev.org/orbit/createInvitation.do?orchestraId=5&eventId="+eventId;	
}

function openInternalLink(linkName)
{
	if (linkName == "seating")
		window.location= "/calendarandtickets/planyourvisit/seatingchart.aspx";
	else if (linkName == "dining")
		window.location= "/calendarandtickets/planyourvisit/dining.aspx";
	else if (linkName == "directions")
		window.location= "/calendarandtickets/planyourvisit/directionsandparking.aspx";
	else if (linkName == "invites")
		alert("need to add this! " + linkName); //window.location= "/calendarandtickets/calendarhtml.aspx";
	else if (linkName == "programNotes")
		window.location= "/calendarandtickets/planyourvisit/programnotes.aspx";
	else if (linkName == "purchaseSeasonTickets")
		window.location= "https://www.woodruffcentertickets.org/asotickets/season/submenu.asp";
	
	else alert("asked to go to a link that I don't understand - " + linkName);
	
}

function BioDivClick(divId)
{

    //alert(divSelected);
    var bioDiv = document.getElementById(divId);
    
    if (typeof(bioDiv) != 'undefined')
    {
        if (bioDiv.style.display != 'none')
                bioDiv.style.display = 'none';
        else
                bioDiv.style.display = '';
    }
}

function tabSelected(sender, eventArgs)
{
    var tab = eventArgs.get_tab();
    tabStripCallBack.Callback(tab.ID);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


  

function SeatingChartClick()
{
    //var seatingChartDiv = document.getElementById("seatingchart_box");
    
  /*  if (seatingChartDiv.style.display == "none")
    {
        seatingChartDiv.style.display = "";
    }
    else
    {
        seatingChartDiv.style.display = "none";
    }*/
    
    seatingChartCallBack.Callback(null);
    // just make it re-render, don't change the current performance
    ticketHeaderCallBack.Callback("-1");

}

function PerformanceSelected(performanceId)
{
    ticketHeaderCallBack.Callback(performanceId);
}


//-->

