var previmgnum = '';
function showgimg(imgsrc, imgnum, imgalt) {
	if (previmgnum != '') {
		previmgnum = imgnum;
	}
	document.images['topimg'].src = imgsrc;
	document.images['topimg'].alt = imgalt;
	var tmp = document.getElementById('descimg');
	tmp.innerHTML = imgalt;
}

function playstars(el)
{
	var index = $("#stars a").index(el);
	if(el != false)
	{
		$('#stars a').each(function(){
			if($("#stars a").index(this) <= index)
			{
				$(this).addClass('selected');
			} else
			{
				$(this).removeClass('selected');
			}
		});
	} else
	{
		$('#stars a').removeClass('selected');
	}
}

function toggleYear(el)
{
	$(el).toggleClass('current');
	if($(el).next().hasClass('month')) $(el).next().slideToggle('normal');
}

function  embedFlash(fileName, lib, tm, w, h)
{
	/*
	(c) Flash ActiveX IE fix by Ivan Turuk. http://www.newagelab.com
	Put this function in external js file
	
	fileName - path to flash file
	lib - flash variables
	tm - flash timestamp for anticaching
	w - width
	h - height
	*/
	
	var flob='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" id="picture" align="middle">';
	flob+='<param name="allowScriptAccess" value="sameDomain" />';
	flob+='<param name="movie" value="'+fileName+'?' + tm + '" />';
	flob+='<param name="quality" value="high" />';
	flob+='<PARAM NAME=FlashVars VALUE="'+lib+'">';
	flob+='<PARAM NAME=wmode VALUE="transparent">';
	flob+='<param name="bgcolor" value="#eaeff4" />';
	flob+='<embed src="'+fileName+'?' + tm + '" quality="high" wmode="transparent" FlashVars="'+lib+'" bgcolor="#eaeff4" width="'+w+'" height="'+h+'" name="picture" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	flob+='</object>';
	document.write(flob);
}

