		
		var root_link = "http://www.atmosphere2009.com";
		
		var tempContent = "";
		
		var loadedContent = 1;
		
		var rotateTimeout = "";
		var currTimeout = "";
		
		var currSponsor = 1;
		
		var currTopNav = 0;
		
		var currLib	= "";
		
		var loaded	= 0;
		
		var waitFunction = "";
		
		var noLoading = 0;
		
		var playerHeight = 0;
		
		var commentsOn = 0;
		
		var currItem = 0;
		
		var currDiv = "";
		var currFeat = 1;
		var currAnchor = "";
		var currFunction = "";
		var secondaryFunction = "";
		var ajaxTimeout = 0;
		
		var opacityTimeoutVar = new Array();
		opacityTimeoutVar[0] = "";
		opacityTimeoutVar[1] = "";
		
		var currQuote = 1;
		
		var rotating = 0;
		
		var currSection = 0;
		var currSubSection = 0;
		
		var CurrNav = 0;
		var currNavTimeout = "";
		
		var currCircleLeft = 0;
		var currCircleTop = 0;
		var currCircleTimeout = "";
		
		var currPartner = 1;
		var currPartnerWide = 1;
		var partnerRotateTimeout = null;
		var partnerRotateTimeoutMain = null;
		
		var CurrInfoBox = -1;
		var LinkInfoBoxOpen = 0;
		var LinkInfoBoxTimer = 0;
		var AbortCloseBox = 0;
		
		var divCount = 2;
		var currDiv = 0;
		var openDiv = 0;
		
		var galleryPos = 1;
		
		var timeoutVar = 0;
		
		var origLeft = new Array();
		var origTop = new Array();
		var currLeft = new Array();
		var currTop = new Array();
		var limitLeft = new Array();
		var limitTop = new Array();
		var offsetLeft = new Array();
		var offsetTop = new Array();
		
		origLeft[0] = 362;
		origLeft[1] = 587;
		origTop[0] = 100;
		origTop[1] = 190;
		
		currLeft[0] = 362;
		currLeft[1] = 587;
		currTop[0] = 100;
		currTop[1] = 190;
		limitLeft[0] = 317;
		limitLeft[1] = 707;
		limitTop[0] = 10;
		limitTop[1] = 10;
		offsetLeft[0] = 5;
		offsetLeft[1] = 10;
		offsetTop[0] = 10;
		offsetTop[1] = 15;
		
		var winW = 0;
		var winH = 0;
		
		// Detect if the browser is IE or not.
		// If it is not IE, we assume that the browser is NS.
		var IE = document.all?true:false
		
		// If NS -- that is, !IE -- then set up for mouse capture
		if (!IE) document.captureEvents(Event.MOUSEMOVE)
		
		// Main function to retrieve mouse x-y pos.s
		
		var tempX = 0;
		var tempY = 0;
		
		// Set-up to use getMouseXY function onMouseMove
		document.onmousemove = getMouseXY;
		
		// Temporary variables to hold mouse x-y pos.s
		var tempMouseX = 0
		var tempMouseY = 0
		
		// Main function to retrieve mouse x-y pos.s
		
		function getMouseXY(e) {
		  if (IE) { // grab the x-y pos.s if browser is IE
			tempMouseX = event.clientX + document.body.scrollLeft
			tempMouseY = event.clientY + document.body.scrollTop
		  } else {  // grab the x-y pos.s if browser is NS
			tempMouseX = e.pageX
			tempMouseY = e.pageY
		  }  
		  // catch possible negative values in NS4
		  if (tempMouseX < 0){tempMouseX = 0}
		  if (tempMouseY < 0){tempMouseY = 0}  
		  // show the position values in the form named Show
		  // in the text fields named MouseX and MouseY
		  
		  if (currFunction != '') {
			
			eval(currFunction);
			
		  }
		  
		  return true
		}
		
		function check_email(email) {
			
			ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
			
			for(i=0; i < email.length ;i++){
				if(ok.indexOf(email.charAt(i))<0){ 
					return (false);
				}	
			}
			
			re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
			re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
			if (!email.match(re) && email.match(re_two)) {
				return (-1);		
			} 
			
		
		}
		
		function getScrollOffset() {
		
			setWindowProps();
		
			tempX = 0;
			tempY = 0;
			
			if (IE) { // grab the x-y pos.s if browser is IE
				tempX = document.body.scrollLeft;
				tempY = document.body.scrollTop;
			} else {
				tempX = window.pageXOffset;
				tempY = window.pageYOffset;
			}
			
			// catch possible negative values in NS4
			if (tempX < 0){tempX = 0}
			if (tempY < 0){tempY = 0}
			
			//alert(tempX + " " + tempY); 
		
		}

		function setWindowProps() {
			
			if (parseInt(navigator.appVersion)>3) {
				if (navigator.appName=="Netscape") {
					winW = window.innerWidth;
					winH = window.innerHeight;
				}
				if (navigator.appName.indexOf("Microsoft")!=-1) {
					winW = (document.body.offsetWidth-21);
					winH = (document.body.offsetHeight-4);
				}
			}
			
		}
		
		function setOpacity(divName,value) {
			document.getElementById(divName).style.opacity = value/10;
			document.getElementById(divName).style.filter = 'alpha(opacity=' + value*10 + ')';
		}
		
		function displayOpacity(divName,value,increment,limit,num) {
			
			if (value == limit) {
				setOpacity(divName,value);
				clearTimeout(opacityTimeoutVar[num]);
			} else {
				setOpacity(divName,value);
				opacityTimeoutVar[num] = window.setTimeout("displayOpacity('"+divName+"',"+(value+increment)+","+increment+","+limit+","+num+")",50);
			}
			
		}
		
		function init(resize) {
			
			if (document.getElementById('currLib')) {
				currLib = document.getElementById('currLib').value;
			}
			
			if (document.getElementById('sponsorTotal')) {
				opacityTimeoutVar[0] = window.setTimeout('rotateSponsor(1)',4000);
			}
			
			if (document.getElementById('quotesTotal')) {
				opacityTimeoutVar[2] = window.setTimeout('rotateQuotes(1)',5000);
			}
			
			setWindowProps();
			
			loaded = 1;
			
			setVisit();
			
		}
		
		function setVisit() {
		
			currIp = document.getElementById('CurrIp').value;
			currMember = document.getElementById('CurrMem').value;
			currSession = document.getElementById('CurrSession').value;
		
			currHref = document.location.href;
		
			//alert(currHref);
		
			questionLocation = currHref.indexOf('?');
			
			variables = '';
			currPage = currHref;
			
			if (questionLocation != -1) {
				variables = currHref.split('?');
				currPage = variables[0];
				variables = variables[1].split('&');
			}
			
			//alert("functions.php?PageView=1&currPage="+currPage+"&variables="+variables+"&currMember="+currMember+"&currIp="+currIp+"&currSession="+currSession);
			
			currDiv = 'test';
			sendAjax("functions.php?PageView=1&currPage="+currPage+"&variables="+variables+"&currMember="+currMember+"&currIp="+currIp+"&currSession="+currSession,processAjax);
			
		}
				
		function IsNumeric(sText) {
		
			var ValidChars = "0123456789.,";
			var IsNumber=true;
			var Char;
		 
			for (i = 0; i < sText.length && IsNumber == true; i++) { 
				Char = sText.charAt(i); 
				if (ValidChars.indexOf(Char) == -1) {
					IsNumber = false;
				}
			}
			
			return IsNumber;
		   
		}
				
		function IsNumericOnly(sText) {
		
			var ValidChars = "0123456789";
			var IsNumber=true;
			var Char;
		 
			for (i = 0; i < sText.length && IsNumber == true; i++) { 
				Char = sText.charAt(i); 
				if (ValidChars.indexOf(Char) == -1) {
					IsNumber = false;
				}
			}
			
			return IsNumber;
		   
		}

		function nothing() {}
		
		function sendAjax(urlContent,returnFunc) {
		
			if (loaded == 1) {
		
				if (currLib != '') {
					urlContent	+= "&LibName="+currLib;
				}
			
				if (noLoading == 0) {
			
				thisWidth = document.getElementById(currDiv).style.width.substring(0,((document.getElementById(currDiv).style.width.length*1)-2))*1;
				thisHeight = document.getElementById(currDiv).style.height.substring(0,((document.getElementById(currDiv).style.height.length*1)-2))*1;
				topPadding = Math.round(thisHeight/2);
				leftPadding = Math.round(thisWidth/2);
				
				document.getElementById(currDiv).innerHTML = '<div align="center" style="padding: '+topPadding+'px 0px 0px '+leftPadding+'px"><img src="'+root_link+'/images/main/ajax_loader.gif"></br></div>';
			
				}
			
				createRequest();			
				
				//alert(urlContent);
				
				request.open("GET", root_link + "/includes/scripts/" + urlContent, true);
				request.onreadystatechange = eval(returnFunc);
				request.send(null);
				/*
				window.clearTimeout(ajaxTimeout);
				ajaxTimeout = window.setTimeout("request.send(null)",500);
				*/
			
			}
			
		}
		
		function processAjax() {
		
			if(request.readyState == 4) {
				
				if(request.status == 200) {
				
					//alert(trim(request.responseText));
				
					if((document.getElementById(currDiv)) && (trim(request.responseText) != '')) {
						//alert(document.getElementById('hoverMain').innerHTML);
						document.getElementById(currDiv).innerHTML = trim(request.responseText);
						document.getElementById(currDiv).style.visibility = "visible";
						//setOpacity(currDiv,9.7);
						/*
						clearTimeout(opacityTimeoutVar);
						displayOpacity(currDiv,1);
						*/
						//document.getElementById(currDiv).style.visibility = "visible";
						
						if (secondaryFunction != '') {
							eval(secondaryFunction);
							secondaryFunction = '';
						}
						
						if (currAnchor != '') {
							document.location.href = currAnchor;
							currAnchor = '';
						}
						
						tempContent = '';
						loadedContent = 1;
						noLoading = 0;
						
						/*
						if (waitFunction != '') {
							eval(waitFunction);	
						}
						*/
						
					}
					
				}
				
			}
		
		}
		
		function pageScroll() {
			getScrollOffset();
			if ((tempY+winH) < 570) {
				window.scrollBy(0,10); // horizontal and vertical scroll increments
				scrolldelay = setTimeout("pageScroll()",20); // scrolls every 100 milliseconds
			}
		}
		
		function trim(stringToTrim) {
			return stringToTrim.replace(/^\s+|\s+$/g,"");
		}
		
		function print_page(pageLink) {
			myRef = window.open(''+pageLink,'mywin','left=20,top=20,width=760,height=500,toolbar=0,resizable=0,scrollbars=1;');
		}
		
		function displayPopup() {
						
			setWindowProps();
			
			var leftOffset = Math.ceil((winW-tempWidth)/2)+tempX;
			var topOffset = Math.ceil((winH-tempHeight)/2)+tempY;
			//topOffset = 180;
			
			document.getElementById('temp').style.left = leftOffset+"px";
			document.getElementById('temp').style.top = topOffset+"px";
			document.getElementById('temp').style.width = tempWidth+"px";
			document.getElementById('temp').style.height = tempHeight+"px";
			
			//setOpacity('temp',1);
			
			//alert(1);
			document.getElementById('temp').style.visibility = "visible";
			//displayOpacity('temp',5);
		
		}
		
		function closePopup() {
			
			tempWidth = 0;
			tempHeight = 0;
			
			document.getElementById('temp').style.visibility = "hidden";
			document.getElementById('temp').innerHTML = "";
			
			document.getElementById('temp').style.left = "0px";
			document.getElementById('temp').style.top = "0px";
			document.getElementById('temp').style.width = "0px";
			document.getElementById('temp').style.height = "0px";
			
		}
		
		function check_errors(formName) {
			
			var submitOk = 1;
			var formatErrorMessage = 1;
			var errorContent = '<div style="font-weight: bold; padding-bottom: 5px;">The following fields have not been entered:</div>';
			
			if (formName == 'SurveyDetails') {
			
				var Email = document.SurveyDetails.Email.value;
				
				if ((Email != '')) {
					
					if (!check_email(Email)) {
					submitOk = 0;
					document.getElementById('errorEmail').style.visibility = 'visible';
					}
					
				}
			
			} else if (formName == 'ContactForm') {
			
				var Name = document.ContactForm.Name.value;
				var Email = document.ContactForm.Email.value;
				var Telephone = document.ContactForm.Telephone.value;
				var Organisation = document.ContactForm.Organisation.value;
				var Comments = document.ContactForm.Comments.value;
				var SecurityWord = document.ContactForm.SecurityWord.value;
				var SecurityWordVerify = document.ContactForm.SecurityWordVerify.value;
				
				document.ContactForm.Name.style.borderColor = '#CCC';
				document.ContactForm.Email.style.borderColor = '#CCC';
				document.ContactForm.Telephone.style.borderColor = '#CCC';
				document.ContactForm.Organisation.style.borderColor = '#CCC';
				document.ContactForm.Comments.style.borderColor = '#CCC';
				document.ContactForm.SecurityWord.style.borderColor = '#CCC';
				document.getElementById('errorName').style.visibility = 'hidden';
				document.getElementById('errorEmail').style.visibility = 'hidden';
				document.getElementById('errorTelephone').style.visibility = 'hidden';
				document.getElementById('errorOrganisation').style.visibility = 'hidden';
				document.getElementById('errorComments').style.visibility = 'hidden';
				document.getElementById('SecurityWord').style.color = '#666666';
				
				document.getElementById('ContactComments').innerHTML = 'comments';				
				
				if (Name == '') {
					submitOk = 0;
					document.ContactForm.Name.style.borderColor = '#00a33d';
					document.getElementById('errorName').style.visibility = 'visible';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					document.ContactForm.Email.style.borderColor = '#00a33d';
					document.getElementById('errorEmail').style.visibility = 'visible';
				} else if (!check_email(Email)) {
					submitOk = 0;
					document.ContactForm.Email.style.borderColor = '#00a33d';
					document.getElementById('errorEmail').style.visibility = 'visible';
				}
				
				if (Telephone == '') {
					submitOk = 0;
					document.ContactForm.Telephone.style.borderColor = '#00a33d';
					document.getElementById('errorTelephone').style.visibility = 'visible';
				}
				
				if (Organisation == '') {
					submitOk = 0;
					document.ContactForm.Organisation.style.borderColor = '#00a33d';
					document.getElementById('errorOrganisation').style.visibility = 'visible';
				}
				
				if (Comments == '') {
					submitOk = 0;
					document.ContactForm.Comments.style.borderColor = '#00a33d';
					document.getElementById('errorComments').style.visibility = 'visible';
				} else if ((Comments.toLowerCase().indexOf('href') != -1) || (Comments.toLowerCase().indexOf('<a') != -1) || (Comments.toLowerCase().indexOf('http') != -1) || (Comments.toLowerCase().indexOf('www') != -1)) {
					submitOk = 0;
					document.ContactForm.Comments.style.borderColor = '#00a33d';
					document.getElementById('ContactComments').innerHTML = 'comments (please do not add links)';
					document.getElementById('errorComments').style.visibility = 'visible';
				}
				
				if (MD5(SecurityWord) != SecurityWordVerify) {
					submitOk = 0;
					document.ContactForm.SecurityWord.style.borderColor = '#00a33d';
					document.getElementById('SecurityWord').style.color = '#00a33d';
				}
			
			} else if (formName == 'RegisterDetails') {
			
				var DietarySpecific = document.RegisterDetails.DietarySpecific.value;
				
				document.RegisterDetails.DietarySpecific.style.borderColor = '#CCC';
				document.getElementById('DietarySpecificError').style.visibility = 'hidden';
				
				if ((document.RegisterDetails.DietaryOther.checked == true) && (DietarySpecific == '')){
					submitOk = 0;
					document.RegisterDetails.DietarySpecific.style.borderColor = '#00a33d';
					document.getElementById('DietarySpecificError').style.visibility = 'visible';
				}
				
			} else if (formName == 'RegisterPersonal') {
			
				var FirstName = document.RegisterPersonal.FirstName.value;
				var LastName = document.RegisterPersonal.LastName.value;
				var Organisation = document.RegisterPersonal.Organisation.value;
				var Position = document.RegisterPersonal.Position.value;
				var Address = document.RegisterPersonal.Address.value;
				var PostalCode = document.RegisterPersonal.PostalCode.value;
				var City = document.RegisterPersonal.City.value;
				var Telephone = document.RegisterPersonal.Telephone.value;
				var Email = document.RegisterPersonal.Email.value;
				var EmailConfirm = document.RegisterPersonal.EmailConfirm.value;
				var OtherWebsite = document.RegisterPersonal.OtherWebsite.value;
				var Other = document.RegisterPersonal.Other.value;
				//var Password = document.RegisterForm.Password.value;
				//var PasswordConfirm = document.RegisterForm.PasswordConfirm.value;
				
				document.RegisterPersonal.FirstName.style.borderColor = '#CCC';
				document.RegisterPersonal.LastName.style.borderColor = '#CCC';
				document.RegisterPersonal.Organisation.style.borderColor = '#CCC';
				document.RegisterPersonal.Position.style.borderColor = '#CCC';
				document.RegisterPersonal.Address.style.borderColor = '#CCC';
				document.RegisterPersonal.PostalCode.style.borderColor = '#CCC';
				document.RegisterPersonal.City.style.borderColor = '#CCC';
				document.RegisterPersonal.Telephone.style.borderColor = '#CCC';
				document.RegisterPersonal.Email.style.borderColor = '#CCC';
				document.RegisterPersonal.EmailConfirm.style.borderColor = '#CCC';
				document.RegisterPersonal.OtherWebsite.style.borderColor = '#CCC';
				document.RegisterPersonal.Other.style.borderColor = '#CCC';
				//document.RegisterForm.Password.style.borderColor = '#CCC';
				//document.RegisterForm.PasswordConfirm.style.borderColor = '#CCC';
				document.getElementById('errorFirstName').style.visibility = 'hidden';
				document.getElementById('errorLastName').style.visibility = 'hidden';
				document.getElementById('errorOrganisation').style.visibility = 'hidden';
				document.getElementById('errorPosition').style.visibility = 'hidden';
				document.getElementById('errorAddress').style.visibility = 'hidden';
				document.getElementById('errorPostalCode').style.visibility = 'hidden';
				document.getElementById('errorCity').style.visibility = 'hidden';
				document.getElementById('errorTelephone').style.visibility = 'hidden';
				document.getElementById('errorEmail').style.visibility = 'hidden';
				document.getElementById('errorEmailConfirm').style.visibility = 'hidden';
				document.getElementById('CancellationError').innerHTML = '';
				//document.getElementById('errorPassword').style.visibility = 'hidden';
				//document.getElementById('errorPasswordConfirm').style.visibility = 'hidden';
				
				if (FirstName == '') {
					submitOk = 0;
					document.RegisterPersonal.FirstName.style.borderColor = '#00a33d';
					document.getElementById('errorFirstName').style.visibility = 'visible';
				}
				
				if (LastName == '') {
					submitOk = 0;
					document.RegisterPersonal.LastName.style.borderColor = '#00a33d';
					document.getElementById('errorLastName').style.visibility = 'visible';
				}
				
				if (Organisation == '') {
					submitOk = 0;
					document.RegisterPersonal.Organisation.style.borderColor = '#00a33d';
					document.getElementById('errorOrganisation').style.visibility = 'visible';
				}
				
				if (Position == '') {
					submitOk = 0;
					document.RegisterPersonal.Position.style.borderColor = '#00a33d';
					document.getElementById('errorPosition').style.visibility = 'visible';
				}
				
				if (Address == '') {
					submitOk = 0;
					document.RegisterPersonal.Address.style.borderColor = '#00a33d';
					document.getElementById('errorAddress').style.visibility = 'visible';
				}
				
				if (PostalCode == '') {
					submitOk = 0;
					document.RegisterPersonal.PostalCode.style.borderColor = '#00a33d';
					document.getElementById('errorPostalCode').style.visibility = 'visible';
				}
				
				if (City == '') {
					submitOk = 0;
					document.RegisterPersonal.City.style.borderColor = '#00a33d';
					document.getElementById('errorCity').style.visibility = 'visible';
				}
				
				if (Telephone == '') {
					submitOk = 0;
					document.RegisterPersonal.Telephone.style.borderColor = '#00a33d';
					document.getElementById('errorTelephone').style.visibility = 'visible';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					document.RegisterPersonal.Email.style.borderColor = '#00a33d';
					document.RegisterPersonal.EmailConfirm.style.borderColor = '#00a33d';
					document.getElementById('errorEmail').style.visibility = 'visible';
				} else if (!check_email(Email)) {
					submitOk = 0;
					document.RegisterPersonal.Email.style.borderColor = '#00a33d';
					document.RegisterPersonal.EmailConfirm.style.borderColor = '#00a33d';
					document.getElementById('errorEmail').style.visibility = 'visible';
				} else if (EmailConfirm != Email) {
					submitOk = 0;
					document.RegisterPersonal.EmailConfirm.style.borderColor = '#00a33d';
					document.getElementById('errorEmailConfirm').style.visibility = 'visible';
					document.RegisterPersonal.Email.style.borderColor = '#00a33d';
					document.getElementById('errorEmail').style.visibility = 'visible';
				}
				
				if (document.RegisterPersonal.Cancellation.checked == false) {
					submitOk = 0;
					document.getElementById('CancellationError').innerHTML = 'You must check this box in order to continue.';
				}
				
				if ((document.RegisterPersonal.OtherWebsiteCheckbox.checked == true) && (OtherWebsite == '')){
					submitOk = 0;
					document.RegisterPersonal.OtherWebsite.style.borderColor = '#00a33d';
				}
				
				if ((document.RegisterPersonal.OtherCheckbox.checked == true) && (Other == '')){
					submitOk = 0;
					document.RegisterPersonal.Other.style.borderColor = '#00a33d';
				}
				
				/*
				if ((Password == '') || (Password != PasswordConfirm)) {
					submitOk = 0;
					document.RegisterForm.Password.style.borderColor = '#00a33d';
					document.RegisterForm.PasswordConfirm.style.borderColor = '#00a33d';
					document.getElementById('errorPassword').style.visibility = 'visible';
					document.getElementById('errorPasswordConfirm').style.visibility = 'visible';
				}
				*/
			} else if (formName == 'RegisterPayment') {
			
				for (i = 0; i < 3; i++) {
					if (document.RegisterPayment.creditCardType[i].checked == true) {
						currCardType = document.RegisterPayment.creditCardType[i].value;
					}
				}
				
				var creditCardNumber = document.RegisterPayment.creditCardNumber.value;
				var expDateMonth = document.RegisterPayment.expDateMonth.value;
				var expDateYear = document.RegisterPayment.expDateYear.value;
				var cvv2Number = document.RegisterPayment.cvv2Number.value;
				
				document.RegisterPayment.creditCardNumber.style.borderColor = '#CCC';
				document.RegisterPayment.expDateMonth.style.borderColor = '#CCC';
				document.RegisterPayment.expDateYear.style.borderColor = '#CCC';
				document.RegisterPayment.cvv2Number.style.borderColor = '#CCC';
				
				var daysInMonth = 32 - new Date(expDateYear, (expDateMonth-1), 32).getDate();
				
				var d1 = new Date(expDateYear, (expDateMonth-1), daysInMonth);  // creates a new Date for the 1st June 2005
				var d2 = new Date(); // creates a new Date representing today
				var milli_d1 = d1.getTime();
				var milli_d2 = d2.getTime();
				var diff = milli_d1 - milli_d2;
				var num_days = (((diff / 1000) / 60) / 60) / 24;
				
				/*
				document.getElementById('errorName').style.visibility = 'hidden';
				document.getElementById('errorEmail').style.visibility = 'hidden';
				document.getElementById('errorTelephone').style.visibility = 'hidden';
				document.getElementById('errorOrganisation').style.visibility = 'hidden';
				document.getElementById('errorComments').style.visibility = 'hidden';
				*/
				
				if (!cardValidator(creditCardNumber,currCardType)) {
					submitOk = 0;
					document.RegisterPayment.creditCardNumber.style.borderColor = '#00a33d';
				}
				
				if (num_days < 0) {
					submitOk = 0;
					document.RegisterPayment.expDateMonth.style.borderColor = '#00a33d';
					document.RegisterPayment.expDateYear.style.borderColor = '#00a33d';
				}
				
				if (cvv2Number == '') {
					submitOk = 0;
					document.RegisterPayment.cvv2Number.style.borderColor = '#00a33d';
				}
				
				if ((cvv2Number == '') || (!IsNumericOnly(cvv2Number))) {
					submitOk = 0;
					document.RegisterPayment.cvv2Number.style.borderColor = '#00a33d';
				} else if ((currCardType == 'Visa') && (cvv2Number.length != 3)) {
					submitOk = 0;
					document.RegisterPayment.cvv2Number.style.borderColor = '#00a33d';
				} else if ((currCardType == 'MasterCard') && (cvv2Number.length != 3)) {
					submitOk = 0;
					document.RegisterPayment.cvv2Number.style.borderColor = '#00a33d';
				} else if ((currCardType == 'Amex') && (cvv2Number.length != 4)) {
					submitOk = 0;
					document.RegisterPayment.cvv2Number.style.borderColor = '#00a33d';
				}
				
			
			}
			
			if (submitOk == 1) {
				eval("document."+formName).submit();	
			}
			
		}
		
		function cardValidator(cardNumber, cardType)
		{
		  var isValid = false;
		  var ccCheckRegExp = /[^\d ]/;
		  isValid = !ccCheckRegExp.test(cardNumber);
		
		  if (isValid)
		  {
			var cardNumbersOnly = cardNumber.replace(/ /g,"");
			var cardNumberLength = cardNumbersOnly.length;
			var lengthIsValid = false;
			var prefixIsValid = false;
			var prefixRegExp;
		
			switch(cardType)
			{
			  case "MasterCard":
				lengthIsValid = (cardNumberLength == 16);
				prefixRegExp = /^5[1-5]/;
				break;
		
			  case "Visa":
				lengthIsValid = (cardNumberLength == 16 || cardNumberLength == 13);
				prefixRegExp = /^4/;
				break;
		
			  case "Amex":
				lengthIsValid = (cardNumberLength == 15);
				prefixRegExp = /^3(4|7)/;
				break;
		
			  default:
				prefixRegExp = /^$/;
				alert("Card type not found");
			}
		
			prefixIsValid = prefixRegExp.test(cardNumbersOnly);
			isValid = prefixIsValid && lengthIsValid;
		  }
		
		  if (isValid)
		  {
			var numberProduct;
			var numberProductDigitIndex;
			var checkSumTotal = 0;
		
			for (digitCounter = cardNumberLength - 1; 
			  digitCounter >= 0; 
			  digitCounter--)
			{
			  checkSumTotal += parseInt (cardNumbersOnly.charAt(digitCounter));
			  digitCounter--;
			  numberProduct = String((cardNumbersOnly.charAt(digitCounter) * 2));
			  for (var productDigitCounter = 0;
				productDigitCounter < numberProduct.length; 
				productDigitCounter++)
			  {
				checkSumTotal += 
				  parseInt(numberProduct.charAt(productDigitCounter));
			  }
			}
		
			isValid = (checkSumTotal % 10 == 0);
		  }
		
		  return isValid;
		}

		
		function dispNavSub(SetNav,CurrNavDisp) {
			
			clearTimeout(currNavTimeout);
			
			if (CurrNavDisp != CurrNav) {
				hideNavSub(CurrNav);
			}
			
			hideNavSub(CurrNavDisp);
			
			CurrNav = SetNav;
			
			ImageName = document.getElementById('ImageNameNav'+CurrNav).value;
			eval('document.Nav'+CurrNav).src= root_link+'/images/menu/'+ImageName+'-on.jpg';
		
			document.getElementById('topNavSub'+SetNav).style.visibility = 'visible';
		
		}
		
		function hideNavSub(SetNav) {
			
			ImageName = document.getElementById('ImageNameNav'+SetNav).value;
			eval('document.Nav'+SetNav).src= root_link+'/images/menu/'+ImageName+'.gif';
			document.getElementById('topNavSub'+SetNav).style.visibility = 'hidden';
		
		}
		
		function hideNavSubDelay(SetNav) {
			
			currNavTimeout = window.setTimeout("dispNavSub("+SetNav+","+CurrNav+")",500);
			
		}
		
		function opacityDiv(divName,opacityValue,direction) {
		
			setOpacity(divName,opacityValue);
			
			if (direction == 1) {
				if (opacityValue < 10) {
					window.setTimeout("opacityDiv('"+divName+"','"+(opacityValue+1)+"',"+direction+")",120);
				} else {
					partnerRotateTimeoutMain = window.setTimeout('PartnerRotateWide(1)',(4000));
				}
			} else {
				if (opacityValue > 0) {
					window.setTimeout("opacityDiv('"+divName+"','"+(opacityValue-1)+"',"+direction+")",50);
				} else {
					document.getElementById(divName).style.visibility = "hidden";
					opacityDiv('partnerDiv'+currPartnerWide,0,1);
					document.getElementById('partnerDiv'+currPartnerWide).style.visibility = "visible";
				}
			}
		
		}
		
		function rotateSponsor(direction) {
			
			if (rotating == 0) {
				
				rotating = 1;
				
				var oldSponsor = 0;
				var divName = '';
				
				clearTimeout(opacityTimeoutVar[0]);
				clearTimeout(opacityTimeoutVar[1]);
				
				var sponsorTotal = document.getElementById('sponsorTotal').value*1;
				var sponsorDisp = document.getElementById('sponsorDisp').value*1;
				
				oldSponsor = currSponsor;
				if (direction == 0) {
					if (currSponsor == 1) {
						currSponsor = sponsorTotal;
					} else {
						currSponsor--;
					}
				} else {
					if (currSponsor == sponsorTotal) {
						currSponsor = 1;
					} else {
						currSponsor++;
					}
				}
				
				var sponsorName = document.getElementById('sponsorName'+currSponsor).value;
				var sponsorId = document.getElementById('sponsorId'+currSponsor).value*1;
				
				if (document.getElementById('sponsorTitle'+currSponsor)) {
					var sponsorTitle = document.getElementById('sponsorTitle'+currSponsor).value;	
					document.getElementById('SponsorTitle').innerHTML = sponsorTitle;
				}
				
				//displayOpacity(divName,value,increment,limit,num)
				divName = 'sponsorImage'+oldSponsor;
				displayOpacity(divName,9,-1,0,0);
				divName = 'sponsorImage'+currSponsor;
				setOpacity(divName,0);
				document.getElementById(divName).style.zIndex = 1;
				document.getElementById(divName).style.visibility = 'visible';
				var newContent = '<a href="'+root_link+'/sponsors.php" class="sponsorLink">'+sponsorName+'</a>';
				opacityTimeoutVar[1] = window.setTimeout("rotateSponsorTimer('sponsorImage"+oldSponsor+"','"+newContent+"')",600);
			
			}
			
		}
		
		function rotateSponsorTimer(divName,newContent) {
			
			//alert(divName);
			
			document.getElementById(divName).style.zIndex = 0;
			document.getElementById(divName).style.visibility = 'hidden';
			rotating = 0;
			divName = 'sponsorImage'+currSponsor;
			displayOpacity(divName,1,1,10,1);			
			document.getElementById('sponsorName').innerHTML = newContent;
			opacityTimeoutVar[0] = window.setTimeout('rotateSponsor(1)',4000);
			
		}
		
		function rotateQuotes(direction) {
			
			if (rotating == 0) {
				
				rotating = 1;
				
				var oldQuote = 0;
				var divName = '';
				
				clearTimeout(opacityTimeoutVar[2]);
				clearTimeout(opacityTimeoutVar[3]);
				
				var quotesTotal = document.getElementById('quotesTotal').value*1;
				
				oldQuote = currQuote;
				if (direction == 0) {
					if (currQuote == 1) {
						currQuote = quotesTotal;
					} else {
						currQuote--;
					}
				} else {
					if (currQuote == quotesTotal) {
						currQuote = 1;
					} else {
						currQuote++;
					}
				}
				
				//displayOpacity(divName,value,increment,limit,num)
				divName = 'quotesContent'+oldQuote;
				displayOpacity(divName,9,-1,0,0);
				divName = 'quotesContent'+currQuote;
				setOpacity(divName,0);
				document.getElementById(divName).style.visibility = 'visible';
				opacityTimeoutVar[3] = window.setTimeout("rotateQuotesTimer('quotesContent"+oldQuote+"')",600);
			
			}
			
		}
		
		function rotateQuotesTimer(divName) {
			
			//alert(divName);
			
			document.getElementById(divName).style.zIndex = 0;
			document.getElementById(divName).style.visibility = 'hidden';
			rotating = 0;
			divName = 'quotesContent'+currQuote;
			displayOpacity(divName,1,1,10,1);			
			opacityTimeoutVar[2] = window.setTimeout('rotateQuotes(1)',5000);
			
		}		
		
		function changeTextsize(num) {
			
			if (!document.getElementById('textContent').style.fontSize) {
				document.getElementById('textContent').style.fontSize = "13px";	
			}
		
			currFontSize = (document.getElementById('textContent').style.fontSize.substr(0,(document.getElementById('textContent').style.fontSize.length-2)))*1;
			currLineHeight = (document.getElementById('textContent').style.lineHeight.substr(0,(document.getElementById('textContent').style.lineHeight.length-2)))*1;
			
			currFontSize += num;
		
			if ((currFontSize > 8) && (currFontSize < 17)) { 
		
			document.getElementById('textContent').style.fontSize = (currFontSize) + "px";
			document.getElementById('textContent').style.lineHeight = (currLineHeight+num) + "px";
			
			}
		
		}
		
		function scrollList(divName,direction,limit) {
			
			if (scrolling == 1) {
			
				var newscrollingTop = scrollingTop + ((direction)*10);
				
				//alert(newscrollingTop+ ' ' +limit*(-1));
				
				if ((newscrollingTop >= (limit*(-1))) && (newscrollingTop <= 26)) {
					scrollingTop = newscrollingTop;
					document.getElementById(divName).style.top = scrollingTop + "px";
					window.setTimeout("scrollList('"+divName+"',"+direction+","+limit+")",50);
				}
			
			}
			
		}
		
		function defaultField(fieldValue,fieldObject,fieldState) {
		
			//var fieldObject = eval('document.'+fieldForm+'.'+fieldName);
			//fieldForm,fieldName
			
			if ((fieldState == 0) && (fieldObject.value == fieldValue)) {
				fieldObject.value = '';	
			} else if ((fieldState == 1) && (fieldObject.value == '')) {
				fieldObject.value = fieldValue;	
			}
		
		}
		
		function displayTopNav(SetNav) {
			
			if (currTopNav != SetNav) {
				hideTopNavFull();
			}
			
			clearTimeout(currTimeout);
			
			currTopNav = SetNav;
			
			if (document.getElementById('topNavLink'+currTopNav)) {
				document.getElementById('topNavLink'+currTopNav).className = 'topNavOn';
				document.getElementById('topNav'+currTopNav).style.overflow = 'visible';
			}
			
		}
		
		function hideTopNav() {
			
			if (currTopNav != 0) {
				currTimeout = window.setTimeout("hideTopNavFull()",200);
			}
		
		}
		
		function hideTopNavFull() {
			if (currTopNav != 0) {
				if (document.getElementById('topNavLink'+currTopNav)) {
					document.getElementById('topNavLink'+currTopNav).className = 'topNav';
					document.getElementById('topNav'+currTopNav).style.overflow = 'hidden';
				}
				currTopNav = 0;
			}
		}
		
		function displayNavWarning(leftOffset) {
			document.getElementById('navWarning').style.left = leftOffset+'px';
			document.getElementById('navWarning').style.visibility = 'visible';
		}
		
		function hideNavWarning() {
			document.getElementById('navWarning').style.visibility = 'hidden';
		}
		
		function focusSubscribe() {
			
			document.location = '#subscribeAnchor';
			
			tempWidth = 500;
			tempHeight = 150;			
			
			var contentDisp = '';
			
			contentDisp += '<div style="border: solid 2px #EFEFEF; background-color: #FFF">';
			contentDisp += '<div style="border: solid 2px #DFDFDF;">';
			contentDisp += '<div style="border: solid 1px #CCCCCC;">';
			contentDisp += '<div style="position: relative; width: 490px; height: 140px;">';
			
			contentDisp += '<div align="left" style="position: absolute; right: 10px; top: 10px; width: 15px; height: 15px;">';
			contentDisp += '<a href="javascript: nothing()" onclick="closePopup()">';
			contentDisp += '<img src="'+root_link+'/images/main/close.png" width="15" height="15" vspace="0" hspace="0" border="0"><br>';
			contentDisp += '</a>';
			contentDisp += '</div>';
			
			contentDisp += '<div style="padding: 10px;">';
			contentDisp += '<div align="left" style="width: 320px; height: 120px;">';
			
			contentDisp += '<div style="padding: 10px;">';
			
			contentDisp += '<form name="SubscribeFormPopup" onsubmit="return false;" style="display: inline;">';
			
			contentDisp += '<div align="left" style="padding: 0px 0px 10px 20px; font-weight: bold">';
			contentDisp += 'Keep up to date with the latest developments about the conference!';
			contentDisp += '</div>';
			
			contentDisp += '<div style="width: 300px; height: 25px;">';
			
			contentDisp += '<div align="right" style="float: left; width: 195px; height: 25px; margin-right: 5px;">';
			contentDisp += '<input type="text" name="Email" value="Enter e-mail address for updates" autocomplete="off" class="input" style="width: 175px; color: #999;" onfocus="clearTimeout(opacityTimeoutVar[3]); document.getElementById(\'subscribeArrow\').style.visibility=\'hidden\'; defaultField(\'Enter e-mail address for updates\',this,0)" onblur="defaultField(\'Enter e-mail address for updates\',this,1)">';
			contentDisp += '</div>';
			contentDisp += '<div style="float: left; width: 100px; height: 25px;">';
			contentDisp += '<div id="subscribePadding" style="padding-top: 1px;">';
			contentDisp += '<a href="javascript: nothing()" onclick="saveSubscribePopup()">';
			contentDisp += '<img src="'+root_link+'/images/main/subscribe-button.png" width="100" height="19" vspace="0" hspace="0" border="0" /><br />';
			contentDisp += '</a>';
			contentDisp += '</div>';
			contentDisp += '</div>';
			
			contentDisp += '</div>';
			
			contentDisp += '<div style="padding-left: 20px;">';
			contentDisp += '<div id="subscribeMessagePopup" style="width: 280px; height: 50px;">';		
			contentDisp += '</div>';		
			contentDisp += '</div>';
	
			contentDisp += '</form>';
			
			contentDisp += '</div>';
			
			contentDisp += '</div>';
			contentDisp += '</div>';
			
			contentDisp += '</div>';
			contentDisp += '</div>';
			contentDisp += '</div>';
			contentDisp += '</div>';
			
			document.getElementById('temp').innerHTML = contentDisp;
			
			displayPopup();
			
			
			//rotatefocusSubscribe(0);			
			//document.SubscribeForm.Email.className = 'inputFocus';
			//document.getElementById('subscribePadding').style.paddingTop = '4px';
			//document.getElementById('subscribeBox').style.backgroundColor = '#EEE';
		
		}
		
		function rotatefocusSubscribe(type) {
			
			divName = 'subscribeArrow';
			
			if (type == 1) {
				setOpacity(divName,1);
				document.getElementById(divName).style.visibility = 'visible';
				displayOpacity(divName,1,1,9,2);
				opacityTimeoutVar[3] = window.setTimeout("rotatefocusSubscribe(0)",800);
			} else {
				setOpacity(divName,9);
				document.getElementById(divName).style.visibility = 'visible';
				displayOpacity(divName,9,-1,1,2);
				opacityTimeoutVar[3] = window.setTimeout("rotatefocusSubscribe(1)",800);
			}
			
		}
		
		function saveSubscribe() {
			
			clearTimeout(LinkInfoBoxTimer);
		
			var Email = document.SubscribeForm.Email.value;
			var Ip = document.SubscribeForm.Ip.value;
			var Session = document.SubscribeForm.Session.value;
		
			//alert(Email);
		
			if (!check_email(Email)) {
				document.getElementById('subscribeMessage').innerHTML = 'Invalid email, please try again.';
			} else {
				currDiv = 'subscribeMessage';
				sendAjax("functions.php?saveSubscribe=1&Email="+Email+"&Ip="+Ip+"&Session="+Session,processAjax);
				document.SubscribeForm.Email.value = '';
				document.SubscribeForm.Email.style.borderColor = '#CCC';
				window.setTimeout("document.getElementById('subscribeMessage').innerHTML=''",3000);
			}
			
			clearTimeout(opacityTimeoutVar[3]);
			document.getElementById('subscribeArrow').style.visibility = 'hidden';
			//document.getElementById('subscribeArrow').style.visibility = 'hidden';
			//document.SubscribeForm.Email.className = 'input';
			//document.getElementById('subscribePadding').style.paddingTop = '1px';
			//document.getElementById('subscribeBox').style.backgroundColor = '#FFF';
					
		}
		
		function saveSubscribePopup() {
			
			clearTimeout(LinkInfoBoxTimer);
		
			var Email = document.SubscribeFormPopup.Email.value;
			var Ip = document.SubscribeForm.Ip.value;
			var Session = document.SubscribeForm.Session.value;
		
			//alert(Email);
		
			if (!check_email(Email)) {
				document.getElementById('subscribeMessagePopup').innerHTML = 'Invalid email, please try again.';
			} else {
				currDiv = 'subscribeMessagePopup';
				sendAjax("functions.php?saveSubscribe=1&Email="+Email+"&Ip="+Ip+"&Session="+Session,processAjax);
				document.SubscribeFormPopup.Email.value = '';
				document.SubscribeFormPopup.Email.style.borderColor = '#CCC';
				window.setTimeout("document.getElementById('subscribeMessagePopup').innerHTML=''",3000);
			}
			
		}
		
		function setRegistrationTotal() {
		
			FeeTotal		= document.RegisterDetails.FeeTotal.value;
			ActivityTotal	= document.RegisterDetails.ActivityTotal.value;
			
			Total			= 0;
			
			for (i = 1; i <= FeeTotal; i++) {
			
				FeePrice = eval('document.RegisterDetails.FeePrice'+i).value*1;
				FeeVAT = eval('document.RegisterDetails.FeeVAT'+i).value*1;
				if (document.RegisterDetails.FeeId[(i-1)].checked === true) {
					Total += (FeePrice*(1+(FeeVAT/100)));
				}
			}
			
			for (i = 1; i <= ActivityTotal; i++) {
			
				ActivityPrice = eval('document.RegisterDetails.ActivityPrice'+i).value*1;
				ActivityVAT = eval('document.RegisterDetails.ActivityVAT'+i).value*1;
				ActivityId = eval('document.RegisterDetails.ActivityId'+i).value*1;
				if ( eval('document.RegisterDetails.Activity'+ActivityId).checked === true) {
					Total += (ActivityPrice*(1+(ActivityVAT/100)));
				}
			}
			
			Total	= Total.toFixed(2);
			
			document.RegisterDetails.PaymentTotal.value = Total;
			//document.RegisterForm.PaymentAmount.value = Total;
			
		}
		
		function verifyFormal(obj,ActivityId) {
		
			if (obj.checked == true) {
				if (ActivityId == 3) {
					document.RegisterDetails.Activity4.checked = true;
				}
			} else {
				if (ActivityId == 4) {
					document.RegisterDetails.Activity3.checked = false;
				}
			}
		
			setRegistrationTotal();
		
		}
		
		function setCVNImage() {
		
			for (i = 0; i < 3; i++) {
				if (document.RegisterPayment.creditCardType[i].checked == true) {
					currCardType = document.RegisterPayment.creditCardType[i].value;
				}
			}
			
			//alert(currCardType);
			
			document.getElementById('CVN-'+currCardType).style.visibility = "visible";
		
		}
		
		function hideCVNImage() {
		
			for (i = 0; i < 3; i++) {
				if (document.RegisterPayment.creditCardType[i].checked == true) {
					currCardType = document.RegisterPayment.creditCardType[i].value;
				}
			}
			
			//alert(currCardType);
			
			document.getElementById('CVN-'+currCardType).style.visibility = "hidden";
		
		}
		
		function displayCancellation() {
			
			tempWidth = 500;
			tempHeight = 250;			
			
			var contentDisp = '';
			
			contentDisp += '<div style="border: solid 2px #EFEFEF; background-color: #FFF">';
			contentDisp += '<div style="border: solid 2px #DFDFDF;">';
			contentDisp += '<div style="border: solid 1px #CCCCCC;">';
			contentDisp += '<div style="position: relative; width: 490px; height: 240px;">';
			
			contentDisp += '<div align="left" style="position: absolute; right: 10px; top: 10px; width: 15px; height: 15px;">';
			contentDisp += '<a href="javascript: nothing()" onclick="closePopup()">';
			contentDisp += '<img src="'+root_link+'/images/main/close.png" width="15" height="15" vspace="0" hspace="0" border="0"><br>';
			contentDisp += '</a>';
			contentDisp += '</div>';
			
			contentDisp += '<div style="padding: 0px 10px 10px 10px;">';
			contentDisp += '<div align="left" style="width: 420px; height: 220px;">';
			
			contentDisp += '<div style="padding: 0px 10px 10px 10px;">';
			
			contentDisp += '<h4>Cancellation policy</h4>';
			
			contentDisp += 'The following cancellation fees apply:';
			contentDisp += '<ul>';
			contentDisp += '<li>Until 16 September: 95€ (+21% VAT)</li>';
			contentDisp += '<li>From 16 September: non-refundable</li>';
			contentDisp += '</ul>';
			
			contentDisp += 'Where a minimum of participants is required, the organiser reserves the right to cancel the activity if this number is not reached.<br><br>';
			
			contentDisp += 'Substitute attendees will be accepted. All cancellations must be received in writing to <a href="mailto:info@atmosphere2009.com">info@atmosphere2009.com</a>.';
			
			contentDisp += '</div>';
			
			contentDisp += '</div>';
			contentDisp += '</div>';
			
			contentDisp += '</div>';
			contentDisp += '</div>';
			contentDisp += '</div>';
			contentDisp += '</div>';
			
			document.getElementById('temp').innerHTML = contentDisp;
			
			displayPopup();
			
			document.getElementById('temp').style.top = '700px';
			
			//rotatefocusSubscribe(0);			
			//document.SubscribeForm.Email.className = 'inputFocus';
			//document.getElementById('subscribePadding').style.paddingTop = '4px';
			//document.getElementById('subscribeBox').style.backgroundColor = '#EEE';
		
		}
		
		function mapHover(RegistrantId,PositionLeft,PositionTop) {
		
			var Name = document.getElementById('Name'+RegistrantId).value;
			var Organisation = document.getElementById('Organisation'+RegistrantId).value;
			var Position = document.getElementById('Position'+RegistrantId).value;
			var City = document.getElementById('City'+RegistrantId).value;
			var CountryName = document.getElementById('CountryName'+RegistrantId).value;
		
			var briefContent = '<div style="padding: 10px 10px 5px 10px; font-weight: bold">';
			briefContent += Name;
			briefContent += '</div>';
			briefContent += '<div style="padding: 0px 0px 0px 10px;">';
			briefContent += Organisation+', '+Position;
			briefContent += '</div>';
			briefContent += '<div style="padding: 5px 10px 0px 10px; font-style: italic;">';
			briefContent += City+', '+CountryName;
			briefContent += '</div>';
			
			//alert(briefContent);
			
			document.getElementById('mapHover').innerHTML = briefContent;
			
			document.getElementById('mapHover').style.left = PositionLeft + 'px';
			document.getElementById('mapHover').style.top = (PositionTop-125) + 'px';
			document.getElementById('mapHover').style.visibility = 'visible';
			
		}
		
		function mapHoverHide() {
			
			document.getElementById('mapHover').innerHTML = '';
			document.getElementById('mapHover').style.visibility = 'hidden';
			
		}
		