var loc;
var detect = navigator.userAgent.toLowerCase();

function close(){
document.getElementById("innerFr").rows="76,*,35";
//if (checkIt('opera')) {
//document.getElementById("tf").src="top.htm";
//}
}
function news(){
document.getElementById("innerFr").rows="76,*,120";
//if (checkIt('opera')) {
//document.getElementById("tf").src="top.htm";
//}
}
function photo(){
document.getElementById("innerFr").rows="76,0,*";
//if (checkIt('opera')) {
//document.getElementById("tf").src="top.htm";
//}
}

function loadDoc(){
   var page = new String(self.document.location);
   var posm = page.lastIndexOf("roerichtrust.org") + 17;
   var filem = page.substr(posm);
//   var t = "top.topFrame.location.replace('top.htm')";
   var frame = 'mainFrame';
   var dframe = 'downFrame';
   var z = "top." + frame + ".location.replace('IRMT.htm')";
//   alert(filem);
   if (filem != 'home.htm') {
   var pos = page.lastIndexOf("??") + 2;
   var file = page.substr(pos);
//   alert(file);
   if (file == 'Photogallery/generic/generic_thumb.htm') { 
   var ds = "top." + dframe + ".location.replace('" + file + "')"; 
   eval(ds); eval(z);
   } else
   if(file && frame) {
   var s = "top." + frame + ".location.replace('" + file + "')";
   eval(s);
   }
   } 
   else eval(z);
//   eval(t); 
   return;
}

function loadIframe3() {
   top.topFrame.location.replace('top.htm');
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
