function initmenu(movid,cid)
{
	showproduct(movid,cid,1);
}
function showproduct(sid,pid,num)
{
	var fdiv = window.prod_type_div;
	var divcount = 0;
	try
	{
		var ss = fdiv[0].style.display;
		divcount = fdic.length;
	}
	catch(e)
	{
		divcount = 1
	}

	var querystr = null;
	try
	{
		if ( num == 'P' )
		{
			querystr = "tid="+pid;
			GetHttpRequest('/product/getinfo.php',querystr,prod_list);
		}
		if ( num == '0' )
		{
			querystr = "/product/?tid="+pid+"&movid="+sid;
			window.location.href=querystr;
		}
		if ( num > 0 )
		{
			if ( divcount == 1 )
			{
				if ( fdiv.style.display == 'none' )
				{
					fdiv.style.display = '';
				}
				else
				{
					fdiv.style.display = 'none';
				}
			}
			else
			{
				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;
		}
	}
	catch(e)
	{
		alert(e);
	}
	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;
}


