var Contact = Class.create ({
	initialize: function (debug) {
		this.debug = debug;

		if (!Prototype)
			this._dbug ("Protype n'est pas chargé");
		if (!Window)
			this._dbug ("Window n'est pas chargé");
		
		this._initWin ();
	},
	
	open: function (aspidf, hash) {
		var url = '?tpl=addcontact&aspidf=' + aspidf + '&hash=' + hash;
		this._win.setAjaxContent (url);
	},

	destroy: function () {
		this._win.close ();
	},
	
	_initWin: function () {
		this._win = new Window ({
			'title': "Ajouter à vos contacts", 
			'className': "alphacube",
			'top':205, 
			'left':100, 
			'width':320, 
			'height':278, 
			'destroyOnClose':false,
			'resizable':false,
			'maximizable':false,
    	'minimizable':false
		});
	},

	_dbug: function (msg) {
		if (this.debug)
			alert (msg);
	},
	onException: function (res, e) {
		alert ("Erreur script : " + e );
	}
});

