
var xmlHttp

function set_content(arg){ 
if((arg==0)||(arg==6)||(arg==7) ||(arg==8)||(arg==9)|| (arg==10)||(arg==11)|| (arg==12))
      document.getElementById("object").style.display="block"
else{
     document.getElementById("object").style.display="none"
     document.getElementById("object").style.Height=0
     }
document.getElementById("concact_info").style.display="none"
if(arg==5){
	document.getElementById("concact_info").style.display="block"
   	document.getElementById("object").style.display="none"
   	document.getElementById("content").style.display="none"
          }
xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Vaš pretraživač ne podržava HTTP Request")
 return
 }
if(arg!=5){
var url="ajax.php"+"?q="+arg
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
           }

                             }

function stateChanged() { 

 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    { 
  //  alert(xmlHttp.responseText)
   if(xmlHttp.responseText!=null || xmlHttp!=""){
   	// alert(xmlHttp.responseText)
   	
   	
     
   		 document.getElementById("content").innerHTML=xmlHttp.responseText
   		 document.getElementById("content").style.display="block"
   		 document.getElementById("content").focus
                                                 } 
                            }
    }
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;
}
