function restore()
{ 
  var i,x,a=document.sa; 
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
     x.src=x.oSrc;
}

function find(n, d) 
{ 
  var p,i,x;  
  if(!d) 
   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=find(n,d.layers[i].document);
  if(!x && d.getElementById) 
    x=d.getElementById(n); 
  return x;
}

function swap() 
{ 
  var i,j=0,x,a=swap.arguments; 
  document.sa=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=find(a[i]))!=null)
   {
     document.sa[j++]=x; 
     if(!x.oSrc) 
       x.oSrc=x.src; 
     x.src=a[i+2];
   }
}

var win = null;
function popWin(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

// usage:
// onclick="popWin('url','name','400','400','yes');return false"


function left()
{
document.write('<p><br><br><br></p>');
document.write('<img src="button_header.gif"><br>');
document.write('<br><br>');
document.write('<a href="http://www.foofooflops.com/" onMouseOut="restore()" onMouseOver="swap( &#39;button_1&#39;, &#39; &#39;, &#39;button_home_shift.gif&#39;,1)">');
document.write('        <img name="button_1" src="button_home.gif" width="135" height="36" border="0" alt=""></a><br>');
document.write('<br><br>');
document.write('<a href="http://www.foofooflops.com/styles.html" onMouseOut="restore()" onMouseOver="swap( &#39;button_2&#39;, &#39; &#39;, &#39;button_styles_shift.gif&#39;,1)">');
document.write('        <img name="button_2" src="button_styles.gif" width="135" height="36" border="0" alt=""></a><br>');
document.write('<br><br>');
document.write('<a href="http://www.foofooflops.com/about.html" onMouseOut="restore()" onMouseOver="swap( &#39;button_3&#39;, &#39; &#39;, &#39;button_about_shift.gif&#39;,1)">');
document.write('        <img name="button_3" src="button_about.gif" width="135" height="36" border="0" alt=""></a><br>');
document.write('<br><br>');
document.write('<a href="http://www.foofooflops.com/order.html" onMouseOut="restore()" onMouseOver="swap( &#39;button_4&#39;, &#39; &#39;, &#39;button_order_shift.gif&#39;,1)">');
document.write('        <img name="button_4" src="button_order.gif" width="135" height="36" border="0" alt=""></a><br>');
document.write('<br><br>');
document.write('<a href="http://www.foofooflops.com/email.html" onMouseOut="restore()" onMouseOver="swap( &#39;button_5&#39;, &#39; &#39;, &#39;button_email_shift.gif&#39;,1)">');
document.write('        <img name="button_5" src="button_email.gif" width="135" height="36" border="0" alt=""></a><br>');
document.write('<p><br><br><br></p>');
document.write('<p><br><br><br></p>');
document.write('<p><br><br><br></p>');
document.write('<p><br><br><br></p>');
document.write('<p><br><br><br></p>');
document.write('<p><br><br><br></p>');
}
