// scripts pour le poney club

var ns = document.layers;
var ns6 = document.getElementbById;
var ie = document.all;
/*
if (ns) {
	document.write('<link rel="stylesheet" type="text/css" href="poneyNS.css" />');
}

function reloadPage() {
	if (ns) {
		location.reload();
	}
}
*/
function winOpen(sectionAlbum) {
	var extension = ".html"
	var url = sectionAlbum + extension;
	var width  = screen.availWidth/2;
	var height = screen.availHeight/2;

	var PosX = ( screen.availWidth - width ) / 2; 
	var PosY = ( screen.availHeight - height ) / 2;
	
	var scrollit = "yes";
	if (ie) {
		scrollit = "no";
	}
	var window_style = "left="+PosX+",top="+PosY+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scrollit + ",resizable=yes,width=" + width + ",height=" + height;
	win = window.open(url, 'activites', window_style);
}

function showScroll() {
	if (ie) {
		document.body.scroll = "yes";
	} else if (ns) {
		window.scrollbars.visible = false;

	}
}

function hideScroll() {
	if (ie) {
		document.body.scroll = "no";
	} else if (ns) {
		window.scrollbars.visible = true;
	}
}

function changeImage(layer,imgName,imgSrc) {
	alert('imgSrc = '+imgSrc);
     if (document.images) {
	    if(document.layers && layer!=null)
             eval('document.'+layer+'.document.images[\''+imgName+'\'].src = \''+imgSrc+'\'');
	    else document.images[imgName].src = imgSrc;
     }
}

function changeSize(winSize) {
	var width  = screen.availWidth/2;
	var height = screen.availHeight/2;

	window.resizeTo(width,height);
}

