var xmlHttp;

function createItem(no, tab)
{ 	
  // function used in manage Side Menu Images : manageSide.php

   xmlHttp=GetXmlHttpObject()
   if (xmlHttp==null)
    {
      alert ("Browser does not support HTTP Request")
      return
    } 
   var url = "dispSide.php";
   url = url+"?no="+no+'&tab='+tab;
 // alert(url);
   if(tab == 1)
    {
      xmlHttp.onreadystatechange=stateChanged_3;
    }
   else if(tab == 2)
    {
      xmlHttp.onreadystatechange=stateChanged_4;
    }
   xmlHttp.open("GET",url,true);
   xmlHttp.send(null); 

  }

 function editKeyShow(Catno)
  {
   // function used in manage Keywords for Showing the Current item on editing : manageKeywords.php

   xmlHttp=GetXmlHttpObject();
   if (xmlHttp==null)
    {
      alert ("Browser does not support HTTP Request");
      return;
    } 
   var url = "dispKey.php";
   url = url+"?Catno="+Catno;
   //alert(url);
   xmlHttp.onreadystatechange=stateChanged_5;
   xmlHttp.open("GET",url,true);
   xmlHttp.send(null); 
  }


function dispCalendar2(startMonth)
 {
   // function used in calendar for changing the start month : Calendar_2.php

   xmlHttp=GetXmlHttpObject();
   if (xmlHttp==null)
    {
      alert ("Browser does not support HTTP Request");
      return;
    } 
   var url = "../calendarDisp2.php";
   url = url+"?start="+startMonth;
   //alert(url);
   xmlHttp.onreadystatechange=stateChanged_6;
   xmlHttp.open("GET",url,true);
   xmlHttp.send(null);
 }

function stateChanged_3() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	document.getElementById("more_item1").innerHTML=xmlHttp.responseText 
} 
}

function stateChanged_4() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	document.getElementById("more_item2").innerHTML=xmlHttp.responseText 
} 
}

function stateChanged_5() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	document.getElementById("showDetail").innerHTML=xmlHttp.responseText 
} 
}

function stateChanged_6() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	document.getElementById("dispCalend").innerHTML=xmlHttp.responseText 
} 
}

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		//for IE
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}