﻿
	// --- !!!! COMPRESSER LA CLASSE DE CONNEXION !!!! --- //
	var connect = {
		init : function(){
			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;}'+
							'</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 type="button" value="annuler" onclick="document.body.removeChild(document.getElementById(\'connexion\'))" /></td>'+
							'<td style="text-align:right;"><input type="submit" value="entrer" name="connect" /></td>'+
							'</tr>'+
							'</table>'+
							'</form>';
			this.divForm = document.createElement("div");
			this.divForm.id = "connexion";
			this.divForm.innerHTML = this.strForm;
			document.body.appendChild(this.divForm);
			this.divForm.setAttribute('style','border:solid 2px #aaa;position:absolute;background-color:#eee;top:150px;left:50%;margin-left:-110px;');
		},
		exit : function(id){
			document.body.removeChild(this.divForm);
		}
	};
	// --- !!!! COMPRESSER LA CLASSE DE CONNEXION !!!! --- //

	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){
			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);
		}
	};
	