function stopError() {
return true;
}
//window.onerror = stopError;
var homepage="http://kf.lsoos.cn/";
var im_id="";
var im_cid="lsoos";
var im_wid="12";
var im_sessionid="61c729584cdaad95554ec9f09a5fbdd0";
var im_uid="";
var im_randstr="61c729584cdaad95554ec9f09a5fbdd0";
var im_title="";
var im_thecount=5;
var im_count=0;
var im_posx="right";
var im_x=0;
var im_posy="top";
var im_y=0;
var im_tipstyle="001";
var im_opennew="0";
var im_autoinvite="";
var im_inviteindex="3";
var im_invitetitle="您好";
var im_invitecontent="有啥可以帮到您吗?";
var myFlashObj;
var floatstop=false;
var isIE = document.all && window.external ? 1 : 0;
var StartInvite=false;
var UseDrag=false;
var NotAgree=false;
if(isIE){
window.attachEvent('onload',lsoo_onload);
}else{
window.addEventListener('load',lsoo_onload,false);
}
function $(id) {
var obj=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
if(document.layers)obj.style=obj;
return obj;
}
////////////////////////////////////////////////////////////////////
function ForceWindow(){
this.r = document.documentElement;
this.f = document.createElement("FORM");
this.f.target = "_blank";
this.f.method = "post";
this.r.insertBefore(this.f, this.r.childNodes[0]);
}
ForceWindow.prototype.open = function(sUrl){
this.f.action = sUrl;
this.f.submit();
}
var myWindow = new ForceWindow();
////////////////////////////////////////////////////////////////////
var JS_URL_TMP=homepage+'getdata/content/client.php?datatype=get';
JS_URL_TMP+='&action=update';
JS_URL_TMP+='&cid='+im_cid;
JS_URL_TMP+='&im_wid='+im_wid;
JS_URL_TMP+='&im_sessionid='+im_sessionid;
JS_URL_TMP+='&im_systemlanguage='+(navigator.systemLanguage?navigator.systemLanguage:navigator.language);
JS_URL_TMP+='&im_color='+screen.colorDepth;
JS_URL_TMP+='&im_screensize='+screen.width + '*' + screen.height;
JS_URL_TMP+='&im_charset='+document.charset;
JS_URL_TMP+='&im_pageurl='+escape(window.top.location.href);
JS_URL_TMP+='&im_referer='+escape(window.top.document.referrer);
document.writeln(' ');
////////////////////////////////////////////////////////////////////
document.writeln(' ');
document.writeln('
'
+'
'
+'
'
+'
'+im_invitetitle+'
'
+'
'
+'
'
+'
'
+'
'
+'
'+im_invitecontent+'
'
+'
'
+'
'
+'
'
+'
'
+'
'
+'
'
+'
'
+'
');
document.writeln(' ');
if (!document.layers)
document.writeln("");
document.writeln("
");
document.writeln(' ');
document.writeln(" ");
if (!document.layers)
document.writeln('
');
document.writeln('');
document.writeln(' ');
document.writeln(' ');
document.writeln(' ');
document.writeln(' ');
document.writeln(' ');
document.writeln(' ');
//document.writeln(' ');
function test(){
var tmp='Object->'+typeof(myFlashObj)+"\n";
tmp+='Baseurl->'+myFlashObj.getVariable("BaseUrl")+"\n";
tmp+='CompanyId->'+myFlashObj.getVariable("CompanyId")+"\n";
tmp+='WorkerId->'+myFlashObj.getVariable("WorkerId")+"\n";
tmp+='ClientId->'+myFlashObj.getVariable("ClientId")+"\n";
tmp+='Debug->'+myFlashObj.getVariable("Debug")+"\n";
tmp+='isInvited->'+myFlashObj.getVariable("isInvited")
alert(tmp);
}
function SwfInit(){
myFlashObj = isIE ? myFlash : document.myFlash;
if(myFlashObj==undefined){
return false;
}
//clearInterval(InitTimer);
myFlashObj.SetVariable("BaseUrl", homepage+'getdata/content/client.php');
myFlashObj.SetVariable("CompanyId", im_cid);
myFlashObj.SetVariable("WorkerId", im_wid);
myFlashObj.SetVariable("ClientId", im_uid);
//myFlashObj.SetVariable("Debug", 1);
}
var InitTimer=setInterval("SwfInit()",100);
function myFlash_DoFSCommand(command, args) {
if(im_inviteindex!='3'){
return false;
}
if(args!="undefined" && args!=""){
if(command=="fdata"){
var tmp=args.split("|");
im_wid=tmp[0];
myFlashObj.SetVariable("WorkerId", im_wid);
$("invite_text").innerHTML=tmp[1];
NewInvite();
}
}
}
function OpenDialog(wid){
window.open(homepage+"kf.php?mod=client&cid="+im_cid+"&wid="+wid+"&uid="+im_sessionid,"Dialog"+wid,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=700,height=472");
$("invite_div").style.display='none';
}
function Accept(){
OpenDialog(im_wid);
}
function Next(){
$("invite_div").style.display='none';
myFlashObj.SendMsg('notagree');
NotAgree=true;
}
function CloseDiv(){
$("frame_div").style.display='none';
floatstop=true;
}
var verticalpos="fromtop";
var frame_startX=0,frame_startY=0;
var invite1_startX=0,invite1_startY=0;
var invite2_startX=0,invite2_startY=0;
function GetScroll(ntype){
if(ntype=='top'){
return document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;
}else{
return document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft;
}
}
function lsoo_Float_lsoos_frame(){
if(UseDrag){
if(im_posx=='left'){
frame_startX=im_x;
}else if(im_posx=='center'){
frame_startX=parseInt((document.body.clientWidth-$('frame_div').clientWidth)/2);
}else if(im_posx=='right'){
frame_startX=document.body.clientWidth-$('frame_div').clientWidth-im_x;
}
if(im_posy=='top'){
frame_startY=im_y;
}else if(im_posy=='middle'){
frame_startY=parseInt((document.body.clientHeight-$('frame_div').clientHeight)/2);
}else if(im_posy=='bottom'){
frame_startY=document.body.clientHeight-$('frame_div').clientHeight-im_y;
}
}
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function frame_ml(id){
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y};
el.x = frame_startX;
if (verticalpos=="fromtop")
el.y = frame_startY;
else{
el.y = ns ? pageYOffset + innerHeight : d.body.scrollTop + d.body.clientHeight;
el.y -= frame_startY;
}
return el;
}
window.frame_stayTopLeft=function(){
if(!UseDrag){
if(im_posx=='left'){
frame_startX=im_x;
}else if(im_posx=='center'){
frame_startX=parseInt((document.body.clientWidth-$('frame_div').clientWidth)/2);
}else if(im_posx=='right'){
frame_startX=document.body.clientWidth-$('frame_div').clientWidth-im_x;
}
if(im_posy=='top'){
frame_startY=im_y;
}else if(im_posy=='middle'){
frame_startY=parseInt((document.body.clientHeight-$('frame_div').clientHeight)/2);
}else if(im_posy=='bottom'){
frame_startY=document.body.clientHeight-$('frame_div').clientHeight-im_y;
}
}
if (verticalpos=="fromtop"){
frame_ftlObj.x = (ns ? pageXOffset : GetScroll('left')) + frame_startX;
var pY = ns ? pageYOffset : GetScroll('top');
frame_ftlObj.y += (pY + frame_startY - frame_ftlObj.y)/8;
}else{
var pY = ns ? pageYOffset + innerHeight : GetScroll('top') + d.body.clientHeight;
frame_ftlObj.y += (frame_pY - frame_startY - frame_ftlObj.y)/8;
}
frame_ftlObj.sP(frame_ftlObj.x, frame_ftlObj.y);
setTimeout("frame_stayTopLeft()", 10);
}
frame_ftlObj = frame_ml('frame_div');
frame_stayTopLeft();
}
function lsoo_Float_lsoos_invite1(){
if(UseDrag){
invite1_startX=parseInt((document.body.clientWidth-400)/2);
invite1_startY=200;//parseInt((document.body.clientHeight-$('invite_div').clientHeight)/2);
}
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function invite1_ml(id){
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y};
el.x = invite1_startX;
if (verticalpos=="fromtop")
el.y = invite1_startY;
else{
el.y = ns ? pageYOffset + innerHeight : d.body.scrollTop + d.body.clientHeight;
el.y -= invite1_startY;
}
return el;
}
window.invite1_stayTopLeft=function(){
if(!UseDrag){
invite1_startX=parseInt((document.body.clientWidth-$('invite_div').clientWidth)/2);
invite1_startY=200;//parseInt((document.body.clientHeight-$('invite_div').clientHeight)/2);
}
if (verticalpos=="fromtop"){
invite1_ftlObj.x = (ns ? pageXOffset : GetScroll('left')) + invite1_startX;
var pY = ns ? pageYOffset : GetScroll('top');
invite1_ftlObj.y += (pY + invite1_startY - invite1_ftlObj.y)/8;
}else{
var pY = ns ? pageYOffset + innerHeight : GetScroll('top') + d.body.clientHeight;
invite1_ftlObj.y += (invite1_pY - invite1_startY - invite1_ftlObj.y)/8;
}
invite1_ftlObj.sP(invite1_ftlObj.x, invite1_ftlObj.y);
setTimeout("invite1_stayTopLeft()", 10);
}
invite1_ftlObj = invite1_ml('invite_div');
invite1_stayTopLeft();
}
function lsoo_Float_lsoos_invite2(){
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function invite2_ml(id){
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y};
el.x = invite2_startX;
if (verticalpos=="fromtop")
el.y = invite2_startY;
else{
el.y = ns ? pageYOffset + innerHeight : d.body.scrollTop + d.body.clientHeight;
el.y -= invite2_startY;
}
return el;
}
window.invite2_stayTopLeft=function(){
invite2_startX=document.body.clientWidth-$('RB_Invite_div').clientWidth;
invite2_startY=document.body.clientHeight-$('RB_Invite_div').clientHeight;
if (verticalpos=="fromtop"){
invite2_ftlObj.x = (ns ? pageXOffset : GetScroll('left')) + invite2_startX;
var pY = ns ? pageYOffset : GetScroll('top');
invite2_ftlObj.y += (pY + invite2_startY - invite2_ftlObj.y)/8;
}else{
var pY = ns ? pageYOffset + innerHeight : GetScroll('top') + d.body.clientHeight;
invite2_ftlObj.y += (invite2_pY - invite2_startY - invite2_ftlObj.y)/8;
}
invite2_ftlObj.sP(invite2_ftlObj.x, invite2_ftlObj.y);
setTimeout("invite2_stayTopLeft()", 10);
}
invite2_ftlObj = invite2_ml('RB_Invite_div');
invite2_stayTopLeft();
}
function drag(o){
o.onmousedown=function(a){
var d=document;if(!a)a=window.event;
var x=a.layerX?a.layerX:a.offsetX,y=a.layerY?a.layerY:a.offsetY;
if(o.setCapture)
o.setCapture();
else if(window.captureEvents)
window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
d.onmousemove=function(a){
if(!a)a=window.event;
if(!a.pageX)a.pageX=a.clientX;
if(!a.pageY)a.pageY=a.clientY;
var tx=a.pageX-x,ty=a.pageY-y;
var pX=isIE ? document.body.scrollLeft : pageXOffset;
var pY=isIE ? document.body.scrollTop : pageYOffset;
o.style.left=pX + tx;
o.style.top=pY + ty;
if(o.id=='frame_div'){
frame_startX=tx;
frame_startY=ty;
}else if(o.id=='invite_div'){
invite1_startX=tx;
invite1_startY=ty;
}
};
d.onmouseup=function(){
if(o.releaseCapture)
o.releaseCapture();
else if(window.captureEvents)
window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
d.onmousemove=null;
d.onmouseup=null;
};
};
}
function lsoo_onload(){
lsoo_Float_lsoos_frame();
if(UseDrag){drag($('frame_div'));}
if(im_autoinvite=='Y')setTimeout("NewInvite()",im_thecount*1000);}
function NewInvite(){
if(im_inviteindex=='0'){
return false;
}
if($("invite_div").style.display!=='none'){
return false;
}
if(NotAgree){
return false;
}
if(im_opennew=="1"){
myWindow.open(homepage+"kf.php?mod=client&cid="+im_cid+"&wid="+im_wid+"&uid="+im_sessionid);
return false;
}else{
myFlashObj.SetVariable("isInvited", "1");
}
if(isIE){
$("invite_div").style.pixelLeft=document.body.scrollLeft+parseInt((document.body.clientWidth-400)/2);
$("invite_div").style.pixelTop=document.body.scrollTop+200;
}else{
$("invite_div").style.left=document.documentElement.scrollLeft+parseInt((document.documentElement.clientWidth-400)/2)+"px";
$("invite_div").style.top=document.documentElement.scrollTop+200+"px";
}
if($("invite_div").style.display=='none'){
$("invite_div").style.display='';
lsoo_Float_lsoos_invite1();
}
//if(UseDrag){drag($('invite_div'));}
clearInterval(InitTimer);
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write(' \n');
}