<!-- Begin
if(navigator.appName == "Netscape") {
  document.write("<LINK REL=STYLESHEET HREF='/netscape.css' TYPE='text/css' MEDIA=screen>");
}
else if (navigator.appVersion.indexOf("MSIE") != -1){
  document.write("<LINK REL=STYLESHEET HREF='/ie.css' TYPE='text/css' MEDIA=screen>");
}


if (parent.location.href == self.location.href ||
    !parent.correct_frame) {
  parent.location.href = 'http://www.4x4extremesports.com/index.php?' + window.location.href;
}


function loadFrames(frame1,page1,frame2,page2) {
  eval("parent."+frame1+".location='"+page1+"'");
  eval("parent."+frame2+".location='"+page2+"'");
}

//
// Picture display pop-up window
//
function CaricaFoto(img, desc){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img, desc);
}
function Controlla(img, desc){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img, desc);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img, desc){
  largh=foto1.width+20;
  altez=foto1.height+70;

  stringa="width="+largh+",height="+altez;

  text="<html><head><title>Preview</title>";

  text+="<style>.text {color=white; font: 12px; font-family: Arial,Helvetica,sans-serif; line-height: 20px}</style>";
  text+="</head><body bgcolor='black'>";
  text+="<img src='" + img + "'>";

  text+="<table border=0 height=50 width="+foto1.width+"><tr><td valign=top width="+(foto1.width-75)+"><font class=text face='Arial,Helvetica,sans-serif' color='white' size='-1'>"+desc+"</font></td>  <td valign=bottom><font face='Arial,Helvetica,sans-serif' color='white' size='-2'><a href='javascript:window.close()'>close window</a></font></td></tr></table>";

  text+="</body></html>";

  finestra=window.open("","",stringa);
  finestra.document.open();
  finestra.document.write(text);
  finestra.document.close();
}


//
// Code to draw the navigation bar at the bottom of the pages
//

// Draw the nav bar
function drawBar() {
  document.write('<div style="position:relative;top:10px;left:18px;height:50px;width:498px;z-index:1;">');
  document.write('<table style="background:#DADADA;padding:3px 10px 3px 10px;" width=520 border=0><tr>');
  document.write('<td width=100%></td><td>');
  counter=0;
  while (counter < CurPage) {
    document.write('<a href="' + PageList[counter] + '" target=basefrm><img src="back.gif" width="24" height="24" border="0" alt="' + DescList[counter] + '"></a>');
    counter++;
  }

  document.write('<a href="' + PageList[counter] + '" target=basefrm><img src="document.gif" width="24" height="24" border="0" alt="' + DescList[counter] + '"></a>');
  counter++;

  while (counter < PageList.length) {
    document.write('<a href="' + PageList[counter] + '" target=basefrm><img src="forward.gif" width="24" height="24" border="0" alt="' + DescList[counter] + '"></a>');
    counter++;
  };
  document.write('</td></tr></table>');
  document.write('</div>');
}
//  End -->
