My_Param = new Array(); //do not remove
var scriptstoadd = "";
scriptstoadd += "<scri" + "pt src=\"http://www.ipigz.com/flash/loader.js\"><\/scr" + "ipt>";
document.write(scriptstoadd);

function gallery_run(photoUrl) 
{
	if (gallery_action == 'image_new') 
	{
		if(photoUrl == '')
		{
			if (thumb_action == 'site_same')
			{
				window.open(target_url);
			}
			else if (thumb_action == 'site_new')
			{
				window.open(target_url);
			}
			else
			{
				scrollTo(0,0);
				showDiv();
			}
		}
		else
		{
			if (thumb_action == 'none')
			{
				window.open(photoUrl);
			}
			else
			{
				view_photo_new(photoUrl);
			}
		}
	}
	else if (gallery_action == 'image_same') 
	{
		if(photoUrl == '')
		{
			if (thumb_action == 'site_same')
			{
				window.open(target_url);
			}
			else if (thumb_action == 'site_new')
			{
				window.open(target_url);
			}
			else
			{
				scrollTo(0,0);
				showDiv();
			}
		}
		else
		{
			if (thumb_action == 'none')
			{
				window.location = photoUrl;
			}
			else
			{
				view_photo_same(photoUrl);
			}
		}
	}
	else if (gallery_action == 'site_new') window.open(target_url);
	else if (gallery_action == 'site_same') window.location = target_url;
	else if (gallery_action == 'dhtml') 
	{
		scrollTo(0,0);
		showDiv();
	}
	else return;
}

function view_photo_new(photoUrl, photoWidth, photoHeight)
{
	photoWidth  = window.screen ? screen.width : 800
	photoHeight	= window.screen ? screen.height : 600;
	url = "http://promo.eurolive.com/hosted/eurolive.php?module=guest_eurolive_hosted_view&id="+Param['id']+"&tracker="+Param['tracker']+"&lg="+Param['lg']+"&thumb_action="+thumb_action+"&ipigz_thumb="+ipigz_thumb+"&target_url="+escape(target_url)+"&imgpath="+escape(photoUrl);
	window.open(url, '', ''); // 'width='+photoWidth+',height='+photoHeight+',location=0,status=1,scrollbars=1,top=0,left=0');
}

function view_photo_same(photoUrl)
{
	url = "http://promo.eurolive.com/hosted/eurolive.php?module=guest_eurolive_hosted_view&id="+Param['id']+"&tracker="+Param['tracker']+"&lg="+Param['lg']+"&thumb_action="+thumb_action+"&ipigz_thumb="+ipigz_thumb+"&target_url="+escape(target_url)+"&imgpath="+escape(photoUrl);
	window.location = url;
}
