// JavaScript Document
//bibliothèque fonctions javascript Marsouins.com
var nom_site = 'marsouins';
var dom_site = nom_site + '.com';
var chaine = ""+location;
if ( chaine.search('/localhost/') == -1 ) {
	var urlSite = 'http://www.' + dom_site;
}
else {
	var urlSite = 'http://localhost/' + nom_site;
}
if ( chaine.search('/administration/') != -1 ) {
	var urlSite = urlSite + '/administration';
}
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
<!--Gestion popups
var infoShow;
function createInfoShow(urlInfo,width,height)
{
	infoShow = window.open('info.php' + urlInfo,'infoShow','scrollbars=yes,width=' + width + ',height=' + height + ',screenX=0,screenY=0,top=10,left=10');
}
function info(url,width,height)
{
	if(typeof(infoShow)!="undefined")
	{
		if(infoShow.closed!=true)
			infoShow.close();
	}
	var urlInfo  = '?info=' + url;
	createInfoShow(urlInfo,width,height);
}
function closeInfoShow()
{
	if(typeof(infoShow)!="undefined")
	{
		if(infoShow.closed!=true)
			infoShow.close();
	}
}
//-->
<!-- début statut déroulant
var Message="La visite vous a plu ! Laissez un message dans le Livre d\'Or des Marsouins !";
var place=1; 
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
} 
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 50);
}
}
window.defaultStatus = ' '
//-->
<!--Alerte suppression-->
function supp(texte,lien) {
	if (confirm(texte)) {
		window.location=lien;
	}
}

function JumpSelect(targ,adresse,selObj,restore){ 
  eval(targ+".location='"+adresse+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function createWindow(url,width,height) {
	var containerWidth = getWindowWidth();
	var positionX = ((containerWidth / 2) - (width /2 ));
	var containerHeight = getWindowHeight();
	var positionY = ((containerHeight / 2) - (height /2 ));
	window.open(url,'infoShow','scrollbars=yes,width=' + width + ',height=' + height + ',screenX=0,screenY=0,top=' + positionY + ',left=' + positionX);
}
