var x0=0,y0=0,x1=0,y1=0;
var offx=2,offy=10;
var moveable=false;
var hover='yellow',normal='gray';//color;
var index=10000;//z-index;
timermoveleft=0;
timermoveright=0;
//开始拖动;
function startDrag(obj)
{
//锁定标题栏;
obj.setCapture();
//定义对象;
//记录鼠标和层位置;
x0 = event.clientX;
y0 = event.clientY;
x1 = parseInt(leftlayer.style.left);
y1 = parseInt(leftlayer.style.top);
//记录颜色;
normal = obj.style.backgroundColor;
//改变风格;
obj.style.backgroundColor = hover;
obj.style.cursor="pointer";
tdwin.style.borderColor = hover;
obj.cells[1].style.color="black";
kkl31.style.display="";
kkl32.style.display="";
moveable = true;
}
//拖动;
function drag(obj) {if (moveable) {leftlayer.style.left = x1 + event.clientX - x0;leftlayer.style.top = y1 + event.clientY - y0;}}
//停止拖动;
function stopDrag(obj)
{
tdwin.style.borderColor = normal;
obj.style.backgroundColor = normal;
obj.style.cursor="move";
obj.cells[1].style.color="white";
kkl31.style.display="none";
kkl32.style.display="none";
//放开标题栏;
obj.releaseCapture();
moveable = false;
offx = parseInt(leftlayer.style.left,10) - document.body.scrollLeft;
offy = parseInt(leftlayer.style.top,10) - document.body.scrollTop;
moveleftlayer();
}
//获得焦点;
function min(obj)
{
var flg = kkl2.style.display=="none";
if(flg) {kkl2.style.display="";obj.src = "images/mini.gif";}
else { kkl2.style.display="none";obj.src = "images/rest.gif";}
}
function cls(obj) { leftlayer.style.display="none"; if (timermoveleft!=0) clearTimeout(timermoveleft);if (timermoveright!=0) clearTimeout(timermoveright);}
//创建一个对象;
function xWin(id,w,h,l,t,tit,msg)
{
index = index+2;
this.id = id ;
this.width = w;
this.height = h;
this.left = l;
this.top = t;
this.zIndex = index;
this.title = tit;
this.message = msg;
this.obj = null;
this.bulid = bulid;
this.bulid();
}
//初始化;
function bulid()
{
var str = "
"
+ ""
+ " " + this.title + " | |  |
| "
+ " " + this.message + " | "
+ " "
+ " | |
"
+ " |
"
+ "
";
document.body.insertAdjacentHTML("beforeEnd",str);
}
function autoclose(){
setTimeout ("rightlayer.style.display='hidden';clearTimeout(timermoveright);", 50000);
setTimeout ("leftlayer.style.display='hidden';clearTimeout(timermoveleft);", 50000);
}
function moveleftlayer() {
if (moveable) return;
var layer = eval("leftlayer.style")
xMenuFrom = parseInt (layer.left, 10);
xMenuTo = document.body.scrollLeft+offx;
yMenuFrom = parseInt (layer.top, 10);
// yMenuTo = document.body.scrollTop+document.body.clientHeight-leftlayer.offsetHeight/2-document.body.clientHeight/2;
yMenuTo = document.body.scrollTop+offy;
timeoutNextCheck = 1000;
if (1<=Math.abs(yMenuTo - yMenuFrom)) {
yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
if (yMenuTo < yMenuFrom) {yOffset = -yOffset;}
LayerTop = parseInt (layer.top, 10) + yOffset;
layer.top = LayerTop;
timeoutNextCheck = 50;
}
if (1<=Math.abs(xMenuTo - xMenuFrom)) {
xOffset = Math.ceil(Math.abs(xMenuTo - xMenuFrom) / 20);
if (xMenuTo < xMenuFrom) {xOffset = -xOffset;}
LayerLeft = parseInt (layer.left, 10) + xOffset;
layer.left = LayerLeft;
timeoutNextCheck = 50;
}
timermoveleft=setTimeout("moveleftlayer()", timeoutNextCheck);
if (jq('#kkl2').text()=='') {if (timermoveleft!=0) clearTimeout(timermoveleft);return;};
}
function moverightlayer() {
if (typeof(rightlayer)!="undefined") {
var layer = eval("rightlayer.style")
xMenuFrom = parseInt (layer.left, 10);
// xMenuTo = mainbody.scrollLeft+document.body.clientWidth-rightlayer.offsetWidth;
xMenuTo = document.body.scrollLeft+document.body.clientWidth-rightlayer.offsetWidth;
yMenuFrom = parseInt (layer.top, 10);
yMenuTo = document.body.scrollTop+document.body.clientHeight-rightlayer.offsetHeight/2-document.body.clientHeight/2;
timeoutNextCheck = 1000;
if (1<=Math.abs(yMenuTo - yMenuFrom)) {
yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
if (yMenuTo < yMenuFrom) {yOffset = -yOffset;}
LayerTop = parseInt (layer.top, 10) + yOffset;
layer.top = LayerTop;
timeoutNextCheck = 50;
}
if (1<=Math.abs(xMenuTo - xMenuFrom)) {
xOffset = Math.ceil(Math.abs(xMenuTo - xMenuFrom) / 20);
if (xMenuTo < xMenuFrom) {xOffset = -xOffset;}
LayerLeft = parseInt (layer.left, 10) + xOffset;
layer.left = LayerLeft;
timeoutNextCheck = 50;
}
timermoveright=setTimeout ("moverightlayer()", timeoutNextCheck);
}
}
/**
* FlashObject v1.3d: Flash detection and embed - http://blog.deconcept.com/flashobject/
*
* FlashObject is (c) 2006 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof com=="undefined"){var com=new Object();}
if(typeof com.deconcept=="undefined"){com.deconcept=new Object();}
if(typeof com.deconcept.util=="undefined"){com.deconcept.util=new Object();}
if(typeof com.deconcept.FlashObjectUtil=="undefined"){com.deconcept.FlashObjectUtil=new Object();}
com.deconcept.FlashObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
this.useExpressInstall=_7;
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new com.deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}
};
com.deconcept.FlashObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},createParamTag:function(n,v){
var p=document.createElement("param");
p.setAttribute("name",n);
p.setAttribute("value",v);
return p;
},getVariablePairs:function(){
var _19=new Array();
var key;
var _1b=this.getVariables();
for(key in _1b){_19.push(key+"="+_1b[key]);}
return _19;
},getFlashHTML:function(){
var _1c="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");
}
_1c="