 //用于显示业务模块栏目
var customerror = "";
try
{

	if(typeof(custom_group) == "undefined")customerror = prompt_zy[lan]+"\"custom_group\""+prompt_wdy[lan]+"\r\n";
	XMLcolumn.load(custom_group);
	var Customitems = XMLcolumn.selectNodes("//depart/groups/group");
	var Customurls = XMLcolumn.selectNodes("//depart/links/link");
	var CustomData = new Array();//显示栏目内容数组
	var Customurl = new Array();//显示栏目URL数组
}
catch(e)
{
//	alert("加载自定义栏目出错\r\n"+customerror);
}

function custominit()
{
	try
	{
		if(Customitems.length != Customurls.length )
		{
//			alert("初始化自定义栏目出错");
			for(var i=0;i<10;i++)
			{
				CustomData[i] = "";
				Customurl[i] = "";
			}

			return null;
		}
		for(var i=0;i<Customitems.length;i++)
		{
			CustomData[i] = Customitems(i).text;
			Customurl[i] = Customurls(i).text;
		}
	}
	catch(e)
	{
	}
}
custominit();
//横型栏目列表，num为0时显示全部栏目
function across_custom(num, imgurl)
{
	if (imgurl==null)
	{
		imgurl='';
	} 
	try
	{
		var j = 0; 
		if(num>CustomData.length || num ==0) j = CustomData.length;
		else j = num;
		theDoc.write ('<table width=98% border=0 cellpadding=0 cellspacing=0 id="customitem"> <tbody> <tr align=left> \r\n');
		for(var i=0;i<j;i++)
		{
			theDoc.write('<td height="12"  align="left">'+ imgurl+'&nbsp;&nbsp;<a href="'+Customurl[i]+'" class="unnamed6">' +CustomData[i]+'</a></td>');		
		}
		theDoc.write('</tr></tbody></table>');
	}
	catch(e)
	{
	}

}
//竖型栏目列表，num为0时显示全部栏目
function  erect_custom(num, imgurl)
{
	if (imgurl==null)
	{
		imgurl='';
	} 
	try
	{
		var j = 0; 
		if(num>CustomData.length || num == 0) j = CustomData.length;
		else j = num;
		theDoc.write ('<table width=98% border=0 cellpadding=0 cellspacing=0 id="customitem"> <tbody> \r\n');
		for(var i=0;i<j;i++)
		{
			theDoc.write('<tr><td align=left height=25 width="100%">'+imgurl+'&nbsp; &nbsp;<a href="'+Customurl[i]+'" class="unnamed6">'+CustomData[i]+'</a></td></tr>');
		}
		theDoc.write('</tbody></table>');
	}
	catch(e)
	{
	}
}
//单个栏目显示
function echo_custom(i, imgurl)
{
	if (imgurl==null)
	{
		imgurl='';
	} 
	try
	{
		if(CustomData.length >0)
		{
			if(i>=CustomData.length) i = 0;
			theDoc.write(imgurl+'&nbsp;&nbsp;<a href="'+Customurl[i]+'" class="unnamed6">'+ CustomData[i]+'</a>');
		}
	}
	catch(e)
	{

	}
}

//处理业务导航栏不在frame页里时的方法。出现一个业务导航栏的可drag菜单
function showcustom()
{
	var custom_dd  = theDoc.all.customitem;
	if(typeof(custom_dd) == "undefined")
	{

		theDoc.write("<div id=\"Layer2\" style=\"position:absolute; left:80px; top:120px; width:125px; height:250px; z-index:1; overflow: visible; visibility: visible\" > ");
		theDoc.write('<table width="125" border="0" cellspacing="0" cellpadding="0" align="center">');
		theDoc.write("<tr><td height=\"20\" bgcolor=\"#FF9900\" width=\"155\" align=\"center\" onMouseDown=\"MM_dragLayer('Layer2','',0,0,0,0,true,false,-1,-1,-1,-1,800,600,0,'',false,'')\"style='cursor:move'> <font color=\"#FFFFFF\">商务中心</font></div></td></tr>");
		theDoc.write('<tr bgcolor="F1F1F1"><td>');
		erect_custom(0);
		theDoc.write('</td></tr></table>');
		theDoc.write("</div>");

		
	}
}

