function getvideo(id){
	url = '/video-de-sexe-' + id + '.html';
	window.open(url, '_blank', 'scrollbars=yes, resizable');
}

function get_abo(lg) {
	if(lg == 'en') 	url = '/membership.html';
	else url = '/devenir-membre.html';
	window.open(url, '_blank', 'location=yes, status=yes, menubar=yes, toolbar=yes, scrollbars=yes, width=' + screen.availWidth + ', height=' + screen.availHeight + ', top=0, left=0, resizable');
}

function sectionmembre(){
	winwidth = 500;
	winheight = 200;
	url = '/membres/';
	window.open(url, '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top='+ (screen.availHeight - winheight) / 2 +', left='+ (screen.availWidth - winwidth) / 2 +', resizable');
	//window.open(url, '_blank', 'scrollbars=yes, top=0, left=0, resizable');
}

function blank(objet) {
	/**	Function utile pour faire un target='_blank' en XHTML strict : <a href="truc.html" onclick="return blank(this);">texte</a> */
	window.open(objet.href,'_blank');
	return false;
}

function bookmark(title,url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,""); 
	} else if(document.all) {
		window.external.AddFavorite(url, title);
	} else if(window.opera && window.print) {
		return true;
	}
}

function PopCommentaire(id) {
	winwidth = 600;
	winheight = 300;
	window.open('/commentaire-'+id+'.html', '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top='+ (screen.availHeight - winheight) / 2 +', left='+ (screen.availWidth - winwidth) / 2 +', resizable');
}

function global_resize() {
	var minwidth, totalwidth;
	minwidth = document.getElementById("divglobal").offsetWidth + document.getElementById("divvban").offsetWidth + 10;
	totalwidth = document.getElementById("divglobal").offsetWidth + (document.getElementById("divvban").offsetWidth + 10) * 2;
	if (screen.width - 32 <= minwidth) document.getElementById("divglobal").style.margin='0px';
	else if (screen.width - 32 <= totalwidth) document.getElementById("divglobal").style.margin='0px auto 0px '+ Math.round((screen.width - minwidth ) * 0.5) +'px';
}
