var updatedEditTableContent=0;
var countDownVar=5;
var dontClosePopup=0;
var windowsHeight=0;

function showLightboxDHTMLPopup()
{
	var t = new Date();
	var lang='fr';
	var dirHTML='ltr';
	var d=document.getElementById('dhtmlPopupTagContentPopup');
	windowsHeight = document.body.scrollHeight;
	if (d)
	{
		d.style.display='';
		//var hlpfrm='<iframe src="'+'/index.php?sid='+sid+'&lang='+lang+'&act=pj recommend to friend" frameborder="0" scrolling="no" height="670px" width="600px"><\/iframe>';
		//in order to change frame's height and width - you have to:
		//set height (currently set to 550) in hlpfrm and coefficient in winInnerHeight (currently set to 0.645 )
		//set width (425) in hlpfrm and coefficient in winInnerWidth (0.34)
		var ifsrc = '/recommendsite.htm';
		if (ispro)
			ifsrc = '/'+subdomain+''+ifsrc;
		var hlpfrm='<iframe src="'+ifsrc+'" frameborder="0" scrolling="no" height="550px" width="425px"><\/iframe>';
		//var hlpfrm='<iframe src="'+'/recommendsite_fr.html" frameborder="0" scrolling="no" height="750px" width="750px"><\/iframe>';
		//var hlpfrm='<iframe src="'+dCookiePath+url+'" frameborder="0" scrolling="no" height="100%" width="100%"><\/iframe>';
		var winInnerHeight = Math.round(parseFloat((window.innerWidth ? window.innerHeight : document.body.clientHeight)*0.7),3);
		var winInnerWidth = parseFloat((window.innerWidth ? window.innerWidth : document.body.clientWidth)*0.3);
		myopenDHTMLPopupCons('ContentPopup', hlpfrm ,dirHTML,winInnerHeight+30,winInnerWidth+50,0.1,1,"");
	}
}


function closeLightboxDHTMLPopup(val)
{
	var d=document.getElementById('dhtmlPopupTagContentPopup');
	if (d) { d.innerHTML=''; d.style.display='none';  }
	document.getElementById('bodyDiv').style.height=windowsHeight;
	document.getElementById('bodyDiv').style.overflow = 'hidden';
	if(val==1) {  document.location.href = document.location.href ; }
}

function myopenDHTMLPopupCons(id, hlpfrm, dir,pH,pW,pWH,opacity,closeFunction)
{
	var docH;
	popupH=parseFloat(pH);
	popupW=parseFloat(pW);
	popupWinH=parseFloat(pWH);
	popupBackGroundColor="";
	popupBackGround="";
	popupBorder="";

	if(opacity==1)
	{
		popupBorder='border: 0px solid #000000;';
		popupBackGround="background-color:#000000";
		popupBackGroundColor='bgcolor="#E1E1E1"';
	}
	popupOpac=parseFloat(opacity)/10;
	if (window.innerWidth) { docH=window.innerHeight-1; } else { docH=document.body.clientHeight; }
	document.getElementById('bodyDiv').style.overflow='hidden';
	document.getElementById('bodyDiv').style.height=(docH)+'px';
	var d=document.getElementById('dhtmlPopupTag' + id);
	var sRes=0;
	if (! d) { return; }
	var nH = (document.body.scrollHeight-2);
	d.style.height=nH+'px';
	var s=d.innerHTML;
	var idlen=''+id;
	idlen=idlen.length;
	if ((s.substring(0, 35+idlen).toLowerCase()!='<table id=' + String.fromCharCode(34) + 'dhtmlpopuptag' + id + 'datatable' + String.fromCharCode(34) + ' ')&&(s.substring(0, 33+idlen).toLowerCase()!='<table id=dhtmlpopuptag' + id + 'datatable '))
	{ sRes=1; d.innerHTML=fillDHTMLPopupDivCons('dhtmlPopupTag' + id, dir, nH,closeFunction); }
	window.scrollTo(0,0);
	d.style.display='';
	if (sRes)
	{
		fixDHTMLPopupDivHeightCons('dhtmlPopupTag' + id);
		document.getElementById('dhtmlPopupTag' + id + 'ContentDiv').innerHTML=hlpfrm;
	}
}

