var xmlHttp
function showProduct(str, hal)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Please use another web browser which support AJAX")
 return
 } 
var url="productList.php"
url=url+"?c="+str + '&page=' + hal;
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function view(str,hal)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Please use another web browser which support AJAX")
 return
 }
var jadul = "" +str;
switch(jadul)
{
case 'jepara':
document.title = "Small town in Indonesia our garden patio furniture factory located";
break
case 'teakwood':
document.title = "Grade A teak wood for our garden patio furniture";
break
case 'about':
document.title = "Trusted garden patio furniture manufacturer in Indonesia";
break
case 'terms':
document.title = "How to order teak garden patio furniture from us";
break
case 'article':
document.title = "Read tips and tricks about teak garden patio furniture";
break
case 'contact':
document.title = "Don't hesitate to contact us for any question about teak garden patio furniture";
break
}
var url="view.php"
url=url+"?view="+str + '&page=' + hal;
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function newspage(hal,str)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Please use another web browser which support AJAX")
 return
 }
var url="view.php"
url=url+"?page="+hal + '&view=' + str;
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function news(str,edy)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Please use another web browser which support AJAX")
 return
 }
document.title = "Furniture Article reading "+edy;
var url="view.php"
url=url+"?view="+str+"&news="+edy;
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function form(str)
{
window.location='?do='+str;
}

function stateChanged()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
document.getElementById("PostContent").innerHTML=xmlHttp.responseText
//var x =  document.getElementById("txtJudul")
//document.title = x.innerHTML
 } else {
   document.getElementById("PostContent").innerHTML = '<BR \><BR \><BR \><center><img src="loader.gif"></center>';
 }
}

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