<!--
var browser = navigator.appName;
var ie = "Microsoft Internet Explorer";
var netscape = "Netscape";
os = navigator.platform;
mac = "MacPPC";

/***********************************************************************
The following code declares variables for the on() and off() functions
***********************************************************************/
var browserOK = false;
var pics;
var NameString;
var objCount = 0;
NameString = navigator.appname + navigator.appCodeName + navigator.appVersion;
if (NameString.indexOf("Explorer") == -1)
{
	if (NameString.indexOf("2.0") == -1)
    {
		browserOK = true;
	    pics = new Array();
    }
}
/********************************************************************
preload:
This function will preload all of your rollover images into cache
Required parameters:
name - this is the name of your image
first - this is the location of the off image
second - this is the location of the on image
*********************************************************************/
function preload(name, first, second)
{
	if (browserOK)
    {
		pics[objCount] = new Array(3);
	    pics[objCount][0] = new Image();
	    pics[objCount][0].src = first;
	    pics[objCount][1] = new Image();
	    pics[objCount][1].src = second;
	    pics[objCount][2] = name;
	    objCount++;
    }
}

/********************************************************************
on:
This functions swaps the off image with the on image
Required parameters:
on - this is the name of the rollover image
*********************************************************************/
function on(name)
{
	if (browserOK)
    {
		for (i = 0; i < objCount; i++)
        {
			if (document.images[pics[i][2]] != null)
	        {
				if (name != pics[i][2])
		        {
					document.images[pics[i][2]].src = pics[i][0].src;
		        }
		        else
		       {
			   	document.images[pics[i][2]].src = pics[i][1].src;
		       }
	        }
    	}
     }
}


/********************************************************************
off:
This functions swaps the on image with the off image
Required parameters:
There are no required parameters for this function
*********************************************************************/
function off()
{
	if (browserOK)
    {
		for (i = 0; i < objCount; i++)
        {
			if (document.images[pics[i][2]] != null) document.images[pics[i][2]].src = pics[i][0].src;
      	}
    }
}

// preload all of your images here
preload("nav_home", "images/nav_home_off.gif", "images/nav_home_on.gif");
preload("nav_about", "images/nav_about_off.gif", "images/nav_about_on.gif");
preload("nav_industry", "images/nav_industry_off.gif", "images/nav_industry_on.gif");
preload("nav_contact", "images/nav_contact_off.gif", "images/nav_contact_on.gif");
preload("nav_request", "images/nav_request_off.gif", "images/nav_request_on.gif");
preload("nav_specials", "images/nav_specials_off.gif", "images/nav_specials_on.gif");
preload("nav_onhold", "images/nav_onhold_off.gif", "images/nav_onhold_on.gif");
preload("browse_dining", "images/browse_dining_off.gif", "images/browse_dining_on.gif");
preload("browse_occ", "images/browse_occ_off.gif", "images/browse_occ_on.gif");
preload("browse_desks", "images/browse_desks_off.gif", "images/browse_desks_on.gif");
preload("view_entire", "images/view_entire_off.gif", "images/view_entire_on.gif");
preload("view_swatch", "images/view_swatch_off.gif", "images/view_swatch_on.gif");
preload("view_details", "images/view_details_off.gif", "images/view_details_on.gif");
preload("close_window", "images/close_window_off.gif", "images/close_window_on.gif");
preload("specials", "images/view_specials_off.gif", "images/view_specials_on.gif");
preload("newitems", "images/view_newitems_off.gif", "images/view_newitems_on.gif");
preload("pricelist", "images/view_pricelist_off.gif", "images/view_pricelist_on.gif");


/***********************************************************************
SetStatusbar:
This function sets the status bar message to the specified message
Parameters are as follows:
msg - this is the message you want displayed
***********************************************************************/
function SetStatusBar(msg)
{
	window.status=msg;
	return true;
}


/**********************************************************************
addFav:
This function adds this site to the users favorites list.  It also
checks to see if you are using netscape.  If you are, it pops up a message
telling you to hit CTRL-D to bookmark the site in netscape
**********************************************************************/
function addFav()
{
	if ((browser == "Netscape Navigator") && (version < 5))		
	{
			alert("Please use CTRL+D on your keyboard to bookmark this site in Netscape");
	}
	else
	{
		window.external.AddFavorite('http://www.Choice-Tickets.com','Vegas Choice Tickets')
	}
}

function GetImageX(ImageName)
{
	var rv = 0;
	var Img = document.images[ImageName];
	if (document.layers)
	{			//netscape
		rv = Img.x;
	}
	else {			// IE
		while (Img.offsetParent){
			rv += Img.offsetLeft;
			Img = Img.offsetParent;
		}
	}
		
	return rv;
}

function GetImageY(ImageName)
{
	var rv = 0;
	var Img = document.images[ImageName];
	if (document.layers)
	{	//netscape
		rv = Img.y;
	}
	else
	{	//ie
		rv = Img.offsetTop;
	}
		
	return rv;
}

/***********************************************************************
popWin:
This function pops up a new window with the specified url.
Parameter are as follows:
url - this is the url that you want the user to be directed to
name - this is the name of the popup window
features - this is the width,height,scrollbars,etc...
***********************************************************************/
function popWin(url,name,features)
{
 	var the_win;
	the_win = window.open(url,name,features);
  	the_win.focus();
}

function SetStatusbar(msg){
	window.status=msg;
	return true;
}

//-->

