var rut='http://www.rominox.ro/';

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 do_intro()
{ 
                xmlHttp=GetXmlHttpObject();
                if (xmlHttp==null) {
                               alert ("Your browser does not support AJAX!");
                               return;
                } 
                
           
			   var url=rut+"ajx_intro.php";
                url=url+"?sid="+Math.random();
                xmlHttp.onreadystatechange=stateChanged_intro;
                xmlHttp.open("GET",url,true);
                xmlHttp.send(null);

				tick=setTimeout("do_intro()",7000);     
}

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

function do_termene(id)
{ 
                xmlHttp2=GetXmlHttpObject();
                if (xmlHttp2==null) {
                               alert ("Your browser does not support AJAX!");
                               return;
                } 
                
           
			   var url=rut+"ajx_termene.php";
                url=url+"?sid="+Math.random()+"&x="+id;
                xmlHttp2.onreadystatechange=stateChanged_termene;
                xmlHttp2.open("GET",url,true);
                xmlHttp2.send(null);

}

function stateChanged_termene() 
{ 
                if (xmlHttp2.readyState==4)        { 
                               document.getElementById("c_termene").innerHTML=xmlHttp2.responseText;
                }
}

function do_paginatie(id)
{ 
                xmlHttp3=GetXmlHttpObject();
                if (xmlHttp3==null) {
                               alert ("Your browser does not support AJAX!");
                               return;
                } 
                
				document.getElementById("c_paginatie").innerHTML='<div style="text-align:center; margin-top:40px;"><img src="'+rut+'img/ajax-loader.gif" /></div>';
			   var url=rut+"ajx_paginatie.php";
                url=url+"?sid="+Math.random()+"&pg="+id;
               xmlHttp3.onreadystatechange=stateChanged_paginatie;
                xmlHttp3.open("GET",url,true);
               xmlHttp3.send(null);

}

function stateChanged_paginatie() 
{ 
                if (xmlHttp3.readyState==4)        { 
                               document.getElementById("c_paginatie").innerHTML=xmlHttp3.responseText;
                }
}


function do_produs(prod,id)
{ 
                xmlHttp4=GetXmlHttpObject();
                if (xmlHttp4==null) {
                               alert ("Your browser does not support AJAX!");
                               return;
                } 
                
           
			   var url=rut+"ajx_produs.php";
                url=url+"?sid="+Math.random()+"&id="+prod+"&p="+id;
                xmlHttp4.onreadystatechange=stateChanged_produs;
                xmlHttp4.open("GET",url,true);
                xmlHttp4.send(null);

}

function stateChanged_produs() 
{ 
                if (xmlHttp4.readyState==4)        { 
                               document.getElementById("c_produs").innerHTML=xmlHttp4.responseText;
                }
}

