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(	"/flim/Presentation/", 	"Presentation", 	"1", 	"1001") , 
new conteneur(	"/flim/Membres/", 	"Membres", 	"1", 	"1002") , 
new conteneur(	"/flim/Contacts/", 	"Contacts", 	"1", 	"1003") , 
new conteneur(	"/flim/FAM/", 	"FAM", 	"1", 	"1004") , 
new conteneur(	"/flim/Partenaires/", 	"Partenaires", 	"1", 	"1005") , 
new conteneur(	"/deadbees/artists/", 	"artists", 	"2", 	"2007") , 
new conteneur(	"/deadbees/releases/", 	"releases", 	"2", 	"2008") , 
new conteneur(	"/deadbees/news/", 	"news", 	"2", 	"2009") , 
new conteneur(	"/deadbees/concerts/", 	"concerts", 	"2", 	"2010") , 
new conteneur(	"/deadbees/contact/", 	"contact", 	"2", 	"2011") , 
new conteneur(	"/deadbees/shop/", 	"shop", 	"2", 	"2012") , 
new conteneur(	"/flim/FAM/2009/", 	"2009", 	"1", 	"2013") , 
new conteneur(	"/flim/FAM/2010/", 	"2010", 	"1", 	"2014") , 
new conteneur(	"/flim/News/", 	"News", 	"1", 	"2015") );
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; 
	}
	}
}
}

