document.writeln('<SCRIPT LANGUAGE="JavaScript" SRC="imgdata.js"></SCRIPT>');

var searchstr = window.document.location.search;
var ix        = searchstr.substr(1, searchstr.length);
var USEIX     = -1;

function MyImage(src, width, height, border)
{
   this.src = src;
   this.width = width;
   this.height = height;
   this.border = border;
}

function getImgTag(index)
{
   var imgTag = ""; // return value

   var img = getImg(index);

   if (img)
   {
      imgTag = "<IMG";
      imgTag += " SRC='"+img+"'";
      imgTag += getImgWidthForTag(index);
      imgTag += getImgHeightForTag(index);
      imgTag += getImgBorderForTag(index);
      imgTag += ">";
   }

   return imgTag;
}

function getImg(index)
{
   var img = ""; // return value

   if (myimages && 
       (index >= -1 && index < myimages.length))
   {
      if (index == USEIX)
      {
         img = myimages[ix].src;
      }
      else
      {
         img = myimages[index].src;
      }
   }

   return img;
}

function getImgWidthForTag(index)
{
   var widthTag = ""; // return value
   var width = 0;

   if (myimages && 
       (index >= -1 && index < myimages.length))
   {
      if (index == USEIX)
      {
         width = myimages[ix].width;
      }
      else
      {
         width = myimages[index].width;
      }
   }

   if (width > 0)
   {
      widthTag = " WIDTH="+width;
   }

   return widthTag;
}

function getImgHeightForTag(index)
{
   var heightTag = ""; // return value
   var height = 0;

   if (myimages && 
       (index >= -1 && index < myimages.length))
   {
      if (index == USEIX)
      {
         height = myimages[ix].height;
      }
      else
      {
         height = myimages[index].height;
      }
   }

   if (height > 0)
   {
      heightTag = " HEIGHT="+height;
   }

   return heightTag;
}

function getImgBorderForTag(index)
{
   var borderTag = ""; // return value
   var border = 0;

   if (myimages && 
       (index >= -1 && index < myimages.length))
   {
      if (index == USEIX)
      {
         border = myimages[ix].border;
      }
      else
      {
         border = myimages[index].border;
      }
   }

   if (border >= 0)
   {
      borderTag = " BORDER="+border;
   }

   return borderTag;
}

//

function getTitle(index)
{
   var title = ""; // return value

   if (titles &&
       (index >= -1 && index < titles.length))
   {
      if (index == USEIX)
      {
         title = titles[ix];
      }
      else
      {
         title = titles[index];
      }
   }

   return title;
}

// BEGIN disable right mouseclick

// Original:  Martin Webb (martin@irt.org)
// This script and many more are available free online at
// The JavaScript Source!! http://javascript.internet.com
//
function right(e)
{
   if (navigator.appName == 'Netscape' && 
       (e.which == 3 || e.which == 2))
   {
      alert("Please don't copy...");
      return false;
   }
   else if (navigator.appName == 'Microsoft Internet Explorer' && 
            (event.button == 2 || event.button == 3))
   {
      alert("Please don't copy...");
      return false;
   }
   return true;
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

// END disable right mouseclick

