if(document.getElementById('lblSeasonSelectTypes'))
{
	document.getElementById('lblSeasonSelectTypes').innerHTML = 'Select Quantity Here!';
}

//if(document.getElementById('ContinueButton'))
//{
//	document.getElementById('ContinueButton').innerHTML = '<input type="button" name="btnContinue" value="Continue Shopping" onclick="window.location = \'http://www.balloonfestival.com/tickets/\'" id="btnContinue" />';
//}

var bpSetReq;
if(document.location.href && document.location.href.indexOf('ViewBasket.aspx') > 0)
{
	var hasAdultGeneral = false;
	var hasChildGeneral = false;
	var hasAdultValue = false;
	var hasChildValue = false;
	var hasBalloonRide = false;
	var hasBlueSky = false;
	var hasAdultTeenSensation = false;
	var hasChildTeenSensation = false;
	var hasKidsClub = false;
	var hasParking = false;
	var hasMerch = false;

	//if(typeof bpTest != "undefined")
	//{
		var subT = document.getElementById('navbar_lnkSubtotal').innerHTML;

		if(typeof bpStop == "undefined")//(typeof bpSubT == "undefined" || subT != bpSubT)// || subT == 'Subtotal: $0.00' )
		{
			if(document.getElementById('basketPopup'))
			{
				if(document.getElementById('EventDataList'))
				{
					var evtDataList = document.getElementById('EventDataList');
					if(evtDataList.innerHTML.indexOf('$17.00') >= 0)
						hasAdultGeneral = true;
					if(evtDataList.innerHTML.indexOf('$7.00') >= 0)
						hasChildGeneral = true;
					if(evtDataList.innerHTML.indexOf('$20.00') >= 0)
						hasAdultValue = true;
					if(evtDataList.innerHTML.indexOf('$10.00') >= 0)
						hasChildValue = true;
					if(evtDataList.innerHTML.indexOf('Hot Air Balloon Rides') >= 0)
						hasBalloonRide = true;
					if(evtDataList.innerHTML.indexOf('Blue Sky Club') >= 0)
						hasBlueSky = true;
					if(evtDataList.innerHTML.indexOf("Kid's Club") >= 0)
						hasKidsClub = true;
					if(evtDataList.innerHTML.indexOf('Advance Parking') >= 0)
						hasParking = true;
					if(evtDataList.innerHTML.indexOf('$35.00') >= 0)
						hasAdultTeenSensation = true;
					if(evtDataList.innerHTML.indexOf('$25.00') >= 0)
						hasChildTeenSensation = true;
				}

				if(document.getElementById('PackageDataList'))
				{
					var packDataList = document.getElementById('PackageDataList');
					if(packDataList.innerHTML.indexOf('Blue Sky Club') >= 0)
						hasBlueSky = true;
				}

				var showingAnything = false;
				if(hasAdultGeneral == true || hasAdultValue)
				{
					//if(hasBlueSky == false){
					//	document.getElementById('bpBlueSky').style.display = 'block'; showingAnything = true; }
					//if(hasMerch == false){
					//	document.getElementById('bpMerch').style.display = 'block'; showingAnything = true; }
					if(hasBalloonRide == false){
						document.getElementById('bpRide').style.display = 'block'; showingAnything = true; }
				}
				if(hasChildGeneral == true || hasChildValue)
				{
					//if(hasBlueSky == false && hasChildValue == true){
					//	document.getElementById('bpBlueSky').style.display = 'block'; showingAnything = true; }
					if(hasKidsClub == false){
						document.getElementById('bpKid').style.display = 'block'; showingAnything = true; }
					//if(hasMerch == false){
					//	document.getElementById('bpMerch').style.display = 'block'; showingAnything = true; }
				}
				if(hasBalloonRide == true)
				{
					//if(hasBlueSky == false){
					//	document.getElementById('bpBlueSky').style.display = 'block'; showingAnything = true; }
					//if(hasMerch == false){
					//	document.getElementById('bpMerch').style.display = 'block'; showingAnything = true; }
				}
				if(hasBlueSky == true || hasParking)
				{
					//if(hasMerch == false){
					//	document.getElementById('bpMerch').style.display = 'block'; showingAnything = true; }
					if(hasBalloonRide == false){
						document.getElementById('bpRide').style.display = 'block'; showingAnything = true; }
				}
				if(hasAdultTeenSensation == true)
				{
					//if(hasBlueSky == false){
					//	document.getElementById('bpBlueSky').style.display = 'block'; showingAnything = true; }
					//if(hasMerch == false){
					//	document.getElementById('bpMerch').style.display = 'block'; showingAnything = true; }
				}
				if(hasChildTeenSensation == true)
				{
					//if(hasMerch == false){
					//	document.getElementById('bpMerch').style.display = 'block'; showingAnything = true; }
				}
				if(hasKidsClub == true)
				{
					//if(hasChildTeenSensation == false && hasAdultTeenSensation == false)	{
					//	document.getElementById('bpTeen').style.display = 'block'; showingAnything = true; }
				}
				if(hasMerch == true)
				{
					if(hasAdultGeneral == false && hasChildGeneral == false &&  hasAdultValue == false && hasChildValue == false && hasBlueSky == false)
						document.getElementById('bpTicket').style.display = 'block';
					if(hasBalloonRide == false)
						document.getElementById('bpRide').style.display = 'block';
				}

				if(showingAnything == true)
				{
					document.getElementById('basketPopup').style.display = 'block';
					document.getElementById('basketPopupMask').style.display = 'block';
					//document.getElementById('basketPopup').style.top = '100px';
					setTimeout("popSlide();", 10);
				}
			}
		}
	//}
}

function popupNoThanks()
{
	var subT = document.getElementById('navbar_lnkSubtotal').innerHTML;

	var url = "EntryPoint.aspx?varadd=1&bpSubT=" + subT + "&bpStop=true&";
	if(typeof XMLHttpRequest != "undefined")
	{
		bpSetReq = new XMLHttpRequest();
	}
	else if(window.ActiveXObject)
	{
		bpSetReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	bpSetReq.open("POST", url, true);
	bpSetReq.send(null);

	document.getElementById('basketPopup').style.display = 'none';
	document.getElementById('basketPopupMask').style.display = 'none';
	
}

var slide = -400;
function popSlide()
{
	if(slide <= 100)
	{
		slide = slide + 10;
		document.getElementById('basketPopup').style.top = slide + 'px';
		setTimeout("popSlide();", 10);
	}
}