// JavaScript Document
function checkRef()
{
	allowedRoots = new Array("aec_V4/","equitcomportementale.com/","chuchoteur.com/","firfol.com/");

// fetch current URL...	
	URL=self.location.href;
	
	separateur=URL.lastIndexOf("/");
	
// Recherche d'une racine connue
	for (i=0;i<allowedRoots.length;i++) {
		rootPos = URL.lastIndexOf(allowedRoots[i]);
		if(rootPos != -1) {
			separateur = rootPos + allowedRoots[i].length;
			break;
		}
	}
	if (rootPos == -1) {
		domaine = "http://www.equitcomportementale.com/";
	} else {
		domaine = URL.substring(0,separateur);
	}
	
	fin=URL.length;
	page=URL.substring(separateur,fin);
//	alert (domaine+"\n"+page);
	
	if (parent.frames.length == 0 ) {
		parent.location.href = domaine+'index.php?topic='+page;
	}
	return
	
}

checkRef()

