// JavaScript Document


	
		function ajaxrequest(fileurl, elementid, query) {
			/*alert("fileurl = " + fileurl);
			alert("elementid = " + elementid);
			alert("query = " + query);*/
			try {
				var xmlhttp = new XMLHttpRequest();
			}
			catch (error)	{
				try{
					var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (error) {
				   return false;
				}
			}
		
			xmlhttp.open('POST', fileurl, true);
			xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			xmlhttp.send(query);
		
			xmlhttp.onreadystatechange = function() {
				if (xmlhttp.readyState == 4) {
					 document.getElementById(elementid).innerHTML=xmlhttp.responseText;
				}
			}
		}
	
		function validateEmail(email) {
			if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){
				return true;
			}
			
			return false;
		}
		
		function noDoublePost() {
			document.getElementById('submitBtn').disabled = true;
			document.getElementById('resetBtn').disabled = true;
			document.getElementById('submitBtn').value = 'Processing...';
		}
		
	
		function showId(id,show){
			if(show){
				document.getElementById(id).style.visibility = "visible";
			}else{
				document.getElementById(id).style.visibility = "hidden";
			}
		}
		
		function changeImage(id,img){
			document.getElementById(id).src= img;
		}
		

		
		function insertHTML(html,id){
			document.getElementById(id).innerHTML = html;		
		}

	
		function showTab(queryString,tabNum){
			//alert('queryString = ' + queryString);
			//	alert("tabNum = " + tabNum);
			ajaxrequest('tab_head.cfm','listingTabs', queryString + '&showtab=' + tabNum);
		}
		


		
		function changeColor(id,color){
			document.getElementById(id).style.background = color;
		}
	
		function gotoAction(url) {
			if (url.length > 0)
				window.location = url;
		}
	
