CLICRDV = {
	u: "http://www.clicrdv.com",
	o: function(e) {		
		if(!this.rendered) { 
			this.r();
		}
		else {
			this.iframe.style.visibility = "";
			this.mask.style.visibility = "";
		}		
		if(e.preventDefault) {
			e.preventDefault();
		} else {
			e.returnValue = false;
		}
		e.stopPropagation();
	},
	r: function() {
		var m = document.createElement('div');
		//m.setAttribute('style', '-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=25)"; filter: alpha(opacity=25);');
		m.style.filter = 'alpha(opacity=25)';
		m.style.position = "fixed";
		m.style.top = "0";
		m.style.left = "0";
		m.style.zIndex = "998";
		m.style.backgroundColor = "#000";
		m.style.opacity = "0.25";
		this.mask = m;
		document.body.appendChild(m);
		
		var d = document.createElement('div');
		d.setAttribute('style', '-moz-box-shadow: 10px 10px 10px #666; -webkit-box-shadow: 10px 10px 10px #666; box-shadow: 10px 10px 10px #666;');
		d.style.position = "fixed";
		d.style.zIndex = "999";
		d.style.border = "1px solid black";
		d.innerHTML = '<img src="'+this.u+'/javascripts/clicrdv/widgets/panel_close_button.png" onclick="CLICRDV.c();" alt="Fermer" style="position: absolute; right: -12px; top: -12px; cursor: pointer;"/><iframe src="'+this.u+'/'+clicrdv_slug+'?nologo=1&iframe=1" style="height: 100%; width: 100%; border: 0;"><p>Your browser does not support iframes.</p></iframe>';
		document.body.appendChild(d);
		this.iframe = d;
		this.rendered = true;
		
		var that = this;
		this.resize();
		window.onresize = function() { that.resize(); };
	},
	resize: function() {
		
		var winW = 900, winH = 670;
		if (window.innerWidth) {
		  winW = window.innerWidth;
		  winH = window.innerHeight;
		}
		else if (document.body.offsetWidth) {
		  winW = document.body.offsetWidth;
		  winH = document.body.offsetHeight;
		}
		
		var ifW = Math.min(1000, winW-50),
			 ifH = winH-60,
			 left = (winW-ifW)/2,
			 top = (winH-ifH)/2;
			
		var d = this.iframe;
		d.style.left = left+"px";
		d.style.top = top+"px";
		d.style.width = ifW+"px";
		d.style.height = ifH+"px";
		
		this.mask.style.width = winW+"px";
		this.mask.style.height = winH+"px";
	},
	c: function() {
		this.iframe.style.visibility = "hidden";
		this.mask.style.visibility = "hidden";
	}
};

document.write('<div style="position: relative; width: 175px; height: 54px; cursor: pointer;"><div style="position: absolute; background-color:'+clicrdv_btncolor+';left: 24px; width: 139px; top: 12px; height: 29px;"></div><a target="_new" href="'+CLICRDV.u+'/'+clicrdv_slug+'" onclick="CLICRDV.o(event);" style="display: block; position: absolute; width: 175px; height: 54px;"><img alt="Prendre RDV maintenant" src="'+CLICRDV.u+'/images/icons/buttontransp1.png" border="0" /></a></div>');

