var xmlHttp
var this1
function showUser(str,thiss)
{ 
this1 = thiss;
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="_js/content.php";
str = charCodeAtTest(str);
url=url+"?q="+str;
this1 = thiss;
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
//xmlHttp.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
xmlHttp.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("overDiv1").innerHTML='<div align="right" style="float:right; width:300px"><a href="javascript:void(0)" style="font-weight:bold" onclick="overlayclose(\'overDiv1\')">X</a></div>'+xmlHttp.responseText ;
 overlay(this1, 'overDiv1')
// overlib('aaaaa', HEIGHT, 100, LEFT, ABOVE, SNAPX, 5, SNAPY, 10);
 } 
}

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;
}


/***********************************************
* Drop Down/ Overlapping Content- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
	
	var subobj=document.getElementById(subobjstr)
	subobj.style.display=(subobj.style.display!="block")? "block":'';
	var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) 
	var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
	subobj.style.left=xpos+"px"
	subobj.style.top=ypos+curobj.offsetHeight+"px"
	return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}

function charCodeAtTest(str){   // functia converteste diacriticele
	 //var str = document.frm1.convert.value;
	 var nstr = '';
	 var compstr = '';
	 for(i=0;i<=str.length;i++)
	 {
	 	compstr = str.substr(i, 1);
		if(compstr.charCodeAt(0)==259)
		{
			compstr = "a";
		}
		if(compstr.charCodeAt(0)==258)
		{
			compstr = "A";
		}
		if(compstr.charCodeAt(0)==238)
		{
			compstr = "i";
		}
		if(compstr.charCodeAt(0)==206)
		{
			compstr = "I";
		}
		if(compstr.charCodeAt(0)==226)
		{
			compstr = "a";
		}
		if(compstr.charCodeAt(0)==194)
		{
			compstr = "A";
		}
		if(compstr.charCodeAt(0)==351)
		{
			compstr = "s";
		}
		if(compstr.charCodeAt(0)==350)
		{
			compstr = "S";
		}
		if(compstr.charCodeAt(0)==355)
		{
			compstr = "t";
		}
		if(compstr.charCodeAt(0)==354)
		{
			compstr = "T";
		}
		if(compstr.charCodeAt(0)==8222)
		{
			compstr = '"';
		}
		if(compstr.charCodeAt(0)==8221)
		{
			compstr = '"';
		}
		
	 	nstr += compstr;
	 }
	 return nstr; 
}