function __doPostBack(eventTarget, eventArgument) {
	var theform = document.getElementById ('PageForm');

	theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
	theform.__EVENTARGUMENT.value = eventArgument;
	theform.submit();
}

function uploadfotopop(inForm, foto1, foto2, foto3, check)
{
	var checkVal = document.getElementById(check);
	if (checkVal != null && checkVal.Value == "1")
	{
		// in ieder geval 1 foto gevuld.
		checkVal.Value = "";		
		
		var counter = 0;
		var f1 = document.getElementById(foto1);
		if (f1 != null) counter++;
		var f2 = document.getElementById(foto2);
		if (f2 != null) counter++;
		var f3 = document.getElementById(foto3);
		if (f3 != null) counter++;
		
		if (counter > 0)
		{
			strUniqueID = Math.floor(Math.random() * 1000000) * ((new Date()).getTime() % 1000);				
			thePos = inForm.action.indexOf("?");
			if (thePos >= 0)
				inForm.action = inForm.action.substring(0, thePos);
			inForm.action += "?guid=" + strUniqueID;
			window.open("../Progress.aspx?No_Rewrite=1&guid=" + strUniqueID,"","toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,height=175,width=600,top=70,left=100");
			inForm.submit();
			return true;			
		}
	}
	return false;
}

function SetCheck(check)
{
	var checkVal = document.getElementById(check);
	if (checkVal != null)
	{
		checkVal.Value = "1";
	}	
}

function nothing()
{
}

function ToggleDiv(img, id)
{
	if (id != null && img != null)
	{
		var div = document.getElementById(id);
		if (div != null)
		{
			if (div.style.display == 'none')
			{
				img.src = "/images/dubbel_up.gif";
				div.style.display = 'block';
			}
			else
			{
				div.style.display = 'none';
				img.src = "/images/dubbel_down.gif";
			}
		}
	}	
}

function ShowPeriodDiv(scope, singleDay, startDate, endDate)
{
	if (scope != null)
	{
		var val = scope.options[scope.options.selectedIndex].value;
		
		var activitySingleDay = document.getElementById(singleDay);
		var activityStartDate = document.getElementById(startDate);
		var activityEndDate = document.getElementById(endDate);
		
		if (activityStartDate != null && activityEndDate != null && activitySingleDay != null)
		{
			activitySingleDay.style.display = "none"
			activityEndDate.style.display = "none"
			activityStartDate.style.display = "none"
			
			// one day
			if (val == "1")
			{	
				activitySingleDay.style.display = "block"
			}
			if (val == "2")
			{				
				activityStartDate.style.display = "block";
				activityEndDate.style.display = "block";		
			}					
		}
	}
}

function ViewFotos(id, url)
{
	window.open(url + '/fotos.aspx?id=' + id, 'fotowin','left=200,top=100,width=225,height=350,toolbar=0,resizable=0, scrollbars=no');
}

function LoadImg(img, src, dir)
{
	var foto = document.getElementById(img);
	if (foto != null)
	{
		foto.src = "/uploads/foto/" + dir + "/" + src;
	}
}