function flickrgalleryPrevious(galleryid, count)
{
	var current = flickrgalleryCurrent(galleryid, count);
	if (current != 1)
	{
		flickrgalleryDisplay(galleryid, count, current - 1);
	}
}

function flickrgalleryNext(galleryid, count)
{
	var current = flickrgalleryCurrent(galleryid, count);
	if (current != count)
	{
		flickrgalleryDisplay(galleryid, count, current + 1);
	}
}

function flickrgalleryCurrent(galleryid, count)
{
	var current = 0;
	for (var i = 1; i <= count; i++)
	{
		var elementName = galleryid + '.' + i;
		if (document.getElementById(elementName).style.display == '')
		{
			current = i;
		}
	}
	return current;
}

function flickrgalleryDisplay(galleryid, count, item)
{
	for (var i = 1; i <= count; i++)
	{
		var elementName1 = galleryid + '.' + i;
		document.getElementById(elementName1).style.display = 'none';
	}
	
	var elementName2 = galleryid + '.' + item;
	document.getElementById(elementName2).style.display = '';
	
	var p = galleryid + 'previous';
	var pd = galleryid + 'previousdisabled';
	var n = galleryid + 'next';
	var nd = galleryid + 'nextdisabled';
	if (item == count)
	{
		document.getElementById(n).style.display = 'none';
		document.getElementById(nd).style.display = '';
	}
	else
	{
		document.getElementById(n).style.display = '';
		document.getElementById(nd).style.display = 'none';
	}
	if (item == 1)
	{
		document.getElementById(p).style.display = 'none';
		document.getElementById(pd).style.display = '';
	}
	else
	{
		document.getElementById(p).style.display = '';
		document.getElementById(pd).style.display = 'none';
	}
}

function eventCalendar(id)
{
    if (document.getElementById(id).style.display == 'none')
    {
        document.getElementById(id).style.display = '';
    }
    else
    {
        document.getElementById(id).style.display = 'none';
    }
}
// menu code begin
Ext.onReady(function() {
				new Ext.ux.Menu('mainmenu', {
					transitionType: 'slide',
					direction: 'horizontal',
					delay: 0.2,
					autoWidth: true,
					transitionDuration: 0.3,
					animate: true,
					currentClass: 'current'
				});
			});
// menu code end 