// // Begin Global Variable Declarations // var cwcMenuItemsAcross = new Array var cwcMenuItemsDown = new Array var cwcMenuItemsAcrossCount var cwcMenuItemsDownCount var bkgThemeImg var okToCloseUserOptions var okToCloseNavPanel var True = true var False = false // reserve space for login cell cwcMenuItemsAcrossCount = 1 cwcMenuItemsDownCount = 1 bkgThemeImg = "/images/themes/simplecross/menubutton.gif" okToCloseUserOptions = false okToCloseNavPanel = true okToOpenNavPanel = false // // Begin function delration // // ********************* General Cookie handling ********************* // Cookie Functions - Second Helping (21-Jan-96) // Written by: Bill Dortch, hIdaho Design // The following functions are released to the public domain. function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var expDays = 30; var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000)); var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = exp var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function DeleteCookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); // This cookie is history var cval = GetCookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } // ********************* END General Cookie handling ********************* function logWindow() { window.open ("/usertools/login","loginWindow","width=350,height=400,location=false"); } function logout() { window.open ("/usertools/logout","logoutWindow","width=350,height=400,location=false"); } function regWindow() { window.open ("/usertools/registeruser","regWindow","width=350,height=400,location=false"); } function showUserOptions() { if ((document.getElementById("userOptions").style.visibility != "visible") && (okToCloseUserOptions == false)) { document.getElementById("userOptions").style.visibility = "visible" okToCloseNavPanel = false setTimeout("okToCloseUserOptions=true", 1000) } } function hideUserOptions() { if ((document.getElementById("userOptions").style.visibility == "visible") && (okToCloseUserOptions == true)) { document.getElementById("userOptions").style.visibility = "hidden" okToCloseUserOptions = false okToCloseNavPanel = true } } function showLI() { // Login Options document.write ('Login || Register') } function showLO() { // Logoff Options document.write ('
>><<
') } function grow() { document.getElementById("cwcMenuFrameTop").style.clip = "rect(auto, 775, auto, auto)" if (okToOpenNavPanel == true) { document.getElementById("cwcMenuFrameLeft").style.clip = "rect(auto, auto, 475, auto)" document.images["menuLogo"].src = "/images/smlogo.gif" hideUserOptions() } } function shrink() { if (okToCloseNavPanel == true) { document.getElementById("cwcMenuFrameTop").style.clip = "rect(auto, 165px, 51px, auto)" document.getElementById("cwcMenuFrameLeft").style.clip = "rect(auto, 175px, 40px, auto)" document.images["menuLogo"].src = "/images/navigator.gif" hideUserOptions() } } function addMenuItem(menuItemLocation, menuItemUrl, menuItemImg, menuItemText) { // menuItemLocation is {across | down} if (menuItemLocation == "across") { cwcMenuItemsAcrossCount++; cwcMenuItemsAcross[cwcMenuItemsAcrossCount] = new Array cwcMenuItemsAcross[cwcMenuItemsAcrossCount]["url"] = menuItemUrl cwcMenuItemsAcross[cwcMenuItemsAcrossCount]["img"] = menuItemImg cwcMenuItemsAcross[cwcMenuItemsAcrossCount]["txt"] = menuItemText } if (menuItemLocation == "down") { cwcMenuItemsDownCount++; cwcMenuItemsDown[cwcMenuItemsDownCount] = new Array cwcMenuItemsDown[cwcMenuItemsDownCount]["url"] = menuItemUrl cwcMenuItemsDown[cwcMenuItemsDownCount]["img"] = menuItemImg cwcMenuItemsDown[cwcMenuItemsDownCount]["txt"] = menuItemText } } function DrawMenu() { across = 0 down = 0 for (across=1; across <= cwcMenuItemsAcrossCount; across++) { if (across == 1) { // top left corner (0,0) document.write ('
') document.write ('
') } else { document.write ('') } } document.write('
' + cwcMenuItemsAcross[across]['txt'] + '
') for (down=1; down <= cwcMenuItemsDownCount; down++) { if (down == 1) { // 2nd on left from top (0,1) document.write ('
') document.write ('') } else { document.write ('') } } document.write('
') showLI(); document.write ('
' + cwcMenuItemsDown[down]['txt'] + '
') var URL = "http://www.cwcag.com/"; if (location.href.indexOf ("babelfish.altavista.com")==-1){ document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write("Babel Fish Translation") } document.write('
') // User Options Window document.write('') shrink() document.write ('
') } // End Function Declaration // Begin Document writes addMenuItem("down","","/images/btn_damascusRoad.GIF","") addMenuItem("down","/foundations/","/images/foundations.gif","") addMenuItem("down","teamspeak://cwcag.dyndns.org/?password=crossroads&nickname=","http://sales.tritoncia.com/images/link_to_teamspeak.gif",'
Download') addMenuItem("across","/events.php","/images/themes/calendar.gif","") addMenuItem("across","/business_directory.php","/images/themes/business_directory.gif","") addMenuItem("across","/chat.php","/images/themes/chat_room.gif","") addMenuItem("down","/forum/","/images/themes/forum.png","") addMenuItem("down","/blog/","/images/themes/blog.png","") addMenuItem("down","/guestbook.html",'/images/guestbook19.gif" height=50',"") DrawMenu() // Body Text follows in page ==> continue to menuend.js