var obj;


/* define the length of time to stay on each image */
/* 1000 = 1 second */

var delay=10;

/* define image urls */


     pic1= new Image(75,187);
     pic1.src="images/animation/Frame01.gif";
     pic2= new Image(75,187); 
     pic2.src="images/animation/Frame02.gif";
     pic3= new Image(75,187);
     pic3.src="images/animation/Frame03.gif"; 
     pic4= new Image(75,187);
     pic4.src="images/animation/Frame04.gif";  
     pic5= new Image(75,187);
     pic5.src="images/animation/Frame05.gif"; 
     pic6= new Image(75,187);
     pic6.src="images/animation/Frame06.gif";  
     pic7= new Image(75,187); 
     pic7.src="images/animation/Frame07.gif"; 
     pic8= new Image(75,187);
     pic8.src="images/animation/Frame08.gif";  
     pic9= new Image(75,187);
     pic9.src="images/animation/Frame09.gif";
     pic10= new Image(75,187);
     pic10.src="images/animation/Frame10.gif";
     pic11= new Image(75,187);
     pic11.src="images/animation/Frame11.gif";  
     pic12= new Image(75,187); 
     pic12.src="images/animation/Frame12.gif"; 
     pic13= new Image(75,187);
     pic13.src="images/animation/Frame13.gif";  
     pic14= new Image(75,187);
     pic14.src="images/animation/Frame14.gif";  
     pic15= new Image(75,187);
     pic15.src="images/animation/Frame15.gif"; 
     pic16= new Image(75,187);
     pic16.src="images/animation/Frame16.gif";  
     pic17= new Image(75,187); 
     pic17.src="images/animation/Frame17.gif"; 
     pic18= new Image(75,187);
     pic18.src="images/animation/Frame18.gif";  
     pic19= new Image(75,187);
     pic19.src="images/animation/Frame19.gif";  
     pic20= new Image(75,187);
     pic20.src="images/animation/Frame20.gif";
     pic21= new Image(75,187);
     pic21.src="images/animation/Frame21.gif";  
     pic22= new Image(75,187); 
     pic22.src="images/animation/Frame22.gif"; 
     pic23= new Image(75,187);
     pic23.src="images/animation/Frame23.gif";  
     pic24= new Image(75,187);
     pic24.src="images/animation/Frame24.gif";  
     pic25= new Image(75,187);
     pic25.src="images/animation/Frame25.gif"; 
     pic26= new Image(75,187);
     pic26.src="images/animation/Frame26.gif";  
     pic27= new Image(75,187); 
     pic27.src="images/animation/Frame27.gif"; 
     pic28= new Image(75,187);
     pic28.src="images/animation/Frame28.gif";  
     pic29= new Image(75,187);
     pic29.src="images/animation/Frame29.gif";  
     pic30= new Image(75,187);
     pic30.src="images/animation/Frame30.gif";
     pic31= new Image(75,187);
     pic31.src="images/animation/Frame31.gif";  
     pic32= new Image(75,187); 
     pic32.src="images/animation/Frame32.gif"; 
     pic33= new Image(75,187);
     pic33.src="images/animation/Frame33.gif";  
     pic34= new Image(75,187);
     pic34.src="images/animation/Frame34.gif";  
     pic35= new Image(75,187);
     pic35.src="images/animation/Frame35.gif"; 
     pic36= new Image(75,187);
     pic36.src="images/animation/Frame36.gif";  
     pic37= new Image(75,187); 
     pic37.src="images/animation/Frame37.gif"; 
     pic38= new Image(75,187);
     pic38.src="images/animation/Frame38.gif";  
     pic39= new Image(75,187);
     pic39.src="images/animation/Frame39.gif";  
     pic40= new Image(75,187);
     pic40.src="images/animation/Frame40.gif";
     pic41= new Image(75,187);
     pic41.src="images/animation/Frame41.gif";  
     pic42= new Image(75,187); 
     pic42.src="images/animation/Frame42.gif"; 
     pic43= new Image(75,187);
     pic43.src="images/animation/Frame43.gif";  
     pic44= new Image(75,187);
     pic44.src="images/animation/Frame44.gif";  
     pic45= new Image(75,187);
     pic45.src="images/animation/Frame45.gif"; 
     pic46= new Image(75,187);
     pic46.src="images/animation/Frame46.gif";  
     pic47= new Image(75,187); 
     pic47.src="images/animation/Frame47.gif"; 
     pic48= new Image(75,187);
     pic48.src="images/animation/Frame48.gif";  
     pic49= new Image(75,187);
     pic49.src="images/animation/Frame49.gif";  
     pic50= new Image(75,187);
     pic50.src="images/animation/Frame50.gif";
     pic51= new Image(75,187);
     pic51.src="images/animation/Frame51.gif";  
     pic52= new Image(75,187); 
     pic52.src="images/animation/Frame52.gif"; 
     pic53= new Image(75,187);
     pic53.src="images/animation/Frame53.gif";  
     pic54= new Image(75,187);
     pic54.src="images/animation/Frame54.gif";  
     pic55= new Image(75,187);
     pic55.src="images/animation/Frame55.gif"; 
     pic56= new Image(75,187);
     pic56.src="images/animation/Frame56.gif";  
     pic57= new Image(75,187); 
     pic57.src="images/animation/Frame57.gif"; 
     pic58= new Image(75,187);
     pic58.src="images/animation/Frame58.gif";  
     pic59= new Image(75,187);
     pic59.src="images/animation/Frame59.gif";  
     pic60= new Image(75,187);
     pic60.src="images/animation/Frame60.gif";
     pic61= new Image(75,187);
     pic61.src="images/animation/Frame61.gif";  
     pic62= new Image(75,187); 
     pic62.src="images/animation/Frame62.gif"; 
     pic63= new Image(75,187);
     pic63.src="images/animation/Frame63.gif";  
     pic64= new Image(75,187);
     pic64.src="images/animation/Frame64.gif";  
     pic65= new Image(75,187);
     pic65.src="images/animation/Frame65.gif"; 
     pic66= new Image(75,187);
     pic66.src="images/animation/Frame66.gif";  
     pic67= new Image(75,187); 
     pic67.src="images/animation/Frame67.gif"; 
     pic68= new Image(75,187);
     pic68.src="images/animation/Frame68.gif";  
     pic69= new Image(75,187);
     pic69.src="images/animation/Frame69.gif";  
     pic70= new Image(75,187);
     pic70.src="images/animation/Frame70.gif";
     pic71= new Image(75,187);
     pic71.src="images/animation/Frame71.gif";  
     pic72= new Image(75,187); 
     pic72.src="images/animation/Frame72.gif"; 
     pic73= new Image(75,187);
     pic73.src="images/animation/Frame73.gif";  
     pic74= new Image(75,187);
     pic74.src="images/animation/Frame74.gif";  
     pic75= new Image(75,187);
     pic75.src="images/animation/Frame75.gif";

var pics= new Array(75) 
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic3.src;
   pics[3]=pic4.src;
   pics[4]=pic5.src;
   pics[5]=pic6.src;
   pics[6]=pic7.src;
   pics[7]=pic8.src;
   pics[8]=pic9.src;
   pics[9]=pic10.src;
   pics[10]=pic11.src;
   pics[11]=pic12.src;
   pics[12]=pic13.src;
   pics[13]=pic14.src;
   pics[14]=pic15.src;
   pics[15]=pic16.src;
   pics[16]=pic17.src;
   pics[17]=pic18.src;
   pics[18]=pic19.src;
   pics[19]=pic20.src;
   pics[20]=pic21.src;
   pics[21]=pic22.src;
   pics[22]=pic23.src;
   pics[23]=pic24.src;
   pics[24]=pic25.src;
   pics[25]=pic26.src;
   pics[26]=pic27.src;
   pics[27]=pic28.src;
   pics[28]=pic29.src;
   pics[29]=pic30.src;
   pics[30]=pic31.src;
   pics[31]=pic32.src;
   pics[32]=pic33.src;
   pics[33]=pic34.src;
   pics[34]=pic35.src;
   pics[35]=pic36.src;
   pics[36]=pic37.src;
   pics[37]=pic38.src;
   pics[38]=pic39.src;
   pics[39]=pic40.src;
   pics[40]=pic41.src;
   pics[41]=pic42.src;
   pics[42]=pic43.src;
   pics[43]=pic44.src;
   pics[44]=pic45.src;
   pics[45]=pic46.src;
   pics[46]=pic47.src;
   pics[47]=pic48.src;
   pics[48]=pic49.src;
   pics[49]=pic50.src;
   pics[50]=pic51.src;
   pics[51]=pic52.src;
   pics[52]=pic53.src;
   pics[53]=pic54.src;
   pics[54]=pic55.src;
   pics[55]=pic56.src;
   pics[56]=pic57.src;
   pics[57]=pic58.src;
   pics[58]=pic59.src;
   pics[59]=pic60.src;
   pics[60]=pic61.src;
   pics[61]=pic62.src;
   pics[62]=pic63.src;
   pics[63]=pic64.src;
   pics[64]=pic65.src;
   pics[65]=pic66.src;
   pics[66]=pic67.src;
   pics[67]=pic68.src;
   pics[68]=pic69.src;
   pics[69]=pic70.src;
   pics[70]=pic71.src;
   pics[71]=pic72.src;
   pics[72]=pic73.src;
   pics[73]=pic74.src;
   pics[74]=pic75.src;



var numpics=75;
var thenum=0;
var repeat;
var pause;
imgName="img1";


function change_it2()
 {
          thenum+=1;

	   if (thenum==74){
	     	glideToCenter();
	     	}
	   else {
  	       document[imgName].src=pics[thenum];
           repeat=setTimeout('change_it2()',30);
       }
 }
      
 function change_it3()
 {
       	thenum=0;
       	show(obj);
       	change_it2();
      
 }


var intervalID

function getObjHeight(obj) {	
		if (obj.offsetHeight);	
			return obj.offsetHeight;
		return (null);
}


function getObjTop(obj) {
		var obj=document.getElementById("banner");
		if (obj.offsetTop)
			return obj.offsetTop;
		return (null);
}

function getInsideWindowWidth(obj) {
	if (window.innerWidth) 	
		return window.innerWidth;
	if (document.body.clientWidth)
		return document.body.clientWidth;
	return (null);
}

function getInsideWindowHeight(obj) {
	if (window.innerHeight) 	
		return window.innerHeight;
	if (document.body.clientHeight)
		return document.body.clientHeight;
	return (null);
}

function show(obj) {
	var obj=document.getElementById("banner");
	obj.style.visibility = "visible"
}

function hide(obj) {
	 var obj=document.getElementById("banner");
	obj.style.visibility = "hidden"
} 

function intro(bool) {
	var obj=document.getElementById("banner");
	var content=document.getElementById("content");
	if (bool==1) {
		//content.style.marginLeft = 75+"px";
		obj.style.top = eval(getInsideWindowHeight()+(getObjHeight(obj)/8))+"px";
		show(obj);
		glideToCenter();
	}
} 

function glideToCenter() {
	var obj = document.getElementById("banner");
	var a = getObjTop(obj);
	hide(obj);
	clearTimeout(repeat);
	a-=58;
	var b = 1;
	var c = 0;
	obj.style.top=a+"px";
		thenum=0;
	show(obj);
	document[imgName].src=pics[thenum];
	change_it2();
	//pause=setTimeout("change_it3()", 0.1);
	/*c++;		
	if (c = 1) {
		clearTimeout(intervalID);
		}
	else {
		intervalID = setTimeout("glideToCenter()",740)
		}
	*/	
}	

function restoreBlank() {
	clearTimeout(repeat);
	clearTimeout(pause);
	
}




