		
		var root_link = "http://www.naturalrefrigerants.com";
		
		var tempContent = "";
		
		var loadedContent = 1;
		
		var rotateTimeout = "";
		var currTimeout = "";
		
		var currLib	= "";
		
		var loaded	= 0;
		
		var waitFunction = "";
		
		var noLoading = 0;
		
		var playerHeight = 0;
		
		var commentsOn = 0;
		
		var currItem = 0;
		
		var currPartner = 0;
		
		var currHover = "";
		var hoverTimeout = "";
		
		var expandDiv = "";
		var expandStart = 0;
		var expandEnd = 0;
		var expandNum = 0;
		
		var currNavName = "navAllLink";
		var currNavSubName = "";
		
		var currDiv = "";
		var currFeat = 1;
		var currAnchor = "";
		var currFunction = "";
		var secondaryFunction = "";
		var ajaxTimeout = 0;
		
		var currSection = 0;
		var currSubSection = 0;
		
		var currRightNav = "Search";
		
		var CurrNav = 0;
		var currNavTimeout = "";
		
		var currCircleLeft = 0;
		var currCircleTop = 0;
		var currCircleTimeout = "";
		
		var CurrInfoBox = -1;
		var LinkInfoBoxOpen = 0;
		var LinkInfoBoxTimer = 0;
		var AbortCloseBox = 0;
		
		var divCount = 2;
		var currDiv = 0;
		var openDiv = 0;
		
		var tempWidth = 0;
		var tempHeight = 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;
		
		// Set-up to use getMouseXY function onMouseMove
		//document.onfocus = blurLink;
		
		//document.onfocus = blurLink;
		
		
		
		function blurLink(e) {
		
			if (!e) var obj = window.event.srcElement;
			else var obj = e.target;
			
			while (obj.nodeType != 1) {
				obj = obj.parentNode;
			}

			if(obj.tagName) {
				alert(obj.tagName);
			}
			
			if(obj.tagName == 'A') {
				alert(obj.href);
				obj.blur();
			}
			
		}
		
		//onfocus="if(this.blur)this.blur();"
		
		// 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) {
			
			if (value == 10) {
				setOpacity(divName,value);
				clearTimeout(opacityTimeoutVar);
			} else {
				setOpacity(divName,value);
				opacityTimeoutVar = window.setTimeout("displayOpacity('"+divName+"',"+(value+1)+")",50);
			}
			
		}
		
		function init(resize) {
			
			if (document.getElementById('currLib')) {
				currLib = document.getElementById('currLib').value;
				//alert(currLib);
			}
			
			//window.setTimeout('PartnerRotateWide(1)',4000);
			
			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 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 defaultField(fieldValue,fieldObject,fieldState) {
			
			if ((fieldState == 0) && (fieldObject.value == fieldValue)) {
				fieldObject.value = '';	
			} else if ((fieldState == 1) && (fieldObject.value == '')) {
				fieldObject.value = fieldValue;	
			}
		
		}
		
		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 == 'RegistrationForm') {
			
				var PrefixId = document.RegistrationForm.PrefixId.value;
				var FirstName = document.RegistrationForm.FirstName.value;
				var LastName = document.RegistrationForm.LastName.value;
				var Email = document.RegistrationForm.Email.value;
				var Username = document.RegistrationForm.Username.value;
				var UsernameValid = document.RegistrationForm.UsernameValid.value;
				var Password = document.RegistrationForm.Password.value;
				var PasswordRepeat = document.RegistrationForm.PasswordRepeat.value;
				
				var Company = document.RegistrationForm.Company.value;
				
				if (PrefixId == 0) {
					submitOk = 0;
					errorContent += 'Please select your title<br>';
				}
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter your first name<br>';
				}
				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter your last name<br>';
				}
				
				if (Company.indexOf('google') != -1) {
					submitOk = 0;
					errorContent += 'Please enter a valid organisation<br>';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					errorContent += 'Please enter your email address<br>';
				} else if (!check_email(Email)) {
					submitOk = 0;
					errorContent += 'Please enter a valid email address<br>';
				}
				
				/*else {
				
					if (EmailValid == 0) {
						submitOk = 0;
						errorContent += 'Please enter a valid username<br>';
					}
				
				}*/
				
				if (Username == '') {
					submitOk = 0;
					errorContent += 'Please enter a username of at least 4 characters<br>';
				} else {
				
					if (UsernameValid == 0) {
						submitOk = 0;
						errorContent += 'Please enter a valid username of at least 4 characters<br>';
					}
				
				}
				
				if (Password.length < 6) {
					submitOk = 0;
					errorContent += 'Please enter a password of at least 6 characters<br>';
				}
				
				if (Password != PasswordRepeat) {
					submitOk = 0;
					errorContent += 'Your passwords do not match!<br>';
				}
				
				if (!document.RegistrationForm.terms.checked) {
					submitOk = 0;
					errorContent += 'Please confirm that you have read our terms and conditions<br>';
				}
			
			} else if (formName == 'PartnerRequest') {
			
				var FirstName = document.PartnerRequest.FirstName.value;

				var LastName = document.PartnerRequest.LastName.value;
				var Email = document.PartnerRequest.Email.value;
				var Company = document.PartnerRequest.Company.value;
				var Message = document.PartnerRequest.Message.value;
				
				formatErrorMessage = 0;
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter your first name<br>';
				}
				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter your last name<br>';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					errorContent += 'Please enter your email address<br>';
				} else if (!check_email(Email)) {
					submitOk = 0;
					errorContent += 'Please enter a valid email address<br>';
				}
				
				if ((Company == '')) {
					submitOk = 0;
					errorContent += 'Please enter a valid company name<br>';
				} else if (Company.indexOf('google') != -1) {
					submitOk = 0;
					errorContent += 'Please enter a valid company name<br>';
				}
				
				if (Message == '') {
					submitOk = 0;
					errorContent += 'Please enter your request text<br>';
				}
			
			} else if (formName == 'ContactRequest') {
				
				var FirstName = document.ContactRequest.FirstName.value;
				var LastName = document.ContactRequest.LastName.value;
				var Email = document.ContactRequest.Email.value;
				var Company = document.ContactRequest.Company.value;
				var Message = document.ContactRequest.Message.value;
				
				formatErrorMessage = 0;
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter your first name<br>';
				}
				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter your last name<br>';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					errorContent += 'Please enter your email address<br>';
				} else if (!check_email(Email)) {
					submitOk = 0;
					errorContent += 'Please enter a valid email address<br>';
				}
				
				if ((Company == '')) {
					submitOk = 0;
					errorContent += 'Please enter a valid company name<br>';
				} else if (Company.indexOf('google') != -1) {
					submitOk = 0;
					errorContent += 'Please enter a valid company name<br>';
				}
				
				if (Message == '') {
					submitOk = 0;
					errorContent += 'Please enter your enquiry text<br>';
				}
			
			} else if (formName == 'SubscriptionForm') {
			
				var FirstName = document.SubscriptionForm.FirstName.value;
				var LastName = document.SubscriptionForm.LastName.value;
				var Email = document.SubscriptionForm.Email.value;
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter your first name<br>';
				}
				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter your last name<br>';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					errorContent += 'Please enter your email address<br>';
				} else if (!check_email(Email)) {
					submitOk = 0;
					errorContent += 'Please enter a valid email address<br>';
				}
			
			} else if (formName == 'ProfileForm') {
			
				var PrefixId = document.ProfileForm.PrefixId.value;
				var FirstName = document.ProfileForm.FirstName.value;
				var LastName = document.ProfileForm.LastName.value;
				var Email = document.ProfileForm.Email.value;
				var Username = document.ProfileForm.Username.value;
				var UsernameValid = document.ProfileForm.UsernameValid.value;
				var Password = document.ProfileForm.Password.value;
				var PasswordRepeat = document.ProfileForm.PasswordRepeat.value;
				/*
				var Password = document.RegistrationForm.Password.value;
				var PasswordRepeat = document.RegistrationForm.PasswordRepeat.value;
				*/
				if (PrefixId == 0) {
					submitOk = 0;
					errorContent += 'Please select your title<br>';
				}
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter your first name<br>';
				}

				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter your last name<br>';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					errorContent += 'Please enter your email address<br>';
				} else if (!check_email(Email)) {
					submitOk = 0;
					errorContent += 'Please enter a valid email address<br>';
				}
				
				if (Username == '') {
					submitOk = 0;
					errorContent += 'Please enter a username of at least 4 characters<br>';
				} else {
				
					if (UsernameValid == 0) {
						submitOk = 0;
						errorContent += 'Please enter a valid username of at least 4 characters<br>';
					}
				
				}
				
				if (Password != '') {
				
					if (Password.length < 6) {
						submitOk = 0;
						errorContent += 'Please enter a password of at least 6 characters<br>';
					}
					
					if (Password != PasswordRepeat) {
						submitOk = 0;
						errorContent += 'Your passwords do not match!<br>';
					}
				
				}
			
			} else if (formName == 'PaperForm') {
			
				var Title = document.PaperForm.Title.value;
				
				var Year = document.PaperForm.Year.value;
				var Pages = document.PaperForm.Pages.value;
				var SectorCount = document.PaperForm.SectorCount.value;
				var TopicCount = document.PaperForm.TopicCount.value;
				var AuthorCount = document.PaperForm.AuthorCount.value;
				var OrgCount = document.PaperForm.OrgCount.value;
				
				var SectorId = document.PaperForm.SectorId.value;
				var TopicId = document.PaperForm.TopicId.value;
				var AuthorId = document.PaperForm.AuthorId.value;
				var AuthorNew = document.PaperForm.AuthorNew.value;
				var OrgId = document.PaperForm.OrgId.value;
				var OrgNew = document.PaperForm.OrgNew.value;
				
				var FileSource = document.PaperForm.FileSource.value;
				
				document.getElementById('loaderPaper').style.visibility = "visible";
				
				//errorContent = '';
				
				var fileExt = FileSource.substring((FileSource.length-4),FileSource.length);
				
				if (Title == '') {
					submitOk = 0;
					errorContent += 'Please enter the title of your paper<br>';
				}
				
				if ((Year == '') || (Year == 0)) {
					submitOk = 0;
					errorContent += 'Please enter the year of publication of your paper<br>';
				}
				
				if ((Pages == '') || (Pages == 0)) {
					submitOk = 0;
					errorContent += 'Please enter the number of pages in your paper<br>';
				}
				
				if ((SectorCount == 1) && (SectorId == 0)) {
					submitOk = 0;
					errorContent += 'Please add at least 1 sector<br>';
				}
				
				if ((TopicCount == 1) && (TopicId == 0)) {
					submitOk = 0;
					errorContent += 'Please add at least 1 topic<br>';
				}
				
				if ((AuthorCount == 1) && (AuthorId == 0) && (AuthorNew == '')) {
					submitOk = 0;
					errorContent += 'Please select at least 1 author<br>';
				}
				
				if ((OrgCount == 1) && (OrgId == 0) && (OrgNew == '')) {
					submitOk = 0;
					errorContent += 'Please select at least 1 organisation<br>';
				}
				
				if (FileSource == '') {
					submitOk = 0;
					errorContent += 'Please choose your file before submitting<br>';
				}
				
				if ((fileExt != '.pdf') && (fileExt != '.ppt') && (fileExt != '.doc') && (fileExt != '.xls')) {
					submitOk = 0;
					errorContent += 'Please upload a file of "pdf format", "powerpoint", "document" or "excel"<br>';
				}
			
			} else if (formName == 'ProfileNewsForm') {
			
				var SourceId = document.ProfileNewsForm.SourceId.value;
				var SourceNew = document.ProfileNewsForm.SourceNew.value;
				var Title = document.ProfileNewsForm.Title.value;
				var Synopsis = document.ProfileNewsForm.Synopsis.value;
				var AttachCount = document.ProfileNewsForm.AttachCount.value;
				
				var Title = document.ProfileNewsForm.AttachCount.value;
				
				document.getElementById('loaderNews').style.visibility = "visible";
				
				InvalidDoc = 0;
				
				for (i = 1; i < AttachCount; i++) {
				
					if (eval('document.ProfileNewsForm.AttachFile_'+i)) {
						FileSource = eval('document.ProfileNewsForm.AttachFile_'+i).value;
						fileExt = FileSource.substring((FileSource.length-4),FileSource.length);
						if (fileExt != '.pdf'){
							InvalidDoc = 1;
						}
					}
				
				}
				
				//errorContent = '';
				//var fileExt = FileSource.substring((FileSource.length-4),FileSource.length);
				
				if ((SourceNew == '') && (SourceId == 0)) {
					submitOk = 0;
					errorContent += 'Please enter the source of your news article<br>';
				}
				
				if (Title == '') {
					submitOk = 0;
					errorContent += 'Please enter the title of your news article<br>';
				}
				
				if ((Synopsis == '') || (Synopsis.length > 300)) {
					submitOk = 0;
					errorContent += 'Please enter the summary for your news article, without exceeding 300 characters<br>';
				}
				
				if (InvalidDoc == 1) {
					submitOk = 0;
					errorContent += 'Please add attachments of "pdf format" only<br>';
				}
				
				if (document.getElementById('AttachDocContent_'+AttachCount).style.visibility == 'visible') {
					submitOk = 0;
					errorContent += 'Please click on the Attach button to add your file or link before sharing your news<br>';
				}
				
				/*
				if (FileSource == '') {
					submitOk = 0;
					errorContent += 'Please choose your file before submitting<br>';
				}
				
				if ((fileExt != '.pdf') && (fileExt != '.ppt') && (fileExt != '.doc') && (fileExt != '.xls')) {
					submitOk = 0;
					errorContent += 'Please upload a file of "pdf format", "powerpoint", "document" or "excel"<br>';
				}*/
				
			} else if (formName == 'ProfileDocForm') {
			
				var Title = document.ProfileDocForm.Title.value;
				var FileName = document.ProfileDocForm.FileName.value;
				
				if (Title == '') {
					submitOk = 0;
					errorContent += 'Please enter the document title<br>';
				}
				
				if (FileName == '') {
					submitOk = 0;
					errorContent += 'Please specify the file you wish to upload<br>';
				}
			
			} else if (formName == 'ProfileInviteForm') {
			
				var FirstName = document.ProfileInviteForm.FirstName.value;
				var LastName = document.ProfileInviteForm.LastName.value;
				var Email = document.ProfileInviteForm.Email.value;
				var Message = document.ProfileInviteForm.Message.value;
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter the first name of the person you wish to invite<br>';
				}
				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter the last name of the person you wish to invite<br>';
				}
				
				if (Email == '') {
					submitOk = 0;
					errorContent += 'Please enter the email address of the person you wish to invite<br>';
				}
				
				if (Message == '') {
					submitOk = 0;
					errorContent += 'Please enter a brief message to accompany your invitation<br>';
				}
			
			} else if (formName == 'CommentForm') {
			
				var Comment = document.CommentForm.Comment.value;
				
				if (document.CommentForm.Email) {
					
					var Email = document.CommentForm.Email.value;
								
					if (trim(Email) == '') {
						submitOk = 0;
						errorContent += 'Please enter your email address before submitting<br>';
					}
					
				}
								
				if (trim(Comment) == '') {
					submitOk = 0;
					errorContent += 'Please enter a comment before submitting<br>';
				}
				
				if ((Comment.indexOf('<a') != -1) || (Comment.indexOf('<A') != -1) || (Comment.indexOf('http://') != -1) || (Comment.indexOf('www.') != -1)) {
					submitOk = 0;
					errorContent += 'Please do not enter any links in your comment<br>';
				}
							
			} else if (formName == 'LoginForm') {
			
				document.LoginForm.LoginUrl.value=document.location.href;
							
			} else if (formName == 'ForumPostForm') {
			
				var Title = document.ForumPostForm.Title.value;
				
				if (trim(Title) == '') {
					submitOk = 0;
					errorContent += 'Please enter a subject before submitting<br>';
				}
							
			} else if (formName == 'GroupPostForm') {
			
				var Title = document.GroupPostForm.Title.value;
				
				if (trim(Title) == '') {
					submitOk = 0;
					errorContent += 'Please enter a subject before submitting<br>';
				}
							
			} else if (formName == 'GroupShareFileForm') {
			
				var Title = document.GroupShareFileForm.Title.value;
				var File = document.GroupShareFileForm.File.value;
				var Link = document.GroupShareFileForm.Link.value;
				
				var checkFile = 1;
				
				if ((document.GroupShareFileForm.MemberDocument) && (document.GroupShareFileForm.MemberDocument.selectedIndex != 0)) {
					checkFile = 0;	
				}
				
				if (checkFile == 1) {
				
					if (trim(Title) == '') {
						submitOk = 0;
						errorContent += 'Please enter a file title<br>';
					}
				
					if ((trim(File) == '') && ((trim(Link) == '') || (trim(Link) == 'http://'))) {
						submitOk = 0;
						errorContent += 'Please choose a file through the browser or enter a link url<br>';
					}
				
				}
							
			} else if (formName == 'GroupMemberForm') {
			
				var Name = document.GroupMemberForm.Name.value;
				var Email = document.GroupMemberForm.Email.value;
				
				if (trim(Name) == '') {
					submitOk = 0;
					errorContent += 'Please enter the full name of the person you wish to invite<br>';
				}
			
				if (trim(Email) == '') {
					submitOk = 0;
					errorContent += 'Please enter the email address of the person you wish to invite<br>';
				}
			
			} else if (formName == 'GroupMeetingForm') {
			
				var Name = document.GroupMeetingForm.Name.value;
				var Location = document.GroupMeetingForm.Location.value;
				var StartDate = document.GroupMeetingForm.StartDate.value;
				var EndDate = document.GroupMeetingForm.EndDate.value;
				
				if (trim(Name) == '') {
					submitOk = 0;
					errorContent += 'Please enter the name of the meeting<br>';
				}
			
				if (trim(Location) == '') {
					submitOk = 0;
					errorContent += 'Please enter the location of the meeting <br>';
				}
			
				if (trim(StartDate) == '') {
					submitOk = 0;
					errorContent += 'Please enter the start date of the meeting <br>';
				}
			
				if (trim(EndDate) == '') {
					submitOk = 0;
					errorContent += 'Please enter the end date of the meeting <br>';
				}
							
			} else if (formName == 'GroupThreadForm') {
			
				var Name = document.GroupThreadForm.Name.value;
				var Synopsis = document.GroupThreadForm.Synopsis.value;
				
				if (trim(Name) == '') {
					submitOk = 0;
					errorContent += 'Please enter the subject of your thread<br>';
				}
			
				if (trim(Synopsis) == '') {
					submitOk = 0;
					errorContent += 'Please enter the message of your thread <br>';
				}
							
			} else if (formName == 'GroupDocForm') {
			
				var Title = document.GroupDocForm.Title.value;
				var Synopsis = document.GroupDocForm.Synopsis.value;
				
				if (trim(Title) == '') {
					submitOk = 0;
					errorContent += 'Please enter the title of the document<br>';
				}
			
				if (trim(Synopsis) == '') {
					submitOk = 0;
					errorContent += 'Please enter the description of the document <br>';
				}
							
			} else if (formName == 'GroupDocSectionForm') {
			
				var Title = document.GroupDocSectionForm.Title.value;
				var Synopsis = document.GroupDocSectionForm.Synopsis.value;
				
				if (trim(Title) == '') {
					submitOk = 0;
					errorContent += 'Please enter the name of the section<br>';
				}
			
				if (trim(Synopsis) == '') {
					submitOk = 0;
					errorContent += 'Please enter the description of the section <br>';
				}
							
			} else if (formName == 'ContactInquiry') {
			
				var FirstName = document.ContactInquiry.FirstName.value;
				var LastName = document.ContactInquiry.LastName.value;
				var Email = document.ContactInquiry.Email.value;
				var Comments = document.ContactInquiry.Comments.value;
				
				if (FirstName == '') {
					submitOk = 0;
					errorContent += 'Please enter your first name<br>';
				}
				
				if (LastName == '') {
					submitOk = 0;
					errorContent += 'Please enter your last name<br>';
				}
				
				if ((Email == '')) {
					submitOk = 0;
					errorContent += 'Please enter your email address<br>';
				} else if (!check_email(Email)) {
					submitOk = 0;
					errorContent += 'Please enter a valid email address<br>';
				}
				
				if (Comments == '') {
					submitOk = 0;
					errorContent += 'Please enter your comments<br>';
				}
				
			} else if (formName == 'GroupSuggest') {
			
				var Name = document.GroupSuggest.Name.value;
				var Synopsis = document.GroupSuggest.Synopsis.value;
				
				if (Name == '') {
					submitOk = 0;
					errorContent += 'Please enter the group name<br>';
				}
				/*
				if (Synopsis == '') {
					submitOk = 0;
					errorContent += 'Please enter a description of the group<br>';
				}
				*/
				
			} else if (formName == 'ProfileMessageForm') {
			
				var Contact_1 = document.ProfileMessageForm.Contact_1.value;
				var Subject = document.ProfileMessageForm.Subject.value;
				
				//alert(Contact_1);
				
				if (Contact_1 == 0) {
					submitOk = 0;
					errorContent += 'Please select at least on contact<br>';
				}
				if (Subject == '') {
					submitOk = 0;
					errorContent += 'Please enter the subject of your message<br>';
				}
				/*
				if (Synopsis == '') {
					submitOk = 0;
					errorContent += 'Please enter a description of the group<br>';
				}
				*/
				
			}
			
			if (submitOk == 1) {
				return true;	
			} else {
				
				if (document.getElementById('loaderPaper')) {
				document.getElementById('loaderPaper').style.visibility = "hidden";
				}
				
				if (document.getElementById('loaderNews')) {
				document.getElementById('loaderNews').style.visibility = "hidden";
				}
				
				document.location.href = '#formErrors';
				if (formatErrorMessage == 1) {
				document.getElementById('formErrorsDiv').style.padding = "10px 5px 5px 0px";
				document.getElementById('formErrorsDiv').style.display = "block";
				document.getElementById('formErrorsDiv').style.color = "#CC0000";
				}
				document.getElementById('formErrorsDiv').innerHTML = errorContent;
				return false;
			}
			
		}
		
		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 setNavLinks(SectionId,SubSectionId) {
			
			noLoading = 1;
			currDiv = 'topNav';
			sendAjax("functions.php?setNavLinks=1&SectionId="+SectionId+"&SubSectionId="+SubSectionId,processAjax);
			
		}
		
		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 openBoxInfo(num) {
			
			if (CurrInfoBox != num) {
			
				CurrInfoBox = num;
			
				AbortCloseBox = 1;
				
				document.getElementById('linkInfoBox').style.visibility = "visible";
				
				document.getElementById('linkInfoContent').innerHTML = document.getElementById('linkInfoContent'+num).innerHTML;
				
				if (LinkInfoBoxOpen == 0) {
					expandBoxInfo('linkInfoBox',10,300);
				} else {
					clearTimeout(LinkInfoBoxTimer);
					LinkInfoBoxTimer = window.setTimeout("closeBoxInfo('linkInfoBox',300,0)",10000);
				}
				
				window.setTimeout("AbortCloseBox = 0",200);
			
			}
			
		}
			
		function expandBoxInfo(DivId,Width,ThisLimit) {
			
			window.clearTimeout(LinkInfoBoxTimer);
			
			document.getElementById(DivId).style.visibility = "visible";
		
			if (Width >= ThisLimit) {
			document.getElementById(DivId).style.left=((ThisLimit*(-1))-1)+"px";		
			document.getElementById(DivId).style.width=ThisLimit+"px";		
			LinkInfoBoxOpen = 1;
			LinkInfoBoxTimer = window.setTimeout("closeBoxInfo('linkInfoBox',300,0)",10000);
			} else {
			document.getElementById(DivId).style.left=((Width*(-1))-1)+"px";	
			document.getElementById(DivId).style.width=Width+"px";
			Width+=20;
			LinkInfoBoxTimer = window.setTimeout("expandBoxInfo('"+DivId+"',"+Width+","+ThisLimit+")",10);
			}/**/
			//alert(LinkInfoBoxOpen);
		
		}
			
		function closeBoxInfo(DivId,Width,ThisLimit) {
			
			//alert(LinkInfoBoxOpen);
			
			if ((LinkInfoBoxOpen == 1) && (AbortCloseBox == 0)) {
		
				window.clearTimeout(LinkInfoBoxTimer);
			
				if (Width <= ThisLimit) {
				document.getElementById(DivId).style.left=((ThisLimit*(-3))-1)+"px";		
				document.getElementById(DivId).style.width=ThisLimit+"px";		
				LinkInfoBoxOpen = 0;
				document.getElementById(DivId).style.visibility = "hidden";
				} else {
				//alert(Width);
				document.getElementById(DivId).style.left=((Width*(-1))-1)+"px";	
				document.getElementById(DivId).style.width=Width+"px";
				Width-=20;
				LinkInfoBoxTimer = window.setTimeout("closeBoxInfo('"+DivId+"',"+Width+","+ThisLimit+")",10);
				}
				
				CurrInfoBox = -1;
				
			}
		
		}
		
		function saveSubscribe() {
			
			clearTimeout(LinkInfoBoxTimer);
		
			var Email = document.getElementById('SubscribeField').value;
			var Ip = document.getElementById('CurrIp').value;
			var SessionName = document.getElementById('CurrSession').value;
		
			if (!check_email(Email)) {
				
				tempWidth = 370;
				tempHeight = 58;
				
				var divContent = '<div style="position: relative; width: '+tempWidth+'px; height: '+tempHeight+'px;">';
				divContent += '<div align="left" style="padding: 20px;">';
				divContent += 'Please enter a valid email address.';
				divContent += '</div>';
				
				divContent += '<div style="position: absolute; right: 20px; bottom: 20px;">';
				divContent += '<input type="button" name="CloseBox" value="close box" class="button" style="width: 100px;" onclick="closePopup()">';
				divContent += '</div>';
				
				divContent += '</div>';
				
				document.getElementById('temp').innerHTML = divContent;
				
				displayPopup();
				
			} else {
				sendAjax("functions.php?saveSubscribe=1&Email="+Email+"&Ip="+Ip+"&SessionName="+SessionName,nothing);
				
				tempWidth = 370;
				tempHeight = 58;
				
				var divContent = '<div style="position: relative; width: '+tempWidth+'px; height: '+tempHeight+'px;">';
				divContent += '<div align="left" style="padding: 20px;">';
				divContent += 'Your email address has been saved.';
				divContent += '</div>';
				
				divContent += '<div style="position: absolute; right: 20px; bottom: 20px;">';
				divContent += '<input type="button" name="CloseBox" value="close box" class="button" style="width: 100px;" onclick="closePopup()">';
				divContent += '</div>';
				
				divContent += '</div>';
				
				document.getElementById('temp').innerHTML = divContent;
				
				displayPopup();
				
				document.getElementById('SubscribeField').value = 'your email address here';
				
			}
		
		}
		
		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 subscribeTop() {
			
			//document.getElementById('subscribeTopLink').style.backgroundColor='#80807f';
			document.getElementById('searchTopBox').style.visibility = "hidden";
			document.getElementById('subscribeTopBox').style.visibility = "visible";
			
		}
		
		function searchTop() {
			
			//document.getElementById('subscribeTopLink').style.backgroundColor='#80807f';
			document.getElementById('subscribeTopBox').style.visibility = "hidden";
			document.getElementById('searchTopBox').style.visibility = "visible";
			
		}
		
		function closeSubscribe() {
			
			//document.getElementById('subscribeTopLink').style.backgroundColor='#80807f';
			document.getElementById('subscribeTopBox').style.height = "33px";
			document.getElementById('subscribeTopBox').style.visibility = "hidden";
			document.getElementById('subscribeMessage').innerHTML = "&nbsp;";
			
		}
		
		function closeSearch() {
			
			//document.getElementById('subscribeTopLink').style.backgroundColor='#80807f';
			document.getElementById('searchTopBox').style.visibility = "hidden";
			
		}
		
		function openEmailBox(DivId,Height,ThisLimit) {
		
			document.getElementById(DivId).style.visibility = 'visible';
		
			//alert(Height);
		
			if (Height >= ThisLimit) {	
			document.getElementById(DivId).style.height=ThisLimit+"px";		
			} else {
			document.getElementById(DivId).style.height=Height+"px";
			Height+=10;
			LinkInfoBoxTimer = window.setTimeout("openEmailBox('"+DivId+"',"+Height+","+ThisLimit+")",10);
			}
		
		}
		
		function closeEmailBox(DivId,Height,ThisLimit) {
		
			if (Height <= ThisLimit) {	
			document.getElementById(DivId).style.height=ThisLimit+"px";
			document.getElementById(DivId).style.visibility = 'hidden';
			} else {
			//alert(Width);
			document.getElementById(DivId).style.height=Height+"px";
			Height-=10;
			LinkInfoBoxTimer = window.setTimeout("closeEmailBox('"+DivId+"',"+Height+","+ThisLimit+")",10);
			}
		
		}
		
		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 displayPopup() {
						
			setWindowProps();
			
			var leftOffset = Math.ceil((winW-tempWidth)/2)+tempX;
			var topOffset = Math.ceil((winH-tempHeight)/2)+tempY;
			topOffset = 100;
			
			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 displayAbout() {
			
			tempWidth = 500;
			tempHeight = 400;
			
			var divContent = '<div style="position: relative; width: '+tempWidth+'px; height: '+tempHeight+'px;">';
			divContent += '<div style="padding: 20px; text-align: justify">';
			divContent += '<h2>About NaturalRefrigerants.com</h2><br>';			
			divContent += 'Simply put: NaturalRefrigerants.com is the "Digg" of natural refrigerants.<br><br>';
 			
			divContent += 'A news aggregator for everything regarding natural gases used in cooling, ';
 			divContent += 'refrigeration and heating. A collection of policy, industry and event ';
			divContent += 'articles from shecco\'s three specialised platforms ';
 			divContent += '<a href="http://www.r744.com" target="_blank" style="color: #00BBED">R744.com</a>, ';
 			divContent += '<a href="http://www.ammonia21.com" target="_blank" style="color: #00BBED">ammonia21.com</a>, and ';
 			divContent += '<a href="http://www.hydrocarbons21.com" target="_blank" style="color: #00BBED">hydrocarbons21.com</a>. ';
 			divContent += 'An easy-to-use sorting tool to track the progress of natural refrigerants ';
 			divContent += 'around the world for anyone with limited time resources.<br><br>';
			
			divContent += 'But most of all this space is open to grow into an interactive ';
 			divContent += 'exchange platform. Soon, anyone with an interest in natural refrigerants ';
 			divContent += 'will be able to share news from other sources on NaturalRefrigerants.com.<br><br>';
			
			divContent += 'For now, help us spread the word about the huge climate benefits ';
 			divContent += 'that CO<sub>2</sub>, ammonia and hydrocarbons hold for our planet. ';
 			divContent += 'Subscribe to the NaturalRefrigerants.com <a href="'+root_link+'/rss.php" style="color: #00BBED">RSS feed</a> and engage others around ';
 			divContent += 'the world with the instant messaging service <a href="http://www.twitter.com/natref" target="_blank" style="color: #00BBED">Twitter</a>.';
			
			divContent += '</div>';
			
			divContent += '<div align="right" style="position: absolute; right: 20px; bottom: 20px;">';
			divContent += '<input type="button" name="CloseBox" value="close box" class="button" style="width: 100px;" onclick="closePopup()">';
			divContent += '</div>';
			
			divContent += '</div>';
			
			document.getElementById('temp').innerHTML = divContent;
			
			displayPopup();
			
		}
		
		function displayHover(divName) {
		
			clearTimeout(hoverTimeout);
			
			if ((currHover != divName) && (currHover != '')) {
				hideHover();
			}
			document.getElementById(divName).style.visibility = "visible";
			currHover = divName;
		
		}
		
		function hideHover() {
		
			document.getElementById(currHover).style.visibility = "hidden";
			resetPartnerLinks();
		
		}
		
		function dispPartnerLinks(PartnerId) {
			
			currPartner = PartnerId;
			
			var partnerHeight = document.getElementById('partnerHeight'+PartnerId).value*1;
			var partnerExtraHeight = document.getElementById('partnerExtraHeight'+PartnerId).value*1;
			
			partnerHeight += partnerExtraHeight;
			
			document.getElementById('partnerLinksBottom'+PartnerId).innerHTML = "&nbsp;";
			document.getElementById('partner'+PartnerId).style.height = partnerHeight+"px";
			document.getElementById('partnerLinks'+PartnerId).style.height = (partnerHeight-10)+"px";
			//document.getElementById('partnerLinksContent'+PartnerId).style.height = (partnerExtraHeight-30)+"px";
			
		}
		
		function resetPartnerLinks() {
			
			if (currPartner != 0) {
			
				var partnerHeight = document.getElementById('partnerHeight'+currPartner).value*1;
				
				document.getElementById('partnerLinksBottom'+currPartner).innerHTML = '<img src="'+root_link+'/images/main/partners-box-bottom.png" width="225" height="10" hspace="0" vspace="0" border="0"><br>';
				document.getElementById('partner'+currPartner).style.height = partnerHeight+"px";
				document.getElementById('partnerLinks'+currPartner).style.height = (partnerHeight-10)+"px";
				//document.getElementById('partnerLinksContent'+currPartner).style.height = "10px";
				
				currPartner = 0;
			
			}
			
		}
		
		function navExpand(divName,startHeight,endHeight,num) {
			
			if (expandDiv != '') {
				timeNavExpand(expandDiv,expandStart,expandEnd,expandNum);	
			}
			
			if (expandDiv != divName) {
			
				expandDiv = divName;
				expandStart = endHeight;
				expandEnd = startHeight;
				expandNum = num*(-1);
				
				timeNavExpand(divName,startHeight,endHeight,num);
			
			} else {
			
				expandDiv = '';
				expandStart = 0;
				expandEnd = 0;
				expandNum = 0;
				
			}
		
		}
		
		function timeNavExpand(divName,startHeight,endHeight,num) {
		
			startHeight += num;
		
			if (((num < 0) && (startHeight < endHeight)) || ((num > 0) && (startHeight > endHeight))) {
				document.getElementById(divName).style.height = endHeight;
			} else {
				document.getElementById(divName).style.height = startHeight;
				window.setTimeout("timeNavExpand('"+divName+"',"+startHeight+","+endHeight+","+num+")",20);
			}
		
		}
		
		function changeNav(type,divName) {
		
			if (type == 0) {
			
				if (currNavName != '') {
					document.getElementById(currNavName).className = 'leftNav';
					if (currNavSubName != '') {
						document.getElementById(currNavSubName).className = 'leftNavSub';		
					}
				}
				if (currNavName != divName) {
					currNavName = divName;
					document.getElementById(currNavName).className = 'leftNavOn';
				} else {
					currNavName = '';
					currNavSubName = '';
				}
			
			} else {
			
				if (currNavSubName != '') {
					document.getElementById(currNavSubName).className = 'leftNavSub';	
				}
				currNavSubName = divName;
				document.getElementById(currNavSubName).className = 'leftNavSubOn';
				
			}
		
		}
		
		function setRightNav(divName) {
			
			//alert(document.getElementById(currRightNav+'Link').className);
			
			if (currRightNav != '') {
				document.getElementById(currRightNav+'Link').className = 'topNav'+currRightNav;
				document.getElementById(currRightNav+'Content').style.visibility = 'hidden';
				
				if (currRightNav == 'Subscribe') {
					document.getElementById('SubscribeField').value = 'your email address here';
				}
				if (currRightNav == 'Search') {
					document.getElementById('SearchField').value = 'enter keyword';
				}
				
			}
			currRightNav = divName;
			
			if (currRightNav == 'Subscribe') {
				document.getElementById('SubscribeField').value = 'your email address here';
			}
			if (currRightNav == 'Search') {
				document.getElementById('SearchField').value = 'enter keyword';
			}
			
			document.getElementById(currRightNav+'Link').className = 'topNav'+currRightNav+'On';
			document.getElementById(currRightNav+'Content').style.visibility = 'visible';
			/*
			*/
			
		}
		
		function searchList() {
			
			var Keyword = document.getElementById('SearchField').value;
			
			if ((Keyword != '') && (Keyword != 'enter keyword')) {
				//storeKeyword(Keyword);
				//alert(Keyword);
				getListing(0,0,0,0,0,Keyword);
				secondaryFunction = "storeKeyword('"+Keyword+"')";
			}
			
			return false;
			
		}
		
		function getListing(CurrResults,SourceId,CategoryId,DateMonth,DateYear,Keyword) {
			
			document.location = '#listContentAnchor';
			currDiv = 'listContent';
			sendAjax("functions.php?getListing=1&CurrResults="+CurrResults+"&SourceId="+SourceId+"&CategoryId="+CategoryId+"&DateMonth="+DateMonth+"&DateYear="+DateYear+"&Keyword="+Keyword,processAjax);			
			
		}
		
		function storeKeyword(Keyword) {
			
			noLoading = 1;
		
			currIp = document.getElementById('CurrIp').value;
			currSession = document.getElementById('CurrSession').value;
			//alert("storeKeyword=1&Keyword="+Keyword+"&Ip="+currIp+"&SessionName="+currSession);
			sendAjax("functions.php?storeKeyword=1&Keyword="+Keyword+"&Ip="+currIp+"&SessionName="+currSession,nothing);			
		
		}
		