function img_show(image,speed)
{
	switch(image) {
		case 1:
			$('#rot1').fadeTo(speed, 1);
			$('#rot2').fadeTo(speed, 1);
			$('#rot3').fadeTo(speed, 1);
			break;
		case 2:
			$('#rot1').fadeTo(speed, 0);
			$('#rot2').fadeTo(speed, 1);
			$('#rot3').fadeTo(speed, 1);
			break;
		case 3:
			$('#rot1').fadeTo(speed, 0);
			$('#rot2').fadeTo(speed, 0);
			$('#rot3').fadeTo(speed, 1);
			break;
	}
}

function img_rotate_over()
{
	if (window.play_over)
		img_show(window.next_image,700);
}

function img_rotate_play()
{
	if (window.play_rotate)
	{
		next_image = next_image + 1;
		if (next_image > 3)
			next_image = 1;
		img_show(window.next_image,1500);
	}
}

function img_mouse_out(current)
{
	window.play_rotate = 1;
	window.play_over = 0;
}

function img_mouse_over(current)
{
	window.next_image = current;
	window.play_rotate = 0;
	window.play_over = 1;
}


function redirect(url)
{
	window.location = url;
}
function gallery_over(i)
{
	$('#gallery_div_'+i).addClass("gallery_current");
	$('#gallery_link_'+i).addClass("gallery_current");
}
function gallery_out(i)
{
	$('#gallery_div_'+i).removeClass("gallery_current");
	$('#gallery_link_'+i).removeClass("gallery_current");
}





