function SendRequest(div, call)
{
	var param ="";
	document.getElementById('indicator').style.visibility='visible';
	if (arguments[0]=='RELOADPAGE')
	{
		document.site.call.value = arguments[1];		
		document.site.method.value = arguments[2];		
		document.site.submit();	
	}
	else
	{
		for (var i=2; i < arguments.length; i++)
		{
			param = param + '&' + arguments[i];
			
		}
       	var ajax = new Ajax.Updater( div, 'callback.php', {asynchronous:true,method:'post', onComplete: disableIndicator,postBody:'call='+call+param} );
    }
    
}


function LoadPage(classname)
{
		document.site.call.value = classname;
		document.site.method.value = arguments[1];
		document.site.submit();		
}
function disableIndicator()
{
	document.getElementById('indicator').style.visibility='hidden';
}

function setFileReference(string)
{
	document.getElementById("dateiname").value = string;
}

function showUploadedImage(e, url)
{
	e.value = url;
}

function changeValue(e)
{
	if (e.value==0)
		e.value=1;
	else
		e.value=0;
}

function enableButtonStep2()
{
	document.getElementById("step2button").disabled=false;
}

function fensterschliessen()
{
	if (!confirm("Möchten Sie wirklich die Seite verlassen?"))
		document.location.href="http://www.strip-events.com/";
}

function deleteReference(stringpath)
{
	if (confirm('Möchten Sie wirklich diese Referenz löschen'))
	{
		document.getElementById('filesource').value = stringpath
		SendRequest('RELOADPAGE', 'referencesadministration', 'delete');
	} else
	{
		alert (stringpath);	
	}
}