var winWidth = 340;
var winHeight = 290;
URL=new Array;
URL[1]='
';URL[2]='
';
co=0;
var b=(URL.length-1);
var pause=6000;
function Rotate() {
if (co==b) {
co=1;
}else{
co=co+1;
}
rest=URL[co];
document.getElementById("IBlock").innerHTML = rest;
window.setTimeout('Rotate()',pause);
}
document.write('
');
var sliderboxwin = document.getElementById("sliderbox");
var ScrollHeight = winHeight;
var hidden = true;
setTimeout("showtbl()", 1);
setInterval("showtbl()", 1000);
setInterval("updatePosition()", 10);
setInterval("slide()", 20);
var fuckIE = false;
if (navigator.appName == "Microsoft Internet Explorer") {
fuckIE = true;
}
else {
sliderboxwin.style.position = "fixed";
}
if (navigator.appName == "Opera") {
winWidth = winWidth + 16;
}
function slide() {
if (!hidden) {
if (ScrollHeight > 0) {
ScrollHeight = ScrollHeight - 10;
}
if (ScrollHeight < 0) {
ScrollHeight = 0;
}
}
}
function updatePosition() {
rightBottomWin("sliderbox", winWidth, winHeight - ScrollHeight);
return 0;
}
function getWinSize() {
var height = 0;
var width = 0;
if (self.innerHeight)
height = self.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight)
height = document.documentElement.clientHeight;
else if (document.body)
height = document.body.clientHeight;
if (self.innerWidth)
width = self.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth)
width = document.documentElement.clientWidth;
else if (document.body)
width = document.body.clientWidth;
var size = [width, height];
return size;
}
function centerWin(id, width, height) {
var winSize = getWinSize();
document.getElementById(id).style.left = (winSize[0]-width)/2+"px";
document.getElementById(id).style.top = (winSize[1]-height)/2+"px";
if (fuckIE == true) {
document.getElementById(id).style.left = (winSize[0]-width+document.body.scrollLeft)+"px";
document.getElementById(id).style.top = (winSize[1]-height+document.body.scrollTop)+"px";
}
}
function rightBottomWin(id, width, height) {
var winSize = getWinSize();
if (document.height)
if (document.height > winSize[1])
winSize[0] -= 16;
winSize[1] -= 1;
winSize[0] -= 5;
winSize[1] -= 5;
document.getElementById(id).style.left = (winSize[0]-width)+"px";
document.getElementById(id).style.top = (winSize[1]-height)+"px";
if (fuckIE == true) {
document.getElementById(id).style.left = (winSize[0]-width+document.body.scrollLeft)+"px";
document.getElementById(id).style.top = (winSize[1]-height+document.body.scrollTop)+"px";
}
return 0;
}
function getCookie(name) {
var cookie = " "+document.cookie;
var search = " "+name+"=";
var setStr = null;
var offset = 0;
var end = 0;
if (cookie.length > 0) {
offset = cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = cookie.indexOf(";", offset)
if (end == -1) {
end = cookie.length;
}
setStr = unescape(cookie.substring(offset, end));
}
}
return(setStr);
}
function setCookie (name, value, expires, path, domain, secure) {
document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "")+ ((secure) ? "; secure" : "");
}
function showtbl(){
var expr = getCookie("untill");
if (expr==null || expr=="") {
sliderboxwin.style.display = "inline";
hidden = false;
}
}
function hidetbl(){
var now = new Date();
var expire = new Date();
expire.setTime(now.getTime()+86400000);
sliderboxwin.style.display = "none";
ScrollHeight = winHeight;
hidden = true;
setCookie("untill", "1", expire.toGMTString());
}
function hidetbllong(){
var now = new Date();
var expire = new Date();
expire.setTime(now.getTime()+86400000);
sliderboxwin.style.display = "none";
ScrollHeight = winHeight;
hidden = true;
setCookie("untill", "1", expire.toGMTString());
}
Rotate();