var baseopacity=0
function slowhigh(which2){
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	highlighting=setInterval("gradualfade(imgobj)",30)
}
function slowlow(which2){
	cleartimer()
	instantset(baseopacity)
}

var baseopacityo=50
function slowhigho(which2){
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacityo)
	highlighting=setInterval("gradualfade(imgobj)",30)
}
function slowlowo(which2){
	cleartimer()
	instantset(baseopacityo)
}

function instantset(degree){
	if (browserdetect=="mozilla")
	imgobj.style.MozOpacity=degree/100
	else if (browserdetect=="ie")
	imgobj.filters.alpha.opacity=degree
}
function cleartimer(){
	if (window.highlighting) clearInterval(highlighting)
}
function gradualfade(cur2){
	if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
	cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
	else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
	cur2.filters.alpha.opacity+=10
	else if (window.highlighting)
	clearInterval(highlighting)
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var rector=3
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}



var pic_width=500;
var pic_height=250;

var delay=4000;

if (document.images)
 {
     pic1= new Image(pic_width,pic_height);
     pic1.src="images/rotate/img1.jpg";  
     pic2= new Image(pic_width,pic_height); 
     pic2.src="images/rotate/img2.jpg"; 
     pic3= new Image(pic_width,pic_height);
     pic3.src="images/rotate/img3.jpg";  
     pic4= new Image(pic_width,pic_height);
     pic4.src="images/rotate/img4.jpg";  
     pic5= new Image(pic_width,pic_height);
     pic5.src="images/rotate/img5.jpg";  
     pic6= new Image(pic_width,pic_height);
     pic6.src="images/rotate/img6.jpg"; 
 }    

var pics= new Array(6) 
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic3.src;
   pics[3]=pic4.src;
   pics[4]=pic5.src; 
   pics[5]=pic6.src;

var numpics=6;
var thenum=0;
imgName="img1";

function change_it()
 {
   if (document.images)
    {
      document.write("<img src='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");
      setTimeout('change_it2()',delay);  
   }
}

function change_it2()
 {
         var x=0;
          thenum+=1;

           if (thenum>numpics-1)
             thenum=0;

           document[imgName].src=pics[thenum];
           x+=1;
           setTimeout('change_it2()',delay);
 }

