﻿<!-- CREATIVE PRODUCTS Partners JavaScripts
// Copyright © 2000-2009 CREATIVE PRODUCTS, LLC. All rights reserved.

// Disables right click with mouse
var RightClickMessage="Copyright © 2000-2009 CREATIVE PRODUCTS, LLC. All rights reserved."; // Put message for alert box between quotes
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS) {
  document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
}
function mischandler() {
  if(EnableRightClick==1) {
    return true;
  }
  else {
    return false;
  }
}
function mousehandler(e) {
  if(EnableRightClick==1) {
    return true;
  }
  var myevent = (isNS) ? e : event;
  var eventbutton = (isNS) ? myevent.which : myevent.button;
  if((eventbutton==2)||(eventbutton==3)) {
    alert(RightClickMessage);
    return false;
  }
}
function keyhandler(e) {
  var myevent = (isNS) ? e : window.event;
  if (myevent.keyCode==96) {
    EnableRightClick = 1;
  }
  return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;

// Launches a pop-up window
function popUp(pageToLoad,winName,width,height,scrollbars,center) {
/* Arguments:
     pageToLoad - The URL of a page to load in the browser window.
                  This can be a relative URL or fully qualified.
     winName - Name of the new window
     width - The horizontal size of the new window
     height - The vertical size of the new window
     scrollbars - Toggle scrollbars on or off.
                  1=on, 0=off.
     center - Toggle centering on 4.0 browsers.
              1=centered window, 0=no centering.
   Values in the "args" section below can all be toggled in the
   same fashion as the center toggle. Modify the appropriate
   value in the args section to be either 0 or 1.
   A call to this function might look like this:
   <A href="javascript:popUp('name.html','name',375,250,0,1)">New Window</A>
*/
  xposition = 0;
  yposition = 0;
  if ((parseInt(navigator.appVersion) >= 4 ) && (center)) {
    xposition = (screen.width - width) / 2;
    yposition = (screen.height - height) / 2;
  }
  args = "width=" + width + ","
    + "height=" + height + ","
    + "resizable=1,"
    + "scrollbars=" + scrollbars + ","
    + "menubar=0,"
    + "toolbar=0,"
    + "status=0,"
    + "directories=0,"
    + "hotkeys=0,"
    + "location=0,"
    + "screenx=" + xposition + ","  // NN Only
    + "screeny=" + yposition + ","  // NN Only
    + "left=" + xposition + ","     // IE Only
    + "top=" + yposition;           // IE Only
  newWin = window.open(pageToLoad,winName,args);
  newWin.focus();
}

// Adds URL to Favorites
function bookmark(url,description) {
  // This text will be shown to the user if the browser is Opera
  operaMsg = "Opera users can create a bookmark by pressing Ctrl+T. When filing the bookmark, change the address to " + url;
  // This text will be shown to the user if the browser is AOL
  aolMsg = "AOL users can add to Favorites by pressing Ctrl++ (hold down Ctrl, Shift, and plus sign keys together). After adding, edit the Favorite to change the Internet address to " + url;
  // This text will be shown to the user if the browser is Firefox
  firefoxMsg = "Firefox users can create a bookmark by pressing Ctrl+D. After adding the bookmark, change the location to " + url;
  // This text will be shown to the user if the browser is Netscape
  netscapeMsg = "Netscape users can create a bookmark by pressing Ctrl+Shift+D. When filing the bookmark, change the location to " + url;
  if ((navigator.userAgent).indexOf("Opera") != -1) {
    alert(operaMsg);
  }
  else if ((navigator.userAgent).indexOf("AOL") != -1) {
    alert(aolMsg);
  }
  else if ((navigator.userAgent).indexOf("Firefox") != -1) {
    alert(firefoxMsg);
  }
  else if (navigator.appName == "Netscape") {
    alert(netscapeMsg);
  }
  else if ((navigator.appName).indexOf("Microsoft") != -1) {
    window.external.AddFavorite(url,description);
  }
}
// -->