function initmenu(id)
{
	try
	{
		if ( window.prodtype[id].style.display == "none" )
		{
			window.prodtype[id].style.display = '';
		}else
		{
			window.prodtype[id].style.display = 'none';
		}
	}
	catch(e)
	{
	}
}

function showproduct(sid,pid,num)
{
	var fdiv = window.prod_type_div;

	if ( num > 0 )
	{
		for ( i=0; i<fdiv.length; i++)
		{
			if ( sid == i )
			{
				if ( fdiv[i].style.display == 'none' )
				{
					fdiv[i].style.display = '';
				}else
				{
					fdiv[i].style.display = 'none';
				}
			}
			else
			{
				fdiv[i].style.display = 'none';
			}
		}
		return false;
	}
	return true;
}


function prod_list()
{
	if ( xmlhttp.readyState == 1 )
	{
		errorresult('正在加载数据，请稍候...');
	}
	if ( xmlhttp.readyState == 4 )
	{
		if ( xmlhttp.status == 200 )
		{
			var ss = xmlhttp.responseXML;
			showProdList(ss);
		}
		else
		{
			errorresult('请求数据出错，请联系管理员');
		}
	}
}

function showProdList(ss)
{
	alert(ss);
	var root = ss.getElementsByTagName("root").firstChild;//.nodeValue;
	alert(root);
}

function erroresult(str)
{
	var ss  = '<table border=0 width=100% height=100%>';
	ss     += '<tr><td align=center bgcolor="#cecece" height=446 width=100%>';
	ss     += '<table border=0 width=100% height=100%><tr><td width=100% height=100%>'
	ss     += str;
	ss     += '</td></tr></table>';
	ss     += '</td></tr>';
	window.product_show_mov.innerHTML = ss;
}

