<!--
var opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
var dom = (document.getElementById)? true : false;
var nn4 = (document.layers)? true : false;
var ie = (document.all && !opera)? true : false;
var ie4 = (!dom && ie)? true : false;
var ie5=document.all&&document.getElementById;
var ns6=document.getElementById&&!document.all;

function WriteLayer(layer,code,doc)
{
        if( doc == null )
            doc = "document";
        if (nn4)
            {
            layer.document.open();
            layer.document.write( code );
            layer.document.close();
            }
        else
            if (ie4)
                {
                layer.innerHTML = code;
                }
            else
                if (dom)
                    {
                    layer.innerHTML = code;
                    }
}

function findObject( id, doc )
{
        var i;

        if( doc == null )
            doc = document;

        if( dom )
            return doc.getElementById( id );
        else
            {
            if( ie4 )
                return doc.all[ id ];
            }

        for( i=0; i<doc.forms.length; i++ )
            for( j=0; j<doc.forms[i].elements.length; j++ )
                if( id == doc.forms[i].elements[j].name )
                    return doc.forms[i].elements[j];

        for( i=0; i<doc.images.length; i++ )
            if( id == doc.images[i].name )
                return doc.images[i];

        if( doc.layers == null )
            return null;

        for( i=0; i<doc.layers.length; i++ )
            {
            if( id == doc.layers[i].name )
                return doc.layers[i];
            var x = findObject( id, doc.layers[i].document );
            if( x != null )
                return x;
            } 
        return null;
}

function GetWindowWidth()
{
  return ns6 ? window.innerWidth-20 : document.body.clientWidth;
}

function GetWindowHeight()
{
  return ns6 ? window.innerHeight-20 : document.body.clientHeight;
}

function FormatMoney(AValue)
{
  if(AValue==0)
    return "-";
  else
  {
    var Value = Math.floor(AValue), Result = "", Fraction, s;
    Fraction = AValue-Value;
    while(Value!=0)
    {
      s = String(Value%1000);
      while(s.length<3)
        s = "0"+s;
      Result = "," + s + Result;
      Value = Math.floor(Value/1000);
    }
    Result = Result.substr(1);
    Fraction = String(Math.round(Fraction*100));
    while(Fraction.length<2)
      Fraction += "0";
    while(Result.substr(0, 1)=="0")
      Result = Result.substr(1);
    return "$"+Result+"."+Fraction;
  }
}

function showLargerImage(Title, ImageLink, Width, Height)
{
  var w, h, l, t, s; s = '';
  if (!Width)  Width=530;
  if (!Height) Height=380;

  Width = Width+Width*0.1
  Height = Height+Height*0.1;

  if(Width<screen.width-20)
    w = Width;
  else
  {
    s = ',scrollbars=yes';
    w = screen.width-20;
  }
  l = Math.round((screen.width-w)/2)-5;
  if(Height<screen.height-40)
    h = Height;
  else
  {
    s = ',scrollbars=yes';
    h = screen.height-40;
  }
  t = Math.round((screen.height-h)/2)-15;
  w=window.open('/misc/showLargerImage.asp?ImageLink=' + ImageLink + '&Title=' + Title,'LargerImage','width='+w+',height='+h+',left='+l+',top='+t+',status=0,toolbar=0,menubar=0,location=0,directories=0'+s);
  w.focus();
  return false;
}
// -->
