var ywxbsHtmlCode = "<div id=\"xbs_container_div\" style=\"Z-INDEX: 10; LEFT: 2px; BOTTOM:2px;WIDTH: 105px; POSITION: absolute; visibility: visible; font-size: 12px; \"></div>";
// var ywxbsHtmlCode = "<table width=\"105\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">     <tr>       <td><img src=\"/img/quick_help_top.gif\" width=\"105\" height=\"40\"></td>     </tr>     <tr>       <td align=\"left\" valign=\"top\" background=\"/img/quick_help_bg.gif\" style=\"padding:0px 0px 0px 8px;\"> 	  <ul class=\"quick_help_title\"> 	  <li><a href=\"#\" onClick=\"javascript:aaa('1');\" id=\"a1\" class=\"quick_help_title\">个人信息查询</a> 		<ul id=\"u1\" class=\"quick_help_con\"> 		   <li><a href=\"#\">-已开套餐查询</a></li> 		   <li><a href=\"#\">-余额查询</a></li> 		   <li><a href=\"#\">-话单查询</a></li> 		   <li><a href=\"#\">-账单查询</a></li> 		</ul> 	  </li> 	  <li><a href=\"#\" onClick=\"javascript:aaa('2');\" id=\"a2\" class=\"quick_help_title\">梦网业务</a> 		<ul id=\"u2\" class=\"quick_help_con\"> 		  <li><a href=\"#\">-开通梦网业务查询与退订</a></li> 		  <li><a href=\"#\">-梦网新代码查询</a></li> 		</ul> 	  </li> 	  <li><a href=\"#\" onClick=\"javascript:aaa('3');\" id=\"a3\" class=\"quick_help_title\">归属地查询</a></li> 	  <li><a href=\"#\" onClick=\"javascript:aaa('4');\" id=\"a4\" class=\"quick_help_title\">近期活动</a></li> 	  <li><a href=\"#\" onClick=\"javascript:aaa('5');\" id=\"a5\" class=\"quick_help_title\">热点业务</a></li> 	  <li><a href=\"#\" onClick=\"javascript:aaa('6');\" id=\"a6\" class=\"quick_help_title\">新业务体验</a></li> 	  <li><a href=\"#\" onClick=\"javascript:aaa('6');\" id=\"a6\" class=\"quick_help_title\">在线客服</a></li> 	</ul> <style> .quick_help_title{ 	line-height:18px; 	height:auto !important; 	height:24px; 	width:90px; } .quick_help_title a{ 	display:block; 	line-height:24px !important; 	line-height:20px; 	padding-left:12px; 	background-image:url(/img/quick_help1.gif); 	background-repeat:no-repeat; 	background-position:0 8px; } .quick_help_title a,.quick_help_title a:hover,.quick_help_title a:visited { 	color:#0f377a; } .quick_help_con{ 	color:#0aaad8; 	display:none; 	padding-left:0; 	line-height:19px; } .quick_help_con li a,.quick_help_con li a:hover,.quick_help_con li a:visited { 	color:#0aaad8; 	background:none; 	height:auto !important; 	height:20px; }  </style> <script> var p; function aaa(o){ 	var ob = document.getElementById(\"u\" + o); 	var pb = document.getElementById(\"u\" + p); 	var oa = document.getElementById(\"a\" + o); 	var pa = document.getElementById(\"a\" + p);  	if(p == null) { 		ob.style.display = \"block\"; 		oa.style.backgroundImage = \"url(/img/quick_help2.gif)\"; 		p = o; 	} else { 		if(p == o){ 			if(ob.style.display == \"block\"){ 				ob.style.display = \"none\"; 				oa.style.backgroundImage = \"url(/img/quick_help1.gif)\"; 			} else { 				ob.style.display = \"block\"; 				oa.style.backgroundImage = \"url(/img/quick_help2.gif)\"; 			} 		} else { 			ob.style.display = \"block\"; 			oa.style.backgroundImage = \"url(/img/quick_help2.gif)\"; 			pb.style.display = \"none\"; 			pa.style.backgroundImage = \"url(/img/quick_help1.gif)\"; 			p = o; 			} 		} 	} </script> <!-- 快速通道结束 --> 	  </td>     </tr>     <tr>       <td height=\"10\"><img src=\"/img/quick_help_bottom.gif\" width=\"105\" height=\"22\" border=\"0\" usemap=\"#Map\"></td>     </tr>   </table>";
// var ywxbsHtmlCode = "<a href=\"/10086/servicesms_gotone.jsp\" target=\"_blank\"><img src=http://www.google.cn/images/nav_logo3.png style=\"border:0;\"></a><div style=\"text-align:left;width:100px;\"><img src=http://www.google.cn/images/nav_logo3.png onClick=\"closeBanner(1);\" style=\"cursor:pointer;\"></div>";

var delta = 0.8;
var collection;
var closeB1 = false;
var closeB2 = false;
var closeB3 = false;
var closeB4 = false;
function floaters() {
	this.items = [];
	this.addItem = function (id, x, y, content) {
		document.write("<DIV id=" + id + " style=\"Z-INDEX: 10; POSITION: absolute;width:80px; height:60px;left:" + (typeof (x) == "string" ? eval(x) : x) + ";top:" + (typeof (y) == "string" ? eval(y) : y) + "\">" + content + "</DIV>");
		var newItem = {};
		newItem.object = document.getElementById(id);
		newItem.x = x;
		newItem.y = y;
		this.items[this.items.length] = newItem;
	};
	this.play = function () {
		collection = this.items;
		setInterval("play()", 30);
	};
}
function play() {
	for (var i = 0; i < collection.length; i++) {
		var followObj = collection[i].object;
		if (followObj.style.display == "none") {
			continue;
		}
		var followObj_x = (typeof (collection[i].x) == "string" ? eval(collection[i].x) : collection[i].x);
		var followObj_y = (typeof (collection[i].y) == "string" ? eval(collection[i].y) : collection[i].y);
		if (followObj.offsetLeft != (document.documentElement.scrollLeft + followObj_x)) {
			var dx = (document.documentElement.scrollLeft + followObj_x - followObj.offsetLeft) * delta;
			dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));
			followObj.style.left = followObj.offsetLeft + dx;
		}
		if (followObj.offsetTop != (document.documentElement.scrollTop + followObj_y)) {
			var dy = (document.documentElement.scrollTop + followObj_y - followObj.offsetTop) * delta;
			dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));
			followObj.style.top = followObj.offsetTop + dy;
		}
	}
}
function closeBanner(banner_id) {
	closeB1 = true;
	collection[0].object.style.display = "none";
	return;
}

var theFloaters = new floaters();

theFloaters.addItem("ywxbs_navigator_1", 6, "document.documentElement.clientHeight - 300", ywxbsHtmlCode);

/**
 * 以下的JS用于在线小帮手主框架DIV加载之后使用XMLHTTP对象从JSP页面中读取菜单并加载
 *
 */
var xbsAjax = null;

try {
	xbsAjax = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
	try {
		xbsAjax = new XMLHttpRequest();
	}
	catch (e) {}
}

if (xbsAjax != null) {
	var xbsContainerDIV = document.getElementById("xbs_container_div");
	if (xbsContainerDIV) {
		xbsContainerDIV.innerHTML = "<img src=\"/img/loading2.gif\" border=\"0\" />";
	}
	
	xbsAjax.open("GET", "/ywxbs_piece.jsp", true);
	xbsAjax.onreadystatechange = function () {
									if (xbsAjax.readyState == 4) {
										if (xbsAjax.status == 200) {
											xbsContainerDIV.innerHTML = xbsAjax.responseText;
											theFloaters.play();
										}
										else {
											xbsContainerDIV.innerHTML = "ERROR: " + xbsAjax.status + ": " + xbsAjax.responseText;
										}
									}
									else {}
								}
	xbsAjax.send(null);
}

/**
 * 以下的JS用于在线小帮手DIV内菜单的展开与收缩
 *
 */
var p;

function aaa(o) {
	var ob = document.getElementById("u" + o);
	var pb = document.getElementById("u" + p);
	var oa = document.getElementById("a" + o);
	var pa = document.getElementById("a" + p);
	
	if (p == null) {
		ob.style.display = "block";
		oa.style.backgroundImage = "url(/img/quick_help2.gif)";
		p = o;
	}
	else {
		if (p == o) {
			if (ob.style.display == "block") {
				ob.style.display = "none";
				oa.style.backgroundImage = "url(/img/quick_help1.gif)";
			}
			else {
				ob.style.display = "block";
				oa.style.backgroundImage = "url(/img/quick_help2.gif)";
			}
		}
		else {
			ob.style.display = "block";
			oa.style.backgroundImage = "url(/img/quick_help2.gif)";
			pb.style.display = "none";
			pa.style.backgroundImage = "url(/img/quick_help1.gif)";
			p = o;
		}
	}
}
