var ns = document.layers;
var ie = document.all;
var ns6 = document.getElementById;

function isLowRes()
{
  //alert("shit");
  
  if (self.screen)
  {
    if(screen.width <= 800)
    {
    	resizeImage();
    	//alert(screen.width)
    }
  }
  else
  {
    if (navigator.javaEnabled && navigator.javaEnabled())
    {
         if(java.awt.Toolkit.getDefaultToolkit().getScreenSize().width <= 800)
	 {
	     	resizeImage();
    	 }
   	}
    else
    {
    	resizeImage();
    }
  }
}

function resizeImage()
{
	var myImage = 'pic';

	if (ie)
	{
		document.images[myImage].height = '200';
	}
	else if (ns)
	{
		document.images[myImage].height = '200';
	}
	else if(ns6)
	{
		document.getElementById(myImage).height = '200';
	}
}

function openWindow(link) 
{
	winStats='toolbar=no,location=no,directories=no,menubar=no,'
	winStats+='scrollbars=no,width=450,height=425'
	if (navigator.appName.indexOf("Microsoft")>=0) 
	{
		winStats+=',left=50,top=50'
	}
	else
	{
		winStats+=',screenX=50,screenY=50'
	}
	floater=window.open(link,"picture",winStats)
   	floater.focus();
}

var loaded = false;

function imageLoad()
{
    if (document.images)
    {
	b1_off = new Image();
	b1_off.src = "../img/buttons/b1_off.gif";
	b2_off = new Image();
	b2_off.src = "../img/buttons/b2_off.gif";
	b3_off = new Image();
	b3_off.src = "../img/buttons/b3_off.gif";
	b4_off = new Image();
	b4_off.src = "../img/buttons/b4_off.gif";
	b5_off = new Image();
	b5_off.src = "../img/buttons/b5_off.gif";
        b1_on = new Image();
        b1_on.src = "../img/buttons/b1_on.gif";
        b2_on = new Image();
        b2_on.src = "../img/buttons/b2_on.gif";
        b3_on = new Image();
        b3_on.src = "../img/buttons/b3_on.gif";
        b4_on = new Image();
        b4_on.src = "../img/buttons/b4_on.gif";
        b5_on = new Image();
        b5_on.src = "../img/buttons/b5_on.gif";
        return (loaded = true);
    }
}

function rollOut(imgName)
{
	//alert(imgName)
    if (document.images)
    {
        document[imgName].src = eval(imgName + "off.src");
    }
}

function rollIn(imgName)
{
	//alert(imgName)
    if (document.images && (loaded == true))
    {
        document[imgName].src = eval(imgName + "on.src");
    }
}



