//----------------------------------------------------------------------------
// IMAGE PRELOAD
//
// This area preloads the "highlighted" images.
// Without this, the menu will not change instantaneously the first time
// a tab is selected. The "on" image will have to load.
//----------------------------------------------------------------------------

	// preload off images too

  	if (document.images)
  	{
  	  casting_on = new Image();
  	  casting_on.src = "http://www.actingland.com/images/tab_casting_on.gif";
  	  guides_on = new Image();
  	  guides_on.src = "http://www.actingland.com/images/tab_guides_on.gif";
  	  resources_on = new Image();
  	  resources_on.src = "http://www.actingland.com/images/tab_resources_on.gif";
  	  services_on = new Image();
  	  services_on.src = "http://www.actingland.com/images/tab_services_on.gif";
  	  video_on = new Image();
  	  video_on.src = "http://www.actingland.com/images/tab_video_on.gif";	  

  	  casting_off = new Image();
  	  casting_off.src = "http://www.actingland.com/images/tab_casting.gif";
  	  guides_off = new Image();
  	  guides_off.src = "http://www.actingland.com/images/tab_guides.gif";
  	  resources_off = new Image();
  	  resources_off.src = "http://www.actingland.com/images/tab_resources.gif";
  	  services_off = new Image();
  	  services_off.src = "http://www.actingland.com/images/tab_services.gif";
  	  video_off = new Image();
  	  video_off.src = "http://www.actingland.com/images/tab_video.gif";	  
	}


//----------------------------------------------------------------------------
// VARIABLE NOTES
// 
// var image - Enter tab names into var image as below
// browser_version - this is just useful to have, but not necessary
// browser_type - same goes for this, just stores information about the browser.
//----------------------------------------------------------------------------


	var tabs = new Array("casting", "guides", "resources", "services", "video");
	var imageOn = new Array(casting_on, guides_on, resources_on, services_on, video_on);
	var imageOff = new Array(casting_off, guides_off, resources_off, services_off, video_off);
        var content_area = new Array("casting_content", "guides_content", "resources_content", "services_content", "video_content");
	var on = new Array(true, false, false, false, false);

	browser_version= parseInt(navigator.appVersion);
	browser_type = navigator.appName;


//----------------------------------------------------------------------------
// SWITCHTAB FUNCTION
//
// The for loop simply resets all the tabs and corresponding tables so that
// they're all "off". Once it exits the for loop, the script turns on the
// selected tab and its table.
//
// Where you see "i < 5", 5 represents the number of tabs.
//----------------------------------------------------------------------------

	function switchtab(num)
	{
          if (on[num] == false)
	  {
	    for (i = 0; i < 5; i++)
	    {

	      document.getElementById([content_area[i]]).style.display = "none";
	      document.getElementById([tabs[i]]).src = imageOff[i].src;
	      on[i] = false;

	    }

	    document.getElementById([content_area[num]]).style.display = "block";
	    document.getElementById([tabs[num]]).src = imageOn[num].src;
	    on[num] = true;
	  }
	}

/*
 	This area is not necessary, but I left it in just in case you need it.
	This uses the browser_type and browser_version variables, and will load
	a different CSS stylesheet for IE and Mozilla. Right now, it is commented
	out with / * and * /. If you want to use this, just remove those and
	this text. Note that in this code, the different stylesheets are called
	"ie.css" and "moz.css".

	if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4)) {
	document.write("<link rel='stylesheet' href='ie.css' type='text/css'>");
	} 

	else if (browser_type == "Netscape" && (browser_version >= 4)) {
	document.write("<link rel='stylesheet' href='moz.css' type='text/css'>");
	}
*/
