function hover(id, newimg)
{
    document.getElementById(id).src = newimg;
}

function animator() {
	
		this.start 		 = frame2;
		this.frame2		 = frame2;
		this.frame3		 = frame3;
		this.frame4		 = frame4;
		this.frame5		 = frame5;
		this.frame6		 = frame6;
		this.frame1final = frame1final;


		function frame2(){
			$("#frame2div").css({"height": 640, "width": 960, 'margin-top': 0, 'margin-left': 0});
			
			$('#frame2div').animate({'height': 380, 'width': 507, 'margin-top': -0, 'margin-left': -150},5000);

			$('#frame2').animate({opacity: 1},2000,function(){
                if (navigator.userAgent.search('IE') > -1)
                    $('#frame3').css({'visibility': 'visible'});
                
                //if (navigator.userAgent.search('IE') == -1)
                frame3();
				$('#frame2').animate({opacity: 0},2000)
				
			})
		}
	
		function frame3(){	
            $('#frame3').animate({opacity: 1},2000,function(){
				frame4();
				$('#frame3').animate({opacity: 0},2000)
				
			})
		}

		function frame4(){
			$("#frame4div").css({"height": 562, "width": 843, 'margin-top': 0, 'margin-left': -300});
			$('#frame4div').animate({'height': 320, 'width': 480, 'margin-top': 0, 'margin-left': 0},5000);
            

			$('#frame4').animate({opacity: 1},2000,function(){
                if (navigator.userAgent.search('IE') > -1)
                    $('#frame5').css({'visibility': 'visible'});
                    
				frame5();
				$('#frame4').animate({opacity: 0},2000)
				
			})
		}
	
		function frame5(){	
			$('#frame5').animate({opacity: 1},2000,function(){
				frame6();
				$('#frame5').animate({opacity: 0},2000)
				
			})
		}
		
		function frame6(){
			$("#frame6div").css({"height": 562, "width": 843, 'margin-top': -300, 'margin-left': 0});
			$('#frame6div').animate({'height': 320, 'width': 480, 'margin-top': -100, 'margin-left': -200},5000);

			$('#frame6').animate({opacity: 1},2000,function(){
                if (navigator.userAgent.search('IE') > -1)
                    $('#frame5').css({'visibility': 'visible'});
                    
				frame7();
				$('#frame6').animate({opacity: 0},2000)
				
			})
		}


	
		function frame7(){	
			$('#frame7').animate({opacity: 1},2000,function(){
				
				$('#frame7').animate({opacity: 0},2000, function(){
					restart();
				})
				
			})
		}
		
		
		function frame1final(){
				$('#frame6div').css({'left': 0, 'top': 0});

				$('#frame2').animate({opacity: 1},2000);

		}
		
		function restart(){
				$('#frame2div').css({'left': 0, 'top': 0});
				$('#frame4div').css({'left': 0, 'top': 0});
				$('#frame6div').css({'left': 0, 'top': 0});

			frame2();
		}
	
}

function hover(id, newimg)
{
    document.getElementById(id).src = newimg;
}

function animator() {
	
		this.start 		 = frame2;
		this.frame2		 = frame2;
		this.frame3		 = frame3;
		this.frame4		 = frame4;
		this.frame5		 = frame5;
		this.frame6		 = frame6;
		this.frame1final = frame1final;


	function frame2(){
			$("#frame2div").css({"height": 640, "width": 960, 'margin-top': 0, 'margin-left': 0});
			
			$('#frame2div').animate({'height': 380, 'width': 507, 'margin-top': -0, 'margin-left': -150},5000);

			$('#frame2').animate({opacity: 1},2000,function(){
				frame3();
				$('#frame2').animate({opacity: 0},2000)
				
			})
		}
	
		function frame3(){	
			$('#frame3').animate({opacity: 1},2000,function(){
				frame4();
				$('#frame3').animate({opacity: 0},2000)
				
			})
		}

		function frame4(){
			$("#frame4div").css({"height": 562, "width": 843, 'margin-top': 0, 'margin-left': -300});
			$('#frame4div').animate({'height': 320, 'width': 480, 'margin-top': 0, 'margin-left': 0},5000);
            

			$('#frame4').animate({opacity: 1},2000,function(){
				frame5();
				$('#frame4').animate({opacity: 0},2000)
				
			})
		}
	
		function frame5(){	
			$('#frame5').animate({opacity: 1},2000,function(){
				frame6();
				$('#frame5').animate({opacity: 0},2000)
				
			})
		}
		
		function frame6(){
			$("#frame6div").css({"height": 562, "width": 843, 'margin-top': -300, 'margin-left': 0});
			$('#frame6div').animate({'height': 320, 'width': 480, 'margin-top': -100, 'margin-left': -200},5000);

			$('#frame6').animate({opacity: 1},2000,function(){
				frame7();
				$('#frame6').animate({opacity: 0},2000)
				
			})
		}


	
		function frame7(){	
			$('#frame7').animate({opacity: 1},2000,function(){
				
				$('#frame7').animate({opacity: 0},2000, function(){
					restart();
				})
				
			})
		}
		
		
		function frame1final(){
				$('#frame6div').css({'left': 0, 'top': 0});

				$('#frame2').animate({opacity: 1},2000);

		}
		
		function restart(){
				$('#frame2div').css({'left': 0, 'top': 0});
				$('#frame4div').css({'left': 0, 'top': 0});
				$('#frame6div').css({'left': 0, 'top': 0});

			frame2();
		}	
}

function fixpngonload(){
        var r_height = document.getElementById('right').clientHeight + 245;
        var l_height = document.getElementById('left').offsetHeight;
        
        //var l_markup = 155;
        var l_markup = 30;

        //alert(r_height + " " + l_height);
        
        if (r_height > l_height)
        {
            var ext_height = r_height - l_height + l_markup;
            //alert(ext_height);
            /*document.getElementById('extender').style.height = (ext_height) + 'px';
            document.getElementById('extender').style.width = '373px';
            document.getElementById('extender').style.display = 'block';
            
            document.getElementById('left').style.height = (r_height + 40) + 'px';*/
            
            document.getElementById('extender').style.height = (ext_height + 450) + 'px';
            document.getElementById('left').style.height = (r_height + 30) + 'px';
            
            //alert(ext_height - 125);
            /*document.getElementById('banner_left_bottom').setAttribute('usemap', '');*/
            //document.getElementById('banner_left_bottom').setAttribute('src', 'images/bottom_wlogo.jpg');
            //$('#banner_left_bottom').attr( 'usemap', '#g_logo3' );
            //alert(document.getElementById('banner_left_bottom').getAttribute('usemap'));

        } /*else
        {
           document.getElementById('banner_left_bottom').setAttribute('src', 'images/banner_left_bottom_logo.png');
           document.getElementById('banner_left_bottom').setAttribute('usemap', '#g_logo');
        }*/
}
