// JavaScript Document


// Navigation
function navigation (){
	
// Propriétés
this.valeur = new Array () ;
this.variable = new Array () ;
this.chaine =  self.location.hash;
this.delimiter = "/";


	// Méthodes
	this.rewrite = function() {		
		if (this.chaine != ""){
			var reg = new RegExp("[#/]{1,2}" );
			this.chaine = this.chaine.replace(reg, "");
			this.valeur = this.chaine.split(this.delimiter);
			for ( i = 0 ; i<this.valeur.length ; i++ ){
				this.variable[i] = this.valeur[i];
			}
			
			//request('GET', "/artnoz/scripts/php/variable-get.php?langage="+this.variable[0], true )
		}	
	}
	
	// Méthodes
	this.redirect = function() {		
		if (this.variable[0] != ""){
			var url ="/#/" ;
			for ( i = 0 ; i<this.variable.length ; i++ ){
				url += this.variable[i]+"/" ;
			}
			while ( url.substring (url.length -1 , url.length) == "/" ){
				url = url.substring (0 , url.length-1);
			}
			
			document.location.href= url ;
			//request('GET', "/artnoz/scripts/php/variable-get.php?langage="+this.variable[0], true )
		}	
	}

}




