function showCheckbox(inApartmentId){
	//var ap_id = document.GetElementById("apartment_id").value;
	//alert(form.id.placeholderApartment.GetElementById("apartment_id"));
	//alert(form.id.GetElementById("placeholderApartment").innerHTML);
	//alert(inApartmentId);
	if (inApartmentId == "" || inApartmentId == '0'){
		document.getElementById("show_nbr_room1").style.display = "block";
		document.getElementById("show_nbr_room").style.display = "block";
	}else{
		 
		document.getElementById("show_nbr_room1").style.display = "none";
		document.getElementById("show_nbr_room").style.display = "none";
	}
 
}



function addApartment(inObjectId, inApartmentId, inLocation){  
	 //alert("hej");
	if (inLocation == 'main'){
		var locUrl = "intresse/xmlRequests.asp?action=addapartmenttodropdown&id="+inObjectId+"&apart_id="+inApartmentId;
	}else if (inLocation == 'edit') {
		var locUrl = "xmlRequests.asp?action=addapartmenttodropdown&id="+inObjectId+"&apart_id="+inApartmentId;
	}else if (inLocation == 'outside') {
		var locUrl = "admin/intresse/xmlRequests.asp?action=addapartmenttodropdown&id="+inObjectId+"&apart_id="+inApartmentId+"&loc="+inLocation;
	}
 	//alert (locUrl);
	locApartment = xmlHttpRequest(locUrl);
 
 	document.getElementById("placeholderApartment").innerHTML = locApartment;
}

function xmlHttpRequest(inUrl){
	document.body.style.cursor='wait';
 
	//Code for Mozilla, Firefox, Safari, and Netscape
	if (window.XMLHttpRequest){
		xmlhttp = new XMLHttpRequest()
		var url = inUrl;
		xmlhttp.open("GET",url,false);
		xmlhttp.send(null);
	}
	//Code for IE
	else if (window.ActiveXObject){
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
		if (xmlhttp){
			var url = inUrl;
			xmlhttp.open("GET",url,false);
			xmlhttp.send();
		}
	}
	
	var locString = xmlhttp.responseText;
	
	document.body.style.cursor='auto';
	
	xmlhttp.abort();
	
	return locString;
}

function delete_interest(InInterestId, InName, InDate){
	//alert (InInterestId);
	
	var text ="Vill du radera intresseanmälan från: "+ InName+ " Daterad: "+InDate+" \nAll ev. historik för denna intresseanmälan försvinner också";

	if (confirm(text)){
	 	location.href='intresse/events.asp?action=delete&int_id='+InInterestId
	}
	else{
		//alert(loc);
		return false; 
	}

}