﻿			// Globals
			// Major version of Flash required
			var requiredMajorVersion = 8;
			// Minor version of Flash required
			var requiredMinorVersion = 0;
			// Minor version of Flash required
			var requiredRevision = 0;



//openPopWin('/hope_flash.html', 491, 358, 'directories=no,status=no,scrollbars=no,resize=no,menubar=no','cen','cen');
function drawPopUp()
{
	//var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	//var flashSniffer = new FlashSniffer();
	//var showFlash = true;
	//if (flashSniffer.version.getValue()<8) showFlash = false;
	//if (isMac) showFlash = true;
	//if (showFlash) {
		document.write('<script>');
		document.write('openPopWin("/Summer08.html", 1009, 634, "directories=no,status=no,scrollbars=no,resize=no,menubar=no","cen","cen");');
		document.write('</script>');
   	//}
	//else {
		//document.write('<a href="http://www.adobe.com/go/getflash/"><img src="/flash/getflash_footer.gif" width="566" height="79" border="0" /></a>');
		
	//}
}
function drawPromoFlash()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
		document.write('<div id="promo_flash">');
        document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="566" height="79" id="promo" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/dsoEvents.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#fff" />');
	    document.write('<param name="wmode" value="transparent" />');
	    document.write('<embed src="/Flash/dsoEvents.swf" wmode="transparent" menu="false" quality="high" width="566" height="79" name="promo" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    document.write('</div>');
	}
	else {
		document.write('<a href="http://www.adobe.com/go/getflash/"><img src="/flash/getflash_footer.gif" width="566" height="79" border="0" /></a>');
		
	}
}
function drawHomeFlash()
{
	
	// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
	var hasProductInstall = DetectFlashVer(6, 0, 65);

	// Version check based upon the values defined in globals
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

	// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
	if ( hasProductInstall && !hasReqestedVersion ) {
		// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
		// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
		// DO NOT MODIFY THE FOLLOWING FOUR LINES
		// Location visited after installation is complete if installation is required
		var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
		var MMredirectURL = window.location;
		document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		var MMdoctitle = document.title;

		var str = AC_FL_RunContent(
			"src", "flash/dso_hp_expressInstall",
			"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
			"width", "1003",
			"height", "470",
			"align", "middle",
			"id", "detection",
			"quality", "high",
			"bgcolor", "#FFFFFF",
			"name", "detection",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
		alert(str);
	} else if (hasReqestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
			"src", "flash/dsoHome",
			"width", "1003",
			"height", "470",
			"align", "middle",
			"id", "main",
			"quality", "high",
			"bgcolor", "#FFFFFF",
			"wmode", "transparent",
			"name", "main",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",			
			"codebase", "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = ''
		+ '<a href="http://www.adobe.com/go/getflash/"><img src="flash/NO_FLASH_JACK.jpg" width="1003" height="470" border="0" /></a>';
		document.write(alternateContent);  // insert non-flash content
		//document.url = "/flash/missing";
	}
	
	
	/*var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1003" height="470" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/dsoHome.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#dedede" />');
	    document.write('<param name="wmode" value="transparent" />');
	    document.write('<embed src="/Flash/dsoHome.swf" menu="false" wmode="transparent" quality="high" width="1003" height="470" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    
	    
	}
	else {
    document.write('<p>Need Macromedia Flash Player?<br /><a href="http://www.macromedia.com/downloads/" target="_blank" style="text-decoration: underline; color:#fff;">Click here</a> to download and install.</p>');
		
	}*/
}

function drawGalleryFlash()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="502" height="279" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/gallery.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#000" />');
	    document.write('<embed src="/Flash/gallery.swf" menu="false" quality="high" width="502" height="279" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    
	    
	}
	else {
				document.write('<p>Need Macromedia Flash Player?<br /><a href="http://www.macromedia.com/downloads/" target="_blank" style="text-decoration: underline; color:#fff;">Click here</a> to download and install.</p>');
		
	}
}

function drawSeatingFlash()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="485" height="353" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/dso_seat_export.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#dedede" />');
	    document.write('<param name="wmode" value="transparent" />');
	    document.write('<embed src="/Flash/dso_seat_export.swf" menu="false" wmode="transparent" quality="high" width="485" height="353" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    
	    
	}
	else {
				document.write('<p>Need Macromedia Flash Player?<br /><a href="http://www.macromedia.com/downloads/" target="_blank" style="text-decoration: underline; color:#fff;">Click here</a> to download and install.</p>');
		
	}
}
function drawSeatingFlash2()
{
	var isMac = window.navigator.platform.indexOf("Mac")!=-1;
	var flashSniffer = new FlashSniffer();
	var showFlash = true;
	if (flashSniffer.version.getValue()<8) showFlash = false;
	if (isMac) showFlash = true;
	if (showFlash) {
	    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="485" height="353" align="top" VIEWASTEXT>');
	    document.write('<param name="allowScriptAccess" value="sameDomain" />');
	    document.write('<param name="movie" value="/Flash/dso_seat_export_v2.swf" />');
	    document.write('<param name="quality" value="high" />');
	    document.write('<param name="bgcolor" value="#dedede" />');
	    document.write('<param name="wmode" value="transparent" />');
	    document.write('<embed src="/Flash/dso_seat_export_v2.swf" menu="false" wmode="transparent" quality="high" width="485" height="353" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />');
	    document.write('</object>');
	    
	    
	}
	else {
				document.write('<p>Need Macromedia Flash Player?<br /><a href="https://www.macromedia.com/downloads/" target="_blank" style="text-decoration: underline; color:#fff;">Click here</a> to download and install.</p>');
		
	}
}


function updateCalendar(month, year) {
    var url = '/calendar.aspx';
    $.get(url, 
        { m: month, y: year }, 
        function(html) {
            $('#calendar').html(html);
        }
    );
}

var popupTimeout = '';

function showPopupInfo(concertId, eventId, concertId2, eventId2) {
    if (popupTimeout != null) clearTimeout(popupTimeout);
    //var url = '/popup.aspx?perf=' + concertId;
    var url = '/popup.aspx';

    if (!concertId2) {
        $.get(url,
        { perf: concertId, selected: eventId },
        function(html) {
            $('#popup').html(html);
        }
    );
    }
    else {
        $.get(url,
        { perf: concertId, selected: eventId, perf2: concertId2, selected2: eventId2 },
        function(html) {
            $('#popup').html(html);
        }
    );
    }
        
}


function hidePopupInfo() {
    popupTimeout = setTimeout(function(){
        $('#popup').empty();
    }, 1000);
}


function showPopToolTip(linkDay, concertId, eventId, concertId2, eventId2) {
    var url = '/poptip.aspx';

    if (!concertId2) {
        $.get(url,
        { perf: concertId, selected: eventId },
        function(html) {
            $('#poptip').html(html);
        }
    );
    }
    else {
        $.get(url, { perf: concertId, selected: eventId, perf2: concertId2, selected2: eventId2 },
        function(html) {
            $('#poptip').html(html);
        });
    

//        linkDay = "#d" + linkDay;
//        alert(linkDay);
//        var pos = $('#d14').parent('td').position();
//        alert(pos.left + ", " + pos.top);
//        var leftEdge = $("#d14").position().left;
//        var topEdge = $("#d14").position().top;
//        alert('Left: ' + leftEdge + ' Top: ' + topEdge);
//        var topmargin = ($("#poptip").height() / 2) * (-1);
//        var rightmargin = ($("#poptip").width() / 2) * (-1);
//        alert('topmar: ' + topmargin + ' rightmar: ' + rightmargin);
        $('#poptip').css({
        "display": "block",
        "z-index": "4"                            
        });
    }
}

function closePopToolTip() {
    $('#poptip').css("display", "none").css("z-index","1");
}

function showPart(fObj,type ,obj){

    var displayed = null;       
    if ((type == -1) || (type == 2))
    {
	    displayed = document.getElementById("part1");
	    displayed.style.display = "none";
    }
    else
    {
	    displayed = document.getElementById(obj);
	    displayed.style.display = "inline";
	}
}

//================
// Popup Variables
//================
var preloadFlag = false;
var popWin = null;  // Use this when referring to pop-up window
var winCount = 0;
var winName = "popWin";

function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
//alert("ALery");
 var d_winLeft = 20;  // Default, pixels from screen left to window left
 var d_winTop = 20;   // Default, pixels from screen top to window top

 winName = "popWin" + winCount++; // Unique name for each pop-up window

 closePopWin();      // Close any previously opened pop-up window

 if (openPopWin.arguments.length >= 4)  // Any additional features?
  winFeatures = "," + winFeatures;

 else
  winFeatures = ""

 if (openPopWin.arguments.length == 6)  // Location specified
  winFeatures += getLocation(winWidth, winHeight, winLeft, winTop);

 else
  winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop);
  popWin = window.open(winURL, winName, "width=" + winWidth + ",height=" + winHeight + winFeatures);
    if (popWin.opener == null)
  	popWin.opener = window;
  	

 }

function closePopWin(){    // close pop-up window if it is open
 // Do not close if early IE
 if ((navigator.appName != "Microsoft Internet Explorer") || (parseInt(navigator.appVersion) >=4)) {
  if(popWin != null) {
   if(!popWin.closed) {
    popWin.close();
   }
  }
 }
}

function getLocation(winWidth, winHeight, winLeft, winTop){
 var winLocation = ""

 if (winLeft < 0)
  winLeft = screen.width - winWidth + winLeft;
 if (winTop < 0)
  winTop = screen.height - winHeight + winTop;
 if (winTop == "cen")
  winTop = (screen.height - winHeight)/2 - 20;
 if (winLeft == "cen")
  winLeft = (screen.width - winWidth)/2;
 if (winLeft>0 && winTop>0)
  winLocation =  ",screenX=" + winLeft + ",left=" + winLeft + ",screenY=" + winTop + ",top=" + winTop;
 else
  winLocation = "";
 return winLocation;
}
