$(document).ready(function() {
	robotShow();
});
function robotShow(){
	var popupDiv = document.createElement("div");
	var isIE=!!window.ActiveXObject;
	var isIE6=isIE&&!window.XMLHttpRequest;
	//给这个元素设置属性与样式
	popupDiv.setAttribute("id","robotShowDiv")
	
	document.body.appendChild(popupDiv);
	//openRobot()是打开的机器人的函数， http://XXXX.com/images/kefu.gif，代表显示的图片
	if(isIE6){
		document.getElementById("robotShowDiv").innerHTML = "<div id='robotsubdiv' style='z-index:9;top:0;position: absolute;top:expression((document).documentElement.scrollTop+600);right: 0px;cursor:pointer;'><a href='javascript:openRobot()'><image src='../../images/index/customer.jpg' border='0px' ></image></a></div>";
	}else{
		document.getElementById("robotShowDiv").innerHTML = "<div id='robotsubdiv' style='z-index:9;top:0;position:fixed;top: 600px;right: 50px;cursor:pointer;'><a href='javascript:openRobot()'><image src='../../images/index/customer.jpg' border='0px' ></image></a></div>";
	}
}

function openRobot(faqType){
	var url = "http://hmin.uwen.com/uwenIm/forward?id=8203333";
	var width='1024px';
	var height='300px';

	if(faqType != "" && faqType != null && faqType != undefined){
		url = url + "&FaqType=" + faqType;
	}else{
		if( typeof(robotFaqType) != "undefined" && robotFaqType != undefined && robotFaqType != ""){
			url = url + "&FaqType=" + robotFaqType;
		}
	}

	popWin(url, width, height);
}

//弹出窗口的定位
function popWin(url, width, height){
	window.open(url, "", "menubar=no, location=no, resizable=no,scrollbars=no, tollbar=no, status=no, width="+ width +", height="+ height +", left=80, top=80");
}

