// JavaScript album.js
//implemented in album
function performx(type, section, al)
{
	window.name="album";
	wPerform = window.open('perform.php?type=' + type + '&sectx=' + section + '&al=' + al, 'perform' , 'top=0,left=0,width=800,height=300,scrollbars=1');
	wPerform.focus();
	return false;
}
//implemented in photoshow
function performphotox(type, al, section, photo, multi)
{
	window.name="photo";
	wPerform = window.open('perform.php?type=' + type + '&sectx=' + section + '&al=' + al + '&photox=' + photo + '&multiplex=' + multi, 'perform' , 'top=0,left=0,width=800,height=300,scrollbars=1');
	wPerform.focus();
	//return true;
	return false;
}
//implemented in photoshow and album
function perform_evmode(type)
{
	/*if(save == false)
	{*/
		x = document.form2;
		x.action = "album.php?donow=" + type;
		x.mref.value = window.location.href;
		x.submit();
	/*}
	else
	{
		x = document.xphotos;
		x.action = "album.php";
		x.target = "";
		x.submit();
	}*/
	//return false;
}
function loadsection(album, movebycombo, sess_ephotos)
{
	toredirx = "";
	x=document.form3;
	if(movebycombo)
		//toredirx = 'album.php?sectm=1&al=' + album + '&sectx=' + x.allsections.value + '&sxoffset=0';
		//album.php?insi=1&al=2&sectx=57&xoffset=0
		toredirx = 'album.php?insi=1&al=' + album + '&sectx=' + x.allsections.value + '&xoffset=0';
	else
		toredirx = sess_ephotos;
	if(sess_ephotos != "")
	{
		y = document.xphotos;
		y.action = "album.php"
		y.target = "";
		y.tomov.value = toredirx;
		//alert("youre about to save");
		y.submit();
	}
	else
	{
		if(x.allsections.value != 0)
			window.location.replace(toredirx);
		else
			window.location.replace('album.php');
	}
	return true;
}
function massmovedelete(type)
{
	x = document.xphotos;
	x.movedelete.value = type;
	x.meditx.value = window.location.href;
	x.ready.value = 1;
	x.action = "perform.php";
	x.target = "";
	//window.open('perform.php', 'mass', 'top=0,left=0,width=800,height=300,scrollbars=1');
	x.submit();
}
function massedit()
{
	x = document.xphotos;
	
	x.meditx.value = window.location.href;
	x.action = "album.php"
	x.target = "";
	x.submit();
	
	return false;
}
/*function savemassedit()
{
	x = document.xphotos;
	
	x.meditx.value = window.location.href;
	x.action = "album.php"
	x.target = "";
	x.submit();
}*/
//implemented in photoshow