
	function flashLoadCallBack(e)
		{			
			if(!e.success)	{
				loadbannerSlides();		
			}
		}
				
				
	function eastOverSlider(id)
		{					
			this.numOlSides=jQuery(".banner .slide").length;				
			this.curSlide=1;	
			this.currentPart=1;
			this.timer=null;
			this.run=function()	{				
				var fadeSpeed=this.currentPart==1 ? 400 : (this.currentPart==2 ? 600 : 900 );					
				jQuery(".banner .slide"+this.curSlide+" .p"+this.currentPart).fadeIn(fadeSpeed,(function(self){return function(){self.next();}})(this));					
				
			};
			
			this.next=function()
				{
					var nextDelay=0;
					if(this.currentPart==3)	{
						this.currentPart=1;
						this.curSlide=	(this.curSlide ==  this.numOlSides ? 1 : this.curSlide +1);
						jQuery(".banner .slide").removeClass("toplayer");
						jQuery(".banner .slide"+this.curSlide).addClass("toplayer");		
						nextDelay=2500;
					}	else	{
						nextDelay=0; //this.currentPart==1 ? 10 : 180;
						this.currentPart=this.currentPart+1;
					}	
				
					//console.debug(this.curSlide+" - "+this.currentPart);
					if(this.currentPart==1)	{	
						if(this.curSlide==this.numOlSides)	{
							jQuery(".banner .slide"+(1)+" .part").css("display",'none');									
						}	else	{
									if(this.curSlide==2)	
										jQuery(".banner .slide"+(this.numOlSides-1)+" .part").css("display",'none');
									else
										jQuery(".banner .slide"+(this.curSlide+1)+" .part").css("display",'none');
								}
					}
					
					if(this.timer)	clearTimeout(this.timer);
					//setTimeout("eastOverSlider.run()",nextDelay);		
					setTimeout((function(self){return function(){self.run();}})(this),nextDelay); 		
				}
		}
			
	var homeSlider;
	var images=["images/homebanner/Slide1_01.jpg","images/homebanner/Slide1_02.jpg","images/homebanner/Slide1_03.jpg","images/homebanner/Slide2_01.jpg","images/homebanner/Slide2_02.jpg","images/homebanner/Slide2_03.jpg","images/homebanner/Slide3_01.jpg"];					
	var slideToPreload=0;
	var imgObjArray=new Array();
			
	function loadbannerSlides()	{
		if(slideToPreload>images.length) return; 
			
		imgObjArray[slideToPreload]=new Image();
		imgObjArray[slideToPreload].src = images[slideToPreload];
		
		jQuery(imgObjArray[slideToPreload]).load(function ()	{					
			loadbannerSlides();
		});	
		
		slideToPreload++;
		if(slideToPreload==images.length)	{
			homeSlider=new eastOverSlider();
			jQuery(".banner").removeClass("banner-loading");
			homeSlider.run();					
		}				
	}
			
		
			
		
