
		rechercheETV = false;
		rechercheOUV = false;
if(typeof isLoad=="undefined")
{  
	if(document.location.hash!="")
	{
		document.location.href = "/FinalVersion/"+document.location.hash.replace("#","").replace("/FinalVersion/","");
	}
	isLoad = true;
	var head = document.getElementsByTagName("head")[0];		
	newJavascript = document.createElement("script");
	newJavascript.type = "text/javascript";
	newJavascript.src = '/FinalVersion/javascript/loadjQuery.js';
	head.appendChild(newJavascript);

	
	// Globales uses
	currentHash = document.location.hash;
	oldHash="";
	newsBox = new Array();
	
	pagesLoaded = new Array();
	count = 0;
	doNotBoucleFunc = false;
	currentObjHash=true;

	
		
			function removeHashFromLinks()
			{
				$("a").each(function(){
					if($(this).attr('href')=="#")
					{
						$(this).attr('href','javascript:void(0);');
					}
				});	
			}	
			function str_replace(will,replace,string)
			{
				var reg=new RegExp("("+will+")", "g");
				return string.replace(reg,replace);
			}
			function strrchr (haystack, needle) {
				
				var pos = 0;
			 
				if (typeof needle !== 'string') {
					needle = String.fromCharCode(parseInt(needle, 10));
				}
				needle = needle.charAt(0);
				pos = haystack.lastIndexOf(needle);
				if (pos === -1) {
					return false;
				}
			 
				return haystack.substr(pos);
			}
		function transformIntoUrlRewriting(string)
			{
				separator = "_";
				if(typeof string=="undefined")
				{
					string = "";
				}
				if(strrchr(string,separator)===false)
				{
					// Il y a pas de dossiers
					/*
					if(string=='index.php' || string=='index.php5')
					{
						string = "";
					}
					*/
					return string;
				}
				else
				{
					page = strrchr(string,separator);
					dossiers = str_replace(page,'',string);
					dossiers += separator;
					dossiers = str_replace(separator,"/",dossiers);
					page = str_replace("_","",page);
					page = str_replace(".php5",".php",page);
					if(page=='index.php')
					{ 
						page = "";
					}
					return dossiers+page;
				}
				
			}

}
		
		function choisir_theme(id)
		{ 
			themes = new Array();
			themes[1] = "/css/V6.2.main.css";
			themes[2] = "/theme/tails/css/";
			themes[3] = "/theme/Robotnik/css/";
			themes[4] = "/theme/Amy/css/";
			themes[5] = "/theme/unleashed/css/";
			themes[6] = "/theme/Sonic-Christmas/css/";
			themes[7] = "/theme/BlackKnight/css/";
			
			
			themesNames = new Array();
			themesNames[1] = "sonic";
			themesNames[2] = "tails";
			themesNames[3] = "Robotnik";
			themesNames[4] = "Amy";
			themesNames[5] = "unleashed";
			themesNames[6] = "Sonic-Christmas";
			themesNames[7] = "BlackKnight";
			
			
			folder = themes[id]; 
			themesName = themesNames[id];
			/*
			var css=document.createElement('link');
			css.setAttribute('type','text/css');
			css.setAttribute('rel','stylesheet');
			css.setAttribute('media','screen');
			css.setAttribute('class','removable');
			css.setAttribute('className','removable');
			css.setAttribute('href','..'+folder+'theme.css');
			document.getElementsByTagName('head')[0].appendChild(css);
			
			var css2=document.createElement('link');
			css2.setAttribute('type','text/css');
			css2.setAttribute('rel','stylesheet');
			css2.setAttribute('media','screen');
			css2.setAttribute('class','removable');
			css2.setAttribute('className','removable');
			css2.setAttribute('href','..'+folder+'menu.css');
			document.getElementsByTagName('head')[0].appendChild(css2);
			
			var css3=document.createElement('link');
			css3.setAttribute('type','text/css');
			css3.setAttribute('rel','stylesheet');
			css3.setAttribute('media','screen');
			css3.setAttribute('class','removable');
			css3.setAttribute('className','removable');
			css3.setAttribute('href',);
			document.getElementsByTagName('head')[0].appendChild(css3);
			*/
			
			$("#css_dynamique_objetMenu").attr('href','/FinalVersion/css_menu.php5?setTheme='+themesName);
			$("#dynamicCssSwitch").attr('href','/FinalVersion/css.php5?id_theme='+id);
			$("#dynamicTheme").attr('href',folder+'theme.css');
	
			
		}
		
	obj=document;
