// JavaScript Document

function addLoadEvent(func)
{
	var oldonload = window.onload;
	if (typeof window.onload != 'function') window.onload = func;
	else window.onload = function() {
	oldonload();
	func();
	}
}
function maxWindow(){
	self.moveTo(0,0);
	self.resizeTo(screen.availWidth,screen.availHeight);
}


function init(){
	var rand = Math.round(Math.random()*10000);
	var so = new SWFObject("swf/site.swf?r="+rand, "site", "100%", "100%", "9", "#ffffff");
	so.addParam("quality", "high");
	so.addParam("pluginspage","http://www.macromedia.com/go/getflashplayer");
	so.addParam("allowFullScreen","true");
	so.addParam("allowScriptAccess","sameDomain");	
	so.addVariable("PATH","http://www.legal-resources.eu/");	
	so.write("flashcontent");
}
/*
function popup(theURL,winName,largeur,features) 
{   
  		if(! window.focus){  return; }
		var left = 'left='+(screen.width-largeur-100);
		var credit = window.open(theURL,winName,left+','+features);
		credit.focus();
		theURL.target = winName;		
}
*/
function popup(id,lang) 
{   
  		theURL 		= 'http://www.legal-resources.eu/news.php?id='+id+'&lang='+lang;
		winName 	= 'popup';
		features	= 'height=480,width=640,top=10,scrollbars=yes,status=no,menubar=yes,location=no,toolbar=no,resizable=yes';
		largeur		= 640;
		
		if(! window.focus){  return; }
		var left = 'left='+(screen.width-largeur-100);
		var credit = window.open(theURL,winName,left+','+features);
		credit.focus();
		theURL.target = winName;		
}
addLoadEvent(init);
if(!window.webkit){
	addLoadEvent(maxWindow);
}
