// œ
var connect = {
	init : function(){
		var _this = this;
		this.strForm = 
			'<style>'+
			'#cms_conn label{margin-left:3px; font-weight:bold; font-family:arial,sans-serif;}'+
			'#cms_conn input{font-size:11px;}'+
			'#cms_conn input[type=button],#cms_conn input[type=submit]{width:80px; background-image:url(__cms/__image/__layout/caption.gif);border:solid 1px #99BBE8;}'+
			'#cms_conn input[type="text"], #cms_conn input[type="password"]{border:solid 1px #99BBE8;}'+
			'</style>'+
			'<form method="POST" action="connexion.php">'+
			'<table id="cms_conn">'+
			'<tr>'+
			'<td><label>utilisateur :</label></td>'+
			'<td><input type="text" name="user" /></td>'+
			'</tr>'+
			'<tr>'+
			'<td><label>mot de passe :</label></td>'+
			'<td><input type="password" name="pass" /></td>'+
			'</tr>'+
			'<tr>'+
			'<td style="text-align:left;"><input id="__connect_bt_quit" type="button" value="annuler" /></td>'+
			'<td style="text-align:right;"><input type="submit" value="entrer" name="connect" /></td>'+
			'</tr>'+
			'</table>'+
			'</form>';
		this.divBg = document.createElement('div');
		this.divForm = document.createElement("div");
		this.divForm.id = "connexion";
		this.divForm.innerHTML = this.strForm;
		document.body.appendChild(this.divBg);
		document.body.appendChild(this.divForm);
		this.divForm.setAttribute(
			'style',
			'border:solid 2px #99BBE8;'+
			'color:#14335C;'+
			'position:absolute;'+
			'background-color:#EBF3FD;'+
			'top:'+(document.documentElement.scrollTop+150)+'px;'+
			'left:50%;'+
			'z-index:600;'+
			'margin-left:-110px;');
		this.divBg.setAttribute(
			'style',
			'position:absolute;'+
			'top:0;'+
			'width:100%;'+
			'height:'+(document.body.offsetHeight+50)+'px;'+
			'background-color:#000;'+
			'opacity:.5;'+
			'z-index:500;');
		document.getElementById('__connect_bt_quit').onclick = function(){ _this.exit(); };
	},
	exit : function(id){
		document.body.removeChild(this.divBg);
		document.body.removeChild(this.divForm);
	}
};
// --- !!!! COMPRESSER LA CLASSE DE CONNEXION !!!! --- //
var site = {
	start : function(){
		if(!document.getElementById('__connexion')) return false;
		document.getElementById('__connexion').onclick = function(){ connect.init(); return false; };
	}
};
