/*
// FLICKR TO SlideShowPro:
//http://www.codeplex.com/FlickrToSSP  
*/

var imgPlus = "<img src=images/colPlus.gif height=9 width=9>";
var imgMinus = "<img src=images/colMinus.gif height=9 width=9>";

function doNothing(){}

function show(s)
{
	try{document.getElementById(s).style.display = 'block';} catch(e){}
	//return true;
}
function hide(s)
{
	try{document.getElementById(s).style.display = 'none';} catch(e){}
	//return true;
}

function showhide(s)
{
	document.getElementById(s).style.display = (document.getElementById(s).style.display == 'none')? 'block' : 'none';
}

function openFlickr()
{
	window.open("http://flickr.com/photos/neoikon/sets");
}


function openSet(setId, title)
{
	hide('PhotoList');
	show('PhotoSet');
	
	// Scroll to the bottom of the page
	if (document.body.scrollHeight)
	{
		window.scrollTo(0, document.body.scrollHeight);
	}
	else if (screen.height)
	{
		// IE5 
		window.scrollTo(0, screen.height);
	} 
	
	//window.location.href = "photoSet.aspx?setid=" + setId + "&title=" + title;
	document.getElementById("PhotoSetIFrame").src = "photoSet.aspx?setid=" + setId + "&title=" + title;
}

function openCloseGroup(groupId, setsPrefix)
{
	// Show
	if (document.getElementById(setsPrefix + groupId).style.display == 'none')
	{
		show(setsPrefix + groupId);
		try{document.getElementById('colapse_' + groupId).innerHTML = imgMinus;}catch(e){}
	}
	// Hide
	else
	{
		hide(setsPrefix + groupId);
		try{document.getElementById('colapse_' + groupId).innerHTML = imgPlus;}catch(e){}
	}
}

function hideSet()
{
	show('PhotoList');
	hide('PhotoSet');
	
	document.getElementById("PhotoSetIFrame").src = "loading.html";
}
