document.write("
")
var bodycontainerHeight = 96;
var bodycontainerWidth = 26;
var bgroundimg = new Image();
bgroundimg.src = 'http://www.juqile.cn/images/bg.gif';
bgroundimg.onload = function(){document.getElementById("leftcontainer").style.backgroundColor = 'transparent';};
slider.names = new Array();
function slider()
{
this.id = slider.names.length;
slider.names[this.id] = this;
this.target = document.getElementById(arguments[0]);
this.direction = arguments[1];
this.height = arguments[2];
this.width = arguments[3];
this.step = arguments[4];
this.timer = 10 * arguments[5];
this.startopa = arguments[6];
this.sparent = this.target.parentNode;
this.intervalid = null;
this.i = 0;
this.status = 0;
this.target.style.display = "none";
return this;
}
slider.prototype.initialize = function()
{
this.sparent.style.overflow = "hidden";
this.target.style.width = Number(this.width) + 'px';
this.target.style.height = Number(this.height) + 'px';
this.target.style.position = "";
this.target.style.display = "";
this.target.style.filter = 'Alpha(opacity=' + Number(this.startopa) + ')';
this.target.style.overflow = "hidden";
switch(this.direction)
{
case 1://left to right
this.target.style.marginLeft = "-" + this.width + "px";
break;
case 2://top to bottom
this.target.style.marginTop = "-" + this.height + "px";
break;
case 3://right to left
this.target.style.marginRight = "-" + this.width + "px";
break;
}
}
slider.prototype.show = function()
{
if (this.status==0)
{
this.initialize();
this.intervalid = window.setInterval("slider.names["+this.id+"].cycle()",this.timer);
}
}
slider.prototype.hide = function()
{
if (this.status==1)
{
this.intervalid = window.setInterval("slider.names["+this.id+"].decycle()",this.timer);
}
}
slider.prototype.cycle = function()
{
var opa = this.target.style.filter.split("=")[1].split(")")[0]
var opastep = Math.round(((100 - Number(opa)) / this.step)+2.5);
var nopa = Number(opa) + Number(opastep);
if (nopa>100){this.target.style.filter = 'Alpha(opacity=100)';}else{this.target.style.filter = 'Alpha(opacity=' + String(nopa) + ')';}
switch(this.direction)
{
case 1: //left to right
var opx = this.target.style.marginLeft.split("px")[0];
var pxstep = Math.round((this.width / this.step)+0.5);
var npx = Number(opx) + Number(pxstep);
if (npx>0){this.target.style.marginLeft = '0px';}else{this.target.style.marginLeft = String(npx) + 'px';}
break;
case 2: //top to bottom
var opx = this.target.style.marginTop.split("px")[0];
var pxstep = Math.round((this.height / this.step)+0.5);
var npx = Number(opx) + Number(pxstep);
if (npx>0){this.target.style.marginTop = '0px';}else{this.target.style.marginTop = String(npx) + 'px';}
break;
case 3: //right to left
var opx = this.target.style.marginRight.split("px")[0];
var pxstep = Math.round((this.width / this.step)+0.5);
var npx = Number(opx) + Number(pxstep);
if (npx>0){this.target.style.marginRight = '0px';}else{this.target.style.marginRight = String(npx) + 'px';}
break;
}
this.i++
if (this.i>(this.step-1)){window.clearInterval(this.intervalid);this.i=0;this.status=1;}
}
slider.prototype.decycle = function()
{
var opa = this.target.style.filter.split("=")[1].split(")")[0]
var opastep = Math.round(((100 - Number(opa)) / this.step)+2.5)*2;
var nopa = Number(opa) - Number(opastep);
if (nopathis.width+2){this.target.style.marginLeft = '-' + this.width + 'px';}else{this.target.style.marginLeft = String(npx) + 'px';}
break;
case 2: //top to bottom
var opx = this.target.style.marginTop.split("px")[0];
var pxstep = Math.round((this.height / Math.round(this.step*0.5))+0.5);
var npx = Number(opx) - Number(pxstep);
if (Math.abs(npx)>this.height+2){this.target.style.marginTop = '-' + this.height + 'px';}else{this.target.style.marginTop = String(npx) + 'px';}
break;
case 3: //right to left
var opx = this.target.style.marginRight.split("px")[0];
var pxstep = Math.round((this.width / Math.round(this.step*0.5))+0.5);
var npx = Number(opx) - Number(pxstep);
if (Math.abs(npx)>this.width+2){this.target.style.marginRight = '-' + this.width + 'px';}else{this.target.style.marginRight = String(npx) + 'px';}
break;
}
this.i++
if (this.i>(Math.round(this.step*0.5)-1)){window.clearInterval(this.intervalid);this.i=0;this.status=0;this.target.style.display = "none";}
}
var leftslider = new slider('leftcontainer',1,bodycontainerWidth,bodycontainerHeight,20,1,20);
//ShowWindows();
CloseWindows();
function moveWhole()
{
document.getElementById("bodycontainer").style.position = "fixed";
var top = document.body.clientHeight + document.body.scrollTop - bodycontainerHeight;
if(document.body.offsetHeight > top)
{
document.getElementById("bodycontainer").style.top = top;
}
}
function moveWholeIe()
{
var top = document.documentElement.clientHeight + document.documentElement.scrollTop - bodycontainerHeight;
if(document.body.offsetHeight > top)
{
document.getElementById("bodycontainer").style.top = top;
}
}
if(window.addEventListener){
window.addEventListener('scroll',moveWhole,false);
window.addEventListener('resize',moveWhole,false);
}
//IE
else if(window.attachEvent){
window.attachEvent('onscroll', moveWholeIe);
window.attachEvent('onresize',moveWholeIe);
}
//open
function ShowWindows()
{
document.getElementById("btnShow").style.display="none";
bodycontainerHeight = 300;
bodycontainerWidth = 300;
leftslider = new slider('leftcontainer',1,bodycontainerWidth,bodycontainerHeight,20,1,20);
leftslider.show();
if(window.addEventListener){
moveWhole();
}
//IE
else if(window.attachEvent){
moveWholeIe();
}
if(document.getElementById('leftcontainer').innerHTML == "")
{
var dl = new DynamicLoad();
dl.Load("http://www.juqile.cn/www/AjaxSubscribe.aspx");
dl.Load("http://www.juqile.cn/css/AjaxCss.css");
}
}
//close
function CloseWindows()
{
bodycontainerHeight = 96;
bodycontainerWidth = 26;
leftslider = new slider('leftcontainer',1,bodycontainerWidth,bodycontainerHeight,20,1,20);
leftslider.hide();
document.getElementById("btnShow").style.display="";
if(window.addEventListener){
moveWhole();
}
//IE
else if(window.attachEvent){
moveWholeIe();
}
}
//showAlert
function ShowAlert(starId,starName)
{
try{
if(document.readyState != "complete")
{return;}
if(typeof($) != "undefined")
{
BOX_show("sub_neworedit",starId,starName);
return;
}
var jquery = new DynamicLoad();
jquery.Load("http://www.juqile.cn/js/jquery-1.3.2.min.js");
jquery.OnLoaded = function(){
var divAlert = new DynamicLoad();
divAlert.OnLoaded = function(){if(BOX_show){BOX_show("sub_neworedit",starId,starName)}else{alert(null)}};
divAlert.Load("http://www.juqile.cn/js/DivAlert.js");
};
}catch(e){}
}
//shownews_new.aspx subscribe
var subHref = document.getElementsByName("subscribe_starnews");
if(subHref.length != 0)
{
for(var i=0;i