var imageSlideNumber = 0;
var hideFlag = false;

function show_awards()
{
	var state = $('AwardsAccordion').getAttribute('state');
	
	if (state == 'hidden') {
		$('AwardsAccordion').morph('height:440px;'); 
		$('AwardsAccordion').setAttribute('state', 'collapsed');
		$('AwardsToggle').innerHTML = 'Minimize';
	}
	else {
		$('AwardsAccordion').morph('height:92px;'); 
		$('AwardsAccordion').setAttribute('state', 'hidden');
		$('AwardsToggle').innerHTML = 'View all awards';
	}
	
	return false;
}

function count_image()
{
	imageSlideNumber++;

	if (imageSlideNumber > 3)
		imageSlideNumber = 0;
}

function slideshow()
{
	var images = new Array();

	images[0] = 'award-softpedia.png';
	images[1] = 'award-soft82.png';
	images[2] = 'award-cnet.png';
	images[3] = 'award-tucows.png';

	if (hideFlag)
	{
		Effect.toggle('Slideshow','appear', {afterFinish: count_image()});
		$('SlideshowImage').src = "images/"+images[imageSlideNumber];
		hideFlag = false;
	}
	else
	{
		Effect.toggle('Slideshow','appear');
		hideFlag = true;
	}
	
	setTimeout("slideshow()", 1500);
}


