var links = new Array();
links[1] = "#";
links[2] = "#";
links[3] = "#";
links[4] = "#";
links[5] = "#";
links[6] = "#";
var imgs = new Array();
for(var n = 1; n <= 6; n++) imgs[n] = new Image();
imgs[1].src = "images/splash1.jpg";
imgs[2].src = "images/splash2.jpg";
imgs[3].src = "images/splash3.jpg";
imgs[4].src = "images/splash4.jpg";
imgs[5].src = "images/splash5.jpg";
imgs[6].src = "images/splash6.jpg";
var imgwidth = 650;//width

var str = "<style type='text/css'>";
str += "#imgnv{position:absolute;bottom:21px;right:0px;}";
str += "#imgnv div.on,#imgnv div.off{display:inline;float:left;margin-right:1px;width:20px;height:15px;line-height:18px!important;line-height:15px;font-size:9px;text-align:center;cursor:pointer;cursor:hand}";
str += "#imgnv div.on{background:#CE0609;color:#FFF;font-weight:bold}";
str += "#imgnv div.off{background:#323232;color:#FFF;text-decoration:none}";
str += "#titnv{margin-top:3px;color:#000}";
str += "</style>";
str += "<div style='position:absolute;z-index:-1;'>";
str += "<div ><a id='dlink' href='" + links[1] + "' target='_blank'><img id='dimg' src='" + imgs[1].src + "' border='0' width='" + imgwidth + "' style='filter:Alpha(opacity=100)' onmouseover='Pause(true)' onmouseout='Pause(false)'></a></div>";
str += "<div style='height:22px;width:0px;'></div><div id='imgnv'><div id='it1' class='on' onmouseover='ImgSwitch(1, true)' onmouseout='Pause(false)'>1</div><div id='it2' class='off' onmouseover='ImgSwitch(2, true)' onmouseout='Pause(false)'>2</div><div id='it3' class='off' onmouseover='ImgSwitch(3, true)' onmouseout='Pause(false)'>3</div><div id='it4' class='off' onmouseover='ImgSwitch(4, true)' onmouseout='Pause(false)'>4</div><div id='it5' class='off' onmouseover='ImgSwitch(5, true)' onmouseout='Pause(false)'>5</div><div id='it6' class='off' onmouseover='ImgSwitch(6, true)' onmouseout='Pause(false)'>6</div>";
//str += "<div id='titnv' align=center><b>" + tits[1] + "</b></div>";
str += "</div>";
document.write(str);

var oi = document.getElementById("dimg");
var pause = false;
var curid = 1;
var lastid = 1;
var sw = 1;
var opacity = 100;
var speed = 15;
var delay = (document.all)? 400:700;

function SetAlpha(){
if(document.all){
if(oi.filters && oi.filters.Alpha) oi.filters.Alpha.opacity = opacity;
}else{
oi.style.MozOpacity = ((opacity >= 100)? 99:opacity) / 100;
}
}

function ImgSwitch(id, p){
if(p){
pause = true;
opacity = 100;
SetAlpha();
}
oi.src = imgs[id].src;
document.getElementById("dlink").href = links[id];
document.getElementById("it" + lastid).className = "off";
document.getElementById("it" + id).className = "on";
//document.getElementById("titnv").innerHTML = "<b>" + tits[id] + "</b>";
curid = lastid = id;
}

function ScrollImg(){
if(pause && opacity >= 100) return;
if(sw == 0){
opacity += 2;
if(opacity > delay){ opacity = 100; sw = 1; }
}
if(sw == 1){
opacity -= 3;
if(opacity < 10){ opacity = 10; sw = 3; }
}
SetAlpha();
if(sw != 3) return;
sw = 0;
curid++;
if(curid > 6) curid = 1;
ImgSwitch(curid, false);
}

function Pause(s){
pause = s;
}

function StartScroll(){
setInterval(ScrollImg, speed);
}

function CheckLoad(){
if (imgs[1].complete == true && imgs[2].complete == true) {
clearInterval(checkid);
setTimeout(StartScroll, 2000);
}
}

var checkid = setInterval(CheckLoad, 10);