var xmlHttp

function showDynamic(str,page,result,state)
{ 
//alert("Debug Mode: "+str);
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url=page //Requested file
display=result
displaystatus=result+"status"
url=url+"?q="+str //Parameter from input form
url=url+"&sid="+Math.random()
progressState=state // Show progress state

xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
/// Added
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
////
xmlHttp.send(null)
}

function stateChanged() 
{	
    if(progressState){
    	if (xmlHttp.readyState!=4){
    		document.getElementById(display).innerHTML=progressState;	
    	}
     }
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
		document.getElementById(display).innerHTML=xmlHttp.responseText  //txtHint is where output shows
	 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
} 

function redirect()
{
	window.location="http://vm-ap01/portal";
}

function setFocus(id){
	var get = document.getElementById(id);
	get = get.focus();	
}
