var GlobalPage =0;
var GalleryPages = new Object();
function GetGalleries(Page)
{
	if(Page==null)
		Page = 0;
	GlobalPage = Page;
	PassAjaxResponseToFunction("./index.php?GetGalleries=TRUE&Page="+GlobalPage, "SetContent", "'GalleriesDiv'",true,null,"GET","");
}
function GetGallery(GID,Page)
{
	if(Page==null)
		Page = 0;
	GalleryPages['G'+GID] = Page;
	PassAjaxResponseToFunction("./index.php?GetGallery=TRUE&GID="+GID+"&Page="+GalleryPages['G'+GID], "SetContent", "'GalleriesDiv'",true,null,"GET","");
}
function GetPicture(GID,FileName,Page)
{
	if(Page==null)
		Page=-1;
	PassAjaxResponseToFunction("./index.php?GetPicture=TRUE&GID="+GID+"&Page="+Page+"&FileName="+FileName, "SetContent", "'GalleriesDiv'",true,null,"GET","");
}
function SetContent(Response,Div)
{
	//alert(Response);
	getObject(Div).innerHTML = Response;
	FadeInTag(Div,0,10,100,null);
	FB.XFBML.parse(getObject('bod'));
}
function Share(GID,Pic,Title,page,link,image)
{
	window.open('http://www.facebook.com/sharer.php?s=100&p[title]='+Title+'&p[summary]='+Title+'&p[url]='+link+'&p[images][0]='+image, 'sharer', 'toolbar=0,status=0,width=626,height=436');
	GetAjaxResponse("./index.php?SHARED=TRUE&GID="+GID+"&P="+Pic,"GET","");
}
