
function close_content(){
document.getElementById("product").style.display="none";
}
   


function show_products_type_content(tpid)
{
  var request_url;       // 请求url
  var request_pars = ""; //请求参数
request_url = "/product/products_type_getcontent.php";
request_pars = "tpid="+tpid;				
var myAjax = new Ajax.Updater({success: 'product'}, request_url,{
method     : 'post',
parameters : request_pars,
onFailure  : reportError,
onLoading  : loading,
onComplete : done 
});


}

function show_products_content(pid,pida)
{
  var request_url;       // 请求url
  var request_pars = ""; //请求参数
  document.getElementById("products_top").innerHTML="";
  document.getElementById("products_topa").innerHTML="<span style='color:#000000'>&gt;&nbsp;</span>"+pida;
request_url = "/product/products_getcontent.php";
request_pars = "pid="+pid;				
var myAjax = new Ajax.Updater({success: 'product'}, request_url,{
method     : 'post',
parameters : request_pars,
onFailure  : reportError,
onLoading  : loading,
onComplete : done 
});

}


function show_products_content_oth(pid,ptid)
{
  var request_url;       // 请求url
  var request_pars = ""; //请求参数
request_url = "/product/products_getcontent.php";
request_pars = "pid="+pid;				
var myAjax = new Ajax.Updater({success: 'product'}, request_url,{
method     : 'post',
parameters : request_pars,
onFailure  : reportError,
onLoading  : loading,
onComplete : done 
});

	var pty = document.getElementById(ptid);
	var ptpy = document.getElementById("p"+ptid);


	pty.style.display = (pty.style.display =="none")?"":"none";
	ptpy.style.display = (ptpy.style.display =="none")?"":"none";

}



function loading()
{  	}



function done()
{ 	}
	


function reportError(request)
{  alert('Sorry. There was an error.');}



function sh(a,c)
{
	document.getElementById("products_topa").innerHTML="";
	document.getElementById("products_top").innerHTML="<span style='color:#000000'>&gt;&nbsp;</span>"+c;
	show_products_type_content(a);
	var x = document.getElementById(a);
	var px = document.getElementById("p"+a);

	x.style.display = (x.style.display =="none")?"":"none";
	px.style.display = (px.style.display =="none")?"":"none";
	/*
	var children = x.childNodes;
	for(i =0;i<children.length;i++)
	{
	children[i].style.display = "";
	}*/
}

function sh_oth(a,b,c)
{
	document.getElementById("products_topa").innerHTML="";
	document.getElementById("products_top").innerHTML="<span style='color:#000000'>&gt;&nbsp;</span>"+c;
	show_products_type_content(a);

	var y = document.getElementById(b);
	var py = document.getElementById("p"+b);


	y.style.display = (y.style.display =="none")?"":"none";
	py.style.display = (py.style.display =="none")?"":"none";
}