https://community.travelchinaguide.com/member/ctrlcentre.asp var dw = window; var win = new Object; var imgroot = "https://community.travelchinaguide.com/member/"; var msgNoteDuration = 15000; var nErr=0; var w3c=(dw.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 (dw.document.compatMode && dw.document.compatMode!="BackCompat")? dw.document.documentElement : dw.document.body; } function GetScrollTop(){ return ie ? IeTrueBody().scrollTop : dw.pageYOffset; } function GetScrollLeft(){ return ie ? IeTrueBody().scrollLeft : dw.pageXOffset-20; } function ck(au,am){ var n=0; try{ n=GetClientWH("w"); init(au,am); }catch(e){ nErr+=1; if(nErr < 3) setTimeout("ck('" + au + "','" + am + "')",500); } } function GetClientWH(strType){ var iWW=0,iWH=0; if(strType.toLowerCase()=="st") return GetScrollTop(); else if(strType.toLowerCase()=="sl")return GetScrollLeft(); if (dw.innerWidth){ // NS4, NS6 and Opera iWW = dw.innerWidth; iWH = dw.innerHeight; } else if(dw.document.documentElement && dw.document.documentElement.clientWidth){ // IE6 in standards compliant mode var oDE = dw.document.documentElement; iWW = oDE.clientWidth; iWH = oDE.clientHeight; } else if(dw.document.body){ // IE4+ var oDB = dw.document.body; iWW = oDB.clientWidth; iWH = oDB.clientHeight; } if(strType.toLowerCase()=="w") return iWW; else return iWH; } function init(su,sm){ if(dw.document.documentElement.clientWidth){ win = dw.document.documentElement; }else{ win = dw.document.body; } var s=""; s+=(" "); s+=(" "); s+=(" "); s+=(" "); s+=(" "); s+=(" "); s+=(" "); s+=(" "); s+=(" "); s+=("
New message<\/td>
"); s+=("
"); s+=("
"); s+=("
"); s+=("
"); var oDiv=dw.document.createElement("div"); oDiv.id="eMeng"; oDiv.style.borderTop = "#a6b4cf 1px solid"; oDiv.style.borderLeft = "#a6b4cf 1px solid"; oDiv.style.borderRight = "#455690 1px solid"; oDiv.style.borderBottom = "#455690 1px solid"; oDiv.style.zIndex = 2; oDiv.style.position = "absolute"; oDiv.style.top = "0px"; oDiv.style.left = "0px"; oDiv.style.width = "180px"; oDiv.style.height = "165px"; oDiv.style.backgroundColor = "#c9d3f3"; oDiv.innerHTML=s; dw.document.body.appendChild(oDiv); getMsg(" ","Dear " + su + " \:
You have " + sm + " new messages in your Msg Box.

Read now!
"); setTimeout('closeDiv()',msgNoteDuration); } var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,bFlag=false,i = 0; function getMsg(MM1,MM2) { try{ dw.document.getElementById("MsgTitle").innerHTML=MM1; dw.document.getElementById("MsgCenter").innerHTML=MM2; divTop = parseInt(dw.document.getElementById("eMeng").style.top,10); divLeft = parseInt(dw.document.getElementById("eMeng").style.left,10); divHeight = parseInt(dw.document.getElementById("eMeng").offsetHeight,10); divWidth = parseInt(dw.document.getElementById("eMeng").offsetWidth,10); docWidth = GetClientWH("w"); docHeight = GetClientWH("h"); dw.document.getElementById("eMeng").style.top = parseInt(GetClientWH("st"),10) + docHeight + 10 + "px"; // divHeight dw.document.getElementById("eMeng").style.left = parseInt(GetClientWH("sl"),10) + docWidth - divWidth + "px"; dw.document.getElementById("eMeng").style.visibility="visible"; objTimer = setInterval("moveDiv()",10); } catch(e){ alert("error"); } } function resizeDiv(){ try{ divHeight = parseInt(dw.document.getElementById("eMeng").offsetHeight,10); divWidth = parseInt(dw.document.getElementById("eMeng").offsetWidth,10); docWidth = GetClientWH("w"); docHeight = GetClientWH("h"); dw.document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(GetClientWH("st"),10) + "px"; dw.document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(GetClientWH("sl"),10) + "px"; } catch(e){;} } function moveDiv(){ try{ if(parseInt(dw.document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(GetClientWH("st"),10))){ bFlag=true; } if(!bFlag){ divTop = parseInt(dw.document.getElementById("eMeng").style.top,10); dw.document.getElementById("eMeng").style.top = divTop - 1 + "px"; }else{ resizeDiv(); } } catch(e){ } } function closeDiv(){ var o=dw.document.getElementById('eMeng'); if(o){ removeDiv(); } } function removeDiv(){ if(objTimer) clearInterval(objTimer) dw.document.body.removeChild(dw.document.getElementById('eMeng')); bFlag=false; }