<!-- This script adjusts website width to fit various screen resolutions.
//
// Script Name:  screenadjust.js
//
// Copyright @2009 - 2010 FXtra, Inc.
// 
// This SOFTWARE SCRIPT and its associated components are owned by FXtra, Inc.
// and are protected by United States Copyright Laws and international treaty
// provisions.  Therefore, you must comply with such laws and treaties in your
// use of this SOFTWARE SCRIPT.  You MAY NOT duplicate, publish, sublicense,
// distribute or modify this SOFTWARE SCRIPT or any accompanying documentation.
// Use of this SOFTWARE SCRIPT is provided by authorization through special
// limited license(s) from FXtra, Inc. only.  It is not available to the
// public domain, nor is it permissible to use this script without the
// explicit consent by license from FXtra. Inc.
//
// Please direct inquiries to:
// FXtra, Inc.
// Marketing & Sales Dept.
// 7981 Marlborough Avenue
// Suite B
// Parma, OH  44129
//
// E-MAIL:  sales@fxtra.com
// PHONE:  (440) 842-6986
//
// * LICENSE TYPE:  This SOFTWARE SCRIPT is provided through a special limited site
// license.
// * LICENSE:  #f00000302b
// * LICENSEE:  EXCELL Consulting - David Kostalnick
// * AUTHORIZED FOR DOMAIN:  www.excellcomputing.com ONLY.
// * RESTRICTED TO DOMAIN DIRECTORY:  www.excellcomputing.com/_codebase.
// * CHILD SITE/SUB WEB AUTHORIZATION:  Callable as installed by FXtra, Inc.
// * OTHER AUTHORIZATIONS:  Domain support and backup or archival purposes only.
// * DURATION:  Life of the above authorized domain.
// * WARRANTY:  This SOFTWARE SCRIPT has been tested and certified by FXtra, Inc.
// to meet or exceed performance of its original specifications and scope of its
// intended purposes.  Licensee assumes all risks associated with use of this
// SOFTWARE SCRIPT by virtue of installation on any computer hardware device.  
// FXtra, Inc. provide or implies any liability or remedy for damages incurred
// through use of this SOFTWARE SCRIPT.  In no event shall FXtra, Inc. or its
// suppliers be liable for any damages whatsoever (including, without limitation,
// direct damages, consequential damages and other pecuniary loss) arising out of
// the use or inability to use this FXtra, Inc. SOFTWARE SCRIPT product, even if
// FXtra, Inc. has be advised of the possibility of such damages.
// This SOFTWARE SCRIPT license warranty statement constitutes the entire
// agreements between the licensee and FXtra, Inc. regarding this SOFTWARE
// SCRIPT, its accompanying components and materials.  If any provision is found
// to be invalid by a court competent jurisdiction, the balance of the
// provisions shall remain in full force  and effect.  THIS AGREEMENT IS
// GOVERNED BY THE LAWS OF THE STATE OF OHIO, U.S.A., BUT NOT INCLUDING THE
// 1980 U.N. CONVENTION ON CONTRACTS FOR INTERNATIONAL SALES OF GOODS.
// * SPECIAL NOTE:  Any updates to this software script by FXtra, Inc. will be
// available free of charge to valid licensees.  To request information on
// availability of any updates, please contact tech@fxtra.com.
//
// To purchase a site license for this script, please contact sales@fxtra.com.
//
// Set ScreenTableWidth initial size to Null
var ScreenTableWidth = "Null";

// Set DisplayText initial text to Null
var DisplayText = "Null";

// Detect Visitor's Screen Width
var ScreenWidth = screen.width;

// Set showAlert to "yes" if you wish an alert box to appear
// for testing purposes; otherwise, set it to "no"

var showAlert  = "no";

// Set Up Alert Message
var conMessage = "TEST MODE: Screen Size =" + ScreenWidth + " ---> Attempting to optimize website.";
var AlertMessage = conMessage;

if (ScreenWidth <= 640){
  if (showAlert == "yes"){
    alert(AlertMessage);
  }
  DisplayText = 'Our website cannot be properly adjusted - <b><font color="#FF0000">consider increasing your screen resolution to 1024 pixels</font></b>';
  ScreenTableWidth = '100%';
}

else if (ScreenWidth <= 800){
  if (showAlert == "yes"){
    alert(AlertMessage);
  }
  DisplayText = 'Our website cannot be properly adjusted - <b><font color="#FF0000">consider increasing your screen resolution to 1024 pixels</font></b>';
  ScreenTableWidth = '100%';
}

else if (ScreenWidth <= 960){
  if (showAlert == "yes"){
    alert(AlertMessage);
  }
  DisplayText = 'Our website has been properly adjusted to <b><font color="#FF0000">938 pixels</font></b>';
  ScreenTableWidth = '938';
}

else if (ScreenWidth <= 1024){
  if (showAlert == "yes"){
    alert(AlertMessage);
  }
  DisplayText = 'Our website has been properly adjusted to <b><font color="#FF0000">1002 pixels</font></b>';
  ScreenTableWidth = '1002';
}

else if (ScreenWidth <= 1152){
  if (showAlert == "yes"){
    alert(AlertMessage);
  }
  DisplayText = 'Our website has been properly adjusted to <b><font color="#FF0000">1130 pixels</font></b>';
  ScreenTableWidth = '1130';
}

// Perform if screen width is larger than 1152
else {
  if (showAlert == "yes"){
    alert(AlertMessage);
  }
  DisplayText = 'Our website has been properly adjusted to the maximum allowable at <b><font color="#FF0000">1130 pixels</font></b>';
  ScreenTableWidth = '1130';
}

//-->
