/*
	创建：2009-06-18
	作者：Aoeiuv.Com
	说明：将首页的版面信息转换成具有立体效果的窗口
	注意：需要css的配合
*/
function getId2Obj(id){
	var obj;
	try{
		obj = eval(id);
	} catch(e){
		obj = null;
	} finally {
		return obj;
	}
}

function popTabShow(icon,title,body){
	var r,i,n,v,c,t;
	r = '<table class="ShadowBack""><tr><td class="ShadowBack" onmouseover="PopupMouseOver(this)" onmouseout="PopupMouseOut(this)">'
		+ '<table cellpadding="0" cellspacing="0">'
		+ '<tr class="ShadowTitle"><td>'
		+ title
		+ '</td></tr>'
		+ '<tr class="ShadowBody"><td>';
	v = getId2Obj('dh' + body);
	if (v != null)
		r += '<div class="c">' + v.innerHTML + '</div>'; 
	v = getId2Obj('dl' + body);
	if (v == null)
		n = 0;
	else
		n = v.childNodes.length;
	for (i=0;i<n;i++)
	{
		c = v.childNodes[i];
		if (c.tagName != 'A') continue;
		t = c.innerHTML;
		t = GetStrLeft(t,28);
		r += '<font class="Star">★</font><a href="' + c.href + '" title="' + c.innerHTML + '<br>' + c.title + '">' + t + '</a><br>';
		//alert(c.title);
	}
	r += '</td></tr></table>'
		+ '</td></tr></table>';
	return r;
}

function GetAllPopTable(obj){
	var c,a,i,n,k,tt,ta;
	tt = '';
	n = obj.childNodes;
	k = n.length;
	for (i=0;i<k;i++)
	{
		c = obj.childNodes[i];
		if (c.tagName != 'A') continue;
		a = '<a href="' + c.href + '" title="' + c.title + '">' + c.innerHTML + '</a>';
		tt += popTabShow('.',a, c.id);
	}
	obj.innerHTML = tt;
}

function PopupMouseOver(td){
	td.style.paddingLeft = 4;
	td.style.paddingTop = 4;
	td.style.paddingRight = 0;
	td.style.paddingBottom = 0;
}

function PopupMouseOut(td){
	td.style.paddingLeft = 0;
	td.style.paddingTop = 0;
	td.style.paddingRight = 4;
	td.style.paddingBottom = 4;
}