// Determine browser and version.
	function Browser() {
		var ua, s, i;
		
		this.isIE    = false;
		this.isNS    = false;
		this.version = null;
		
		ua = navigator.userAgent;
		
		s = "MSIE";
		if ((i = ua.indexOf(s)) >= 0) {
			this.isIE = true;
			this.version = parseFloat(ua.substr(i + s.length));
			return;
		}
		
		s = "Netscape6/";
		if ((i = ua.indexOf(s)) >= 0) {
			this.isNS = true;
			this.version = parseFloat(ua.substr(i + s.length));
			return;
		}
		
		// Treat any other "Gecko" browser as NS 6.1.
		s = "Gecko";
		if ((i = ua.indexOf(s)) >= 0) {
			this.isNS = true;
			this.version = 6.1;
			return;
		}
	}
	var browser = new Browser();
	
// Global object to hold drag information.
	var dragObj = new Object();
	dragObj.zIndex = 0;
	
/* --------------------------------------------------
	Drag Functions
-------------------------------------------------- */
	function dragStart(event, id) {
		var el;
		var x, y;
		
		// If an element id was given, find it. Otherwise use the element being clicked on.
		if (id)
			dragObj.elNode = document.getElementById(id);
		else {
			if (browser.isIE)
				dragObj.elNode = window.event.srcElement;
			if (browser.isNS)
				dragObj.elNode = event.target;
			
			// If this is a text node, use its parent element.
			if (dragObj.elNode.nodeType == 3)
				dragObj.elNode = dragObj.elNode.parentNode;
		}
		
		// Get cursor position with respect to the page.
		if (browser.isIE) {
			x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
			y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
		}
		if (browser.isNS) {
			x = event.clientX + window.scrollX;
			y = event.clientY + window.scrollY;
		}
		
		// Save starting positions of cursor and element.
		dragObj.cursorStartX = x;
		dragObj.cursorStartY = y;
		dragObj.elStartLeft  = parseInt(dragObj.elNode.style.left, 10);
		dragObj.elStartTop   = parseInt(dragObj.elNode.style.top,  10);
		
		if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0;
		if (isNaN(dragObj.elStartTop))  dragObj.elStartTop  = 0;
		
		// Update element's z-index.
		//dragObj.elNode.style.zIndex = ++dragObj.zIndex;
		
		// Capture mousemove and mouseup events on the page.
		if (browser.isIE) {
			document.attachEvent("onmousemove", dragGo);
			document.attachEvent("onmouseup",   dragStop);
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
		if (browser.isNS) {
			document.addEventListener("mousemove", dragGo,   true);
			document.addEventListener("mouseup",   dragStop, true);
			event.preventDefault();
		}
	}
	
	function dragGo(event) {
		var x, y;
		
		// Get cursor position with respect to the page.
		if (browser.isIE) {
			x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
			y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
		}
		if (browser.isNS) {
			x = event.clientX + window.scrollX;
			y = event.clientY + window.scrollY;
		}
		
		// Move drag element by the same amount the cursor has moved.
		dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px";
		dragObj.elNode.style.top  = (dragObj.elStartTop  + y - dragObj.cursorStartY) + "px";
		
		if (browser.isIE) {
			window.event.cancelBubble = true;
			window.event.returnValue = false;
		}
		if (browser.isNS)
			event.preventDefault();
	}
	
	function dragStop(event) {
		// Stop capturing mousemove and mouseup events.
		if (browser.isIE) {
			document.detachEvent("onmousemove", dragGo);
			document.detachEvent("onmouseup",   dragStop);
		}
		if (browser.isNS) {
			document.removeEventListener("mousemove", dragGo,   true);
			document.removeEventListener("mouseup",   dragStop, true);
		}
	}
	
/* --------------------------------------------------
	ajax to include external file
-------------------------------------------------- */
	
	/***********************************************
	* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
	* This notice MUST stay intact for legal use
	* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
	***********************************************/
	
	//To include a page, invoke ajaxinclude("***.htm") in the BODY of page
	//Included file MUST be from the same domain as the page displaying it.
	
	//var rootdomain="http://"+window.location.hostname
	
	function ajaxinclude(url) {
		var page_request = false
		if (window.XMLHttpRequest) // if Mozilla, Safari etc
			page_request = new XMLHttpRequest()
		else if (window.ActiveXObject){ // if IE
			try {
				page_request = new ActiveXObject("Msxml2.XMLHTTP")
				} 
			catch (e){
				try{
					page_request = new ActiveXObject("Microsoft.XMLHTTP")
					}
					catch (e){}
				}
		}
		else
			return false
		page_request.open('GET', url, false) //get page synchronously 
		page_request.send(null)
		
		if (window.location.href.indexOf("http")==-1 || page_request.status==200)			    
			 return page_request.responseText;				
	}
	
/* --------------------------------------------------
	Showbox Variables
-------------------------------------------------- */
// unit of measurement is pixel
	var titleHeight = 35;
	var curveRadius = 5;
	var de = document.documentElement;
	var winW = (typeof(window.innerWidth)=="number" ? window.innerWidth : (de ? de.clientWidth : document.body.clientWidth));
	var winH = (typeof(window.innerHeight)=="number" ? window.innerHeight : (de ? de.clientHeight : document.body.clientHeight));
	
/* --------------------------------------------------
	Showbox Functions
-------------------------------------------------- */
	function hideTheBox() {
		var theBox = document.getElementById("box");
		theBox.style.top = '-9999em';
		theBox.style.left = '-9999em';
		
		var theLayer = document.getElementById("layer");
		theLayer.style.height = '';
		theLayer.style.top = '-9999em';
		theLayer.style.left = '-9999em';
	}
	
	function showBox(bxContent, bxTitle, w, h, type, redirectUrl, action, toConfirm )
  { 	
	if(typeof bxContent =="undefined") bxContent="";  
	if(typeof bxTitle =="undefined")  bxTitle=document.title;
	if(typeof w =="undefined") w=600;
	if(typeof h =="undefined") h=480;
	if(typeof type=="undefined")type=0;;	
	if(typeof redirectUrl =="undefined") redirectUrl="";		
	if(typeof action=="undefined") action="";	
	if(typeof toConfirm=="undefined") toConfirm="";

	if (action!="")
		action = unescape(action);
	
	var de = document.documentElement;
	var db = document.body;
	var scrollX = parseInt((self.pageXOffset || (de && de.scrollLeft) || db.scrollLeft));
	var scrollY = parseInt((self.pageYOffset || (de && de.scrollTop) || db.scrollTop));
	var windowHeight = parseInt((self.innerHeight || (de && de.clientHeight) || db.clientHeight));
	var windowWidth	= parseInt((self.innerWidth || (de && de.clientWidth) || db.clientWidth));
	var wint = scrollY + (windowHeight /2) - (h/2) ;
	var winl = scrollX + (windowWidth/2) - (w/2);
		
	var layer = document.getElementById('layer');
    var div = document.getElementById('box');	
	
	
	this.removeBox = function (){
      db.removeChild(document.getElementById('layer'));
      db.removeChild(document.getElementById('box'));
	}  	
	
	this.closeBox = function () {
		  removeBox();	
		  if(redirectUrl!=""){		
		    location.replace(redirectUrl);
		  } else {
 	  	  	if(action!="")		  	
			   	eval(action);			  
		  }	
	}
	    
	if (!layer){
		 layer = document.createElement('div');
	    layer.id = 'layer';
	}	
	layer.style.left = '0px';
	layer.style.top = '0px';
	layer.style.height= windowHeight + 500 + parseInt(document.documentElement.offsetHeight)  + 'px'; // add document.documentElement.offsetHeight so it will cover whole page in IE
    db.appendChild(layer); 
	
    if(!div){
		 div = document.createElement('div');	
	    div.id = 'box';
	}	
    div.style.height = h + (browser.isNS ? 36: 0) + 'px';
    div.style.width = w + 'px';
    div.style.top = wint + 'px';
	div.style.left = winl + 'px';
	div.innerHTML = '<b class="hdCorner"><b class="Corner1"><b></b></b><b class="Corner2"><b></b></b><b class="Corner3"></b></b>';	
		div.innerHTML += '<span class="x1"><span class="x1a"></span></span><span class="x2"><span class="x2a"></span></span>';

    db.appendChild(div); 
	
	// heading
	var elhd = document.createElement('div');     
	elhd.className = 'hd';
	elhd.innerHTML = '<div style="float: left;">'+bxTitle + '</div><div style="float: right; padding-right:5px;"><a href="javascript:;" onclick="removeBox()"><img src="' +imageWWWPath+ '/close-2.png" id="imgClose" align="absmiddle"></a></div><div class="clear"></div>';
	div.appendChild(elhd);	
	
    var elc = document.createElement('div');
	elc.className = 'content'
	elc.id = 'pcont'
	
	elc.style.height =  (h - 28 - 38) + "px";  // content's height =  h - header - footer

//	elc.innerHTML = ((type==0) ? '<p>'+bxContent+'</p>' :  '<div class="small" style="text-align: right;"><a href="" onclick="printSelection(document.getElementById(\'pcont\'));return false">print</a></div>' + ajaxinclude(bxContent) ); //+ '<br><br>' ;	
	elc.innerHTML = ((type==0) ? '<p>'+bxContent+'</p>' :   ajaxinclude(bxContent) ); //+ '<br><br>' ;	
	
	// footer
	var elft = document.createElement('div');
	elft.className = 'ft';
	if(toConfirm.toUpperCase()!="CONFIRM"){
			// close button	
		    var a = document.createElement('a');
			a.className = 'button';
	    a.innerHTML = 'Close window';
	    a.href = 'javascript:closeBox();';
		elft.appendChild(a);		
	} else {

		// OK button	
   		var okbtn = document.createElement('a');
		okbtn.className = 'button';
		okbtn.id="YesBtn"		
	    okbtn.innerHTML = 'Yes';
 	    okbtn.href = 'javascript:closeBox();';
		elft.appendChild(okbtn);		

		// No button	
	    var nobtn = document.createElement('a');
		nobtn.className = 'button';
		nobtn.id="NoBtn"
	    nobtn.innerHTML = 'No';
	    nobtn.href = 'javascript:removeBox()';
		elft.appendChild(nobtn);	
	}	

			
	div.appendChild(elc);
	div.appendChild(elft);		
	div.innerHTML += '<b class="ftCorner"><b class="Corner5"></b><b class="Corner4"></b><b class="Corner3"></b><b class="Corner2"><b></b></b><b class="Corner1"><b></b></b></b>';		

  }	
  
 
// function to print only a div content 
function printSelection(node){

  var content=node.innerHTML
  var pwin=window.open('','print_content','width=100,height=100');
  pwin.resizeTo(1,1);

  pwin.document.open();
  pwin.document.write('<html><body onload="window.print()">'+content+'</body></html>');
  pwin.document.close();
 
  setTimeout(function(){pwin.close();},1000);

}  

// function to center the light box as the user scrolls the window
function adjustBox(){
		var obj = document.getElementById('box');
		if (!obj) return;
	
	var de = document.documentElement;
	var db = document.body;	
	var scrollX = (self.pageXOffset || (de && de.scrollLeft) || db.scrollLeft);
	var scrollY = (self.pageYOffset || (de && de.scrollTop) || db.scrollTop);
	var windowHeight = (self.innerHeight || (de && de.clientHeight) || db.clientHeight);
	var windowWidth	= (self.innerWidth || (de && de.clientWidth) || db.clientWidth);

		var w= Number(obj.style.width.substr(0,obj.style.width.length-2) );
		var h= Number(obj.style.height.substr(0,obj.style.height.length-2) );
		
	var t=scrollY + (windowHeight /2) - (h/2);
		if (t<0) t=0;

	var l=scrollX + (windowWidth/2) - (w/2);
		if (l<0) l=0;
	
		obj.style.top = t+"px";
		obj.style.left = l+"px";

}



  function confirmBox(bxContent, bxAction )
  { 
    var answer = false;
	if(typeof(bxTitle)=="undefined") 	bxTitle ="Are You Sure?";
	if(typeof(w)=="undefined") 			w=300;
	if(typeof(h)=="undefined") 			h=110;
	if(typeof(type)=="undefined") 		type=0;	
	
		if(typeof(bxAction)=="undefined") {
			return;
		} else {
			bxAction = unescape(bxAction);
		}
	
	var wint = ( ( windowHeight()-h)/2 + scrollY() );
	var winl = scrollX() + (windowWidth()/2 ) - (w/2);
	
	//var winl = ( windowWidth()-w/2 + scrollX() );
	if (h > (windowHeight()/2))  wint = wint - (h - (windowHeight()/2))-100;
	if (wint<0)   wint = 10;	
	
    var layer = document.createElement('div');
    layer.id = 'layer';
	layer.style.height= windowHeight() + document.documentElement.offsetHeight  + 'px'; // add document.documentElement.offsetHeight so it will cover whole page in IE
    document.body.appendChild(layer); 
   
    var div = document.createElement('div');
    div.id = 'box';
    div.style.height = h;
    div.style.width = w;
    div.style.top = wint + 'px';
	div.style.left = winl + 'px';
//    div.style.border = '1px solid silver';
    document.body.appendChild(div); 
	
	
	// heading
    var elhd = document.createElement('div');
	elhd.className = 'hd';
	elhd.innerHTML = bxTitle;
	div.appendChild(elhd);	  	  
	
	// content  
    var elc = document.createElement('div');
	elc.className = 'content'
	elc.id = 'pcont'
	elc.style.height =  (h - elhd.style.height - 20);
	elc.innerHTML = ((type==0) ? '<p>'+bxContent+'</p>' :  '<div class="small" style="text-align: right;"><a href="" onclick="printSelection(document.getElementById(\'pcont\'));return false">print</a></div>' + ajaxinclude(bxContent) ); //+ '<br><br>' ;	
	
	var elft = document.createElement('div');
	elft.className = 'ft';
	
	// OK button	
    var okbtn = document.createElement('a');
	okbtn.className = 'button';
	okbtn.id="YesBtn"
	okbtn.style.margin="10px"	
	okbtn.style.color="#333";			
    okbtn.innerHTML = 'Yes';
    okbtn.href = 'javascript:void(0)';
    okbtn.onclick = function()
	{	
		document.body.removeChild(document.getElementById('layer'));
	    document.body.removeChild(document.getElementById('box'));
		eval('minicart.' + bxAction);
		return true;
	}	
	
	elft.appendChild(okbtn);		
	
	// No button	
    var nobtn = document.createElement('a');
	nobtn.className = 'button';
	nobtn.id="NoBtn"
	nobtn.style.margin="10px"		
	nobtn.style.color="#333";		
    nobtn.innerHTML = 'No';
    nobtn.href = 'javascript:void(0)';
    nobtn.onclick = function() 
	{	
		document.body.removeChild(document.getElementById('layer'));
	    document.body.removeChild(document.getElementById('box'));
		return false;
	}	
	
	
	elft.appendChild(nobtn);				
	div.appendChild(elc);
	div.appendChild(elft);		

}	
	
/* --------------------------------------------------
	Update Showbox
-------------------------------------------------- */
	function updateShowbox(boxContent, boxTitle, boxW, boxH, isModal, isDrag, isInclude, afterURL) {
		
		if(typeof(boxTitle)=="undefined") boxTitle = "";
		if(typeof(boxContent)=="undefined") {
			if(boxTitle!="") {
				boxContent = boxTitle;
				boxTitle = "";
			} else {
				return;
			}
		} else {
			boxContent = unescape(boxContent);
		}
		if(typeof(boxW)=="undefined" || boxW==0) boxW = Math.ceil(winW * 0.6);
		if(typeof(boxH)=="undefined" || boxH==0) boxH = Math.ceil(winH * 0.6);
		if(typeof(isModal)=="undefined") isModal = 1;
		if(typeof(isDrag)=="undefined") isDrag = 0;
		if(typeof(isInclude)=="undefined") {
			// check if content is a url (relative or absolute)
			if(boxContent==boxContent.match(/(?:(?:(https?|file):\/\/)([^\/]+)(\/(?:[^\s])+)?)|(\/(?:[^\s])+)/g))
				isInclude = 1;
			else
				isInclude = 0;
		}
		
		var theBox = document.getElementById("box");
		theBox.style.width = boxW+'px';
		theBox.style.height = boxH+'px';
		var scrollX = self.pageXOffset || (de && de.scrollLeft) || document.body.scrollLeft;
		var scrollY = self.pageYOffset || (de && de.scrollTop) || document.body.scrollTop;
		
		var theLayer = document.getElementById("layer");
		if(isModal) {
			var maxBodyHeight = "100%";
			if(document.documentElement.offsetHeight) {
				maxBodyHeight = Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight)+'px';
			} else if(document.body.offsetHeight) {
				maxBodyHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight)+'px';
			}
			theLayer.style.height = '2000px';
			theLayer.style.top = '0';
			theLayer.style.left = '0';
		} else {
			theLayer.style.top = '-9999em';
			theLayer.style.left = '-9999em';
		}
		
		var boxSrc = '<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0">'+
			//	(boxTitle!="" ? '<tr><td height="10" class="boxedhead" '+(isDrag ? 'onmousedown="dragStart(event, \'box\');"' : '')+'>'+boxTitle+'</td></tr>' : '')+
			'	<tr><td height="10" class="boxedhead" '+(isDrag ? 'onmousedown="dragStart(event, \'box\');"' : '')+'><div style="float: right;"><input type="button" value="x" onclick="'+(afterURL !='' ? 'window.location.href=\''+afterURL+'\'' : 'hideTheBox();')+'" class="button"></div>'+boxTitle+'</td></tr>'+
			'	<tr><td height="100%" class="boxed">'+
					(isInclude ? '<iframe name="showBoxFrame" src="'+boxContent+'" width="100%" height="100%" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="auto"></iframe>' : boxContent)+
			'	</td></tr>'+
			'<tr><td align="center" class="boxed"><input type="button" name="Close" value="X CLOSE" onclick="'+(afterURL !='' ? 'window.location.href=\''+afterURL+'\'' : 'hideTheBox();')+'" class="button"></td></tr>'+
			//	(boxContent.indexOf("hideTheBox")==-1 ? '<tr valign="top"><td height="10" class="boxed" align="right"><a href="javascript:hideTheBox();">close</a></td></tr>' : '') +
			'</table>';
		
		theBox.style.top = ((((winH-boxH)/2)+scrollY) - (boxTitle!="" ? 30 : 0) - (boxContent.indexOf("hideTheBox")==-1 ? 30 : 0))+'px';
		theBox.style.left = (((winW-boxW)/2)+scrollX)+'px';
		theBox.innerHTML = boxSrc;
	}
	
		function updateEventShowbox(eventIndex, boxTitle, boxW, boxH, isModal, isDrag, isInclude) {
		boxContent = '<p align="left" style="font-size: 14px;"><strong>Please choose your performance date and time below:</strong></p>'+eventDatesAndLinks[eventIndex];
		if(typeof(boxTitle)=="undefined") boxTitle = "";
		if(typeof(boxContent)=="undefined") {
			if(boxTitle!="") {
				boxContent = boxTitle;
				boxTitle = "";
			} else {
				return;
			}
		} else {
			boxContent = unescape(boxContent);
		}
		if(typeof(boxW)=="undefined" || boxW==0) boxW = Math.ceil(winW * 0.6);
		if(typeof(boxH)=="undefined" || boxH==0) boxH = Math.ceil(winH * 0.6);
		if(typeof(isModal)=="undefined") isModal = 1;
		if(typeof(isDrag)=="undefined") isDrag = 0;
		if(typeof(isInclude)=="undefined") {
			// check if content is a url (relative or absolute)
			if(boxContent==boxContent.match(/(?:(?:(https?|file):\/\/)([^\/]+)(\/(?:[^\s])+)?)|(\/(?:[^\s])+)/g))
				isInclude = 1;
			else
				isInclude = 0;
		}
		
		var theBox = document.getElementById("box");
		theBox.style.width = boxW+'px';
		theBox.style.height = boxH+'px';
		var scrollX = self.pageXOffset || (de && de.scrollLeft) || document.body.scrollLeft;
		var scrollY = self.pageYOffset || (de && de.scrollTop) || document.body.scrollTop;
		
		var theLayer = document.getElementById("layer");
		if(isModal) {
			var maxBodyHeight = "100%";
			if(document.documentElement.offsetHeight) {
				maxBodyHeight = Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight)+'px';
			} else if(document.body.offsetHeight) {
				maxBodyHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight)+'px';
			}
			theLayer.style.height = maxBodyHeight;
			theLayer.style.top = '0';
			theLayer.style.left = '0';
		} else {
			theLayer.style.top = '-9999em';
			theLayer.style.left = '-9999em';
		}
		
		var boxSrc = '<table width="100%" height="100%" border="0" cellpadding="5" cellspacing="2">'+
			//	(boxTitle!="" ? '<tr><td height="10" class="boxedhead" '+(isDrag ? 'onmousedown="dragStart(event, \'box\');"' : '')+'>'+boxTitle+'</td></tr>' : '')+
			'	<tr><td height="10" class="boxedhead" '+(isDrag ? 'onmousedown="dragStart(event, \'box\');"' : '')+'><div style="float: right;"><input type="button" value="x" onclick="hideTheBox();" class="button"></div>'+boxTitle+'</td></tr>'+
			'	<tr><td height="100%" class="boxed">'+
					(isInclude ? '<iframe name="showBoxFrame" src="'+boxContent+'" width="100%" height="100%" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="auto"></iframe>' : boxContent)+
			'	</td></tr>'+
			//	(boxContent.indexOf("hideTheBox")==-1 ? '<tr valign="top"><td height="10" class="boxed" align="right"><a href="javascript:hideTheBox();">close</a></td></tr>' : '') +
			'</table>';
		
		theBox.style.top = ((((winH-boxH)/2)+scrollY) - (boxTitle!="" ? 30 : 0) - (boxContent.indexOf("hideTheBox")==-1 ? 30 : 0))+'px';
		theBox.style.left = (((winW-boxW)/2)+scrollX)+'px';
		theBox.innerHTML = boxSrc;
	}
	
	function showBoxAlert(alertText, postAlertAction) {
		var alertTextFinal = '<div align="center">'+
			'	<p>'+ cleaner(alertText) +'</p>'+
			'	<p style="margin-top: 1.5em;"><input type="button" value="continue" onclick="hideTheBox();'+ (typeof(postAlertAction)=="undefined" && postAlertAction!='' ? postAlertAction : '') +'" class="button"></p>'+
			'</div>';
		var alertW = Math.ceil(alertTextFinal.length * 1.5);
		var alertH = Math.ceil(alertW / 4);
		
		updateShowbox(alertTextFinal, '', alertW, alertH, 1, 0, 0);
	}
	
function changeSeats(index, reservationIndex)
{
  var noURL = "submitForm('remove',"+index+","+reservationIndex+");";
  var yesURL = "submitForm('tryAgain',"+index+","+reservationIndex+");";
  var message = "Would you like to search for different seats for this event?";
  var title = "Release These Tickets";
  changeSeatsLightBox(message, title, 400, 200, yesURL, noURL)
}
	
function changeSeatsLightBox(boxContent, boxTitle, w, h, yesURL, noURL, isModal, isDrag, isInclude)
{ 
  if(typeof(boxTitle)=="undefined") boxTitle = "";
		if(typeof(boxContent)=="undefined") {
			if(boxTitle!="") {
				boxContent = boxTitle;
				boxTitle = "";
			} else {
				return;
			}
		} else {
			boxContent = unescape(boxContent);
		}
		if(typeof(boxW)=="undefined" || boxW==0) boxW = Math.ceil(winW * 0.6);
		if(typeof(boxH)=="undefined" || boxH==0) boxH = Math.ceil(winH * 0.6);
		if(typeof(isModal)=="undefined") isModal = 1;
		if(typeof(isDrag)=="undefined") isDrag = 0;
		if(typeof(isInclude)=="undefined") {
			// check if content is a url (relative or absolute)
			if(boxContent==boxContent.match(/(?:(?:(https?|file):\/\/)([^\/]+)(\/(?:[^\s])+)?)|(\/(?:[^\s])+)/g))
				isInclude = 1;
			else
				isInclude = 0;
		}
		
		var theBox = document.getElementById("box");
		theBox.style.width = boxW+'px';
		theBox.style.height = boxH+'px';
		var scrollX = self.pageXOffset || (de && de.scrollLeft) || document.body.scrollLeft;
		var scrollY = self.pageYOffset || (de && de.scrollTop) || document.body.scrollTop;
		
		var theLayer = document.getElementById("layer");
		if(isModal) {
			var maxBodyHeight = "100%";
			if(document.documentElement.offsetHeight) {
				maxBodyHeight = Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight)+'px';
			} else if(document.body.offsetHeight) {
				maxBodyHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight)+'px';
			}
			theLayer.style.height = maxBodyHeight;
			theLayer.style.top = '0';
			theLayer.style.left = '0';
		} else {
			theLayer.style.top = '-9999em';
			theLayer.style.left = '-9999em';
		}
		
		var boxSrc = '<table width="350" height="150" border="0" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF">'+
			'	<tr><td height="10" colspan="2" class="boxedhead" '+(isDrag ? 'onmousedown="dragStart(event, \'box\');"' : '')+'><div style="float: right;"><input type="button" value="x" onclick="hideTheBox();" class="button"></div>'+boxTitle+'</td></tr>'+
			'	<tr><td colspan="2" style="font-size: 12px;">'+
					(isInclude ? '<iframe name="showBoxFrame" src="'+boxContent+'" width="100%" height="100%" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="auto"></iframe>' : boxContent)+
			'	</td></tr>'+
			'<tr><td align="right"><input type="button" name="YesCS" value="Yes" onclick="'+yesURL+'" class="button"></td>'+
      '<td><input type="button" name="NoCS" value="No, search another event" onclick="'+noURL+'" class="button"></td></tr>'+
      '<tr><td colspan="2" align="right"><input type="button" name="ReturnCS" value="Return to Cart" onclick="hideTheBox();" class="button" style="margin-right: 63px;"></td></tr>'+
			'</table>';
	
		theBox.style.top = ((((winH-boxH)/2)+scrollY) - (boxTitle!="" ? 30 : 0) - (boxContent.indexOf("hideTheBox")==-1 ? 30 : 0))+'px';
		theBox.style.left = (((winW-boxW)/2)+scrollX)+'px';
		theBox.innerHTML = boxSrc;
}
	
/* --------------------------------------------------
	Print Hidden Showbox and Layer
-------------------------------------------------- */
	document.write(
		'<div id="layer"></div>',
		'<div id="box"></div>'
	);
