// JavaScript Document
SiteAjaxFolder   = "ajax/";
function setkeyword(text){
	document.getElementById("txtSearch").value=text;
	
}
function GetKeywordSuggesstion(strText){
		var Keyword = trim(strText.value);
	//	GetKeywordSuggesstionComplete();
	
		if(Keyword.length>=2){
			
			var AjaxFilename = SiteAjaxFolder+'keyword.php';
			var success 	 = function(t){GetKeywordSuggesstionComplete(t);}
			var failure 	 = function(t){ShowOnFailure(t);}
			var url 		 = AjaxFilename;
			var pars 		 = 'op=getcitystate&Keyword='+Keyword;	
			var myAjax 		 = new Ajax.Request(url, {method:'post',postBody:pars, onSuccess:success, onFailure:failure});
	
		
		}
	//}
}

function GetKeywordSuggesstionComplete(t){	
		if(t.responseText != '')	{
			document.getElementById("KeywordLayer").innerHTML     = t.responseText;	
			setLayerDivIds('dhtmlgoodies_scrolldiv','scrolldiv_parentContainer','scrolldiv_theScroll','scrolldiv_scrollbar','scrolldiv_slider','scrolldiv_content','scrolldiv_scrollUp','scrolldiv_scrollDown');
			Slide(document.getElementById("KeywordLayer")).slideDown("slow");	
			scrolldiv_setColor('#FFFFFF');	// Setting border color of the scrolling content
		    //setSliderBgColor('#E2EBED');	// Setting color of the slider div
			setContentBgColor('#FFFFFF');	// Setting color of the scrolling content
			setScrollButtonSpeed(1);	// Setting speed of scrolling when someone clicks on the arrow or the slider
			setScrollTimer(5);	// speed of 1 and timer of 5 is the same as speed of 2 and timer on 10 - what's the difference? 1 and 5 will make the scroll move a little smoother.
			scrolldiv_setWidth(300);	// Setting total width of scrolling div
			scrolldiv_setHeight(130);	// Setting total height of scrolling div
			scrolldiv_initScroll();	// Initialize javascript functions
		}
}
function setkeyword(strValue)	{
	ChangeDisplay('Close');
	document.getElementById('txtSearch').value = strValue;
}
function ChangeDisplay(DisplayOnly){
	if(DisplayOnly == "Close"){
		$("KeywordLayer").style.display = "none";
		Slide(document.getElementById("KeywordLayer")).slideUp("slow");	
	}
}



