
function onPageLoad () {
	oContent = new FadeLayer ("dContent",315,133,0.25);
	oContentBack = new FadeLayer ("dContentBack",315,213,0.25);
	oContentBack.hide ();
	oContentBack.fadeIn ();
	
	oContentLoader = new ContentLoader ("dContent",315,133,"ifBuffer");
	oContentLoader.event_contentLoaded = function () {
		oContent.fadeIn()
	}
	
	var x = 603;
	var y = 212;
	for (var i=0;i<numPages;i++) {
		x = i%3==0?603:x+=15;
		y = i%3==0?y+15:y;
		eval ("oS"+i+"= new FadeLayer(\"dS"+i+"\","+x+","+y+",0.5)");
		setTimeout ("oS"+i+".fadeIn ("+x+","+y+")",(i*200)+1000)
	}
	setTimeout ("loadPage (0)",1000);
}

function loadPage (pageNum) {
	if (currentPage != pageNum) {
		oContent.fadeOut ();
		setTimeout ("oContentLoader.loadContent ('"+pageArray[pageNum]+"')",1000);
		setTimeout ("document.images.i"+pageNum+".src='images/square2_o.gif'",1000);
		if (currentPage != null) {
			setTimeout ("document.images.i"+currentPage+".src='images/square2_n.gif'",1000);
		}
		currentPage = pageNum
	}	
}

function openWindow(windowURL, windowWidth, windowHeight, scrollbars) {
	var x = (screen.width/2)-(windowWidth/2);
	var y = (screen.height/2)-(windowHeight/2);
	var sScroll = scrollbars==true?'scrollbars=1':'scrollbars=0';
	open(windowURL,"","width="+windowWidth+",height="+windowHeight+","+sScroll+",left="+x+",top="+y);
}
