var myQQSkin="13"; //皮肤所在文件夹名
var myQQPath=""; //所在文件夹路径，前后带"/"号 默认为空即可
var persistclose=1; //设置为0或1，记录关闭状态
var startX = iecompattest.clientWidth - 134;
var startY = 80;
var verticalpos="fromtop"; //输入"fromtop"或"frombottom"
var online= new Array();
function $$(id){return document.getElementById(id);}
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
$$("topbar").style.visibility="hidden"
}
function staticbar(){
barheight=$$("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=document.body.scrollLeft+document.body.offsetWidth-134+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 1);
}
 
document.getElementById("qqmenu").style.display = 'none';
document.getElementById("qqpanel").style.display = 'block';
ftlObj = ml("topbar");
stayTopLeft();
}

document.writeln("<SCRIPT language=javascript type=text/javascript> var _lang_flag = 'cn';</SCRIPT>");

function floatqq(){
//公司公共QQ
var kf0 ="<a href=\"http://wpa.qq.com/msgrd?V=1&Uin=381463083&Site=清华同方人环&Menu=yes\" target=\"_blank\"><img src=\"http://wpa.qq.com/pa?p=1:381463083:1\" alt=\"点击这里给我发消息\" border=\"0\"></a>";
var kf1 ="<a href=\"http://wpa.qq.com/msgrd?V=1&Uin=2672842349&Site=清华同方人环&Menu=yes\" target=\"_blank\"><img src=\"http://wpa.qq.com/pa?p=1:2672842349:1\" alt=\"点击这里给我发消息\" border=\"0\"></a>";

var kf3 = "<a target=\"_blank\" href=\"http://wpa.qq.com/msgrd?V=1&Uin=2535521855&Site=清华同方人环&Menu=yes\"><img border=\"0\" SRC=http://wpa.qq.com/pa?p=1:2535521855:1 alt=\"点击这里给我发消息\"></a>"
		
	//qq 数组
	var qq = new Array(kf1,kf3);


	var strtemp = "";
	strtemp = strtemp + "<STYLE>.popmenu {BORDER-RIGHT: #3c3a6c 1px solid; BORDER-TOP: #3c3a6c 1px solid; BORDER-LEFT: #3c3a6c 1px solid; LINE-HEIGHT: 18px; BORDER-BOTTOM: #3c3a6c 1px solid; POSITION: absolute; BACKGROUND-COLOR: #f4f6fc}";
	strtemp = strtemp + "</STYLE>";
	strtemp = strtemp + "<DIV id=huanmei style=\"Z-INDEX: 10; VISIBILITY: visible; WIDTH: 111px; POSITION: absolute;\">";
	strtemp = strtemp + "<DIV class=popmenu id=popMenu style=\"DISPLAY: none\"></DIV>";
	strtemp = strtemp + "<div id=\"qqmenu\" style=\"float:right; display:none;\"><img style=\"cursor:pointer;\"  onclick=\"document.getElementById('qqmenu').style.display='none';document.getElementById('qqpanel').style.display=''\" src=\"/img/tools.gif\" ></div>";
	strtemp = strtemp + "<TABLE id=\"qqpanel\" height=394 cellSpacing=0 cellPadding=0 width=111 border=0 style=\"display:none;\">";
	strtemp = strtemp + "<TBODY>";
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD vAlign=top>";
	strtemp = strtemp + "<TABLE cellSpacing=0 cellPadding=0 width=111 border=0>";
	strtemp = strtemp + "<TBODY>";
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD><IMG height=21 src=\"/img/ui8004_62.gif\" width=94></TD>";
	strtemp = strtemp + "<TD><IMG style=\"cursor:pointer;\"  onclick=\"document.getElementById('qqpanel').style.display='none';document.getElementById('qqmenu').style.display=''\" height=21 src=\"/img/ui8004_63.gif\" width=17 ></TD></TR></TBODY></TABLE>";
	strtemp = strtemp + "<TABLE cellSpacing=0 cellPadding=0 width=111 border=0>";
	strtemp = strtemp + "<TBODY>";
    strtemp = strtemp + "</TBODY></TABLE>";
	strtemp = strtemp + "<TABLE cellSpacing=0 cellPadding=0 width=111 background=/img/ui8004_83.gif border=0>";
	strtemp = strtemp + "<TBODY>";
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD vAlign=top>";
	
	strtemp = strtemp + "<TABLE style=\"CURSOR: pointer;  margin-left:6px !important;\"  onclick=\"javascript:hideDeptElement('divdept_id','0');\" height=21  cellSpacing=0 cellPadding=0 width=99 background=/img/ui8004_94.gif border=0>";
	strtemp = strtemp + "<TBODY>";
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD>";
	strtemp = strtemp + "<DIV class=blue212 align=center>商务合作</DIV></TD></TR></TBODY>";    
	strtemp = strtemp + "</TABLE>";
	strtemp = strtemp + "<DIV id=divdept_id0 style=\"DISPLAY: block\">";
	strtemp = strtemp + "<TABLE height=80 cellSpacing=0 cellPadding=0 width=103 align=center border=0>";
	strtemp = strtemp + "<TBODY>";
	
	//region qqlist 添加qq 的话复制开始
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD width=18>&nbsp;</TD>";
	strtemp = strtemp + "<TD class=blue212 width=61>";
	strtemp = strtemp + "<SPAN class=flowui>" + qq[0] + "</SPAN> ";
	strtemp = strtemp + "</TD>";
	strtemp = strtemp + "</TR>";
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD width=18>&nbsp;</TD>";
	strtemp = strtemp + "<TD class=blue212 width=61>";
	strtemp = strtemp + "<SPAN class=flowui>" + qq[1] + "</SPAN> ";
	strtemp = strtemp + "</TD>";
	strtemp = strtemp + "</TR>";
	/*strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD width=18>&nbsp;</TD>";
	strtemp = strtemp + "<TD class=blue212 width=61>";
	strtemp = strtemp + "<SPAN class=flowui>" + qq[2] + "</SPAN> ";
	strtemp = strtemp + "</TD>";
	strtemp = strtemp + "</TR>";*/
	
	strtemp = strtemp + "</TBODY>";
	strtemp = strtemp + "</TABLE>";
	strtemp = strtemp + "</DIV>";
	

	
	strtemp = strtemp + "</TD></TR></TBODY></TABLE>";
	strtemp = strtemp + "<TABLE cellSpacing=0 cellPadding=0 width=111 border=0>";
	strtemp = strtemp + "<TBODY>";
	strtemp = strtemp + "<TR>";
	strtemp = strtemp + "<TD>";
	strtemp = strtemp + "<IMG height=13 src=\"/img/ui8004_97.gif\" width=111 />";
	strtemp = strtemp + "</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV>";
	$("#span_float_qq").html(strtemp);
}

var _lang = _lang_flag;
var popup_menu = null;
function getPos(el,sProp) {
	var iPos = 0;
	while (el!=null) {
		iPos+=el["offset" + sProp];
		el = el.offsetParent;
	}
	return iPos;
}

function showPopupMenu(el, m, cuuid, user , phoneurl , rootwebpath) {
	if (m) {
		//alert(getPos(el,"Left"));
		m.style.display='';
		if (getPos(el,"Left")+180 > screen.width)
		{
		m.style.pixelLeft = 45 + getPos(el,"Left") - (180-10);
		}else{
		m.style.pixelLeft = 45 + getPos(el,"Left") + el.offsetWidth;
		}
		m.style.pixelTop = getPos(el,"Top");
		m.innerHTML = "<table  class=popup width=180 CELLPADDING=2 CELLSPACING=0 id=tb><tr  class=popup><td colspan=2 height=8 bgcolor=336699 background='" + rootwebpath + "images/popMenu_bgline.gif'></td></tr>"+
					"<tr  class=popup>"+
					"<!--td><img src='"+GetDir(cuuid)+"n_80.png' border=1 onerror=\"this.src='images/defaultuser.gif'\"></td-->"+
					"<!--td><img src='" + rootwebpath + "images/defaultuser.gif' border=1></td-->"+					
					"<td valign=top>"+
					"<!--font color=336699 style='font-size:7pt'>ID:<b>"+cuuid+"</b></font><br-->"+
					"<font color=336699 style='font-size:8pt'>联系人:<b>"+user+"</b></font><br>"+ 
					"<br>" + 
					"<img src='" + rootwebpath + "images/j.gif' border=0>&nbsp;&nbsp;<a class=LinkB href='#' onclick=\"javascript:window.open('" + phoneurl + "','','width=450,height=350,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no')\">免费服务电话</a><br>"+										
					"</td></tr></table>";
	}
	if ((m!=popup_menu) && (popup_menu)) popup_menu.style.display = 'none';
	popup_menu = m;
}

function hidePopupMenu(el, m) {
	if (el && m && m.style.display=='') {
		if ((document.body.scrollLeft + window.event.x > el.offsetLeft) 
				&& (document.body.scrollLeft + window.event.x < el.offsetLeft + el.offsetWidth) 
				&& (document.body.scrollTop + window.event.y > el.offsetTop) 
				&& (document.body.scrollTop + window.event.y < el.offsetTop + el.offsetHeight)
				|| (document.body.scrollLeft + window.event.x > m.offsetLeft)                
				&& (document.body.scrollLeft + window.event.x < m.offsetLeft + m.offsetWidth) 
				&& (document.body.scrollTop + window.event.y > m.offsetTop)
				&& (document.body.scrollTop + window.event.y < m.offsetTop + m.offsetHeight)) {
		} else {
			m.style.display = 'none';
		}
	}
}

function hideSelf(m) {	
	if (m.style.display=='') {
		if ((document.body.scrollLeft + window.event.x >= m.offsetLeft)                
		&& (document.body.scrollLeft + window.event.x <= m.offsetLeft + m.offsetWidth) 
		&& (document.body.scrollTop + window.event.y >= m.offsetTop)
		&& (document.body.scrollTop + window.event.y <= m.offsetTop + m.offsetHeight)) {
		} else {
			m.style.display = 'none';
		}
	}
}

function hideIt(m)
{	
	if(document.getElementById(m).style.display=="none")
	{
	  document.getElementById(m).style.display="";
	}
	else
	{
	  document.getElementById(m).style.display="none";
	}
}

function zoomIt(m)
{
 if(document.getElementById('huanmei').offsetLeft<0)
 {
	document.getElementById('huanmei').style.left = 3;
 }
 else
 {
	document.getElementById('huanmei').style.left = -80; 
 }
 // 右对齐 
 
}

//--- function hideDeptElement (usage: hide the parts of staff under the dept.)
function hideDeptElement(m,indexno)
{
	m_uiid = m + indexno;
//	if(document.getElementById(m_uiid)==null) return;
	
	if(document.getElementById(m_uiid).style.display=="none")
	{
	  document.getElementById(m_uiid).style.display="";
	}
	else
	{
	  document.getElementById(m_uiid).style.display="none";
	}  
}

$(document).ready(function() {
floatqq();
staticbar();
});
