
var t;function timestamp(){t = setTimeout("ajax_nav()",10000);}

function ajax_nav()
{
	url = 'random_text.php';
	var xmlHttpReq_user = false;
    var self = this;
   if (window.XMLHttpRequest) {
        self.xmlHttpReq_user = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        self.xmlHttpReq_user = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq_user.open('POST', url, true);
    self.xmlHttpReq_user.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq_user.send(null);
    self.xmlHttpReq_user.onreadystatechange = function() 
	{
		if (self.xmlHttpReq_user.readyState == 4) 
		{
          if(self.xmlHttpReq_user.responseText!="")
			{
				updatepageSearch(self.xmlHttpReq_user.responseText);
			}
		}
    }
	timestamp();
}
function updatepageSearch(dynamickeywordview)
{str1=trim(dynamickeywordview,'');if (str1!=""){document.getElementById("dynamickeywordview").style.visibility = "visible" ;		document.getElementById("dynamickeywordview").innerHTML=str1;}
}
function trim(str2, chars){return ltrim(rtrim(str2, chars), chars);}
function ltrim(str2, chars) {chars = chars || "\\s";return str2.replace(new RegExp("^[" + chars + "]+", "g"), "");}
function rtrim(str2, chars) {chars = chars || "\\s";return str2.replace(new RegExp("[" + chars + "]+$", "g"), "");
}
