if (window.EWIMMO_MObjs === undefined) {
	EWIMMO_MObjs = new Object;
	Object.extend( EWIMMO_MObjs,
	{
		furl: '/ewimmo.config.php',
		target: 'Immobilie_7',
		addMarkedObject: function(id, name) {
			var params = 'ewimmo_AddMarkedObject_property_id=' + id + '&ewimmo_AddMarkedObject_property_name=' + name + '&ewimmo_rpc=1';
		//	alert(furl);
			var myAjax = new Ajax.Request(this.furl, {method: 'get',	parameters: params, onComplete: function() {this.reloadMarkedObjects()}.bind(this)});
		},

		delMarkedObject: function(id) {
			var del_params = 'ewimmo_DelMarkedObject_property_id=' + id + '&ewimmo_rpc=1';;
			var myAjax = new Ajax.Request(this.furl, {method: 'get',	parameters: del_params, onComplete: function() {this.reloadMarkedObjects()}.bind(this)});
		},

		reloadMarkedObjects: function(transport) {
	
			if ($(this.target)) {
				Dialog.alert("Die Aktion wurde erfolgreich abgeschlossen!", {width:300, height:100, okLabel: "schließen", onOk:function() {window.location.reload(); return true;}});
			} else {
				Dialog.alert("Die Aktion wurde erfolgreich abgeschlossen!", {width:300, height:100, okLabel: "schließen"});
			}
			
			
		},

		contact: function(contacts_page) {
			window.location=contacts_page;
		}
	});
}

