//  Document Name:  jscript.js
//  Author:  Vincent Jong
//  Company:  J & J Graphics
//  Date Created:  August 17, 2002
//  Date Last Modified:  August 23, 2002
//  Description:
//    This document is the javascript source code for setting browser status bar caption,
//    setting the document to be in its own window (no frame), checking browser version and
//    redirecting the user to the latest version if browser used is IE, NN, or Mozilla, and
//    to disable the right-click context menu.  IE and NN browsers version 3.0 or greater support
//    this javascript code as does Mozilla version 1.0 but the minimum browser requirements for IE
//    and NN is set for version 4.0 or greater.

//check if document is on top
//alert (navigator.appName + "\n" + navigator.appVersion + "\n" + navigator.appVersion.length + "\n" + navigator.language);
var alrtmsg = "Permission to Frame Denied! \nProperty of J & J Graphics! \nUse or reproduction of images, media, \nand designs without permission is prohibited.";
if (self != window.top)
{
  alert(alrtmsg);
  top.location = self.location;
}
//set status bar message
window.status = "Image isn't everthing, but the right one is......";

/*
//check browser version
var navName = navigator.appName;
var navVer = navigator.appVersion.charAt(0);
var navMsg = "Your browser is too old.  You will be redirected to the appropriate\nwebsite in order to download the latest version of " + navName;
var navMsg2 = "Your browswer may not fully support some functionality used by this website.\nSome pages may not rendor or behave correctly\n";
var recMsg = "Fully supported browsers include:\nInternet Explorer version 4.0 or greater\nNetscape Navigator version 4.0 or greater\nMozilla version 1.0 or greater";
if (navName == "Microsoft Internet Explorer")  //opera uses this for appName
{
  if (navVer < 4)
  {
    //old browser
    alert (navMsg);
    document.location="http://www.microsoft.com/windows/ie/downloads/default.asp"
  }
}
else if (navName == "Netscape")
{  
  if (navVer < 4)
  {
    //old browser
    alert (navMsg);
    document.location="http://browsers.netscape.com/browsers/main.tmpl";
  }
}
else if (navName == "Mozilla")  //right now they use netscape as appName but maybe that will change
{  
  if (navVer < 1)  //I know this works as the pages were tested on Mozilla 1.0
  {
    //old browser
    alert (navMsg);
    document.location="http://www.mozilla.org";
  }
}
else if (navName == "Opera")
{
  //alert (navMsg2 + recMsg);
  if (navVer < 6)
  {
    alert (navMsg);
    document.location="http://www.opera.com";
  }
}
else //using some other browser
{
  alert (navMsg2 + recMsg);
}

//mouse click capture - need to add code for opera users
var message="Property of J & J Graphics! \nUse or reproduction of images, media, \nand designs without permission is prohibited.";
function click(e)
{
  if (navName == "Netscape")
  {
    if (e.which != 1)
    {
      alert (message);
      return false;
    }
  }
  else
  {
    if (event.button != 1)
    {
      alert (message);
      return false;
    }
  }
}
if (navName == "Netscape")
{
  document.captureEvents(Event.MOUSEDOWN);
  if (navVer > 4)
  {
    document.oncontextmenu=click;
  }
  else
  {
    document.onmousedown=click;
  }  
}
else  //IE
{
  document.onmousedown=click;
}
*/
