// OPEN A POPUP -------------------------------------------------------

var offsetMac = 0;

function pop(goPage,nom,windowWidth,windowHeight,style) {
	var x = 0;
	var y = 0;
	var offset = 30;
		
	if (screen) x = (screen.availWidth - windowWidth) / 2;
	if (screen) y = (screen.availHeight - windowHeight) / 2;
	
	
	if ( style == 'POP' ) { 
	    var popped = window.open(goPage,nom,'width='+windowWidth+',height='+(windowHeight+offsetMac)+',status=no,menubar=no,scrollbars=no,resizable=no,screenX='+x+',screenY='+y+',left='+x+',top='+y); 
    }
    
	if ( style == 'POPSCROLL' ) { 
	    var popped = window.open(goPage,nom,'width='+windowWidth+',height='+(windowHeight+offsetMac)+',status=no,menubar=no,scrollbars=auto,resizable=no,screenX='+x+',screenY='+y+',left='+x+',top='+y); 
    }

	if ( style == 'WINDOW' ) {
		if (windowHeight > screen.availHeight) windowHeight = (screen.availHeight - offset);
		var popped = window.open(goPage,nom,'width='+windowWidth+',height='+(windowHeight+offsetMac)+',status=yes,menubar=yes,scrollbars=yes,resizable=yes,screenX='+x+',screenY='+y+',left='+x+',top='+y);
	}
	
	if ( !popped.opener) { popped.opener = window; }
}

function more(id,prefix)
{
	var d = document.getElementById("display_more_" + prefix + "_" + id);
	d.style.display = "none";
	var d = document.getElementById("display_text2_" + prefix + "_" + id);
	d.style.display = "block";
}

function minus(id,prefix)
{
	var d = document.getElementById("display_text2_" + prefix + "_" + id);
	d.style.display = "none";
	var d = document.getElementById("display_more_" + prefix + "_" + id);
	d.style.display = "block";
}

function topOfThePage()
{
	scrollTo(0,0);
}

function scrolldown() 
{
	var h=0;
	if (window.innerHeight) h = window.innerHeight;
	else if (document.body && document.body.offsetHeight) h = window.document.body.offsetHeight; 
	else if (document.documentElement && document.documentElement.clientHeight) h = document.documentElement.clientHeight;
	this.scroll(1,h);
}