function $(){ var elements = new Array(); for(var i = 0; i -1) QueryString += "&isDebug=1"; var initUrl = GVTongHome + "Stat.aspx?cid=" + ClientID + "&Appeal="+ GVAppeal + QueryString; initUrl += "&rand=" + Math.random()+"&Language="+Language+"&CompanyID="+CompanyID+"&DNSID="+DNSID; var LoadIM = GVTongHome + "Load_IM.aspx?SColor=blue&CompanyID="+CompanyID+"&Lang="+Language+"&DNSID="+DNSID+"&domain="+ window.location.host +"&ClientID="+ClientID+"&Place="+GVPanel_Place; document.writeln(""); document.writeln(""); function addEvent(node,type,listener){ if(!(node = $(node))){return false;} //W3C添加事件方法 if(node.addEventListener){ node.addEventListener(type,listener,false); return true; } //MSIE添加事件方法 else if(node.attachEvent){ node['e'+type+listener] = listener; node[type+listener] = function(){ node['e'+type+listener](window.event); } node.attachEvent('on'+type,node[type+listener]); return true; } return false; } //浏览器宽度,高度 function getBrowserSize() { var de = document.documentElement; return { 'width': ( window.innerWidth || (de && de.clientWidth) || document.body.clientWidth), 'height': ( window.innerHeight || (de && de.clientHeight) || document.body.clientHeight) } }; //判断浏览器 var w3c = (document.getElementById) ? true : false; var agt = navigator.userAgent.toLowerCase(); var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("omniweb") == -1)); function IeTrueBody() { return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body; } //滚动条高度 function GetScrollTop() { return ie ? IeTrueBody().scrollTop : window.pageYOffset; } function AlertDiv(URL, Message) { remove(); var dd = document.createElement("div"); dd.innerHTML = "

servicio de sitio web en línea

" + Message + "

aceptarrechazar

"; dd.className="gv_service gv_ser"; dd.id="GVAlertChat"; document.body.appendChild(dd); var Requestscroll=function() {try{ var ob = getBrowserSize(); var height = $("GVAlertChat").offsetHeight; var width = $("GVAlertChat").offsetWidth; $("GVAlertChat").style.left = (ob.width / 2 - width / 2) + "px"; $("GVAlertChat").style.display = ""; $("GVAlertChat").style.top = (ob.height / 2 - height / 2) + GetScrollTop() + "px"; } catch (e) { } } Requestscroll(); addEvent(window,"scroll",Requestscroll); } function RefuseChat() { remove(); AjaxLoad("","RefuseChat"); } function AcceptChat(url) { var ChtFrom = window.open(url); if(ChtFrom!=null) { remove(); } } function remove() { if($("GVAlertChat")!=null) { $("GVAlertChat").parentNode.removeChild($("GVAlertChat")); } } /*GEtRequestChat*/ function AjaxLoad(CallBackName, Action, Par) { var Data = new Date(); var cc=Data.getTime(); var strScript = (GVTongHome + "/AjaxScript.aspx?UseriD=" + ClientID + "&CompanyID=" + CompanyID + "&Action=" + Action + "&CallBackName=" + CallBackName+ "&Time=" + cc ); if (Par) { strScript += parent; } var ScriptCtl = document.createElement("script"); ScriptCtl.src = strScript; ScriptCtl.charset='utf-8'; document.getElementById("GV_JSDIV").appendChild(ScriptCtl); } function CallBack(value) { if (value != "") { try{ var url = (GVTongHome+"Chat.aspx?CompanyID=" + CompanyID + "&ClientID=" + ClientID + "&ServiceID=" + value.split(":")[0] + "&Language="+Language); AlertDiv(url, value.split(":")[1]); } catch(e){} } setTimeout("CallLoad()", 2000); } function CallLoad() { AjaxLoad("CallBack", "GetCall"); } addEvent(window,"load",function(){ var GV_JSDIV = document.createElement("div"); GV_JSDIV.id="GV_JSDIV"; document.body.appendChild(GV_JSDIV); CallLoad(); });