var tabURL = new Array();
// ***************************
// Tab Bar Settings
// ***************************
// if below is true, the tab bar will be horizontal... vertical if false
var tabHorizontal = true;

// set the amount of space you want between each tab (horizontal or vertical)
var tabSpacing = 2;

// Add custom background CSS below: color or image
// e.g. "background: #000000 url(myImage.jpg); height:40px; width:650px;";
var tabBarWrapper = "background: #000000 url(); height:40px;";

// Change the overall tab bar alignment below, use: left, center or right.
var tabBarAlign = "center";

// Change the tab bar alignment more precisely within the tab bar wrapper
var tabBarAlign2 = "top:5px; left:0px;";

/* *************************************************************
Enter the tab & image URLs (in order) for your site below:
You can include any GuildPortal site or any other website.

tabURL.push ([
 "Tab URL"
,"Selected Tab Image URL"
,"UnSelected Tab Image URL"
,"MouseOver Tab Image URL"
]);
 ************************************************************** */
// Box Office
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=613051"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/BoxOffice.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/BoxOffice.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/BoxOffice.jpg"
]);

// Lobby
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=613052"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/Lobby.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/Lobby.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/Lobby.jpg"
]);

// Cast & Crew
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=613055"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/Cast.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/Cast.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/Cast.jpg"
]);

// Fan Mail
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=613058"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/FanMail.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/FanMail.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/FanMail.jpg"
]);

// Tour Dates
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=613054"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/TourDates.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/TourDates.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/TourDates.jpg"
]);

// Events
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=806275"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/Events.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/Events.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/Events.jpg"
]);

// The Fuse™
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=965672"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/TheFuse.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/TheFuse.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/TheFuse.jpg"
]);

// Sponsors
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=620596"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/Sponsors.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/Sponsors.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/Sponsors.jpg"
]);

// A-List
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=631114"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/A-list.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/A-list.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/A-list.jpg"
]);

// Links
tabURL.push ([
 "http://www.guildportal.com/Guild.aspx?GuildID=70851&TabID=815216"
,"_self"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Active%20Image/Links.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/Default%20Image/Links.jpg"
,"http://i186.photobucket.com/albums/x50/HGS-BoxOffice/MouseOver/Links.jpg"
]);

// ***************************
// Don't change anything below
// ***************************
makeTabs();
function makeTabs () {
if (String(top.name).substring(0,4) == "Edit") {return;}
var currentTyp = '';
var currentURL = window.location.href;
var currentTab = gup('TabID',currentURL);
var currentGID = gup('GuildID',currentURL);

var tabHTML = '<style>.TabBkgd {' + tabBarWrapper + '}.TabBar2 {position: relative;';
 tabHTML += tabBarAlign2 +'}.TabBar2 td {';
 if (tabHorizontal) {
  tabHTML += 'padding: 0px '+ tabSpacing + 'px;';
 } else {
  tabHTML += 'padding: '+ tabSpacing + 'px 0px;';
 }
 tabHTML += 'margin:0px;border:0px;}.TabBar2 img {border:0px;}</style>';
 tabHTML += '<div class="TabBkgd"><table class="TabBar2" cellpadding="0"';
 tabHTML += ' cellspacing="0" border="0" align="'+ tabBarAlign +'" valign="middle">';
 if (tabHorizontal) tabHTML += '<tr>';

for (j = 0; j < tabURL.length; j++) {
 if(currentURL == tabURL[j][0] || currentTab == gup('TabID',tabURL[j][0])&& currentGID == gup('GuildID',tabURL[j][0]) ) {
  currentTyp = tabURL[j][2];
 } else {
  currentTyp = tabURL[j][3];
 }
 if (!tabHorizontal) tabHTML += '<tr>';
 tabHTML += '<td><a class="tabStyle" href="' + tabURL[j][0] + '" ';
 tabHTML += 'target="' + tabURL[j][1] + '" ';
 tabHTML += 'onmouseover="tab' + j + '.src=\'' + tabURL[j][4] + '\'" ';
 tabHTML += 'onmouseout="tab' + j + '.src=\'' + currentTyp + '\'">';
 tabHTML += '<img id="tab' + j + '" src="' + currentTyp;
 tabHTML += '"></a></td>';
 if (!tabHorizontal) tabHTML += '</tr>';
}
if (tabHorizontal) tabHTML += '</tr>';
tabHTML += '</table></div>';
document.write (tabHTML);
}
// Original code from Netlobo.com (http://www.netlobo.com/url_query_string_javascript.html)
function gup(name, myString) {
 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
 var regexS = "[\\?&]"+name+"=([^&#]*)";
 var regex = new RegExp( regexS );
 var results = regex.exec( myString );
 if( results == null )
  return "";
 else
  return results[1];
}