function findObj(n) {
  var p,i,x;
  d=document;
  if((p=n.indexOf("?"))>0 && parent.frames.length){
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for(i=0;!x && i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x && d.layers && i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n);
  return x;
}

var isIE=false;
var isNav=false;
if(navigator.appName.indexOf("Microsoft")!=-1) isIE=true;
else{
  if(parseInt(navigator.appVersion)>=5) isIE=true;
  else isNav=true;
}

function setmpos(){
  var posx=0;
  if(isNav) posx=window.innerWidth;
  else posx=document.body.clientWidth;
  posx=parseInt((posx-779)/2);
  if(posx<0) posx=0;
  //  if(isIE && navigator.appName.indexOf("Microsoft")==-1) posx-=parseInt(document.body.clientWidth-779)/2);

  var LocNews=posx+273;
  var LocFilms=posx+373;
  var LocResearch=posx+473;
  var LocIndyfans=posx+573;
  var LocFeatures=posx+673;



  if(isNav){
    MTOP=0;
	document.menunews.moveTo(LocNews-10,MTOP);
    document.menufilms.moveTo(LocFilms-10,MTOP);
    document.menuresearch.moveTo(LocResearch-10,MTOP);
    document.menuindyfans.moveTo(LocIndyfans-10,MTOP);
    document.menufeatures.moveTo(LocFeatures-10,MTOP);

  }else{
    obj=document.getElementById('menunews');
    obj.style.left=LocNews;
    obj=document.getElementById('menufilms');
    obj.style.left=LocFilms;
    obj=document.getElementById('menuresearch');
    obj.style.left=LocResearch;
    obj=document.getElementById('menuindyfans');
    obj.style.left=LocIndyfans;
    obj=document.getElementById('menufeatures');
    obj.style.left=LocFeatures;
  }
}

timeOn=currentBody=null;

function showBody(nav) {
  if(currentBody!=null && (obj=findObj(currentBody))!=null){
    if(obj.style) obj=obj.style;
    obj.visibility="hidden";
  }
  currentBody = "menu"+nav;
  if((obj=findObj(currentBody))!=null){
    if(obj.style) obj=obj.style;
    obj.visibility="visible";
  }
}

function hideBody(nav) {
  if(currentBody!=null && (obj=findObj(currentBody))!=null){
    if(obj.style) obj=obj.style;
    obj.visibility="hidden";
  }
}

function startTimer(){
  timeOn=setTimeout("hideBody()",0);
}

function stopTimer(){
  clearTimeout(timeOn);
}

if(document.images)
{
	var news1		= new Image();
	news1.src		= "http://www.theraider.net/navigation/news_a.jpg";
	var news2		= new Image();
	news2.src		= "http://www.theraider.net/navigation/news_b.jpg";
	
	var films1		= new Image();
	films1.src		= "http://www.theraider.net/navigation/films_a.jpg";
	var films2		= new Image();
	films2.src		= "http://www.theraider.net/navigation/films_b.jpg";
	
	var research1		= new Image();
	research1.src		= "http://www.theraider.net/navigation/research_a.jpg";
	var research2		= new Image();
	research2.src		= "http://www.theraider.net/navigation/research_b.jpg";
	
	var indyfans1		= new Image();
	indyfans1.src		= "http://www.theraider.net/navigation/indyfans_a.jpg";
	var indyfans2		= new Image();
	indyfans2.src		= "http://www.theraider.net/navigation/indyfans_b.jpg";
	
	var features1		= new Image();
	features1.src		= "http://www.theraider.net/navigation/features_a.jpg";
	var features2		= new Image();
	features2.src		= "http://www.theraider.net/navigation/features_b.jpg";
}


function highlight(img)
{
	document[img].src = eval(img + "2.src");
	showBody(img);
}

function unhighlight(img, imgNo)
{
	document[img].src = eval(img + "1.src");
}

function highlightClassics(img)
{
	document[img].src = eval(img + "2.src");
}

function unhighlightClassics(img)
{
	document[img].src = eval(img + "1.src");
}