⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 monitorstatic.js

📁 3d商店系统!利用jsp和3d结合制作!
💻 JS
📖 第 1 页 / 共 5 页
字号:
 			}
 			else
 				{
 					document.layers.FloatIcon.visibility = 'hidden';
 				}
 		}
 		else if (Sys.DOM)
 		{
 			top = pageYOffset;
 			left = pageXOffset;
 			if ((this.lastTop < 0) || ((this.lastTop == top) && (this.lastLeft == left)))
 			{
 				Sys.getObj('FloatIcon').style.visibility = 'visible';
 			}
 			else
 				{
 					Sys.getObj('FloatIcon').style.visibility = 'hidden';
 				}
 		}
 		this.scrollPlace();
 		this.lastTop = top;
 		this.lastLeft = left;
 	}
 	setTimeout('globalFloatIcon.showTimer()', 250);
};
function FloatIcon_scrollPlace()
{

  var iconHeight = Sys.getObj("live800icon").height;
  var iconWidth = Sys.getObj("live800icon").width;

  //float to bottom
  var y;
  var x;
  if (this.toBottom)
  {
      if (document.body)
          y = document.body.clientHeight - iconHeight - this.floatTop;
      else
          y = innerHeight - iconHeight - this.floatTop;
  }
  else
      y = this.floatTop;

  //float to right
  if (this.toRight == "1")
  {
      if (document.body)
          x = document.body.clientWidth - iconWidth - this.floatLeft;
      else
          x = innerWidth - iconWidth - this.floatLeft;
  }
  else
      x = this.floatLeft;


	var obj = null;
	if (Sys.IE)
	{
		obj = document.all.FloatIcon.style;
	}
	else if (Sys.NS)
	{
		obj = document.layers.FloatIcon;
	}
	else if (Sys.DOM)
	{
		obj = Sys.getObj('FloatIcon').style;
	}

	if (Sys.IE)
	{
		scrollPosY = 0;
		scrollPosX = 0;
		eval('try {' + 'if (typeof(document.documentElement) !=	"undefined") {'	+ 'scrollPosY =	document.documentElement.scrollTop;' + 'scrollPosX = document.documentElement.scrollLeft;' + '}' + '} catch	(e)	{}');
		scrollPosY = Math.max(document.body.scrollTop, scrollPosY);
		scrollPosX = Math.max(document.body.scrollLeft, scrollPosX);
		obj.left	= scrollPosX + x + 'px';
		obj.top = scrollPosY +	y +	'px';
	}
	else if	(Sys.NS)
	{
		obj.left =	pageXOffset	+ x;
		obj.top = pageYOffset + y;
	}
	else if (Sys.DOM)
	{
		obj.left = pageXOffset + x + 'px';
		obj.top = pageYOffset + y + 'px';
	}
};
function FloatIcon_show()
{
	this.showInvite = true;
	if (Sys.IE)
	{
 		document.all.FloatIcon.style.visibility = 'visible';
 	}
 	else if (Sys.NS)
 	{
 		document.layers.FloatIcon.visibility = 'visible';
	}
 	else if (Sys.DOM)
 	{
		Sys.getObj('FloatIcon').style.visibility = 'visible';
 	}
};
function FloatIcon_hide()
{
	this.showInvite = false;
	if (Sys.IE)
	{
 		document.all.FloatIcon.style.visibility = 'hidden';
 	}
 	else if (Sys.NS)
 	{
 		document.layers.FloatIcon.visibility = 'hidden';
	}
 	else if (Sys.DOM)
 	{
		Sys.getObj('FloatIcon').style.visibility = 'hidden';
 	}
};
function floatIconOnIconClick()
{
	globalIcon.onIconClick();
};
function FloatIcon_onIconClick()
{
	this.parentObject.onIconClick();
};
//var globalFloatIcon = new FloatIcon();
//setTimeout('globalFloatIcon.showTimer()', 250);


/**
  *	Define object InviteWindow
  *	@param inLogger log object
  *	@param inChatClient
  */
function InviteWindow(inLogger, inPreferences, inVisitClient, inWindow)
{

	/* Private Attributes */
	this.logger = inLogger;
	this.preferences = inPreferences;
	this.visitClient = inVisitClient;
	this.window = inWindow;
	this.skin = this.preferences["skin"];
	this.inviteText = "";
	this.lastTop = -1;
	this.lastLeft = -1;
	this.showInvite = false;
	this.inviteInnerHtml = null;
	this.isauto = true;
	this.operatorInvite=true;/*operator invite flag*/
	
	/* Public Attributes */
	this.toBottom = true;
	this.toRight = true;
	this.floatTop = 150;
	if(document.body)
		this.floatLeft = (document.body.clientWidth-250)/2;
	else
		this.floatLeft = (innerWidth-450)/2;
	this.loaded = true;
	this.parent = null;

	/* Private methods */
	this.generate = InviteWindow_generate;
	this.showTimer = InviteWindow_showTimer;
	this.scrollPlace = InviteWindow_scrollPlace;
	this.initListener = VisitHandle_initListener;

	/* Publice methods */
	this.show = InviteWindow_show;
	this.hide = InviteWindow_hide;
	this.accept = InviteWindow_accept;
	this.refuse = InviteWindow_refuse;
	this.setInviteText = InviteWindow_setInviteText;

	/* Listener interface */
	this.setConfig = InviteWindow_setConfig;

	/* Initialization */
	this.generate();
	//this.initListener();
	setTimeout('globalInviteWindow.showTimer()', 250);
	
	if((preferences["invite_auto"]==1||preferences["invite_auto"]==2)&&preferences["status"]=="1")
	{
		setTimeout('globalInviteWindow.show()', preferences["invite_delay"]*1000);
		this.isauto = true;
	}

}
function VisitHandle_initListener()
{

	this.visitClient.addMessageListener(this);
}
function InviteWindow_setConfig(inSettings)
{
	this.inviteText = inSettings["invitecontent"];
	this.setInviteText(this.inviteText);
};
function InviteWindow_setInviteText(inInviteText)
{
	Sys.getObj("invitetext").innerHTML = inInviteText;
};
function URLDecode(Str){
  if(Str==null||Str=="")
    return "";
  var newStr="";
  function toCase(sStr){
    return sStr.toString(16).toUpperCase();
    }
  for(var i=0,ichar,len=Str.length;i<len;){
    if(Str.charAt(i)=="%"){
      ichar=Str.charAt(i+1);
      if(ichar.toLowerCase()=="e"){
        newStr+=String.fromCharCode((parseInt("0x"+Str.substr(i+1,2))-0xE0)*0x1000+(parseInt("0x"+Str.substr(i+4,2))-0x80)*0x40+parseInt("0x"+Str.substr(i+7,2))-0x80);
        i+=9;
        }
      else if(ichar.toLowerCase()=="c"||ichar.toLowerCase()=="d"){
        newStr+=String.fromCharCode((parseInt("0x"+Str.substr(i+1,2))-0xC0)*0x40+parseInt("0x"+Str.substr(i+4,2))-0x80);
        i+=6;
        }
      else{
        newStr+=String.fromCharCode(parseInt("0x"+Str.substr(i+1,2)));
        i+=3;
        }
      }
    else{
      newStr+=Str.charAt(i).replace(/\+/," ");
      i++;
      }
    }
  return newStr;
  };
 
 function getInviteContent(){
    var content="";
  if(typeof live800_visitorAddr=="undefined")return content;
 	if(live800_visitorAddr!="null"&&live800_visitorAddr.length!=0)
 	{
 		content="&nbsp;<span id='inviteMessage' style='color:#000000;line-height:13px;FONT-SIZE: 9pt; FONT-FAMILY: Tahoma; word-break:break-all;word-wrap:break-word; '>";
 		//if(preferences["companyID"]=="800")content="&nbsp;<span id='inviteMessage' style='color:#FFFFFF;line-height:13px;FONT-SIZE: 9pt; FONT-FAMILY: Tahoma; word-break:break-all;word-wrap:break-word; '>";
 		content=content+URLDecode(live800_visitorAddr)+"<br/><br/>&nbsp;"+URLDecode(live800_inviteContent)+"</span>";
 	}
 	return content;
 };
function InviteWindow_generate(){
	var baseUrl = preferences["protocol"] + "://" + preferences["baseHtmlUrl"] + preferences["baseWebapp"] + preferences["baseChatHtmlDir"];
	var inviteUrl = baseUrl + "/invitewin.jsp?companyID=" + preferences["companyID"];
	/*edit by hwj;0:blue;1:yellow;2:green;3:red*/
	var styleType=0;
	if(preferences["invite_style"]!=null&&typeof preferences["invite_style"]!="undefined"&&preferences["invite_style"]!="null")
	styleType=preferences["invite_style"];
	if(preferences["invite_top"]!=null&&typeof preferences["invite_top"]!="undefined"&&preferences["invite_top"]!="null"&&preferences["invite_top"]==1){
		this.inviteInnerHtml='<OBJECT height="159" width="439" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"><PARAM NAME=movie VALUE="'+baseUrl+'/images/invite.swf"><PARAM NAME=quality VALUE=high><PARAM NAME=FlashVars VALUE="title='+URLDecode(preferences["invite_title"])+'&content='+URLDecode(live800_inviteContent)+'&addr='+URLDecode(live800_visitorAddr)+'"></OBJECT>';
	}
	if((preferences["companyID"]=="800"&&(preferences["invite_style"]==null||typeof preferences["invite_style"]=="undefined"))||styleType==4){
		var bt1="";
		var bt2="";
		if(typeof live800_Language=="undefined")
		{
			bt1="/images/cn_image/invite_bt1.gif";
			bt2="/images/cn_image/invite_bt2.gif";
		}
		else
		{
			if(live800_Language=="zh")
			{
				bt1="/images/cn_image/invite_bt1.gif";
				bt2="/images/cn_image/invite_bt2.gif";
			}
			else if(live800_Language=="zh_TW")
			{
				bt1="/images/big5_image/invite_bt1.gif";
				bt2="/images/big5_image/invite_bt2.gif";
			}
			else if(live800_Language=="en")
			{
				bt1="/images/english_image/invite_bt1.gif";
				bt2="/images/english_image/invite_bt2.gif";
			}
			else
			{
				bt1="/images/cn_image/invite_bt1.gif";
				bt2="/images/cn_image/invite_bt2.gif";
			}
		}
		var attr='width=541,height=401';
		var tempsurl=this.preferences["protocol"] + "://" + this.preferences["baseUrl"] + this.preferences["baseWebapp"]+"/chatClient/chatbox.jsp?"+getGid()+getParam()+"&companyID="+ this.preferences["companyID"]+"&configID="+preferences["configID"]+getEnterUrl()+"&"+getTrustfulVisitorInfo();
		var boxname="chatbox"+this.preferences["companyID"];
		var openwin="javascript:this.newWindow=window.open('"+tempsurl+"','','"+attr+"');this.newWindow.focus();this.newWindow.opener=window;void(0);";
		this.inviteInnerHtml ='<table style="z-index:88882" width="439" height="160" border="0" cellpadding="0" cellspacing="0"><tr style="cursor:move;">';
		this.inviteInnerHtml +='<td height="28" colspan="7" background="' +baseUrl+ '/images/1.gif">';
		this.inviteInnerHtml +='<span style="color:#0000;font-size:12px;">&nbsp;&nbsp;&nbsp;Live800 - '+URLDecode(preferences["invite_title"])+'</span></td></tr><tr>';
		this.inviteInnerHtml +='<td rowspan="5"><img src="' +baseUrl+ '/images/2.gif" width="134" height="131" alt=""></td>';
		this.inviteInnerHtml +='<td colspan="6"><img src="' +baseUrl+ '/images/3.gif" width="305" height="27" alt=""></td></tr>';
		this.inviteInnerHtml +='<tr><td height="46" colspan="4" background="' +baseUrl+ '/images/4.gif" valign="top">';
		this.inviteInnerHtml +=getInviteContent()+'</td>';
		this.inviteInnerHtml +='<td colspan="2"><img src="' +baseUrl+ '/images/5.gif" width="38" height="46" alt=""></td></tr>';
		this.inviteInnerHtml +='<tr><td colspan="6"><img src="' +baseUrl+ '/images/6.gif" width="305" height="23" alt=""></td></tr>';
		this.inviteInnerHtml +='<tr><td><img src="' +baseUrl+ '/images/7.gif" width="139" height="22" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+bt1+ '" width="66" height="22" onclick="globalInviteWindow.accept();" style="cursor:pointer"></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/9.gif" width="12" height="22" alt=""></td>';
		this.inviteInnerHtml +='<td colspan="2"><img src="' +baseUrl+ bt2+'" width="66" height="22" onclick="globalInviteWindow.refuse();" style="cursor:pointer"></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/11.gif" width="22" height="22" alt=""></td></tr>';
		this.inviteInnerHtml +='<tr><td colspan="6"><img src="' +baseUrl+ '/images/12.gif" width="305" height="13" alt=""></td></tr>';
		this.inviteInnerHtml +='<tr><td><img src="' +baseUrl+ '/images/blank.gif" width="134" height="1" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/blank.gif" width="139" height="1" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/blank.gif" width="66" height="1" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/blank.gif" width="12" height="1" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/blank.gif" width="50" height="1" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/blank.gif" width="16" height="1" alt=""></td>';
		this.inviteInnerHtml +='<td><img src="' +baseUrl+ '/images/blank.gif" width="22" height="1" alt=""></td></tr></table>';
	}
	else if(styleType==0){
		var bt1="";
		var bt2="";
		if(typeof live800_Language=="undefined")
		{
			bt1="/images/cn_image/invite_bt1.gif";
			bt2="/images/cn_image/invite_bt2.gif";
		}
		else
		{
			if(live800_Language=="zh")
			{
				bt1="/images/cn_image/invite_bt1.gif";
				bt2="/images/cn_image/invite_bt2.gif";
			}
			else if(live800_Language=="zh_TW")
			{
				bt1="/images/big5_image/invite_bt1.gif";
				bt2="/images/big5_image/invite_bt2.gif";
			}
			else if(live800_Language=="en")
			{
				bt1="/images/english_image/invite_bt1.gif";
				bt2="/images/english_image/invite_bt2.gif";
			}
			else
			{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -