	var activeBooth = 0;
	var _global = this;
	var calloutTimeout = null;
	var calloutEffect = null;
	
	var firstChoices = new Array();
	var secondChoices = new Array();
	var thirdChoices = new Array();
	var activeChoice = 1;

	function showBoothInfo(boothId,xPos,yPos,width,height,text) {
		
		try {
		
			activeBooth = boothId;
			if ($('boothbg_' + boothId).style.background == '') {
				$('booth_' + boothId).style.backgroundColor='#FFFF00';
			} //end if
			
			if (calloutTimeout) {
				clearTimeout(calloutTimeout);
				// Cancel the current effect and reset the opacity
				if (calloutEffect) {
					calloutEffect.cancel();
					$('callout').style.opacity='1';
					$('callout').style.filter='alpha(opacity=100)';
					//$('booth_' + boothId).style.backgroundColor = '#FFFF00';
				} //end if
	
			} //end if
			
			//var thisPos = Position.positionedOffset($('booth_'+boothId));
			//alert(thisPos)
			if (xPos) {
				$('callout_content').innerHTML = text ;
				$('callout_body').innerHTML = text ;
				
				xPosVar = xPos;
				yPosVar = yPos;
				widthVar = width;
				
				//setTimeout("try { $('callout_body').style.height = $('callout_content').getHeight() - 20 + 'px'; } catch(e) { }	$('callout').style.height = '';	$('callout').style.height = $('callout').getHeight() + 'px';$('callout').style.left = xPosVar + widthVar - 4 + 'px'; $('callout').style.top = yPosVar - $('callout').getHeight() + 'px';if ($('callout').style.display == 'none') { $('callout').style.opacity = 1; $('callout').style.filter='alpha(opacity=100)'; $('callout').style.display = 'block'; }",0);
				
				//try { $('callout_body').style.height = $('callout_content').getHeight() - 20 + 'px'; } catch(e) { }
				$('callout').style.height = '';		
				$('callout').style.height = $('callout').getHeight() + 'px';
				
				
				$('callout').style.left = xPosVar + width - 4 + 'px';
				$('callout').style.top = yPosVar - $('callout').getHeight() + 'px';
	
				if ($('callout').style.display == 'none') {
					$('callout').style.opacity = 1;
					$('callout').style.filter='alpha(opacity=100)';
					$('callout').style.display = 'block';
					
					//new Effect.Opacity('callout', {duration:0.2, from:0.0, to:1.0});
				}//end if
			} //end if
				
		} catch(e) {}
	} //end function

	function hideBoothInfo(boothId) {
	
		try {
			$('booth_' + boothId).style.backgroundColor = '';
			var booth = boothId;
			//timeout = "setTimeout(\"calloutEffect = new Effect.Opacity('callout', {duration:0.3, from:1.0, to:0.0, afterFinish:function() {$('callout').style.display='none'; }});\",50)";
			//timeout = 'setTimeout("$('callout').style.display='none';",50);
			//calloutTimeout = eval(timeout);	
			calloutTimeout = setTimeout("$('callout').style.display='none';",100);
		
			//alert(boothId);
			//$('booth_'+boothId).style.backgroundColor='';
			//$('callout').style.display = 'none';
		} catch(e) {}
	} //end function

	function selectBooth(boothId) {
		try {
			if ($('boothbg_' + boothId).style.backgroundColor != '') {
				$('boothbg_' + boothId).style.backgroundColor = '';
				$('booth_' + boothId).style.backgroundColor = '#ffff00';
				
				//for (var i=0;i<firstChoices.length;i++) { if (firstChoices[i] == boothId) { 
				//	firstChoices[firstChoices.length] = boothId;
					firstChoices = $(firstChoices).without(boothId);
					secondChoices = $(secondChoices).without(boothId);
					thirdChoices = $(thirdChoices).without(boothId);
					if (firstChoices.length == 0) { if (activeChoice == 1) { $('firstChoice').innerHTML = 'Click a Booth on the Floor Map'; } else { $('firstChoice').innerHTML = 'Click to add FIRST choice'; } } else { $('firstChoice').innerHTML = firstChoices; } $('first_choice').value = firstChoices;
					if (secondChoices.length == 0) { if (activeChoice == 2) { $('secondChoice').innerHTML = 'Click a Booth on the Floor Map'; } else { $('secondChoice').innerHTML = 'Click to add SECOND choice'; } } else { $('secondChoice').innerHTML = secondChoices; } $('second_choice').value = secondChoices;
					if (thirdChoices.length == 0) { if (activeChoice == 3) { $('thirdChoice').innerHTML = 'Click a Booth on the Floor Map'; } else { $('thirdChoice').innerHTML = 'Click to add THIRD choice'; } } else { $('thirdChoice').innerHTML = thirdChoices; } $('third_choice').value = thirdChoices;
					
				//} //end if
				
				
			} else {
				$('boothbg_' + boothId).style.backgroundColor = '#0000ff';
				$('booth_' + boothId).style.backgroundColor = '';
				
				if (activeChoice == 1) {
					firstChoices[firstChoices.length] = boothId;
					$('firstChoice').innerHTML = firstChoices;
					$('first_choice').value = firstChoices;
				} else if (activeChoice == 2) {
					secondChoices[secondChoices.length] = boothId;
					$('secondChoice').innerHTML = secondChoices;
					$('second_choice').value = secondChoices;
				} else if (activeChoice == 3) {
					thirdChoices[thirdChoices.length] = boothId;
					$('thirdChoice').innerHTML = thirdChoices;
					$('third_choice').value = thirdChoices;
				} //end if
					
					
				//var secondChoices = new Array();
				//var thirdChoices = new Array();
				
			} //end if		
	
	
			// Display Booth Wizard
			if ($('boothSelection').style.display=='none') {
				try {
					var thisPos = Position.positionedOffset($('booth_'+activeBooth));
					$('boothSelection').style.top = thisPos[1] + 'px';
					$('boothSelection').style.left = thisPos[0] + 25 + 'px';
					$('boothSelection').style.opacity='0';
					$('boothSelection').style.filter='alpha(opacity=0)';
					$('boothSelection').style.display='block';
					new Effect.Opacity('boothSelection', {duration:0.2, from:0.0, to:1.0});
					new Draggable('boothSelection', { handle:'handle', starteffect: function() {return false;}, endeffect: function() {return false;} });
				} catch(e) {}
			} //end if

		} catch(e) {}
	} //end function

	function activateChoice(choice) {
		try {
			if (activeChoice != choice) {
			
				switch(activeChoice) {
					case 1:  $('firstChoice').style.backgroundColor=''; if (firstChoices.length == 0) { $('firstChoice').innerHTML = 'Click to add FIRST choice'; }
					break;
					case 2:  $('secondChoice').style.backgroundColor=''; if (secondChoices.length == 0) { $('secondChoice').innerHTML = 'Click to add SECOND choice'; }
					break;
					case 3:  $('thirdChoice').style.backgroundColor=''; if (thirdChoices.length == 0) { $('thirdChoice').innerHTML = 'Click to add THIRD choice'; }
					break;
				} //end switch
	
				switch(choice) {
					case 1:  $('firstChoice').style.backgroundColor='#ffff00'; if (firstChoices.length == 0) { $('firstChoice').innerHTML = 'Click a Booth on the Floor Map'; } else { $('firstChoice').innerHTML = firstChoices; } 
					break;
					case 2:  $('secondChoice').style.backgroundColor='#ffff00'; if (secondChoices.length == 0) { $('secondChoice').innerHTML = 'Click a Booth on the Floor Map'; } else { $('secondChoice').innerHTML = secondChoices; }
					break;
					case 3:  $('thirdChoice').style.backgroundColor='#ffff00';  if (thirdChoices.length == 0) { $('thirdChoice').innerHTML = 'Click a Booth on the Floor Map'; } else { $('thirdChoice').innerHTML = thirdChoices; }
					break;
				} //end switch
			
			activeChoice = choice;
			
			} //end if

		} catch(e) {}
	} //end function

	function resetMap() {
		try {
			$('boothSelection').style.display='none';
			for (var i=0;i<firstChoices.length;i++) { $('boothbg_' + firstChoices[i]).style.backgroundColor = ''; }; $(firstChoices).clear(); $('first_choice').value = '';
			for (var i=0;i<secondChoices.length;i++) { $('boothbg_' + secondChoices[i]).style.backgroundColor = ''; }; $(secondChoices).clear(); $('second_choice').value = '';
			for (var i=0;i<thirdChoices.length;i++) { $('boothbg_' + thirdChoices[i]).style.backgroundColor = ''; }; $(thirdChoices).clear(); $('third_choice').value = '';
			
			activateChoice(3);activateChoice(2);activateChoice(1);
		} catch(e) {}
	} //end function

	function checkForm() {
		try {
			var selectionCount = 0;
			if (firstChoices.length != 0) { selectionCount++; }
			if (secondChoices.length != 0) { selectionCount++; }
			if (thirdChoices.length != 0) { selectionCount++; }
			
			if ($('first_choice').value == '' && $('second_choice').value == '' && $('third_choice').value == '') { 
				return confirm('You have NOT selected any preference for your BOOTH location.\n\nIf you would like us to assign you a booth location click \'OK\', otherwise, click \'CANCEL\' and select your BOOTH location by clicking on the floor map.');
			} else if (selectionCount == 1) { 
				return confirm('You have only selected ONE preference for your BOOTH location.\n\nWe can NOT guarantee your BOOTH location and may need to assign you a different location based on availability. To continue with just one selection, please click \'OK\', otherwise, click \'CANCEL\' and select additional BOOTH location preferences by clicking on the floor map.');
			} //else {
			//	return true;
			//} //end
			return true;
		} catch(e) {}
	} //end function

	function updateTotal() {
		if (isNaN($('exhibitor_total_booth_request').value) == false && $('exhibitor_total_booth_request').value > 0) {
			$('totalBooths').innerHTML = $('exhibitor_total_booth_request').value;
			$('totalCost').innerHTML = formatCurrency($('exhibitor_total_booth_request').value * 1850);
		} else {
			$('exhibitor_total_booth_request').value = 1;
			$('totalBooths').innerHTML = 1;
			$('totalCost').innerHTML = '$1,850';
		} //end if-else
	} //end function
	
	function formatCurrency(num) {
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
		num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
		cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
		num = num.substring(0,num.length-(4*i+3))+','+
		num.substring(num.length-(4*i+3));
		//return (((sign)?'':'-') + '$' + num + '.' + cents);
		return (((sign)?'':'-') + '$' + num);
	}