var detect = navigator.userAgent.toLowerCase();

var frameset = "../../urusvati.htm";
var frameset1 = "../../home.htm";
page = new String(self.document.location);
var pos = page.lastIndexOf("roerichtrust.org") + 17;
var file = page.substr(pos);
//  var addr = page.substr(0,pos);
var urlAddress = page;
//  if (browser = 'Opera') {var s1 = frameset1} 
//  else { var s1 = frameset + "?" + file + "&" };
var s1 = frameset + "?" + file + "&";
var s2 = frameset1;

if (checkIt('opera')) {redirop()}
else {redircom()};

function redircom(){
if (self.location == top.location && location.search.substring(1) != 'nf')
  { top.location.replace(s1) }
}

function redirop(){
if (self.location == top.location && location.search.substring(1) != 'nf')
  { top.location.replace(s2) }
}

function addToFavorites() {
	if (document.all) { window.external.AddFavorite(urlAddress,pageName) } 
	else if (window.sidebar) {window.sidebar.addPanel(pageName, urlAddress, "")}
//	alert(urlAddress);
//  alert(pageName);
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

