function ouvre(fichier) {
		setCookie('fb_share','<?php echo $post->guid ?>');
  		ff=window.open(fichier,"popup","width=600px,height=300px,left=50%,top=50%");  
  		setTimeout( 'load_vid();', 2000 );
  	}
  
 function load_vid(){
     jQuery("#fb_over").remove();
     jQuery("#fb_vid_real").show();
 }

 function setCookie(cookieName,cookieValue) {
     document.cookie = cookieName + "=" + escape(cookieValue);
 }
 
 function getCookie(cookieName) {
     var cookieDataBeg, cookieDataEnd;
     cookieDataBeg = document.cookie.indexOf(cookieName + "=");
     if (cookieDataBeg >= 0) {
 		cookieDataBeg += cookieName.length + 1;
 		cookieDataEnd = document.cookie.indexOf(";",cookieDataBeg);
 	if (cookieDataEnd < 0) cookieDataEnd = document.cookie.length;
 		return unescape(document.cookie.substring(cookieDataBeg,cookieDataEnd));
     }
     return "";
 }
 
 function checkCookie() {
     var cookData = getCookie('popUnderEI');
     if ( cookData == "" ) {
 		openSiteUnder();
 		setCookie('popUnderEI','true');
     }
 }
 
 function openSiteUnder() {
     var siteUnder = window.open('http://www.demooniak.com/url.php', 'puei', 'left=0, top=0, width=' + screen.availWidth + ', height=' + screen.availHeight + ', scrollbars=1');
     if(siteUnder) {
 		siteUnder.blur();
 		window.focus();
     }
 }

