//----------------------------------------------------------------------------
// 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)
  	{
  	  profile_on = new Image();
  	  profile_on.src = "/images/profile-actor2.gif";
  	  resume_on = new Image();
  	  resume_on.src = "/images/profile-resume2.gif";	  
  	  blog_on = new Image();
  	  blog_on.src = "/images/profile-blog2.gif";
   	  interests_on = new Image();
  	  interests_on.src = "/images/profile-interests2.gif";	
  	  photos_on = new Image();
  	  photos_on.src = "/images/profile-photos2.gif";
  	  video_on = new Image();
  	  video_on.src = "/images/profile-video2.gif";
  	  email_on = new Image();
  	  email_on.src = "/images/profile-email2.gif";		  	  

  	  profile_off = new Image();
  	  profile_off.src = "/images/profile-actor1.gif";
  	  resume_off = new Image();
  	  resume_off.src = "/images/profile-resume1.gif";	  
  	  blog_off = new Image();
  	  blog_off.src = "/images/profile-blog1.gif";
  	  interests_off = new Image();
 	  interests_off.src = "/images/profile-interests1.gif";	
  	  photos_off = new Image();
  	  photos_off.src = "/images/profile-photos1.gif";
  	  video_off = new Image();
  	  video_off.src = "/images/profile-video1.gif";
  	  email_off = new Image();
  	  email_off.src = "/images/profile-email1.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("profile", "resume", "blog", "interests", "photos", "video", "email");
	var imageOn = new Array(profile_on, resume_on,  blog_on, interests_on, photos_on, video_on, email_on);
	var imageOff = new Array(profile_off, resume_off, blog_off, interests_off, photos_off, video_off, email_off);
    var content_area = new Array("profile_content", "resume_content", "blog_content", "interests_content", "photos_content", "video_content", "email_content");
	var on = new Array(true, false, false, 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 < 6", 6 represents the number of tabs.
//----------------------------------------------------------------------------

	function switchtab(num)
	{
          if (on[num] == false)
	  {
	    for (i = 0; i < 7; 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'>");
	}
*/
