var scFlag = false; var scrollcount = 0; var Strict_Compat = false; var ToolBar_Supported = false; var Frame_Supported = false; var doImage = doImage; var TType = TType; if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.appVersion.substring(0,1) > 3) { ToolBar_Supported = true; if (document.compatMode == "CSS1Compat") Strict_Compat = true; } if (ToolBar_Supported) { var newLineChar = String.fromCharCode(10); var char34 = String.fromCharCode(34); var LastMSMenu = ""; var LastICPMenu = ""; var CurICPMenu = ""; var IsMSMenu = false; var IsMenuDropDown = true; var HTMLStr; var TBLStr; var x = 0; var y = 0; var x2 = 0; var y2 = 0; var x3 = 0; var MSMenuWidth; var ToolbarMinWidth; var ToolbarMenu; var ToolbarBGColor; var ToolbarLoaded = false; var aDefMSColor = new Array(3); var aDefICPColor = new Array(3); var aCurMSColor = new Array(3); var aCurICPColor = new Array(3); var MSFont; var ICPFont; var MSFTFont; var ICPFTFont; var MaxMenu = 30; var TotalMenu = 0; var arrMenuInfo = new Array(30); var bFstICPTBMenu = true; var bFstICPFTMenu = true; // Output style sheet and toolbar ID document.write(""); // Build toolbar template HTMLStr = "
"; HTMLStr += "
"; HTMLStr += "
"; HTMLStr += "
"; HTMLStr += "
"; HTMLStr += "
"; HTMLStr += "
"; HTMLStr += "
"; HTMLStr += "" + "
"; // Define event handlers window.onresize = resizeToolbar; window.onscroll = scrollbaroptions; // Intialize global variables ToolbarBGColor = "#FFCC33"; // toolbar background color if (Strict_Compat) { MSFont = "bold x-small Arial"; ICPFont = "bold x-small Verdana"; } else { MSFont = "xx-small Verdana"; ICPFont = "bold xx-small Verdana"; } aDefMSColor[0] = aCurMSColor[0] = "#000000"; // bgcolor; aDefMSColor[1] = aCurMSColor[1] = "white"; // text font color aDefMSColor[2] = aCurMSColor[2] = "#FFCC00"; // mouseover font color aDefICPColor[0] = aCurICPColor[0] = "#000000"; // bgcolor; aDefICPColor[1] = aCurICPColor[1] = "white"; // text font color aDefICPColor[2] = aCurICPColor[2] = "#FFCC00"; // mouseover font color } function drawToolbar() { HTMLStr += "
"; document.write(HTMLStr); ToolbarLoaded = true; MSMenuWidth = Math.max(idICPMenuPane.offsetWidth, (200+112)); ToolbarMinWidth = (250+18) + MSMenuWidth; idToolbar.style.backgroundColor = ToolbarBGColor; // idMSMenuPane.style.backgroundColor = aDefMSColor[0]; idICPMenuPane.style.backgroundColor = aDefICPColor[0]; resizeToolbar(); for (i = 0; i < TotalMenu; i++) { thisMenu = document.all(arrMenuInfo[i].IDStr); if (thisMenu != null) { if (arrMenuInfo[i].IDStr == LastMSMenu && arrMenuInfo[i].type == "R") { //Last MSMenu has to be absolute width arrMenuInfo[i].type = "A"; arrMenuInfo[i].unit = 200; } if (arrMenuInfo[i].type == "A") thisMenu.style.width = arrMenuInfo[i].unit + 'px'; else thisMenu.style.width = Math.round(arrMenuInfo[i].width * arrMenuInfo[i].unit) + 'em'; } } } function resizeToolbar() { scFlag = false; scrollcount = 0; if (ToolBar_Supported == false) return; w = Math.max(ToolbarMinWidth, document.body.clientWidth) - ToolbarMinWidth; if (document.all("idMSMenuSpacer")) { // idMSMenuCurve.style.left = (250+w) + 'px'; // idMSMenuPane.style.left = (250+w+18) + 'px'; // idMSMenuPane.style.width = MSMenuWidth + 'px'; // idADSBanner.style.left = (w+18) + 'px'; // idMSCBanner.style.left = (w+18+200) + 'px'; // idMSCBanner.style.width = (MSMenuWidth - 200) + 'px'; idICPMenuPane.style.width = '770px' //ToolbarMinWidth + w + 'px'; } } function setSubMenuWidth(MenuIDStr, WidthType, WidthUnit) { var fFound = false; if (TotalMenu == MaxMenu) { alert("Unable to process menu. Maximum of " + MaxMenu + " reached."); return; } for (i = 0; i < TotalMenu; i++) if (arrMenuInfo[i].IDStr == MenuIDStr) { fFound = true; break; } if (!fFound) { arrMenuInfo[i] = new menuInfo(MenuIDStr); TotalMenu += 1; } if (!fFound && WidthType.toUpperCase().indexOf("DEFAULT") != -1) { arrMenuInfo[i].type = "A"; arrMenuInfo[i].unit = 160; } else { arrMenuInfo[i].type = (WidthType.toUpperCase().indexOf("ABSOLUTE") != -1)? "A" : "R"; arrMenuInfo[i].unit = WidthUnit; } } // This function creates a menuInfo object instance. function menuInfo(MenuIDStr) { this.IDStr = MenuIDStr; this.type = ""; this.unit = 0; this.width = 0; this.count = 0; } function updateSubMenuWidth(MenuIDStr) { for (i = 0; i < TotalMenu; i++) if (arrMenuInfo[i].IDStr == MenuIDStr) { if (arrMenuInfo[i].width < MenuIDStr.length) arrMenuInfo[i].width = MenuIDStr.length; arrMenuInfo[i].count = arrMenuInfo[i].count + 1; break; } } function addICPMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr) { if (addICPMenu.arguments.length > 4) TargetStr = addICPMenu.arguments[4]; else TargetStr = "_top"; tempID = "ICP_" + MenuIDStr; addMenu(tempID, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, true); bFstICPTBMenu=false; } function addMenu(MenuIDStr, MenuDisplayStr, MenuHelpStr, MenuURLStr, TargetStr, bICPMenu) { cFont = bICPMenu? ICPFont : MSFont; cColor0 = bICPMenu? aDefICPColor[0] : aDefMSColor[0]; cColor1 = bICPMenu? aDefICPColor[1] : aDefMSColor[1]; cColor2 = bICPMenu? aDefICPColor[2] : aDefMSColor[2]; tagStr = bICPMenu? "" : ""; MenuStr = newLineChar; if ((bICPMenu == false && LastMSMenu != "") || (bICPMenu == true && bFstICPTBMenu==false)) MenuStr += ""; MenuStr += "" + " " + MenuDisplayStr + " "; MenuStr += tagStr; HTMLStr = HTMLStr.replace(tagStr, MenuStr); setSubMenuWidth(MenuIDStr,"default",0); } function addICPSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr) { if (addICPSubMenu.arguments.length > 3) TargetStr = addICPSubMenu.arguments[3]; else TargetStr = "_top"; tempID = "ICP_" + MenuIDStr; addSubMenu(tempID,SubMenuStr,SubMenuURLStr,TargetStr,true); } function addSubMenu(MenuIDStr, SubMenuStr, SubMenuURLStr, TargetStr, bICPMenu) { cFont = bICPMenu? ICPFont : MSFont; cColor0 = bICPMenu? aDefICPColor[0] : aDefMSColor[0]; cColor1 = bICPMenu? aDefICPColor[1] : aDefMSColor[1]; cColor2 = bICPMenu? aDefICPColor[2] : aDefMSColor[2]; var MenuPos = MenuIDStr.toUpperCase().indexOf("MENU"); if (MenuPos == -1) { MenuPos = MenuIDStr.length; } InstrumentStr = MenuIDStr.substring(0 , MenuPos) + "|" + SubMenuStr; URLStr = formatURL(SubMenuURLStr, InstrumentStr); var LookUpTag = ""; var sPos = HTMLStr.indexOf(LookUpTag); if (sPos <= 0) { HTMLStr += newLineChar + newLineChar + ""; HTMLStr += "
"; } if (SubMenuStr.toLowerCase() == '
'){ TempStr = newLineChar + SubMenuStr + LookUpTag; }else{ TempStr = newLineChar + "" + " " + SubMenuStr + "
" + LookUpTag; } if (sPos <= 0) HTMLStr += TempStr + "
"; else HTMLStr = HTMLStr.replace(LookUpTag, TempStr); updateSubMenuWidth(MenuIDStr); } function mouseMenu(id, MenuIDStr) { IsMSMenu = (MenuIDStr.toUpperCase().indexOf("MS_") != -1); IsMouseout = (id.toUpperCase().indexOf("OUT") != -1); if (IsMouseout) { color = IsMSMenu? aDefMSColor[1] : aDefICPColor[1]; if (MenuIDStr == CurICPMenu && aCurICPColor[1] != "") color = aCurICPColor[1]; } else { color = IsMSMenu? aDefMSColor[2] : aDefICPColor[2]; if (MenuIDStr == CurICPMenu && aCurICPColor[2] != "") color = aCurICPColor[2]; } window.event.srcElement.style.color = color; } function doMenu(MenuIDStr) { var thisMenu = document.all(MenuIDStr); if (ToolbarMenu == null || thisMenu == null || thisMenu == ToolbarMenu) { window.event.cancelBubble = true; return false; } // Reset dropdown menu window.event.cancelBubble = true; ToolbarMenu.style.display = "none"; ToolbarMenu = thisMenu; IsMSMenu = (MenuIDStr.toUpperCase().indexOf("MS_") != -1); // Set dropdown menu display position x = window.event.srcElement.offsetLeft + window.event.srcElement.offsetParent.offsetLeft; if (MenuIDStr == LastMSMenu) x += (window.event.srcElement.offsetWidth - thisMenu.style.posWidth); x2 = x + window.event.srcElement.offsetWidth; y = (IsMSMenu)? (idRow1.offsetHeight) : (idRow1.offsetHeight + idRow2.offsetHeight); thisMenu.style.top = y; thisMenu.style.left = x; thisMenu.style.clip = "rect(0 0 0 0)"; thisMenu.style.display = "block"; thisMenu.style.zIndex = 102; // delay 2 millsecond to allow the value of ToolbarMenu.offsetHeight be set window.setTimeout("showMenu()", 2); return true; } function showMenu() { if (ToolbarMenu != null) { IsMenuDropDown = (Frame_Supported && IsMSMenu == false)? false : true; if (IsMenuDropDown == false) { y = (y - ToolbarMenu.offsetHeight - idRow2.offsetHeight); if (y < 0) y = 0; ToolbarMenu.style.top = y; } y2 = y + ToolbarMenu.offsetHeight; ToolbarMenu.style.clip = "rect(auto auto auto auto)"; x2 = x + ToolbarMenu.offsetWidth; } } function hideMenu() { if (ToolbarMenu != null && ToolbarMenu != StartMenu) { // Don't hide the menu if the mouse move between the menu and submenus cY = event.clientY + document.body.scrollTop; cX = event.clientX; if (document.body.offsetWidth > x && scFlag) { cX = x + 9; } if ( (cX >= (x+5) && cX<=x2) && ((IsMenuDropDown == true && cY > (y-10) && cY <= y2) || (IsMenuDropDown == false && cY >= y && cY <= (y2+10)) )) { window.event.cancelBubble = true; return; } ToolbarMenu.style.display = "none"; ToolbarMenu = StartMenu; window.event.cancelBubble = true; } } function formatURL(URLStr, InstrumentStr) { return URLStr; } function scrollbaroptions() { scrollcount ++; if (scrollcount < 3) { scFlag = true; }else{ scrollcount = 0; scFlag = false; } } if (ToolBar_Supported != null && ToolBar_Supported == true) { // USAGE: // addICPMenu("MENU ID", "MENU ITEM NAME", "ALT TEXT","URL"); // addICPSubMenu("PARENT MENU NAME","MENU ITEM NAME","URL"); addICPMenu("HomeMenu", "Home", "eSix Home","/"); addICPMenu("SchoolMenu", "School", "School Home","/school_home.asp"); addICPSubMenu("SchoolMenu","Band","/screen_catalog.asp?cat=17"); addICPSubMenu("SchoolMenu","Baseball","/screen_catalog.asp?cat=2"); addICPSubMenu("SchoolMenu","Basketball","/screen_catalog.asp?cat=3"); // addICPSubMenu("SchoolMenu","College","/screen_catalog.asp?cat=7"); addICPSubMenu("SchoolMenu","Football","/screen_catalog.asp?cat=4"); // addICPSubMenu("SchoolMenu","Highschool","/screen_catalog.asp?cat=6"); addICPSubMenu("SchoolMenu","Phys Ed","/screen_catalog.asp?cat=5"); addICPSubMenu("SchoolMenu","Soccer","/screen_catalog.asp?cat=20"); addICPSubMenu("SchoolMenu","Softball","/screen_catalog.asp?cat=18"); addICPSubMenu("SchoolMenu","Tennis","/screen_catalog.asp?cat=21"); addICPSubMenu("SchoolMenu","Track","/screen_catalog.asp?cat=19"); addICPSubMenu("SchoolMenu","Volleyball","/screen_catalog.asp?cat=1"); addICPMenu("UTACollegeMenu", "UT Arlington", "UT Arlington Store","/uta_home.asp"); addICPSubMenu("UTACollegeMenu","T-Shirts","/uta_home.asp?cat=8&type=9"); addICPSubMenu("UTACollegeMenu","Polo Shirts","/uta_home.asp?cat=8&type=10"); // addICPSubMenu("UTACollegeMenu","
",""); addICPSubMenu("UTACollegeMenu","Sweatshirts","/uta_home.asp?cat=8&type=11"); addICPSubMenu("UTACollegeMenu","Hats","/uta_home.asp?cat=8&type=5"); addICPSubMenu("UTACollegeMenu","Other","/uta_home.asp?cat=8&type=12"); // addICPSubMenu("UTACollegeMenu","Ad Specialty","/uta_home.asp?cat=8&type=2"); // addICPSubMenu("UTACollegeMenu","Student Government","/screen_catalog.asp?cat=14"); addICPMenu("AdSpecialties","Ad Specialties","Click here to view our ad specialty catalog","http://esix.logomall.com/homepage/default.aspx?DPSV_Id=43651"); // addICPMenu("eSixStoreMenu","eSix Store", "eSix Store",""); // addICPSubMenu("eSixStoreMenu","eSix","/store_catalog.asp?cat=15"); // addICPSubMenu("eSixStoreMenu","Faith Outfitters","/store_catalog.asp?cat=16"); addICPMenu("ContactMenu","Contact", "Contact Us","/contact.asp"); addICPMenu("OrderMenu","Order Form", "Download Order Form","/Order Form.pdf"); }