function ConfirmDelete(question,url)
	{
 	var where_to= confirm(question);
 	if (where_to== true)
 		{
	   	window.location=url;
 		}
	}

function CheckFileForm()
	{
	var alertstr;
 	if (!document.updfileform.bigtext.value)
 		{ 		
 		alertstr = "Klickbar text saknas\n";
 		}
 	if (!document.updfileform.file.value)
 		{
 		alertstr += "Fil saknas\n";
 		}
 	if (alertstr)
 		{
		alert(alertstr); 	
 		return false;
 		}
 	return true;
	}

var WindowObjectReference = null;

function popUp(URL) {
	WindowObjectReference = window.open(URL, 'name', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=960,height=800,left = 560,top = 300');
	if (window.focus) {WindowObjectReference.focus();}
	}	

function RedirectUrl(form)
	{
	//alert('test');
	//alert(document.showprice.redirecturl.value);
	var index = document.getElementById('redirecturl').selectedIndex;
	var url = document.getElementById('redirecturl').value;
	if (url)
		{
		window.location = url;
		}
	}

function verifyForm() {
	var themessage = "Formuläret är inte komplett ifyllt. Var vänlig komplettera med följande: ";
	if (document.rondeller.name.value=="") {
	themessage = themessage + " - Namn";
	}
if (document.rondeller.address.value=="") {
	themessage = themessage + " - Gatuadress/postbox";
	}
if (document.rondeller.city.value=="") {
	themessage = themessage + " - Postnummer och ort";
	}
//alert if fields are empty and cancel rondeller submit
if (themessage == "Formuläret är inte komplett ifyllt. Var vänlig komplettera med följande: ") {
	document.rondeller.submit();
	}
else
	{
	alert(themessage);
	return false;
   }
}
