function openClientsComments(pagina){
	
		opencc=new PopUpTs();
		opencc.addContent('<iframe src="'+pagina+'.html" frameborder="0" scrolling="no"  width="100%" height="100%">');
		opencc.setSeize(340,290);
		opencc.center();
		opencc.show();
}

var numDivPopUp=1;
var zdx=1;
function createPopUp(){
	outerdiv=document.getElementById(this.id);
	outerdiv.style.height=this.height+'px';
	outerdiv.style.width=this.width+'px';
	outerdiv.style.display="block";
	outerdiv.style.borderStyle=this.borderStyle;
	outerdiv.style.borderWidth=this.borderWidth+'px';
	outerdiv.style.borderColor=this.borderColor;
	outerdiv.style.backgroundColor=this.bgColor;
	outerdiv.style.position='absolute';
	outerdiv.style.left=this.x+'px';
	outerdiv.style.top=this.y+'px';
	outerdiv.style.display='none';
	outerdiv.style.zIndex=zdx++;
	
	iframeObj = document.createElement('IFRAME');
	
	iframeObj.style.position = 'absolute';
	iframeObj.frameBorder='0px';
	iframeObj.style.left='0px';
	iframeObj.style.top='0px';
	iframeObj.style.display = '';
	iframeObj.style.height = this.height+'px';
	iframeObj.style.width = this.width+'px';
	iframeObj.style.zIndex =-1000;
	//outerdiv.appendChild(iframeObj);
	//alert(this.content);
	if (this.isExternalPage){
		if (this.showClose==true){
	 		outerdiv.innerHTML='<div style="20px;background-color:#FF0D83" align="right" ><a style="background-color:#FF0D83;cursor:pointer;color:#FFFFFF" onClick="hidebox(\''+this.id+'\')"  >close x</a> &nbsp;</div><iframe  src="'+this.content+'" width="100%" height="100%" frameborder="0"></iframe>';
		}
		else {
	 		outerdiv.innerHTML='<iframe  src="'+this.content+'" width="100%" height="100%" frameborder="0"></iframe>';
		}
	}
	
	else{
		outerdiv.innerHTML=this.content;
	}
	this.isInit=true;
}

function hidebox(id){
	div=document.getElementById(id);
	div.style.display='none';
	return false;
}


function hide(){
	 hidebox(this.id);
}


function showbox(id){
	
	div=document.getElementById(id);
	div.style.display='block';
	return false;
}
function show(){
	if (!this.isInit){
		this.createPopUp();
	}
	showbox(this.id);
}


function setSize(width,height){
		this.height=height;
		this.width=width;
}
function setSeize(width,height){
		this.height=height;
		this.width=width;
}

function setPos(x,y){
		this.x=x;
		this.y=y;
}



function addContent(text){
	this.isExternalPage=false;
	this.content=text;
}
function setUrl(url){
		this.isExternalPage=true;
		this.content=url;
}
function center(){
	var largeur = 0, hauteur = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
  		largeur = window.innerWidth;
  		hauteur = window.innerHeight;
  	} 
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
 		 largeur = document.documentElement.clientWidth;
  		 hauteur = document.documentElement.clientHeight;
 	 } 
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		  largeur = document.body.clientWidth;
		  hauteur = document.body.clientHeight;
  	}
	else {
	  largeur = -1;
	  hauteur = -1;
    }
	/*----------------------------------------------------------------------*/
	var pos=0;
	if (window.innerHeight) {
    	pos = window.pageYOffset
	  }
 	 else if (document.documentElement && document.documentElement.scrollTop) {
    	pos = document.documentElement.scrollTop
 	 }
  	else if (document.body) {
    	pos = document.body.scrollTop
  	}

	dx=((largeur-this.width > 0)? parseInt((largeur-this.width)/2) :100);
	dy=((hauteur-this.height > 0)? parseInt((hauteur-this.height)/2) :100);
	this.x=document.body.scrollLeft+dx;
	this.y=pos+dy ;

	
}

function  PopUpTs(){
	numDivPopUp++;
	this.id="DivPopUp"+numDivPopUp;
	objdiv=document.createElement('DIV');
	objdiv.id=this.id;
	document.body.appendChild(objdiv);
	
	if (document.body){
		this.x=document.body.scrollLeft+100;
		this.y=document.body.scrollTop+100 ;
	}else{
		this.x=100;
		this.y=100;
	}
	this.height=200;
	this.width=200;
	this.isExternalPage=true;
	this.content="";
	this.title="";
	this.isInit=false;
	this.showClose=false;
	
	this.borderColor="#FF0D83";
	this.bgColor="#FFFFFF";
	this.borderWidth="2px";
	this.borderStyle="solid";
	
	/*methode*/
	this.hide=hide;
	this.show=show;
	this.setUrl=setUrl;
	this.center=center;
	this.addContent=addContent;
	// erreur d'orthographe !!!!!!!!
	
	this.setSeize=setSeize;
	this.setSize=setSize;
	this.setPos=setPos;
	this.createPopUp=createPopUp;
	
	
	
}
