var xmlHttp
function showHint()
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  var fonttype=document.getElementById("FontType1").value;
  var contenttext=document.getElementById("ContentTextLines").value;
  var textcolor=document.getElementById("TextColor1").value;
  var widthmm=document.getElementById("WidthMM").value;
  
if(fonttype.length==0)
{ 
document.getElementById("FontType1").innerHTML="";
return;
}

if(contenttext.length==0)
{ 
document.getElementById("ContentTextLines").innerHTML="";
return;
}

if(textcolor.length==0)
{ 
document.getElementById("TextColor1").innerHTML="";
return;
}

if(widthmm.length==0)
{ 
document.getElementById("WidthMM").innerHTML="";
return;
}
  
  
var url="plotimage.php";
url=url+"?text="+contenttext;
url=url+"&font="+fonttype;
url=url+"&color="+textcolor;
url=url+"&width="+widthmm;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("r_hint").innerHTML=xmlHttp.responseText;
}
}

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;
}