Page ={
	oFx: null,
	getPath :function( nId ){
		var s = "" ,
		o = Pages.getElementById( nId )
		while( o ){
			if(  o.sLabel ) s = o.sLabel + "/" + s
			o = o.parentNode
			}
		return s
		},
	load :function( nId , sCaller ){
		if( nId != ID ){
			if( loader ) loader.className = "loading"
			ID = Page.ID = nId
			/*
			ID = pour simplifier le code
			Page.ID = pour résoudre les problémes avec les IFRAME et les fenêtres.
			*/
			if( sCaller != 'history' && History ) History.add( nId )
			Cookie.set( "ID" , ID )
			var o = Pages.getElementById( ID )
			if( o ){
				if( oPathBox ) if( sCaller != 'pathbox' ) oPathBox.createPath( ID )
				if( oStaticMenu ) oStaticMenu.highlightPath( ID )
				}
			if( contents ){
				contents.style.visibility = "hidden"
				if( Fx ){
					Page.oFx = new Fx ( contents , { height : "1" }, "circ.inOut" , 200 , true )
					Page.oFx.oncomplete = function(){ Page.oFx = null }
					} else contents.style.display = "none"
				}
			;["up","left","right","down"].each( function( s ){
				var e = window[ s ]
				if( e ){
					e.style.display = "none"
					e.innerHTML = ""
					}
				})
			oAjax.get( '@pp/contents/pages/' + ID + '.xml?s=' + CACHE_ID , 'xml' , Page.setContents )
			}
		return nId != ID
		},
	parseXmlDoc :function( o ){
		var oPage = { attr:{}}
		;["contents","left","right","up","down","scripts"].each( function( s ){ oPage[s] = getValue( o , s )})
		;["left","right"].each( function( s ){ oPage.attr[s] = o.getAttribute(s)})
		return oPage
		},
	refresh :function(){
		if( Page.nTimeOut ) clearTimeout( Page.nTimeOut )
		var nId = Page.ID
		ID = null
		Page.load( nId )
		},
	setContents :function( o ){
		if( o ){
			if( o.getAttribute( "css" ) == "1" ) FileSystem.loadCSS( "@pp/contents/pages/css/" + ID + ".css?s=" + CACHE_ID )
			if( o.getAttribute( "js" ) == "1" ) FileSystem.loadJS( "@pp/contents/pages/js/" + ID + ".js?s=" + CACHE_ID )
			}
		var b = sContents
		, oPage = o ? Page.parseXmlDoc( o ) : { attr:{}}
		sContents = oPage.contents || ""
		if( loader ) loader.className = "done"
		var f = function (){
			var o = Pages.getElementById( ID )
			if( page ) page.className = "page" + ID
			var sTitle = o && o.sLabel && sContents  ?  "<h1>" +  o.sLabel + "</h1>" : ""
			;["up","left","right","down"].each( function( s ){
				var e = window[s]
				switch( s ){
					case "left":
					case "right":
						if( e && oPage.attr[ s ]){
							e.style.display = ""
							e.style.visibility = "hidden"
							Template.Navigation.Add.Menu( window[s] , oPage.attr[ s ])
							}
					case "up":
					case "down":
						if( e && oPage[s]){
							e.style.display = ""
							e.style.visibility = "hidden"
							e.appendChild( Tag( "DIV" , { innerHTML :  oPage[s]}))
							}
						break;
					}
				})
			if( contents ){
				contents.innerHTML = sTitle + sContents
				contents.style.height = ''
				contents.cssText = ''
				if( Fx ){
					var n = sContents ? ( Tag.dimension( contents )).height : 1
					contents.style.height = "1px"
					Page.oFx = new Fx ( contents , { height : n }, sEffect , nTime , true )
					Page.oFx.oncomplete = function(){
						if( contents.style.height != "1px" ) Style.set( contents , 'height: null;' )
						Page.oFx = null
						fOnComplete()
						}
					} else {
						contents.style.display = ""
						fOnComplete()
						}
				}
			if( oPage.scripts ) eval( oPage.scripts )
			Template.Navigation.load()
			document.title = sSiteName + Page.getPath( ID ) + " "
			}
		var fOnComplete = function(){
			contents.style.visibility = "visible"
			if( bSpecialFonts ) Cufon.refresh();
			if( bSounds && ! isNaN( pageSound ) && swfsound.bReady ) swfsound.startSound( pageSound )
 			;["up","left","right","down"].each( function( s ){
				var e = window[s]
				switch( s ){
					case "left":
					case "right":
						if( e && oPage.attr[ s ]) e.style.visibility = "visible"
					case "up":
					case "down":
						if( e && oPage[s]) e.style.visibility = "visible"
						break;
					}
				})
			}
		if( b && Fx ){
			try{
				if( Page.oFx ) Page.oFx.oncomplete = f
					else f()
				}catch( e ){ f()}
			} else f()
		},
	setTimeout :function( nId , nMilliseconds ){
		Page.nTimeOut = setTimeout( function(){ Page[ ID == nId ? "refresh" : "load" ]( nId )} , nMilliseconds )
		}
	}
