function change(serverPage)
{
	var xmlhttp = false;
	
	try {
//If the Javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
//alert ("You are using Microsoft Internet Explorer.");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using Internet Explorer.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
//alert ("You are using Microsoft Internet Explorer");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a javascript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
//alert ("You are not using Microsoft Internet Explorer");
}
	
//var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET",serverPage);
xmlhttp.onreadystatechange=function(){
var contains=xmlhttp.responseText;
$("#container .text").hide('fast');
$("#container .text").html(contains);
var t=setTimeout('$("#container .text").fadeIn("slow");',300);
$("#container .text_title").corner();

}
xmlhttp.send(null);

}

//slideshow function here
function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
	
    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');



    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );

  $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

function view()
{
//	$("#slideshow").hide();
	$("#container .right").hide();
	$("#container .list").fadeIn();
}
function view_slide()
{
		
	$("#container .list").hide();
	$("#container .right").fadeIn();
}
var x=0;
function  news()
{
	if(x==0)
	{
		$("#water_text1").hide();
		$("#water_text1").html("TMR launches Vehicle Design Course.<p style='padding-left:130px; font-size:15px;'><a onclick=change('article2.html'); style='cursor:pointer'>Read</a>...</p>");
		$("#water_text1").fadeIn();
		x=1;
	}
	else if(x==1)
	{
		$("#water_text1").hide();
		$("#water_text1").html("Welcome to Sponsors.<p style='padding-left:130px; font-size:15px;'><a onclick=change('article3.html'); style='cursor:pointer'>Read</a>...</p>");
		$("#water_text1").fadeIn();
		x=2;
	}
	else if(x==2)
	{
		$("#water_text1").hide();
		$("#water_text1").html("Technical Update<p style='padding-left:130px; font-size:15px;'><a onclick=change('article4.html'); style='cursor:pointer'>Read</a>...</p>");
		$("#water_text1").fadeIn();
		x=3;
	}
		else if(x==3)
	{
		$("#water_text1").hide();
		$("#water_text1").html("TMR Registers for SAE BAJA, Rochester, NY, 2010<p style='padding-left:130px; font-size:15px;'><a onclick=change('article1.html'); style='cursor:pointer'>Read</a>...</p>");
		$("#water_text1").fadeIn();
		x=0;
	}
}

$(document).ready(function(){
						   $("#banner .logo").corner();
						  // $("#banner .name").corner();
						   $("#container").corner();
						   $("#container .water img").corner("30px");
						   $(".sponsors_title").corner();
						   $(".text_title").corner();
						   $(".text").corner();
						$("#banner").show(4000);
						   
							setInterval( "slideSwitch()", 5000 );
							setInterval("news()",5000);
						   
						   
						   
						   
						   });


