var aURL = new Array(	"/", 
	"/magellium/About_us/", 
	"/magellium/GABARIT/", 
	"/magellium/Signal_and_image_processing/", 
	"/magellium/Geomatics/", 
	"/magellium/Innovative_learning_technologies/", 
	"/magellium/Robotics_and_intelligent_systems/", 
	"/magellium/Contact/", 
	"/magellium/Press_release/", 
	"/magellium/Space/", 
	"/magellium/Defense_and_security/", 
	"/magellium/Health/", 
	"/magellium/Industry/", 
	"/magellium/Engineering_solutions_and_services/", 
	"/magellium/Customers_and_partners/", 
	"/magellium/Join_us/", 
	"/fr/Qui_sommes_nous_./", 
	"/fr/GABARIT/", 
	"/fr/Traitement_du_Signal_et_des_Images/", 
	"/fr/Geomatique/", 
	"/fr/Technologies_Innovantes_pour_la_Formation/", 
	"/fr/Robotique_et_Systemes_Intelligents/", 
	"/fr/Contactez-nous/", 
	"/fr/Espace_Presse/", 
	"/fr/Espace/", 
	"/fr/Defense_et_Securite/", 
	"/fr/Sante/", 
	"/fr/Industrie_-__Autres_secteurs/", 
	"/fr/Ingenierie._Solutions_et_Services/", 
	"/fr/Clients_et_Partenaires/", 
	"/fr/Nous_rejoindre/", 
	"/magellium/test/", 
	"/fr/Mentions_legales/", 
	"/magellium/Legal_infos/", 
	"/magellium/Recrutement/", 
	"/fr/Recrutement/"
);
var aAncre = new Array(	"", 
	"About_us", 
	"GABARIT", 
	"Signal_and_image_processing", 
	"Geomatics", 
	"Innovative_learning_technologies", 
	"Robotics_and_intelligent_systems", 
	"Contact", 
	"Press_release", 
	"Space", 
	"Defense_and_security", 
	"Health", 
	"Industry", 
	"Engineering_solutions_and_services", 
	"Customers_and_partners", 
	"Join_us", 
	"Qui_sommes_nous_.", 
	"GABARIT", 
	"Traitement_du_Signal_et_des_Images", 
	"Geomatique", 
	"Technologies_Innovantes_pour_la_Formation", 
	"Robotique_et_Systemes_Intelligents", 
	"Contactez-nous", 
	"Espace_Presse", 
	"Espace", 
	"Defense_et_Securite", 
	"Sante", 
	"Industrie_-__Autres_secteurs", 
	"Ingenierie._Solutions_et_Services", 
	"Clients_et_Partenaires", 
	"Nous_rejoindre", 
	"test", 
	"Mentions_legales", 
	"Legal_infos", 
	"Recrutement", 
	"Recrutement"
);
var aMinisite = new Array(	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"1", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"3", 
	"1", 
	"3", 
	"1", 
	"1", 
	"3"
);
function parseUrl1(data) {
var e=/^((http|ftp):\/)?\/?([^:\/\s]+)(\/#([\w\-]+))?$/;
var e2=/^((http|ftp):\/)?\/?([^:\/\s]+)(\/\?id=\d+)(#([\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 {
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 aAncre){
	if (aAncre[i] == nameAncre) {
		iAncre = i
	}
}
	if (iAncre != -1) {
items = thisUrl.split("/")
;var currentSite = items[4] 
;if (aURL[iAncre].indexOf(currentSite) > 0) { 
	var baseURL = 'http://'+hostName+'/content'+aURL[iAncre];
 
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='+aMinisite[iAncre]+'#'+nameAncre;
return false; 
	}
	}
}
}

