	var int 
	function closeTag() {
		var box = document.getElementById("suggestions");
		box.style.display="none"
		int=window.clearInterval(int)
	}
	
	function stopTag() {
		int=window.clearInterval(int)
	}
	
	function showCountry() {
		$('#txtLocation').show("slow");
	}
	
	function closeCountry() {
		$('#txtLocation').hide("slow");
	}
	
	function showCity(str) {
		$.post("http://my.travellife.org/test/country.php", {country: ""+str+""}, function(data){
			if(data.length >0) {
				$('#subLocation').show("slow");
				$('#subLocation').html(data);
			} 
		});
	}
	
	function randomTags(inputString,pageno) {
		/*if(inputString.length == 0) {
			// Hide the suggestion box.
			//$('#suggestions').hide();
		} else {*/
			$.post("http://my.travellife.org/test/5.php", {queryString2: ""+inputString+"" , pageno: ""+pageno+""}, function(data){
				if(data.length >0) {
					//$('#suggestions').show();
					$('#randomTags').html(data);
				}
			});
		//}
	} // lookup
	
	function gogogo(sing) {
		
		var expandme = document.getElementById(sing);
		expandme.style.display="show"
	}
	
	function lookTag(inputString, pageno) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
			$.post("http://my.travellife.org/test/4.php", {queryString: ""+inputString+"" , pageno: ""+pageno+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
	function lookup(inputString,inputStr,inputStr1,pageno) {
		/*if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#forum-tag').hide();
		} else {*/
			$.post("http://my.travellife.org/test/3.php", {queryString: ""+inputString+"" ,str: ""+inputStr+"" ,str1: ""+inputStr1+"" ,pageno: ""+pageno+""}, function(data){
				if(data.length >0) {
					$('#forum-tag').show("slow");
					$('#autoForum-tag').html(data);
				} else {
					$('#forum-tag').show("slow");
					$('#autoForum-tag').show("slow");
					$('#autoForum-tag').html(inputString+inputStr+inputStr1+pageno);
				$('#subLocation').show("slow");
				$('#subLocation').html(data);
				document.write(inputString+inputStr+inputStr1+pageno+"nonono");
				}
			});
		//}
	} // lookup
	
	function fill(thisValue) {
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}
		
	function displayThread(d1,d2,d3,d4) {
		if(d1.length == 0) {
			// Hide the suggestion box.
			$('#forum-tag').hide();
		} else {
			$.post("http://my.travellife.org/test/2.php", {dt1: ""+d1+"" ,dt2: ""+d2+"" ,dt3: ""+d3+"" ,dt4: ""+d4+""}, function(data){
				if(data.length >0) {
					$('#forum-tag').show("slow");
					$('#autoForum-tag').html(data);
				}
			});
		}
	} //
		
	function changeTag(t1,t2) {
		if(t1.length == 0) {
			// Hide the suggestion box.
			$('#changeTagname').hide();
		} else {
			$.post("http://my.travellife.org/test/1.php", {t1: ""+t1+"" ,t2: ""+t2+""}, function(data){
				if(data.length >0) {
					$('#changeTagname').show("slow");
					$('#changeTagname').html(data);
				}
			});
		}
	} //
		
	function checkTag(tag,tid,oname) {
		if(tag.length == 0) {
			// Hide the suggestion box.
			$('#checkTagname').hide();
		} else {
			$.post("http://my.travellife.org/test/6.php", {t: ""+tag+"", t1: ""+tid+"", t2: ""+oname+""}, function(data){
				if(data.length >0) {
					$('#checkTagname').show();
					$('#checkTagname').html(data);
				}
			});
		}
	} //
	
		function editClose(layer) {
		var myLayer=document.getElementById(layer);
		myLayer.style.display="none";
	}
	
	function addTag(xnput,str) {
		var myData=document.getElementById(xnput);
		myData.value=str;
	}
	
	ddaccordion.init({
		headerclass: "expandable", //Shared CSS class name of headers group that are expandable
		contentclass: "categoryitems", //Shared CSS class name of contents group
		revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
		collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
		defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
		onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
		animatedefault: true, //Should contents open by default be animated into view?
		persiststate: false, //persist state of opened contents within browser session?
		toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
		togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
		animatespeed: "slow", //speed of animation: "fast", "normal", or "slow"
		oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
			//do nothing
		},
		onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
			//do nothing
		}
	})


	var last_clicked="";

	function showlayer(layer){
		var myLayer=document.getElementById(layer);
		
		if (last_clicked==""){
		last_clicked=document.getElementById(layer);
		}
		
		if((myLayer.style.display=="none" || myLayer.style.display=="") && last_clicked.style.display=="block"){
		last_clicked.style.display="none";
		myLayer.style.display="block";
		last_clicked = myLayer;
		} else if(myLayer.style.display=="none" || myLayer.style.display==""){
		myLayer.style.display="block";
		last_clicked = myLayer;
		} else {
		myLayer.style.display="none";
		}
	}	
	
	
