//---------------------------
var atmenet1 = 10;
var Obj1 = "";
var opt1 = 0;
var opt1im1 = 0;
var rrL1 = 0;

function setOpacity1() {
	Obj1.style.opacity = atmenet1/10;
	Obj1.style.filter = 'alpha(opacity=' + atmenet1*10 + ')';

if(atmenet1 > 0){atmenet1--;}else{atmenet1=10;
opt1=window.clearInterval(opt1)
imgrotate1s1();
}
}

function opacTim1(){

opt1 = window.setInterval("setOpacity1()", OpacityTime);
opt1im1=window.clearInterval(opt1im1);

}
function imgrotate1s1(){

var imgrotate1 = document.getElementById("imgrotate1");
var rotateLink1 = imgrotate1.getElementsByTagName("a");

if(visibleRadio1){
var rotateInp = document.getElementById("radiorotate1").getElementsByTagName("img");
}
for(var rL1=0;rL1<rotateLink1.length;rL1++){

if(visibleStart1 == rL1){
if(rL1 >= 0){
rrL1 = rL1+1;
}
if(rL1 == rotateLink1.length-1){
rrL1 = 0;
}

rotateLink1[rrL1].style.opacity = 1;
rotateLink1[rrL1].style.filter = 'alpha(opacity=' + 100 + ')';



rotateLink1[rL1].style.opacity = 1;
rotateLink1[rL1].style.filter = 'alpha(opacity=' + 100 + ')';
if(visibleRadio1){
rotateInp[rL1].src = onRadio1;
}
rotateLink1[rL1].style.zIndex=888;
Obj1 = rotateLink1[rL1];
opt1im1 = window.setInterval("opacTim1()", visibleTime1*1000);
}else{

rotateLink1[rL1].style.zIndex=1;
if(visibleRadio1){
rotateInp[rL1].src = offRadio1;
}
}
}
if(visibleStart1 < rotateLink1.length-1){visibleStart1++;}else{visibleStart1=0;}
}
//setInterval("imgrotate1()", visibleTime1*1000);

function start(){
if(document.getElementById("imgrotate1")){
var imgrotate1 = document.getElementById("imgrotate1");

var imgrotate1HTML = imgrotate1.innerHTML;
imgrotate1HTML = imgrotate1HTML.replace(/<br>/g,"");
imgrotate1HTML = imgrotate1HTML.replace(/<br\/>/g,"");
imgrotate1HTML = imgrotate1HTML.replace(/<BR>/g,"");
imgrotate1HTML = imgrotate1HTML.replace(/<BR\/>/g,"");
imgrotate1.innerHTML = imgrotate1HTML;


var rotateLink1 = imgrotate1.getElementsByTagName("a");
if(visibleRadio1){
var radiodiv  = document.createElement('div');
radiodiv.id = "radiorotate1";
imgrotate1.appendChild(radiodiv);
imgrotate1.style.height = rotateLink1[0].offsetHeight+20+"px";
imgrotate1.style.width = rotateLink1[0].offsetWidth;
}else{
imgrotate1.style.height = rotateLink1[0].offsetHeight;
imgrotate1.style.width = rotateLink1[0].offsetWidth;
}

for(var rL1=0;rL1<rotateLink1.length;rL1++){
rotateLink1[rL1].style.visibility = "visible";
if(visibleRadio1){
      var inp  = document.createElement('img');
		  inp.src = offRadio1;
		  inp.name = "radiorotate1";
		  inp.style.cursor = "pointer";
		  inp.rel = rL1;
		  if(document.all){
		  inp.setAttribute("onclick", function() { rotateValtas1(this.rel) });

		  }else{
		  inp.setAttribute("onclick","rotateValtas1("+rL1+");");
		  }
		  if(rL1==0){ inp.src=onRadio1; }
          radiodiv.appendChild(inp);
}
rotateLink1[rL1].style.opacity = 0;
rotateLink1[rL1].style.filter = 'alpha(opacity=' + 0 + ')';

}

imgrotate1s1();
}
}




function rotateValtas1(rL1){
var imgrotate1 = document.getElementById("imgrotate1");
var rotateLink1 = imgrotate1.getElementsByTagName("a");

for(var res=0;res<rotateLink1.length;res++){
rotateLink1[res].style.opacity = 0;
rotateLink1[res].style.filter = 'alpha(opacity=' + 0 + ')';
}

visibleStart1=rL1;
clearInterval(opt1im1);
opt1im1=0;
imgrotate1s1();
}
