	//Image Array
	max = 4;
	index = 0;
	images=new Array(max);
	fadein = 1;	

	//Array images
	images[0]=new Image;
	images[0].src="images/banner/quote1.jpg";
	
	images[1]=new Image;
	images[1].src="images/banner/quote2.jpg";
		
	images[2]=new Image;
	images[2].src="images/banner/quote3.jpg";
	
	images[3]=new Image;
	images[3].src="images/banner/quote4.jpg";

	//Add images as above
	
	function banner(){
		if (fadein==0){
			document.banner.src = images[index].src;
			fade('fadeBlock');
			//Transition time in milliseconds
			setTimeout("banner()",5000);
			fadein = 1;
			return;
		}else{
			fade('fadeBlock');
			index++;
			if (index==max){
				index=0;
			}
			//Transition time in milliseconds
			setTimeout("banner()",6500);
			fadein = 0;
			return;
		}
	}
	
	var TimeToFade = 1000.0;
	
	function fade(eid){
		var element = document.getElementById(eid);
  		if(element == null){
    		return;
   		}
		if(element.FadeState == null){
			if(element.style.opacity == null || element.style.opacity == '' || element.style.opacity == '1'){
      			element.FadeState = 2;
    		} else {
      			element.FadeState = -2;
    		}
	  	}
	  	if(element.FadeState == 1 || element.FadeState == -1){
	    	element.FadeState = element.FadeState == 1 ? -1 : 1;
    		element.FadeTimeLeft = TimeToFade - element.FadeTimeLeft;
  		} else {
	    	element.FadeState = element.FadeState == 2 ? -1 : 1;
    		element.FadeTimeLeft = TimeToFade;
    		setTimeout("animateFade(" + new Date().getTime() + ",'" + eid + "')", 33);
  		}  
	}
	
	function animateFade(lastTick, eid){  
  		var curTick = new Date().getTime();
  		var elapsedTicks = curTick - lastTick;
  		var element = document.getElementById(eid);
		if(element.FadeTimeLeft <= elapsedTicks){
			element.style.opacity = element.FadeState == 1 ? '1' : '0';
    		element.style.filter = 'alpha(opacity = ' + (element.FadeState == 1 ? '100' : '0') + ')';
    		element.FadeState = element.FadeState == 1 ? 2 : -2;
    		return;
  		}
		element.FadeTimeLeft -= elapsedTicks;
  		var newOpVal = element.FadeTimeLeft/TimeToFade;
  		if(element.FadeState == 1){
    		newOpVal = 1 - newOpVal;
		}
	  	element.style.opacity = newOpVal;
  		element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
  		setTimeout("animateFade(" + curTick + ",'" + eid + "')", 33);
	}


function swapimg(imgID, newImg){
	if(document.images){
	document[imgID].src = eval(newImg + '.src')
	}
}

function mailWin(url){
	newWindow = window.open(url, 'Email', 'resizable,width=200,height=330')
	newWindow.focus()
}

function termsWin(url){
	window.name = 'Main'
	newWindow = window.open(url, 'popup', 'scrollbars,resizable,dependent,width=288,height=240,left=10,top=10')
	newWindow.focus()
}

function dtlWin(url){
	window.name = 'Details'
	newWindow = window.open(url, 'popup', 'scrollbars,resizable,dependent,width=630,height=470,left=5,top=5')
	newWindow.focus()
}

function popup(mylink, windowname, w, h){
	if (! window.focus)return true;
	var href;
	if (typeof(mylink) == 'string')
	   href=mylink;
	else
	   href=mylink.href;
	newPop = window.open(href, windowname, 'width=' + w + ',height=' + h + ',left=20,top=20,toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0');
	newPop.focus();
	return false;
}
