/////// Admin
var pagehost = window.location.hostname;
var imagepath = "http://localhost/itshed/img";

function callAjax(div_id,ajaxtype)
  {
  var xmlHttp;
  try
    {
    xmlHttp=new XMLHttpRequest();
    }catch (e) {
        try{
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      	}catch (e){
      	try{
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }catch (e){
	return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
        document.getElementById(div_id).value=xmlHttp.responseText;
        }
      }
	var req = ajaxtype;
    xmlHttp.open("GET",req,true);
    xmlHttp.send(null);
}
function callAjaxHTTP(div_id,ajaxtype)
  {
  var xmlHttp;
  try
    {
    xmlHttp=new XMLHttpRequest();
    }catch (e) {
        try{
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      	}catch (e){
      	try{
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }catch (e){
	return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==4)
        {
        document.getElementById(div_id).innerHTML=xmlHttp.responseText;
        }
      }
	var req = ajaxtype;
    xmlHttp.open("GET",req,true);
    xmlHttp.send(null);
}


function showproduct(){var a="products.php?type=getProduct";var b="productShow";callAjaxHTTP(b,a)}function showproductDistrict(a){var b="products.php?type=getProductDistrict&productID="+a;var c="productShow";callAjaxHTTP(c,b)}function showproductDS(a,b){var c="products.php?type=getProductDS&productID="+a+"&districtID="+b;var d="productShow";callAjaxHTTP(d,c)}function showproductGN(a,b,c){var d="products.php?type=getProductGN&productID="+a+"&districtID="+b+"&dsID="+c;var e="productShow";callAjaxHTTP(e,d)}function showproductVI(a,b,c,d){var e="products.php?type=getProductVI&productID="+a+"&districtID="+b+"&dsID="+c+"&gnID="+d;var f="productShow";callAjaxHTTP(f,e)}function showconsumer(){var a="consumer.php?type=getProduct";var b="consumerShow";callAjaxHTTP(b,a)}function showconsumerDistrict(a){var b="consumer.php?type=getProductDistrict&productID="+a;var c="consumerShow";callAjaxHTTP(c,b)}function showconsumerDS(a,b){var c="consumer.php?type=getProductDS&productID="+a+"&districtID="+b;var d="consumerShow";callAjaxHTTP(d,c)}function showconsumerGN(a,b,c){var d="consumer.php?type=getProductGN&productID="+a+"&districtID="+b+"&dsID="+c;var e="consumerShow";callAjaxHTTP(e,d)}function showconsumerVI(a,b,c,d){var e="consumer.php?type=getProductVI&productID="+a+"&districtID="+b+"&dsID="+c+"&gnID="+d;var f="consumerShow";callAjaxHTTP(f,e)}function showproductDistrictleft(a){var b="products2.php?type=getProductDistrict&districtID="+a;var c="productShow";callAjaxHTTP(c,b)}function showproductDsleft(a,b){var c="products2.php?type=getProductDS&districtid="+a+"&dsID="+b;var d="productShow";callAjaxHTTP(d,c)}function showproductGnleft(a,b,c){var d="products2.php?type=getProductGN&districtid="+a+"&dsID="+b+"&gnid="+c;var e="productShow";callAjaxHTTP(e,d)}function showproductVileft(a,b,c,d){var e="products2.php?type=getProductVI&districtid="+a+"&dsID="+b+"&gnid="+c+"&viid="+d;var f="productShow";callAjaxHTTP(f,e)}function showconsumerDistrictleft(a){var b="consumer2.php?type=getProductDistrict&districtID="+a;var c="consumerShow";callAjaxHTTP(c,b)}function showconsumeDsleft(a,b){var c="consumer2.php?type=getProductDS&districtid="+a+"&dsID="+b;var d="consumerShow";callAjaxHTTP(d,c)}function showconsumeGnleft(a,b,c){var d="consumer2.php?type=getProductGN&districtid="+a+"&dsID="+b+"&gnid="+c;var e="consumerShow";callAjaxHTTP(e,d)}function showconsumeVileft(a,b,c,d){var e="consumer2.php?type=getProductVI&districtid="+a+"&dsID="+b+"&gnid="+c+"&viid="+d;var f="consumerShow";callAjaxHTTP(f,e)}function getvillageid(){var a=document.getElementById('selvillage').value;window.location.href="villageManagement.php?villageID="+a}function gotoHomePage(){window.location.href=window.location.href}function GoToBack_timer(){setTimeout("GoToBack()",3500)}function GoToBack(){javascript:history.go(-1)}function openWindow(a){window.open(a,"mywindow","menubar=1,resizable=1,width=770,height=400,status=1,scrollbars=1,")}






function showyj(){
	var a="yj.php?type=getyj";
	var b="yjShow";
	callAjaxHTTP(b,a)
	}
	
	function showyjDistrict(a){
		var b="products.php?type=getyjDistrict&productID="+a;
		var c="productShow";
		callAjaxHTTP(c,b)
		}

function showyjDS(a,b){
	var c="products.php?type=getyjDS&productID="+a+"&districtID="+b;
	var d="productShow";
	callAjaxHTTP(d,c)
	}

function showyjGN(a,b,c){
	var d="products.php?type=getyjGN&productID="+a+"&districtID="+b+"&dsID="+c;
	var e="productShow";
	callAjaxHTTP(e,d)
	}

function showyjVI(a,b,c,d){
	var e="products.php?type=getyjVI&productID="+a+"&districtID="+b+"&dsID="+c+"&gnID="+d;
	var f="productShow";
	callAjaxHTTP(f,e)}
