function conteneur(nUrl,nAncre,nIdSite, nNode) {
this.monUrl = nUrl;
this.monAncre = nAncre;
this.monIdSite = nIdSite;
this.monNode = nNode;
}
var tab_Ancre = new Array(new conteneur(	"/", 	"", 	"1", 	"0") , 
new conteneur(	"/lelokal/_briques/", 	"_briques", 	"1", 	"1000") , 
new conteneur(	"/lelokal/Communication/", 	"Communication", 	"1", 	"1001") , 
new conteneur(	"/lelokal/Production/", 	"Production", 	"1", 	"1002") , 
new conteneur(	"/lelokal/Post_Prod/", 	"Post_Prod", 	"1", 	"1003") , 
new conteneur(	"/lelokal/Location/", 	"Location", 	"1", 	"1004") , 
new conteneur(	"/lelokal/Contact/", 	"Contact", 	"1", 	"1005") , 
new conteneur(	"/lelokal/Spot_Pub/", 	"Spot_Pub", 	"1", 	"1006") , 
new conteneur(	"/lelokal/Corporate/", 	"Corporate", 	"1", 	"1007") , 
new conteneur(	"/lelokal/Animation/", 	"Animation", 	"1", 	"1008") , 
new conteneur(	"/lelokal/Fiction/", 	"Fiction", 	"1", 	"1009") , 
new conteneur(	"/lelokal/Documentaire/", 	"Documentaire", 	"1", 	"1010") , 
new conteneur(	"/lelokal/Credits/", 	"Credits", 	"1", 	"1011") , 
new conteneur(	"/lelokal/Mentions_legales/", 	"Mentions_legales", 	"1", 	"1012") );
function parseUrl1(data) {
var e=/^((http|ftp):\/)?\/?([^:\/\s]+)(\/#([\w\-]+))?$/;
var e2=/^((http|ftp):\/)?\/?([^:\/\s]+)(\/\?id=\d+)(#([\w\-]+))?$/;
var e3=/^((http|ftp):\/)?\/?([^:\/\s]+)(\/#([\w\-^\/]+))\/([\w\-]+)?$/;
if (data.match(e)) {
	return  {url: RegExp['$&'],
			protocol: RegExp.$2,
			host:RegExp.$3,
			path:RegExp.$4,
			  ancre:RegExp.$5,
			file:RegExp.$6,
			hash:RegExp.$7};
}
else  if (data.match(e2)) {
	return  {url: RegExp['$&'],
			protocol: RegExp.$2,
			host:RegExp.$3,
			path:RegExp.$4,
			  path3:RegExp.$5,
			ancre:RegExp.$6,
			hash:RegExp.$7};
}
else  if (data.match(e3)) {
	return  {url: RegExp['$&'],
			protocol: RegExp.$2,
			host:RegExp.$3,
			path:RegExp.$4,
			  path3:RegExp.$5,
			ancre:RegExp.$6,
			hash:RegExp.$7};
}
else {
return  {url:"", protocol:"",host:"",path:"",file:"",hash:""};
}
}
function test_ancre(){
var sUrl = String(window.top.document.location.href);  
var thisUrl = String(this.document.location.href);  
var Url_reg = "";
Url_reg = parseUrl1(sUrl); 
var hostName = Url_reg["host"] 
var nameAncre = Url_reg["ancre"] 
if(nameAncre  != "" && nameAncre  != undefined && thisUrl.indexOf("home.php") > 0){
var  iAncre = -1;
for (var i in tab_Ancre){
	if (tab_Ancre[i].monNode == nameAncre) {
		iAncre = i
	}
}
	if (iAncre == -1) {
for (var i in tab_Ancre){
	if (tab_Ancre[i].monAncre == nameAncre) {
		iAncre = i
	}
}
}
	if (iAncre != -1) {
items = thisUrl.split("/")
;var currentSite = items[4] 
;if (tab_Ancre[iAncre].monUrl.indexOf(currentSite) > 0) { 
	var baseURL = 'http://'+hostName+'/content'+tab_Ancre[iAncre].monUrl;
 
if (window.top.document.getElementById('iframediv') !=null) { 
	if (window.parent.document.location.href == document.location.href){
		//  
return false; 
	}
	else { 
		if (document.location.href != baseURL) {
			//this.document.location.href = baseURL;
			return baseURL; 
		}
	else { 
			return false; 
		} 
	} 

} 
	} else {window.top.document.location.href = 'http://'+hostName+'/?id='+tab_Ancre[iAncre].monIdSite+'#'+nameAncre;
return false; 
	}
	}
}
}

