
	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; };
		}
	};
	
	var popupimage = function(chemin,nom,param){
		popupImage = window.open('',nom,param)
		html = '<HTML><HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><IMG SRC="'+chemin+'" BORDER=0></BODY></HEAD></HTML>';
		popupImage.document.open();
		popupImage.document.write(html);
		popupImage.document.close();
	};
	
	var setflash = {
		collect : function(srcContainer){
			if(!document.getElementById(srcContainer)) return false;
			var fl,w,h,child,src;
			if(typeof srcContainer=='string') fl = document.getElementById(srcContainer).getElementsByTagName('object');
			if(typeof scrContainer=='object') fl = scrContainer.getElementsByTagName('object');
			for(i=0;i<fl.length;i++){
				w = fl[i].width;
				h = fl[i].height;
				child = fl[i].childNodes;
				for(j=0;j<child.length;j++){
					if(child[j].getAttribute('src')) src=child[j].getAttribute('src');
				}
				this.create(fl[i],src,w,h);
			}
		},
		create : function(element,src,w,h){
			var flvObject;
			flvObject = new SWFObject(src,'',w,h,'9','#000');
			flvObject.addParam("wmode","transparent");
			flvObject.write(element);
		}
	};
	
