// Partners:  Global Tech & Pixel 8
function writeTag()
{
 //Partner Id
 var pi='afpe360tuvisse'
 //
 var W="pi="+pi;
 var ur = window.location.href
 ur = ur.substring(ur.indexOf("/",ur.indexOf("http://")+7),ur.length)
 W+="&ur="+escape(ur);
 W+="&rf="+escape(window.document.referrer);
 W+="&ua="+(navigator.userAgent);
 document.write('<scrip' + 't language=javascript src="http://www.gt.com.br/logAnywhere/logAnywhere.asp?'+W+'"><' + '/s' + 'cript' + '>');
} 
writeTag();

var w = 800;
var h = 600;
if (document.all || document.layers)
{
	w = screen.availWidth;
	h = screen.availHeight;
}

function ContactPopUp(contact)
{
	if (contact != "")
	{
		var popW = 388;
		var popH = 530;
		var left = (w-popW)/2;
		var top = (h-popH)/2;
		result = window.showModalDialog(contact + ".aspx", "", "dialogLeft:" + left + "px;dialogTop:" + top + "px;dialogWidth:" + popW + "px;dialogHeight:" + popH + "px");
		if (result == "ok")
		{
			document.location.href = document.location.href;
		}
	}
}

function SendByEmailPopUp(photoGuid)
{
	if (photoGuid != "")
	{
		var popW = 388;
		var popH = 590;
		var left = (w-popW)/2;
		var top = (h-popH)/2;
		result = window.showModalDialog("SendByEmailPopUp.aspx?g=" + photoGuid, "", "dialogLeft:" + left + "px;dialogTop:" + top + "px;dialogWidth:" + popW + "px;dialogHeight:" + popH + "px");
		if (result == "ok")
		{
			document.location.href = document.location.href;
		}
	}
}


function WallpaperPopUp(photoGuid)
{
	if (photoGuid != "")
	{
		var popW = 382;
		var popH = 419;
		var left = (w-popW)/2;
		var top = (h-popH)/2;
		result = window.open("WallpaperPopUp.aspx?g=" + photoGuid, "", "Left=" + left + "px,Top=" + top + "px,Width=" + popW + "px,Height=" + popH + "px");
	}
}

function CorrectNamesPopUp(photoGuid)
{
	if (photoGuid != "")
	{
		var popW = 388;
		var popH = 450;
		var left = (w-popW)/2;
		var top = (h-popH)/2;
		result = window.showModalDialog("CorrectNamesPopUp.aspx?g=" + photoGuid, "", "dialogLeft:" + left + "px;dialogTop:" + top + "px;dialogWidth:" + popW + "px;dialogHeight:" + popH + "px");
		if (result == "ok")
		{
			document.location.href = document.location.href;
		}
	}
}
		
function AlbumPopUp(albumId)
{
	if (albumId > 0)
	{
		var popW = 771;
		var popH = 505;
		var left = (w-popW)/2;
		var top = (h-popH)/2;
		
		window.open("http://www.tuvisse.com.br/AlbumPopUp.aspx?eventId=" + albumId, "AlbumPopUp", "top=" + top + "px, left=" + left + "px,scrollbars=yes,toolbar=no,status=no,menubar=no,width=" + popW + "px,height=" + popH + "px");
	}
}

function SearchPopUp(filter)
{
	var popW = 770;
	var popH = 505;
	var left = (w-popW)/2;
	var top = (h-popH)/2;
	
	window.open("SearchPopUp.aspx?filter=" + filter, "SearchPopUp", "top=" + top + "px, left=" + left + "px,scrollbars=yes,toolbar=no,status=no,menubar=no,width=" + popW + "px,height=" + popH + "px");
}

function AllAlbums(typeId)
{
	if (typeId > 0)
	{
		window.location.href = "AllAlbums.aspx?typeId=" + typeId;
	}
}
