var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++){ var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [ { string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" }, { string: navigator.vendor, subString: "Apple", identity: "Safari" }, { prop: window.opera, identity: "Opera" }, { string: navigator.vendor, subString: "iCab", identity: "iCab" }, { string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.vendor, subString: "Camino", identity: "Camino" }, { string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, {  string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" } ], dataOS : [ { string: navigator.platform, subString: "Win", identity: "Windows" }, { string: navigator.platform, subString: "Mac", identity: "Mac" }, { string: navigator.platform, subString: "Linux", identity: "Linux" } ]  }; BrowserDetect.init(); /****************************************************************************************   Copyright (c) 2007 LOCKERDOME Corporation. All rights reserved.  The javascript contained herein is the property of LOCKERDOME  Corporation, Saint Louis, MO. It may not be used outside the LOCKERDOME  application without written consent.  *****************************************************************************************/  var winWidth = document.documentElement.clientWidth +25; var winHeight = document.documentElement.clientHeight; var largefade = 70; var largeincr = 70; var accountTypes = new Array("Team", "Player", "Coach", "Scout", "Parent", "Fan"); var botmargin = 132; var mainurl = ""; var signin= false; var sitename = ""; var sitetitle = ''; var pageTracker = ""; var processrequest = true; var recentsignin = false; var privatelockerlink = false; var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); var toolbarview = false; var isopen = false; var guestActions = new Array(); var resizeoffset = 4; var cSubsection = "default"; var setPageAction = true; var currentPageAction = ""; var theIframe = null; var theIframeWin = null; var upost = ""; var storepost = true; var storetemppost = false; var openaction = false; var tpost = ''; var usubsection = ""; var theTop = 100; var minMidHeight = 150; var midHeight = winHeight - botmargin; var hashit = true; var setalllinks = false; var midHeight = (midHeight > minMidHeight) ? midHeight : minMidHeight; var filterLoc = theTop + midHeight; var topincr = 0; var defWidth = (winWidth < 800) ? 800 : winWidth; var suser = "none"; var processcontenttabs = ""; var ulocation = ""; var udomain = ""; var currentPage = ""; var lockerdomain = "http://lockerdome.com/users/"; var settinglink = "http://lockerdome.com/settings/sttngsndpsswrd"; var udomain = ""; var processtablist = ""; var curtype = ""; var startglazer = true; var headerwrite = ""; var initglaze = false; var introglaze = ""; var midright = defWidth - 20;  var midrr = 201; var midrl = midright - (midrr + 20); var IE = document.all?true:false; var currentUrl = ""; var upldDir = "http://s3.amazonaws.com/lduploads/"; var ldboxWidth = 100; var currentLink = ""; var skiplink = false; var currentSubcommand = ""; var previousLink = ""; var currentSection = ""; var previousSection = ""; var currentSubsection = ""; var expectedmain = ""; var previousSubsection = ""; var current = 8; var defaultIcon = "showplayer"; var signupstep ="generalinfo"; var tabprocessor = true; var ajaxprocessor = true; var user = -1; var state = 0; var prcommand = true; var searchtext = ""; var thecurrentUrl = ""; var objcontent = ""; var otmarginright = 150; var firecounter = 1; var defOffset = 20; var expectedHash = ""; var pageloaded = false; var dothefade = true; var firstpage = true;   var returnString = ""; var docContent = ""; defWidth = defWidth - 20; var currentSelection = ""; var theincr = (IE) ? 200 : 500; var selectedcol = "";  var tableorder = "asc"; var account = ""; var picture = "none"; var unameu ="none"; var cuuser = "none"; var usport ="none"; var cexcel = ""; var uusernameu = "none"; var cusname = "none"; var updateLink = true; var sec = 0; var showload = true; var showprocessing = false; var bytesize = 0; var startoff = 0; var img_ar = new Array(); var usrImg = new Image();  var spacerImg = new Image();  var tmpimg = new Image();  spacerImg.src = "/UI/images/largespacer.jpg"; var clearRateImg = new Image();  clearRateImg.src = "/UI/images/grey-white_star.gif"; var coloredRateImg = new Image();  coloredRateImg.src = "/UI/images/grey-red_star.gif"; var halfColoredRateImg = new Image(); halfColoredRateImg.src = "/UI/images/grey-halfstar.gif"; var showlarge = true; var imgDir = "http://s3.amazonaws.com/ldimages/"; var opentables = false; var tableobjs = new Array(); var currenteditor = ""; var regComplete = false; var keylocation = ""; var changeincr = 28; var sidescrolling = false; var scrollbar = false; var scrollerheight = midHeight - 30; var contentHeight = 0; var trailingscroll = 0; var trailingwindow =0; var trailratio = 0; var topborder = 0; var botborder; var bborder = 0;  var scrollerloaded = false; var xincr = 0; var yincr = 0; var isregistering = false; var pagecreate = ""; var utypeu = "none"; var signedin = false; var movingbrace = false; var yloc = 0; var xloc = 0; var movey = 5; var movex = 5; var attop = true; var atbot = false; atleft = true; atright =false; var midWidth = (midright); var botscrolling = false; var newpage = false; var curSelection = ""; var curCommand = ""; var moveObject = false; var moveobj = ""; var overobj = false; var thecurobj = ""; var midpoint = ""; var ccol = ""; var overobjh = "";  var curselect = ""; var typeedit = false; var ooto = ""; var pooto = ""; var theobjw = ""; var oobo = ""; var poobo = "";var theobjh = ""; var objset = false; var overobjmid = ""; var isovert = false; var isoverb = false; var overleft = true; var thecurleft = true; var thepreviousedit = ""; var tempcurl = 0; var previouswrite = false; var theeditedword = ""; var exceltab = ""; var innerAccount = false; var mclose = false; var autoheight = false; var signmeup = false; var registerme = false; var curcomm = ""; var reguser = ""; var reguserid = ""; var currentCol = ""; var currentPRow = null; var currentRow = null; var currentDoc = ""; var previouseditedword = "";  var previouseditedCol = ""; var currentObject = ""; var currentWord = ""; var currentExt = ""; var redirectSection = ""; redirectSub = ""; redirectPost = ""; var refreshtab = true; var addexcel = ""; var curInfo=""; var curs = ""; var curMod; var country = "United_States"; var ruser = ""; var uruser = ""; var bodyinfo = ""; var midbodyinfo = ""; var newcommand = true; var curStat = ""; var storetoptab = "";  var moreload = false; var currentParent = ""; var eDiv = ""; var curmidcont = ""; var selectedEvent = ""; var setHash = ""; var currentstatus = true; var curStatEvent = ""; var glazecolor = "#777"; var mainpage = false; var designtype = ''; var designbar = ''; var designdescription = ''; var midbackground = ''; var toptextcolor = ''; var mainlocation = ''; var forceload = false;function getTopincr(){  if(IE) topincr = document.body.scrollTop - 30; else topincr = window.pageYOffset - 30;  if(topincr > 30) return topincr; else return 0; }  function setscroll(instance){ theIframeWin = instance.getWin(); theIframe = theIframeWin.frameElement; theIframe.setAttribute("allowTransparency","false");     theIframe.style.background = '#ccc';     theIframe.style.overflowY = 'scroll';  }  function setSearch(){ keylocation = "search"; }  function cleanName(name){ if(!name.match(/@/g)){ name = name.replace(/_/g, ' '); } return name; } function getAge(str){ darray = str.split('-'); byr = darray[0]/1;  bmo = darray[1]/1;  bday = darray[2]/1; now = new Date(); tday = now.getDate(); tmo = (now.getMonth()); tyr = (now.getFullYear()); if((tmo > bmo)||(tmo==bmo & tday>=bday)) age = byr; else age = byr+1;  return (tyr-age); }  function setIntroGlaze(sbsctn){ if(sbsctn == "register" || sbsctn == "signin" || sbsctn == "userrequest"){ initglaze = true; introglaze = sbsctn; } }  function setNameLink(uid, type){ cuid = uid; if(type == "full_ansu") cuid = uid.substring(1, uid.length -1);  user = setUser(uid, type); name = user["name"]; name = cleanName(name);  if(uid.match(/@/g) || isSameUser(cuid, '||') && currentLink != "MEMBERS"){ ptxt = '<div style = "float:left; color:#222" >'+name+'</div>'; } else{ sprt = user['sport']; usrn = user['user_name'];  acc = user['account']; nm = user['name']; ptxt = '<div style = "float:left;" class = "hoverlinks" onclick = "locLinker(\''+uusernameu+'\', \''+sprt+'\', \''+usrn+'\', \''+acc+'\', \''+nm+'\')"><a href = "#" onclick="event.returnValue = false; return false;">'+name+'</a></div>'; } return ptxt; }  function setLocation(curlocation){ if(IE){ document.getElementById('midbox').src = "hashsetup.php?prm="+curlocation; expectedHash = curlocation; expectedmain = curlocation; } else{ window.location.hash = curlocation; expectedHash = window.location.hash.replace(/%20/, ' '); } }  function getCookie(c_name){ if (document.cookie.length>0){ c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1){  c_start=c_start + c_name.length+1;  c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); }  } return ""; }  function performPageCommand(type){ obj = document.getElementById('commandlistform'); switch(type){ case "Download PDF":  cprm = "printpage.php?type="+currentSubsection+"&prm="+currentLink+'&post='+upost+'&sbsctn='+usubsection; obj.action = cprm;   obj.submit(); break; case "Subscribe_to_feed": myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/boardsubscribe'); break; case "Subscribe_to_Rss_feed": myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/blogsubscribe'); break; case "Change_Season": myTimer.queuePush('seasonreq_400/250/Change'); break; case "Add_Season": myTimer.queuePush('seasonreq_400/250/Add'); break; case "Search": stoptheload(); objval = document.getElementById('u_search').value; if(objval.match(/[a-zA-Z0-9]/)){ objval = objval.replace(/\s/g, '_'); myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/'+currentSubsection+'/search_'+currentSubsection+',_'+objval); } break; case "Add_Player": case "Add_Coach": case "Add_Scout": curtype = type.replace(/Add_/g, ''); myTimer.queuePush('callAjax_HOME/'+currentSection+'/setrosternetwork/'+curtype); break; case "Recent": case "Most_Viewed": case "Most_Commented": case "Top_Rated": if(myUserList.page != type){ msection = currentSubsection.replace(/_.*/, ''); msection += '_'+currentSection; myUserList.page = type; myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setmediapage/'+msection+',_'+type); } break; }  }  function showEmailBox(){ ctxt = ""; ctxt += '<div style = "float:left; margin-right:5px;">'; ctxt +='<input id = "c_name" type = "text"  style = "width:140px;" value = "NAME" onclick = "myLocker.resetContent(this, \'NAME\')" />'; ctxt += '</div>'; ctxt += '<div style = "float:left; margin-right:5px;">'; ctxt +='<input id = "c_email" type = "text" style = "width:140px;" value = "EMAIL" onclick = "myLocker.resetContent(this, \'EMAIL\')" />'; ctxt += '</div>'; return ctxt; };  function addToRoster(loc){ cname = document.getElementById("c_name").value; cemail = document.getElementById('c_email').value; proceed = true; if(!validate.validEmail(cemail) || cemail == "EMAIL") proceed = false; if(!validate.validString(cname) || cname == "NAME") proceed = false; if(proceed){ ccomm = (account != "League") ? 'addU'+loc.toLowerCase() : 'addUL'+loc.toLowerCase(); myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+ccomm+'_email/'+cemail+',_'+cname+',_'+loc+'/'+ccomm); } else alert("Cannot complete the request.  The format for name and email are incorrect."); };  function displayAddToRoster(){  loc = (exceltab == "Coaches") ? "Coach" : exceltab.substr(0, exceltab.length-1); comm = "Add "+loc; cobj = document.getElementById('roster_command'); cobj2 = document.getElementById('roster_actions'); switch(cobj.innerHTML){ case "submit": addToRoster(loc); cobj.innerHTML = comm; cobj2.innerHTML = ""; break; default: cobj.innerHTML = "submit"; cobj2.innerHTML = showEmailBox(); } }  function getRosterCommands(){ loc = (exceltab == "Coaches") ? "Coach" : exceltab.substr(0, exceltab.length-1); comm = "Add "+loc; xtxt = ""; xtxt +='<div style = "float:left; margin-right: 15px;">'; xtxt +='<div id = "roster_actions" style = "float:left; padding:2px; font-size:10px"></div>'; xtxt += '<div id = "roster_command" style = "float:left; padding:2px; cursor:pointer; font-size:10px; color:#0000aa; text-decoration:underline;" onclick = "displayAddToRoster()">'+comm+'</div>'; xtxt += '</div>'; return xtxt; }  function setPageCommands(typelist, extra){ extra = (extra == null) ? "" : extra; cobj = document.getElementById('title_commands'); tlen = typelist.length; txt = ''; if(tlen > 0 && typelist[0] != ''){ txt =  '<form id = "commandlistform" action = "" onsubmit="event.returnValue = false; return false;" '; txt +=' method="post" style = " float:left; margin:0px; padding:0px; clear:both;" target="target_search">'; txt += '<iframe id="target_search" name="target_search" src="" style = "display:none; width:0px; height:0px;" ></iframe>'; txt +='<div style = "clear:both; padding-top:10px;">'; txt += extra; for(cl = 0 ; cl < tlen; cl++){ if(typelist[cl] != ""){ switch(typelist[cl]){ case "Search": txt += '<div style = "float:left; margin-left:40px; ">'; txt +='<input id = "u_search" name = "u_search" type = "text" style = "float:left; width:200px; " onclick = "setSearch()"/>'; txt += '</div>'; txt += '<input type = "submit" style = "font-size:10px; float:left; margin-left:10px;" value = "Search" onclick = "performPageCommand(\''+typelist[cl]+'\')"/>'; break; case "Filter": txt +='<div style = "float:left; margin-left:20px;">'; txt +='<div id = "txt_filter" style = "font-size:10px; color:#000; float:left; padding-left:2px; padding-top:4px; padding-bottom:2px; padding-right:3px; border: 1px solid #fff; border-bottom:0px;" >Filter: </div>'; txt +='<div id = "obj_filter" style = "width:20px; padding-top:3px; height:15px; padding-left:5px; float:left; background-image:url(\'http://s3.amazonaws.com/ldimages/grey-filter_down.gif\'); background-repeat:no-repeat; border: 1px solid #fff; border-bottom:0px; border-left:0px; background-position:2px 3px; "  onclick = "myFilters.displayFilterMenu()" >'; txt +='</div>'; txt +='<div id = "obj_menu" style = "float:left;">'; txt +=myFilters.getFilterMenu(); txt +='</div>';  txt +='</div>'; break; case "Recent": case "Most_Viewed": case "Most_Commented": case "Top_Rated": cwrd = typelist[cl].replace(/_/g, ' '); if(typelist[cl] != myUserList.page) txt += '<div style = "float:left; padding:2px; margin-right: 15px; cursor:pointer; font-size:10px; color:#0000aa; " class = "hoverlinks" onclick = "performPageCommand(\''+typelist[cl]+'\')"><a href = "#" onclick = "event.returnValue = false; return false;">'+cwrd+'</a></div>'; else txt += '<div style = "float:left; padding:2px; margin-right: 15px; font-size:10px; color:#222; font-weight:bold;">'+cwrd+'</div>'; break; default: cwrd = typelist[cl].replace(/_/g, ' '); txt += '<div style = "float:left; padding:2px; margin-right: 15px; cursor:pointer; font-size:10px; color:#0000aa; " class = "hoverlinks" onclick = "performPageCommand(\''+typelist[cl]+'\')"><a href = "#" onclick = "event.returnValue = false; return false;">'+cwrd+'</a></div>'; } }  } txt +='</div>'; txt += '</form>'; cobj.innerHTML = txt; } }  function relocateToUrl(relocation){ window.location = "http://"+relocation; }  function setPrivate(){ ctxt = '<div style = "clear:both; padding:4px; font-size:10px; color:#009999">This section is private.  You must be part of '+cname+'\'s network to view the content.</div>'; return ctxt; }  function addTab(tab, evid, ctype, uid){ contentTabs.setMultiTabs(tab+",_"+exceltab); uEvent.currenttype = ctype; uEvent.eventname = evid; uEvent.currentuser = uid; setPage(tab); }  function setPage(ctab){ if(ctab == null) ctab = ""; if(params.exceltablist.length == 0){ processtablist = ctab; myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks'); } else{ AJAX.setMainPage(false);  } }  function setCookie(c_name,value,expiredays){ try{ exdate=new Date(); exdate.setDate(exdate.getDate()+expiredays); document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()); }catch(e){} }  function setWizContent(type, stage){ stoptheload(); cWiz.setContent(type, stage); }  function setWizMultiAccount(type, stage, account){ cWiz.cindex--; cWiz.stage --; myTimer.queuePush('callCommand_HOME/default/default'); params.commandlist = ('callAjax_HOME/'+currentSection+'/getmembers/'+account+'/setmultiaccount'); }  function deleteCookie(cookie_name){ var cookie_date = new Date();   cookie_date.setTime(cookie_date.getTime() - 1); document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString(); }  function checkCookie(){ username=getCookie('username'); if (username!=null && username!="") alert('Welcome again '+username+'!'); else { username=prompt('Please enter your name:',""); if (username!=null && username!="") setCookie('username',username,365); } }   function getMidIncr(){ obj = document.getElementById('midboxcontent'); topincr = obj.scrollTop; return topincr; }  function getGlazeIncr(){ obj = document.getElementById('glazerselection'); topincr = obj.scrollTop; return topincr; }   function URLencode(sStr) { if(sStr != null)     return (sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22'); return ""; }  function setDefaults(){ winWidth = document.documentElement.clientWidth+25; winHeight = document.documentElement.clientHeight; midHeight = winHeight - botmargin; midHeight = (midHeight > minMidHeight) ? midHeight : minMidHeight; defWidth = (winWidth < 800) ? 800 : winWidth -25; midright = defWidth - 20; midrl = midright - (midrr + 20); midWidth = (midright-10); fcont = document.getElementById('filtercontent'); if(fcont != null) fcont.style.display = "block"; }  function getCheckedMail(eventname){ tmess = document.getElementById('themessage'); if(tmess != null){ tmess.action = "starttrash.php?prm="+currentSection+'&sect='+eventname; tmess.submit(); } else{ prm = (currentSection != "Mail") ? "Trash(P)" : "Trash"; window.parent.myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/toptabs/"+prm); } }  function setTab(col, row){ currentCol = col; currentRow = row; currentPRow = row; cr = currentPRow/1; curInfo = params.etype[cr]; curSelection = params.id[cr]; curMod = params.mod[cr]; curselect = params.etype[cr]; curs = params.ext[cr]; }  function getUserId(){ id = '('+account+'||'+unameu+'||'+usport+'||'+uusernameu+")"; id.replace(/\s/g, '_'); return id; }  function scrollUp(){ obj = document.getElementById('midboxcontent'); obj.scrollTo(0, 0); }  function scrollDown(){ midc = document.getElementById('midboxcontent'); yincr = midc.offsetHeight; scrollTo(0, yincr); }  function uploadLoad(){ midcont = document.getElementById('pagecontent'); midboxc =document.getElementById('midbox'); proceed = false; csect = cleanTab(currentSection);  switch(csect){ case "Media": case "Users": case "Photos": case "Videos": eDiv = document.createElement("div"); eDiv.innerHTML = myUserList.createImages(); inith = midcont.style.height; if(myUserList.proceed == myUserList.endpoint){ yincr = getMidIncr(); setObject(midcont, eDiv, "Media"); } break; case "Network": midcont = document.getElementById('listcontent'); eDiv = document.createElement("div"); eDiv.innerHTML = myGroups.initPrinter(); inith = midcont.style.height; if(myGroups.proceed == myGroups.endpoint){ yincr = getMidIncr(); setObject(midcont, eDiv, "Ulist");  } break; case "Blogs": case "Blog": case "Mail":  midcont = document.getElementById('mailcontent'); eDiv = document.createElement("div"); eDiv.innerHTML = myMail.returnList(); inith = midcont.style.height; if(myMail.proceed == myMail.endpoint){ yincr = getMidIncr(); setObject(midcont, eDiv, "Message");  } break; default: switch(currentSubsection){  case "Blog": case "Blogs": midcont = document.getElementById('mailcontent'); eDiv = document.createElement("div"); eDiv.innerHTML = myMail.returnList(); inith = midcont.style.height; if(myMail.proceed == myMail.endpoint){ yincr = getMidIncr(); setObject(midcont, eDiv, "Message");  } break; case "Watch_List": case "Events": case "Eyes": midcont = document.getElementById('listcontent'); eDiv = document.createElement("div"); eDiv.innerHTML = myGroups.initPrinter(); inith = midcont.style.height; if(myGroups.proceed == myGroups.endpoint){ yincr = getMidIncr(); setObject(midcont, eDiv, "Ulist");  } break; case "Board_Room": midcont = document.getElementById('boardcontent'); eDiv = document.createElement("div"); eDiv.innerHTML = myBoard.printBoardContent(); inith = midcont.style.height; if(myBoard.proceed == myBoard.endpoint){ yincr = getMidIncr(); setObject(midcont, eDiv, "Ulist");  } break; } break;  } }  function showLoadBox(){ bx=document.getElementById('ldbox'); if(bx != null){ bxs = bx.style; if(bxs.display != "block"){ bxs.left = (midWidth/2 -80)+"px"; bxs.top = (midHeight/2 )+"px"; blender.changeOpac(70, "ldbox"); bxs.display ="block"; } } }  function setMidContent(){ midcont.style.display = "block";  midcont.onload = myTimer.queuePush('initImg'); myTimer.morewaiting = currentstatus; myLarge.removeGlaze(); }  function setObject(midcont, eDiv, type){ currentstatus = myTimer.morewaiting; myTimer.morewaiting = true; midcont.appendChild(eDiv); switch(type){ case "Media": myTimer.queuePush('setMidcontent'); break; case "Message": myTimer.morewaiting = currentstatus; myLarge.removeGlaze(); if(currentSection == "Blog" || currentSection == "Blogs"){ myMail.initPreview(); } break; case "Ulist": myTimer.morewaiting = currentstatus; myLarge.removeGlaze(); break; }  }  function locLinker(usr, sport, username, acc, name){ currentLink = "LOCKER"; currentSection = "Profile(D)"; generalProcess.loggedin = true; forceload = true; callUserUrl("LOCKER", usr, sport, username, acc, name); params.commandlist = "closeMini_minibox"; }  function lockerLink(sport, username, acc, name){ locLinker(uusernameu, sport, username, acc, name); }  function getusracc(type){ switch(type){ case "pl": return "Player"; break; case "co": return "Coach"; break; case "te": return "Team"; break; case "le": return "League"; break; case "pa": return "Parent"; break; case "fa": return "Fan"; break; case "sc": return "Scout"; break; } }  function initGATracker(){ val = window.location.href; if(val.match(/lockerdome/g)){  document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));  } }  function startGATracker(curl){ val = window.location.href; if(val.match(/lockerdome/g) && pageTracker != null){  if(curl == null){ pageTracker = _gat._getTracker("UA-1933164-1"); pageTracker._setAllowAnchor(true); pageTracker._trackPageview(); } else pageTracker._trackPageview(curl); } }  function trackGAEvent(){ val = window.location.href; if(val.match(/lockerdome/g) && pageTracker != null){  category = currentLink+" "+currentSection; action = exceltab; pageTracker = _gat._getTracker("UA-1933164-1"); pageTracker._trackEvent(category, action, '', ''); pageTracker._trackPageview(); } }  function createLDMail(){ return (uusernameu+'.'+unameu+'.'+(account.substr(0,2))).toLowerCase(); }  function callUserUrl(loc, usr, sport, username, acc, name){ val = window.location.href; if(val.match(/lockerdome/g) && !val.match(/currenttesting/g)){ tempsprt = sport.replace(/\s/g, '_'); tempname = name.replace(/\s/g, '_'); sprtumail = (tempsprt+'/'+username+'.'+tempname+'.'+acc.substr(0,2)).toLowerCase(); userlink = "/users/"+sprtumail;  startGATracker(userlink); } gotoLocker(loc, usr, sport, username, acc, name); }  function gotoLocker(loc, usr, sport, username, acc, name){ myuser = (username == usr); tname = name.replace(/_/g, ' '); if (myuser){ accountManager.aswitch(name, sport, username, acc); } else{ myTimer.queuePush('callAjax_LOCKER/'+currentSection+'/viewMember_/'+name+',_'+username+',_,_'+sport+',_'+acc); } }  function getErrorMessage(type, usp, uac, ssp, sac){ msg = ""; switch(type){ case "adduser": msg = "As a "+usp+" "+uac+" you cannot join a "+ssp+" "+sac+"."; break; case "joinuser": msg = "You cannot add a "+ssp+" "+sac+" to your roster"; break; case "addtoleague": msg = "As a league of "+utypeu.toLowerCase()+"s , you cannot add a "+ssp+" "+sac+" to your roster"; break; case "sameuser": msg = "You can't accept your own request"; break; case "joinevent": msg = "As a "+usp+" "+uac+" you cannot join a "+ssp+" event"; break; } return msg; }  function isSameUser(parray, separator){ userarray = parray.split(separator); try{ if(account == userarray[0] && unameu == userarray[1]  && usport == userarray[2]   && uusernameu == userarray[3]) return true; }catch(e){} return false; }  function userRequest(command, postvalue){ if(isSameUser(postvalue, ':')){ alert('You cannot perform this operation on yourself.'); } else if(exceltab == "Local" || exceltab == "Requests"){ myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/confirmRequest_'+command+'/'+postvalue+'/confirmRequest'); } else alert('All requests must be accepted from "Local" or "Requests" tabs'); }  function userCommand(eventtype, postval, psval){ psv = psval.split(','); evnt = eventtype.split('_'); postar = postval.split('_'); errmessage = ""; if(exceltab == "Local" || exceltab == "Requests"){ switch(evnt[0]){ case "useradd": showinfo = false; cursport = postar[postar.length - 1]; curaccount = postar[1]; displaysport = setSportText(usport); cursport = setSportText(cursport); samesport = (displaysport == cursport); sameaccount = (curaccount == account); showinfo = (samesport)&&(sameaccount); ps = "";  switch(evnt[1]){ case "Friend": showinfo = (psv[0] != uusernameu); ps = "sameuser"; break; case "Participant": cursport = setSportText(postar[3]); eventtype = postar[4]; showinfo = (cursport == displaysport); ps = "joinevent"; if(showinfo){ switch(eventtype){ case "Matchup": case "Tournament": showinfo = (psv[0] != uusernameu); ps = "sameuser"; break; showinfo = (psv[0] != uusernameu && psv[1] != unameu); ps = "sameuser"; default: } } break; case "Season": curaccount = postar[2]; if(account == "League" && curaccount != utypeu){ showinfo = false; ps = "addtoleague"; } else ps = "joinuser"; break; case "Network": ps ="adduser"; curaccount = postar[2]; break; default: showinfo = true; } errmessage = getErrorMessage(ps, displaysport, account.toLowerCase(), cursport, curaccount.toLowerCase()); if(showinfo) myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+postval+'/'+psval); else alert(errmessage);  break; case "userdeny": break; }  } else alert('All requests must be accepted from "Local" Mail'); }  function whois(){ guest = (uruser == suser && currentLink == "LOCKER"); me = (cuuser == suser); admin =  (ruser == suser);  if(me) return "me"; else if (admin) return "admin"; else if (guest) return "guest"; }  function resetCachedLinks(){ params.link_responce = new Array(); params.toptabs_responce = new Array(); params.midtabs_responce = new Array(); params.bottabs_responce1 = new Array(); params.bottabs_responce2 = new Array(); }  function cleanTab(tab){ theword = tab.replace(/\(D\)/g, ""); theword = theword.replace(/\(M\)/g, ""); theword = theword.replace(/\(V\)/g, ""); theword = theword.replace(/\(P\)/g, ""); theword = theword.replace(/_/g, " "); return theword; }  function setSportText(text){ cword = text.replace(/_/g, " "); cword = cword.replace(/-/g, " "); cword = cword.replace(/And/g, "&"); cword = cword.replace(/Indoor/g, "(I)"); cword = cword.replace(/Outdoor/g, "(O)"); return cword; }  function isguesttab(theword){ return (currentLink == "LOCKER" && theword.match(/\(V\)/g)); }  function defaultGuest(theword){ defaultguesttab = theword.match(/\(V\)/g); return (currentLink == "LOCKER") && defaultguesttab; }  function defaultTab(theword){ defaultguesttab = theword.match(/\(V\)/g); defaultmembertab = theword.match(/\(D\)/g); defaultsearchtab = (theword.match(/\(D\)/g)) || (theword.match(/\(M\)/g)); inlocker = ((currentLink == "HOME" && state != 0) || currentLink == "LOCKER"); switch(whois()){ case "me": case "admin": if(inlocker) return defaultmembertab; else return (defaultsearchtab); break; case "guest": if(inlocker) return (defaultguesttab || defaultmembertab); else return defaultsearchtab; break; } return defaultsearchtab; }  function showBottom(val, curtab){ switch(currentLink){ case "HOME": curtab = cleanTab(curtab); return (curtab != "Take Action"); break; case "LOCKER": return (val != "Private"); break; }  return true; }  function showTab(theword){ showguesttab = !(theword.match(/\(P\)/g)); inlocker = ((currentLink == "HOME"  && state != 0) || currentLink == "LOCKER"); switch(whois()){ case "me": case "admin": return true; break; case "guest": if(inlocker) return (showguesttab); else return true; break; } return true; }   function RGBtoHex(R,G,B) { return toHex(R)+toHex(G)+toHex(B); }  function getImg(type){ imgar = new Array(); for(i = 0; i < type.length; i++) imgar[i] = 'bg_'+type[i].toLowerCase()+'.gif'; return imgar; }  function instack(thear, comp){ len = thear.length; for(s = 0; s < len; s++) if(thear[s] == comp) return true; return false; }  function abrHelper(curarray){ newarray = new Array(); c = 0;  do{ clen = curarray.length; haselements = clen > 0; firstobj = curarray[0]; found = false; for(i = 1; i < clen; i++){ if(curarray[i] == firstobj){ newarray.push(curarray[i]); curarray.splice(i,1); found = true; } } if(!found){ newarray.push(firstobj); curarray.splice(0,1); } }while(haselements); return newarray; }  function orderAbrs(valuearray){ params.group = abrHelper(params.group); params.abbreviationid = abrHelper(params.abbreviationid); params.abbreviation = abrHelper(params.abbreviation); params.fullattribute = abrHelper(params.fullattribute); }  function stoptheload(){ bx = document.getElementById('ldbox'); if(bx != null) bx.style.display ="none"; window.parent.myTimer.flushlist(); newcommand = false; }  function say(val){ alert(val); }  function setAjaxCont(){ document.getElementById('midboxcontent').innerHTML = req.responseText; myTimer.waiting = false; }  function getFrameTopincr(obj){ themiddle = (obj == null) ? window.frames[0] : obj; if(IE && obj == null) topincr = themiddle.document.body.scrollTop; else if (IE) topincr = themiddle.document.documentElement.scrollTop; else topincr = themiddle.window.pageYOffset; return topincr; }  function getFrameLeftincr(){ themiddle = window.frames[0]; if(IE) topincr = themiddle.document.body.scrollLeft; else topincr = themiddle.window.pageXOffset; return topincr; }  function reloadsite(){ try{ if(window.opener != null) window.opener.location.reload(); }catch(e){} }  function signout(cursub){ curCommand = ""; curSelection = ""; curs = ""; exceltab = "All"; cexcel = "All"; params.cursel = ""; deleteCookie('cde_u_1x8_l'); deleteCookie('cderu_0_1xx0x'); deleteCookie('enter'); resetCachedLinks();  generalProcess.loggedin = false; state = 0; currentSection = "Main(D)"; if(cursub == null || cursub == "") myTimer.queuePush('callCommand_HOME/Main(D)/default/'); else myTimer.queuePush('callCommand_HOME/'+currentSection+'/'+cursub+'/'); params.commandlist = "resetui"; }  function initialize(){ myTimer.addtoBackground('history'); myTimer.addtoBackground('tabcontroller'); myTimer.addtoBackground('scroller'); myTimer.addtoBackground('gscroller'); myTimer.queuePush('history_start'); myTimer.init(); startList('navigate'); /*startList('navigate2');*/ }  function setBodyInfo(){ ctxt = ""; ctxt =  '<style type="text/css">'; ctxt +='html,body { overflow: hidden; } '; ctxt +='html, body { overflow: hidden; } '; ctxt += '</style>'; ctxt += '<body style = "overflow:hidden;" >'; ctxt +='<script type="text/javascript" >'; if (typeof window.addEventListener != 'undefined'){ ctxt += 'window.addEventListener("load", initialize, false); '; ctxt += 'window.addEventListener("mousemove", myMouse.setMouseXY, false); '; ctxt += 'window.addEventListener("mouseup", UI.resetParentValues, false); '; ctxt += 'window.addEventListener("keydown", setKey, false); '; ctxt += 'window.addEventListener("click", UI.removeBoxes, false); '; } else if (typeof document.addEventListener != 'undefined'){ ctxt += 'document.addEventListener("load", initialize, false); '; ctxt += 'document.addEventListener("mousemove", myMouse.setMouseXY, false); '; ctxt += 'document.addEventListener("mouseup", UI.resetParentValues, false); '; ctxt += 'document.addEventListener("keydown", setKey, false); '; ctxt += 'document.addEventListener("click", UI.removeBoxes, false); '; } else if (typeof window.attachEvent != 'undefined'){ ctxt += 'window.attachEvent("onload", initialize, false); '; ctxt += 'window.attachEvent("mousedown", myMouse.callback, false); '; ctxt += 'document.onclick = UI.removeBoxes; '; ctxt += 'document.onmousemove = myMouse.setMouseXY; '; ctxt += 'document.onmouseup = UI.resetParentValues; ' ; ctxt += 'document.onkeypress = function(e){setKey(e);}; ' ; } ctxt +='</script>'; ctxt +='<div id = "bodycontent"></div>'; ctxt += '</body>'; return ctxt; }  function printNoUserEntry(){ xtxt = ""; xtxt += '<div style = "float:left; padding:10px; ">'; xtxt += '<div style = "float:left; color:#009999; font-weight:bold; font-size:12px;">Welcome to '+(unameu.replace(/_/g, ' '))+'\'s Locker</div>'; xtxt += '</div>'; return xtxt; }  function setMouse(){ ex = ' function setMidMouseXY(e){ '; ex += ' try { '; ex +=' if (window.parent.IE) { '; ex += ' window.parent.myMouse.X = event.clientX + document.body.scrollLeft; '; ex +=' window.parent.myMouse.Y = event.clientY + document.body.scrollTop+98 - window.parent.getFrameTopincr(); '; ex +='} '; ex +=' else { '; ex +=' window.parent.myMouse.X = e.pageX; '; ex +=' window.parent.myMouse.Y = e.pageY+98- window.parent.getFrameTopincr(); '; ex +=' } '; ex +=' } '; ex +=' catch(e){}'; ex += ' } '; return ex; }  function setmidBodyInfo(){ ctxt = ""; ctxt = '<body style = "overflow-x:auto; overflow-y:scroll;" >'; /* ctxt +='<script type="text/javascript" >'; if (typeof window.addEventListener != 'undefined'){ ctxt +='window.addEventListener("load", window.parent.UI.initializeChild, false); '; } else if (typeof document.addEventListener != 'undefined'){ ctxt +='document.addEventListener("load", window.parent.UI.initializeChild, false); '; } else if (typeof window.attachEvent != 'undefined'){ ctxt +='window.attachEvent("onload", window.parent.UI.initializeChild); '; } ctxt +='</script>'; */ return ctxt; }  function setScrollerWidth(loc, startpos){}  function setYincr(val, theincr){ yincr = val; yincr = (yincr < trailingwindow) ? yincr : trailingwindow; if(theincr != null){ yloc += theincr; yloc = (yloc < 0) ? 0 : yloc; } }  function setXincr(val, theincr){ xincr = val; xincr = (xincr < trailingwindowx) ? xincr : trailingwindowx; if(theincr != null){ xloc += theincr; xloc = (xloc < 0) ? 0 : xloc; } }  function moveScroll (){ moveScroller(myMouse.Y, topborder, botborder, bborder, scrollerheight, trailratio, "y"); }  function moveScroller(mouseloc, startborder, endborder, scrlendborder, scrlwidth, ratio, incrtype){ if(mouseloc > startborder && mouseloc < endborder){ scrollerpos = mouseloc - scrlwidth/2;  scrollerpos = (scrollerpos < startborder) ? startborder : scrollerpos;   scrollerpos = (scrollerpos > scrlendborder) ? scrlendborder: scrollerpos; incrx = 0; incry = 0; switch(incrtype){ case "x": atleft = (scrollerpos == startborder); atright = (scrollerpos == scrlendborder); setXincr((scrollerpos - startborder)*ratio); obj = document.getElementById("scrollmoverb"); obj.style.position = "absolute"; obj.style.left = scrollerpos + "px"; scrollTo(xincr, getFrameTopincr()); break; case "y": attop = (scrollerpos == startborder); atbot = (scrollerpos == scrlendborder); setYincr((scrollerpos - startborder)*ratio); obj = document.getElementById("scrollmover"); obj.style.position = "absolute"; obj.style.top = scrollerpos + "px"; scrollTo(xincr, getFrameTopincr()); break; }   } }  function moveScrollX (){ moveScroller(myMouse.X, leftborder, rightborder, rborder, scrollerwidth, trailratiox, "x"); }  function startList(id) { try{ if (document.all&&document.getElementById) { navRoot = document.getElementById(id); for (i=0; i<navRoot.childNodes.length; i++) { node = navRoot.childNodes[i]; if (node.nodeName=="LI") { node.onmouseover=function() { this.className+=" over"; };  node.onmouseout=function() { this.className=this.className.replace(" over", ""); }; } } } }catch(e){} }  function setMainPicture(img){ myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setaccountimage/'+img); }  function setProfilePicture(img){ oldval = ""; post = "PH_Image,_"+uusernameu+',_'+'Image,_'+oldval+',_'+img; myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/addprofileimage/'+post+'/addimage'); }  function startImageSelector(psv){ psv = (psv == null) ? "" : psv; myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/gettheimages_'+psv); }  function deleteProfileImage(img, i){ params.type.splice(i, 1); myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deleteprofileimage/'+img+'/deletedimage'); }  function loadPicture(id, curwidth, curheight, counter){ counter = counter/1; if(counter < 10){ imgobj = img_ar[id]; obj = document.getElementById(id);  if(obj != null){ obj.style.display = "none"; if(obj != null){ obj.src = imgobj.src; ch = getMainSize("height", curwidth, curheight, imgobj); cw = getMainSize("width", curwidth, curheight, imgobj); if(isNaN(ch) || ch <= 1){ stoptheload(); myTimer.queuePush("pause_20/1"); myTimer.queuePush('loadpicture_'+id+'/'+curwidth+'/'+curheight+'/'+(counter+1)); } else{ obj.style.display = "block"; cw = (cw > curwidth) ? curwidth : cw; ch = (ch > curheight) ? curheight : ch; obj.width = cw;  obj.height = ch; } } } } }  function loadMainPicture(id, curwidth, curheight, counter){ counter = counter/1; obj = document.getElementById(id);  if(obj != null){ if(usrImg.src == upldDir || usrImg.src == upldDir+"none") usrImg.src = upldDir+"bg_face.gif"; obj.src = usrImg.src; ch = getMainSize("height", curwidth, curheight, usrImg); cw = getMainSize("width", curwidth, curheight, usrImg); if(isNaN(ch) || ch <= 1){ myTimer.queuePush("pause_40/1"); myTimer.queuePush('loadmainpicture_'+id+'/'+curwidth+'/'+curheight+'/'+counter); } else{ cw = (cw > curwidth) ? curwidth : cw; ch = (ch > curheight) ? curheight : ch; obj.width = cw; obj.height = ch; stoptheload(); myLarge.removeGlaze(); if(myMini.visible['minibox'] && !cWiz.visible){ myTimer.queuePush('closeMini_minibox'); } } } }  function printNoEntries(){ xtxt = ""; xtxt +='<div style = "width:200px;">'; xtxt += '<div style = "float:left;  padding:10px; ">'; xtxt += '<div style = "float:left; color:#000; font-size:11px;">No entries</div>'; xtxt += '</div>'; xtxt +='<div style = "clear:both"></div>'; xtxt +='</div>'; return xtxt; }  function setPrivateLink(loc){ xtxt = ""; cname = unameu.replace(/_/g, ' '); xtxt += '<div style = "float:left; padding:10px; ">'; xtxt += '<div style = "float:left; color:#000; font-weight:bold; font-size:12px;">This link is private. You must be part of '+cname+'\'s network to see the content</div>'; xtxt += '</div>'; return xtxt; }  function getMainSize(type, objw, objh, imgobj){ cwidth = imgobj.width; cheight = imgobj.height; rtval = 0; switch(type){ case "width": if(cheight > cwidth) rtval = Math.floor((objh*cwidth)/cheight); else rtval = objw; break; case "height": if(cheight > cwidth) rtval = objh; else rtval = Math.floor((objw*cheight)/cwidth); break; } return rtval; }  function setNetUser(utext, type){ user = new Object(); tarray = type.split('full_'); description = (tarray.length > 1) ? tarray[1] : tarray[0]; ullen = description.length; if(tarray.length > 1)  curinfo = utext.substr(1, utext.length - 2); else curinfo = utext; infolist = curinfo.split('||'); for(ul = 0; ul < ullen; ul++){ switch(description.charAt(ul)){ case "a": user["account"] = infolist[ul]; break; case "n": user["name"] = infolist[ul]; break; case "s": user["sport"] = infolist[ul]; break; case "u": user["user_name"] = infolist[ul]; break; } } return user; }  function setEmailUser(utext, type){ user = new Array(); user['account'] = utext;  user['name'] = utext;  user['sport'] = utext; user['user_name'] = utext; return user; }  function setUser(utext, type){ if(!utext.match(/@/g)) return setNetUser(utext, type); else return setEmailUser(utext, type); }  function convertWord(word, type){ theword = type.split('_'); switch(theword[0]){ case "input": word = word.split('_').join(' '); word = word.split('.').join('-'); word = word.split('|').join('&amp;'); break; case "output": word = word.split('-.').join('.'); word = word.split('&').join('-'); break; } return word; }  function getElementsByClassName(classname, node, frame)  {     frame = (frame != null) ? document.getElementsByTagName("body")[0]: document.getElementsByTagName("body")[0]; if(!node)  node = frame;     var a = [];     var re = new RegExp('\\b' + classname + '\\b');     var els = node.getElementsByTagName("*");     for(var i=0,j=els.length; i<j; i++)         if(re.test(els[i].className)) a.push(els[i]);     return a; }  function printGettingStarted(){ if(state != 0 && currentLink == "HOME"){ csect = cleanTab(currentSubsection); wrd = csect.replace(/View/g, ''); xtxt = ""; xtxt += '<div style = "float:left; padding:10px; ">'; xtxt += '<div style = "float:left; color:#0000aa; font-weight:bold;">Getting Started</div>'; xtxt += '<div style = "margin-left:10px; font-size:12px; color:#777; font-weight:bold; clear:both; padding-top:10px;"><div style = "float:left;">click&nbsp;</div><div style = "float:left; cursor:pointer" onclick = "startHelp(\''+csect+'\')" class = "hoverbrightblue"><a href = "#" onclick = "event.returnValue = false; return false;">here</a></div><div style = "float:left">&nbsp;for tips for managing '+wrd+'</div></div>'; xtxt += '<div style = "clear:both"></div>'; xtxt += '</div>'; return xtxt; } else return printNoEntries(); }  function startHelp(loc){ myTimer.queuePush('callAjax_'+currentLink+"/"+currentSection+"/Help"); }  function processStat(user, i, j){ section = params.sublinks[i].childNodes[0].childNodes[0].nodeValue; subsection = params.sublinks[i].childNodes[j].childNodes[0].nodeValue; AJAX.processUrl('/brain.php/prm/displayMainStat/sctn/'+section+'/sbsctn/'+subsection, "postit", ""); }  function ie6display(){}  function callAction(com1, com2){ if(state != 0){ switch(com1){ case "Create": com2 = (com2 == null) ? "Player" : com2; accountManager.createAccount(com2); break; case "Switch": com2 = (com2 == null || com2 == "") ? "Player" : com2; uReg.currentReg = com2; myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/gettheaccounts_1/'+uReg.currentReg); break; case "Add_to_Eyes": myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/addtoeyes//getreponse'); break; case "Add_to_Friends": myTimer.queuePush('openLink_HOME/Mail/Compose/addtofriends'); break; case "Send_Message": myTimer.queuePush('openLink_HOME/Mail/Compose/'); break; default: alert("Currently disabled"); } } else  myTimer.queuePush('signin_400/250'); }  function newLink(clink, csection, csubsection, cpost){ cpost = (cpost == null) ? "" : cpost; showload = false; setalllinks = true; curSelection = csubsection; currentLink = clink; currentSection = csection; myTimer.queuePush('callCommand_'+clink+'/'+csection+'/'+csubsection+'/'+cpost); }  function openLink(clink, csection, csubsection, cpost){ showload = false; setalllinks = true; curSelection = csubsection; currentLink = clink; currentSection = csection; myTimer.queuePush('callAjax_'+clink+'/'+csection+'/relocate/'+cpost); }  function setSubscribed(){ obj = document.getElementById('imgsubscribe'); obj2 = document.getElementById('substarter'); obj3 = document.getElementById('name'); obj4 = document.getElementById('email'); obj.src = "http://s3.amazonaws.com/ldimages/subcomplete.gif"; obj2.onclick = ""; obj3.value = "";  obj4.value = ""; }  function sayError(){ alert('Email already subscribed'); }  function extend(subclass, superclass) {    function Dummy() {}    Dummy.prototype = superclass.prototype;    subclass.prototype = new Dummy();    subclass.prototype.constructor = subclass;    subclass.superclass = superclass;    subclass.superproto = superclass.prototype; } function setKey(e){  if (!e) var e = window.event;  if (e.keyCode) code = e.keyCode;  else if (e.which) code = e.which;  var character = String.fromCharCode(code);  this.unicode = code;  this.actualkey=String.fromCharCode(this.unicode);  switch(keylocation){  case "search":  if(this.unicode == 13){  stoptheload();  myLarge.removeGlaze();  myTimer.queuePush("search");  }  break;  case "edittable":  if(this.unicode == 13){  currenteditor.resetNode();  opentables = false;  }  break;  case "tabletype":  myTimer.queuePush("resizetextbox");    break;  case "tolist":  if(this.unicode == 13){  dropDown.selectList(dropDown.cid);  myTimer.queuePush("removeBox_commentbox");  }  else{  myTimer.queuePush("setdropdown");  stoptheload();  }  break;  case "mainsearch":  if(this.unicode == 13){  objval = document.getElementById('input_search').value;  clink = document.getElementById('curlink').value;  csub = document.getElementById('cursublink').value;  if(objval != "" && csub != objval)  window.location = '/pg/'+clink+'/'+objval;  }  break;  }  }    function Registration(){  var displayingReg = null;  var currentReg = null;  var completeReg = new Array('1');  var prevAccount = "";  var extramenus = new Array();  var possibleReg = new Array();  var adddefReg = 0;  var countType = 0;  var previousRegField = null;  var previousRegType = null;  var theaccount = "";  var currentSelection = "";  var regcontent = "";  var regFinished = false;  var designformat = "default";  this.txtstyle = "";  this.txtcontainer = '';    this.addToCompleteReg = function(val){  currentfound = false;  for (a = 0; a < this.completeReg.length; a++){  if(this.completeReg[a].toString() == val.toString()){  currentfound == true;  break;  }      if(!currentfound && a == this.completeReg.length - 1 ){  this.completeReg.push(val);  break;  }  }  };    this.postUserInfo = function(){  val = "";  val += '<input type = "hidden" id = "innerSignin" name = "innerSignin" value = "'+usport+'" />';  return val;  };    this.printUP = function(thetxt, type, id, value){  if(value != "" && value != null){  disabled =  "disabled";   cvalue = value;  user = this.postUserInfo();  }      else{  disabled= ""; cvalue = ""; user = "";  }      txt = "";  txt +='<div style = "float:left; margin-top:2px; visibility:visible;  color:#444444; font-size:11px; width:99%; height:25px; padding-top:6px; padding-bottom:6px; color:#fff;" > ';  txt +='<div style = "float:left; padding-top:2px;  text-align:right; overflow:auto; width:120px;">'+thetxt+'</div>';  txt += '<input type = "'+type+'" id = "'+id+'" name = "'+id+'" size = "27" style = "overflow:auto; visibility:visible; display:block; margin-left: 10px; color:#444444; float:left; height:18px;" value = "'+cvalue+'" '+disabled+' />';  txt += user;  txt += '</div>';  return txt;  };    this.resetType = function(obj){  ccont = obj.value;  if(ccont == "-- Type text here --")  obj.value = "";    };    this.submitComment = function(){  val = document.getElementById('comment').value;  cemail = document.getElementById('email').value;   if(val != "-- Type text here --" && val != ""){  if(validate.validEmail(cemail))  document.getElementById('commentform').submit();  else  alert('You must enter a valid email address');  }  else  alert('You cannot send empty feedback');  };    this.printHints = function(){  txt ='<div style = "width:100%; overflow:auto;">';  txt +='<div style = "height:25px; background:#A7B6AA; color:#fff; clear:both; font-size:14px; font-weight:bold; letter-spacing:2px; border-bottom:3px solid #919C95"><div style = "padding:2px; padding-top:4px;">Did You Know?</div></div>';  txt +='<div style = "margin:5px; font-size:11px; color:#444">';  txt +='<ul id = "hintid">';  if(BrowserDetect.OS != "Mac"){  txt +='<li>1) You can switch to fullscreen by pressing F11</li>';  txt +='<li>2) You can return to normal view by pressing F11</li>';  txt +='<li>3) You can learn about a section by clicking the help tab</li>';  txt +='<li>4) You can send feedback by clicking the feedback link</li>';  }  else{  txt +='<li>1) You can learn about a section by clicking the help tab</li>';  txt +='<li>2) You can send feedback by clicking the feedback link</li>';  }  txt +='</ul>';  txt +='</div>';  txt +='</div>';  return txt;  };    this.printComment = function(prm){  psv = (prm != null && prm != "") ? prm : "";  txt = "";  txt +=  '<form id = "commentform" target="target_signin" action = "feedback.php"  method="post" style = " float:left;">';  txt += '<iframe id="target_signin" name="target_signin" src="" style="width:0px;height:0px;border:0; "></iframe>';  txt +='<div style = "width:100%; overflow:auto;">';  txt +='<div style = "width:300px; float:left;">';  txt +='<div style = "height:45px; clear:both; "><div style = "margin:5px;  width:80px;font-size:11px; clear:both; float:left; color:#009999; font-weight:bold;">Your Email: </div><input id = "email" name = "email" type = "text" style = "margin:5px; margin-top:0px;  clear:both; float:left; border:1px solid #ddd; width:290px;" /></div>';  txt +='<div style = "height:165px;"><textarea id = "comment" name = "comment" style = "float:left;margin:5px; width:290px; height:155px; border:1px solid #ddd; overflow:auto;" onclick = "uReg.resetType(this)">-- Type text here --</textarea></div>';  txt +='</div>';  txt +='<div style="float:left; width:70px; margin:5px; height:180px; ">';  txt +='<div style = "margin-top:10px; margin-left:5px; background:#fff; cursor:pointer; width:64px; border:1px solid #ccc; border-right:0px; height:88px" onclick = "uReg.submitComment()">';  txt +='<img style = "float:left; clear:both;" src = "http://s3.amazonaws.com/ldimages/mn_comment.gif" />';  txt +='<div style = "clear:both; float:left; width:60px; margin-top:5px; font-size:11px; color:#009999; letter-spacing:2px; text-align:center; font-weight:bold">Send</div>';  txt +='</div>';  txt +='</div>';  txt +='</div>';  txt +=  '</form>';  return txt;  };    this.printSignin = function(prm, srelocate){  psv = (prm != null && prm != "" && prm != "none") ? prm : "";  srelocate = (srelocate != null) ? srelocate : "default";  txt = "";  txt +=  '<form id = "signinform" target="target_signin" action = "signin.php?relocate='+srelocate+'"  method="post" style = "float:left;">';  txt += '<iframe id="target_signin" name="target_signin" src="" style="width:0px;height:0px;border:0; "></iframe>';  txt +='<div id = "req_content" style = " width:400px; height:224px; background-image:url(\'http://s3.amazonaws.com/ldimages/imgsignin.gif\');">';  txt +='<div id = "signinmain" style = " border: 0px; width:auto; height:auto; ">';  txt += '<div style="clear:both; height:25px; width:380px; padding:10px;  font-size:16px; font-weight:bold; color:#fff; ">';  txt +='<div style = "float:right; font-size:11px; ">';  txt +='<div onclick = "uReg.showSignup('+winWidth+', 30, \'setMini_showAccounts\')" style = "cursor:pointer; color:#fff;" >Sign up</div>';  txt +='</div>';  txt += '</div>';  txt +='<div class = "search" style = "clear:both; height:auto; border-bottom:1px solid #444; border-top:1px solid #777; width:380px; padding:10px; font-size:16px; font-weight:bold; color:#fff;">';  txt +='<div style = " clear:both; height:100px; overflow:auto;">';  txt +=this.printUP('username', 'text', 'usrname', psv);  txt +=this.printUP('password', 'password','password');  txt +='</div>';  txt +='<input type = "hidden" id ="try" name = "try" value = "HI" />';  txt += '<div style = "padding-top:5px;">';  txt += '<div style = "float:left; width:200px; text-align:center; color:#eee; padding-bottom:5px; margin:0px;"> <font style = "font-size:11px; "><a href = "'+settinglink+'" target = "_blank" style = "color:#eee; font-size:11px; text-decoration:none;">I can\'t access my account</a> </font></div>';  txt += '<div  style = " float:right; margin-right:10px; text-align:center;" >';  txt +='<input id = "signmein" name = "signmein" type = "button" value = "Sign in" style = "color:#222; padding:2px; font-size:11px; margin:0px; auto; text-align:center;" onClick = "uReg.processSignin(this);"/>';  txt +='</div>';  txt +='</div>';  txt +='</div>';  txt +='</div>';  txt +='</div>';  txt +=  '</form>';  return txt;  };    this.processSignin = function(obj){  resetCachedLinks();  obj.disabled = true;  document.getElementById('signinform').submit();  };      this.showRegistration = function(reg, nsetReg, mprm, width, height){  if(reg != null)  this.currentReg = reg;  if(width == null)  myLarge.displayLargeDisplay(500, 300, this.displayingReg);  else  myLarge.displayLargeDisplay(width, height, this.displayingReg);  if(nsetReg == null) myTimer.queuePush('setMini_registration');  else myTimer.queuePush(nsetReg);  if(mprm == null)this.showSignup(winWidth, 30, 'setMini_showAccounts');  else this.showSignup(winWidth, 30, mprm);  };    this.showSignup = function(thewidth, theheight, param){  try{  if(!myMini.visible['minibox2']){  myMini.showMini('minibox2', thewidth, theheight);  myTimer.queuePush(param);  }      }catch(e){alert(e.description);}  };    this.showSignUpOptions = function(acctype){  if(signin){  signin = false;  }  this.startRegistration(acctype, "default");  };      this.removeFromReg = function(val){  thelength = this.completeReg.length;  remove = false;    for (a = 0; a < thelength; a++){  if(this.completeReg[a].toString() == val.toString()){  this.completeReg[a] = this.completeReg[thelength - 1];  remove = true;  break;  }      }      if (this.completeReg.length > 0 && remove)   this.completeReg.pop();  };    this.resetReg = function(theaccount){  if(this.prevAccount != ""){   document.getElementById(this.prevAccount).style.display = "none";  }  this.prevAccount = theaccount;  };    this.displaySignupBox = function(acctype, thewidth){  theacc = document.getElementById(acctype);  thebox = theacc.style;  this.resetReg(acctype);  if(acctype != currentSelection){  thebox.display = "block";  expander.expandImage(acctype, thewidth, 0, thewidth, 200, 0, 0, 'middle');  currentSelection = acctype;  }      else{  thebox.display = "none";  currentSelection = "";  }  };    this.resetRegistrationBox = function(acctype){  cbox = document.getElementById(acctype+"_innerbox");  mbox = cbox.style;  };    this.initDesign = function(){  switch(this.designformat){  case "accounts":  this.txtstyle = "color:#888; font-weight:bold; padding-left:0px; ";  this.txtcontainer = "width:473px; padding-left:10px;  padding-top:1px; height:22px; clear:both;";  break;  default:  this.setDefaultDesign();  }  };    this.setDefaultDesign = function(){  this.txtstyle = "color:#fff; font-weight:bold; padding-left:20px; ";  this.txtcontainer = "width:493px; padding-left:5px;  padding-top:1px; height:22px; clear:both;";  };    this.setRegistration = function(icontent){  stxt = "";  if(icontent){  stxt += '<form id="registerform" target="target_register" ';  stxt +=' action = "" enctype="multipart/form-data" method="post" style = "float:left; ">';  stxt += '<iframe id="target_register" name="target_register" src="" style="width:0px; height:0px; border:0px; "></iframe>';  stxt +=  '<div style = "width:500px; height:354px; padding-top:10px; margin-top:0px; ';  stxt +='background-image:url(\'http://s3.amazonaws.com/ldimages/imgregister.gif\'); ';  stxt +='" id = "regercont">';  }    for(i = 0 ; i < params.name.length; i++){  if(params.inputtype[i] != "none" && params.inputtype[i] != "None"){  wrd = params.name[i].split('_').join(' ');  stxt += '<div style ="'+this.txtcontainer;  if(i != 0)  stxt += 'border-top:0px; ';  stxt += '">';   stxt += '<div style = "float:left;  width:180px; font-size:11px; '+this.txtstyle+'">';  if(params.name[i] == "Name"){  ext = (this.currentReg != "Team") ? this.currentReg+' Full ' : this.currentReg+' ';  stxt += ext;  }  else if (params.name[i] == "Gender" || params.name[i] == "Birthday")  stxt += this.currentReg+' ';  stxt += params.name[i].replace(/_/g, ' ');  stxt +='</div>';  stxt += '<div style = "float:right; height:18px; margin-right:10px; width:250px; padding-right:20px; ">';  stxt +='<div style = "float:right">'+this.printInputType(params.inputtype[i], params.name[i], i)+"</div>";    stxt +='<input type = "hidden" value = "'+params.abbreviationid[i]+'" id = "valid_id_'+params.name[i]+'" name = "valid_id_'+params.name[i]+'" />';  stxt += '</div>';  stxt += '</div>';  }  }  stxt +='<input type = "hidden" name = "valid_user_account" id = "valid_user_account"/>';  if(icontent){  stxt += '<div style = "text-align: center; height:25px; width:470px; margin-top:5px; padding-top:5px; padding-bottom:5px; border-top:1px solid #080808; padding-right:20px;">';  stxt +='<input id = "signmein" type = "button" value = "Submit" style = " float:right; margin-right:10px; cursor:pointer; padding-left:7px; padding-right:7px;" onclick = "uReg.submitReg(\'signmein\', \'registerform\', \'register.php?loc='+currentLink+'\', true)">';  stxt += '</div>';  stxt += '</div>';  stxt += '</form>';  }  this.regcontent = stxt;    switch(this.designformat){  case "wizard":  myTimer.queuePush('register_'+cWiz.width+'/'+cWiz.height);  break;  case "accounts":  accountManager.initWindowContent();  break;  }  };    this.startRegistration = function(acctype, designformat){  this.extramenus = new Array();  this.possibleReg = new Array();  this.completeReg = new Array('1');  this.adddefReg = 0;  this.countType = 0;  this.previousRegField = null;  this.previousRegType = null;  this.theaccount = acctype;  this.designformat = designformat;  if(designformat != "default") this.initDesign();  else this.setDefaultDesign();    myTimer.queuePush('callAjax_HOME/Registration/'+acctype);  };    this.printRegDays = function(type, l, thev){  xt = "";  theid = "valid_menu_day";  isvalid = false;  for(k = 1; k <= 31; k++){  if(thev != "" && thev == k){  xt += '<option value = "'+k+'" selected>'+k+'</option>';  isvalid = true;  this.addToCompleteReg(theid);  }  else  xt += '<option value = "'+k+'">'+k+'</option>';  }  ktxt = "";  ktxt += '<select name = "valid_menu_day" id = "valid_menu_day" onchange = "uReg.setRegReady(this, \''+type+'\')" onmouseup = "uReg.setRegReady(this, \''+type+'\')" style = "';  if(isvalid) ktxt += "border: 1px solid #00FF00; ";  ktxt += 'float:right; padding:0px; margin:0px; margin-right:5px; width:50px; font-size:11px;  height:20px; ">';  ktxt += '<option value = "default">dd</option>';  ktxt += xt;  ktxt += "</select>";  ktxt +='<input type = "hidden" value = "BI_PI_dd" id = "valid_id_day" name = "valid_id_day"  style = "float:left;">';  this.possibleReg.push('valid_menu_day');  return ktxt;  };    this.printRegMonths = function(type, l, thev){  xt = "";  theid = "valid_menu_month";  isvalid = false;  for(l = 1; l <= 12; l++){  if(thev != "" && thev == l){  xt += '<option value = "'+l+'" selected>'+l+'</option>';  isvalid = true;  this.addToCompleteReg(theid);  }  else  xt += '<option value = "'+l+'">'+l+'</option>';  }  rtxt = "";  rtxt += '<select name = "valid_menu_month" id = "valid_menu_month" onchange = "uReg.setRegReady(this, \''+type+'\')" onmouseup = "uReg.setRegReady(this, \''+type+'\')" style = "';  if(isvalid) rtxt += "border: 1px solid #00FF00; ";  rtxt += 'float:right; padding:0px; margin:0px; margin-right:5px; width:50px; font-size:11px; height:20px;  ">';  rtxt += '<option value = "default">mm</option>';  rtxt += xt;  rtxt += "</select>";  rtxt +='<input type = "hidden" value = "BI_PI_mm" id = "valid_id_month" name = "valid_id_month" style = "float:left;">';  this.possibleReg.push('valid_menu_month');  return rtxt;  };    this.printRegYears = function(type, l, thev){    rtxt = "";  theid = "valid_menu_year";  xt = "";  var thetime = new Date();  val = thetime.getFullYear();  isvalid = false;  for(m = val; m >= 1900; m--){  if(thev != "" && thev == m){  xt += '<option value = "'+m+'" selected >'+m+'</option>';  isvalid = true;  this.addToCompleteReg(theid);  }  else  xt += '<option value = "'+m+'">'+m+'</option>';  }    rtxt += '<select name = "valid_menu_year" id = "valid_menu_year"  onchange = "uReg.setRegReady(this, \''+type+'\')" onmouseup = "uReg.setRegReady(this, \''+type+'\')" style = "';  if(isvalid) rtxt += 'border: 1px solid #00FF00; ';  rtxt += 'float:right; padding:0px; margin:0px; font-size:11px; height:20px;   ';  if(IE){ rtxt += 'width:84px; ';}  else {rtxt += 'width:82px; ';}  rtxt +=  '">';  rtxt += '<option value = "default">yyyy</option>';  rtxt += xt;  rtxt += "</select>";  rtxt +='<input type = "hidden" value = "BI_PI_yy" id = "valid_id_year" name = "valid_id_year" style = "float:left;">';  this.possibleReg.push('valid_menu_year');  return rtxt;  };    this.printRegMenu = function(type, name, l){  txt = "";  txt += '<div style = "height:auto; width:auto;">';  rtname = 'valid_menu_'+name;  txt += this.setInputType(type, rtname, params.value[l]);  txt += '</div>';  this.adddefReg ++;  this.extramenus.push('valid_menu_'+name);  return txt;  };    this.startValidation = function(name, type){  currentregField = name;  currentregType = type;  };      this.setRegReady = function(obj, type){  if(this.previousRegField != null && this.previousRegType != null){  if(!this.validateInput(this.previousRegField, this.previousRegType)){  this.previousRegField.style.border = "1px solid #CCCCCC";  }  }  this.validateInput(obj, type);  this.previousRegType = type;  this.previousRegField = obj;  };    this.validDBUsername = function(name){  myTimer.queuePush('callAjax_HOME/Registration/validUsername/'+name);  };    this.validDBEmail = function(email){  myTimer.queuePush('callAjax_HOME/Registration/validEmail/'+email);  };    this.validDBAge = function(birthday){  myTimer.queuePush('callAjax_HOME/Registration/validAge/'+birthday);  };    this.validateInput = function(obj, type, recall){  green = "#00FF00";  red = "#FF0000";  orange = "#FFCC00";  isdone = false;  thecolor = red;  switch(type){  case "yy-mm-dd":  command = obj.options[obj.selectedIndex].value;  if(validate.validateYDM(command)){  thecolor = "green";  }  else{  thecolor = "orange";  }  break;  case "email":  if(validate.validEmail(obj.value)){  thecolor = "green";  }  else{  thecolor = "orange";  }  break;  case "text":  switch(obj.id){  case "Name":  case "valid_text_Name":  thevalid = validate.validateFullName(obj.value);  break;  default:  thevalid = validate.validTextAndNums(obj.value);  }  if(thevalid){  if(obj.value.length < 2){  thecolor = "orange";  }  else{  thecolor = "green";  }  }  else{   if(obj.value.length < 5){  thecolor = "orange";  }  else{  thecolor = "red";  }  }  break;  case "password":  switch(obj.id){  case "valid_password_Password_(min_6_chars)":  if(validate.validTextAndNums(obj.value)){  repass = document.getElementById('valid_password_Re-type_Password');  if(obj.value.length < 6){  thecolor = "orange";  isdone = false;  if (repass.value.length >= 6 )  this.validateInput(repass, "password", true);  this.removeFromReg(repass.id);  isdone = false;  }  else{  thecolor = "green";  if (repass.value.length >= 6)  this.validateInput(repass, "password", true);  this.addToCompleteReg(repass.id);  isdone = true;  }  }  else{  thecolor = "red";  if (repass.value.length >= 6)  this.validateInput(repass, "password", true);  this.removeFromReg(repass.id);  isdone = true;  }  break;  case "valid_password_Re-type_Password":  if(validate.validTextAndNums(obj.value)){  pass =  document.getElementById('valid_password_Password_(min_6_chars)');  thepassword = pass.value;  if ((obj.value.length < thepassword.length || thepassword.length < 6) && recall == null){  thecolor = "orange";  this.removeFromReg(pass.id);  }  else if(obj.value != thepassword ){  pass.style.border = "1px solid "+ red;  thecolor = "red";  this.removeFromReg(pass.id);  }  else if (obj.value.length >= 6){  pass.style.border = "1px solid "+ green;  thecolor = "green";  this.addToCompleteReg(pass.id);  }  }  else{  pass.style.border = "1px solid "+ red;  thecolor = "red";  this.removeFromReg(pass.id);  }  break;  }  break;  }  switch(thecolor){  case "green":  obj.style.border = "1px solid " + green;  this.addToCompleteReg(obj.id);  isdone = true;  break;  case "orange":  obj.style.border = "1px solid " + orange;  this.removeFromReg(obj.id);  break;  case "red":  obj.style.border = "1px solid " + red;  this.removeFromReg(obj.id);  isdone = true;  break;  }  editReg = thecolor;  return (isdone && (recall == null));  };    this.printSelectHeader = function(name){  ztxt  = "";  ztxt += '<select name = "'+name+'" id = "'+name+'" style = "font-size:11px;  height:20px;  float:right; border:1px solid #00FF00;';  if(IE){ztxt += ' width:194px;'; }  else{ztxt += ' width:192px;';  }  ztxt +=  '">';  return ztxt;  };    this.setInputType = function(type, name, value, menuoptions){  txt = '';  switch(type){  case "email":  txt += '<input name = "'+name+'" id = "'+name+'" type = "text" style = "float:left; overflow:auto; visibility:visible; width: 190px; height:16px; font-size:11px; border:1px solid #CCCCCC;" onmouseup = "uReg.setRegReady(this, \''+type+'\')" onkeyup = "uReg.validateInput(this, \''+type+'\')" value = "'+value+'">';  break;  case "text":  isvalid = (value != "");  txt += '<input name = "'+name+'" id = "'+name+'" type = "text" style = " height:16px; font-size:11px; width: 190px;  float:right; ';  if(!isvalid) txt += 'border:1px solid #CCCCCC;';  else{  txt += 'border:1px solid #00FF00;';  this.addToCompleteReg(name);  }  txt += '" onmouseup = "uReg.setRegReady(this, \''+type+'\')" onkeyup = "uReg.validateInput(this, \''+type+'\')" value = "'+value+'">';  break;  case "password":  txt += '<input name = "'+name+'" id = "'+name+'" type = "password"  style = "font-size:11px; float:right; overflow:auto; visibility:visible; border:1px solid #CCCCCC;  width: 190px;  height:16px; " onmouseup = "uReg.setRegReady(this, \''+type+'\')" onkeyup = "uReg.validateInput(this, \''+type+'\')">';  break;  case "sport":  txt += this.printSelectHeader(name);  for(n = 0; n < params.sport.length; n++){  wd = params.sport[n].replace(/_/g, ' ');  if(value == params.sport[n])  txt += "<option value = '"+params.sport[n]+"' selected>"+wd+"</option>";  else  txt += "<option value = '"+params.sport[n]+"'>"+wd+"</option>";  }  txt += "</select>";  break;  case "league":  txt += this.printSelectHeader(name);  if(value == "Player" ){  txt += "<option value = 'Player' selected>Player</option>";  txt += "<option value = 'Team'>Team</option>";  }  else if(value == "Team"|| value == ""){  txt += "<option value = 'Player'>Player</option>";  txt += "<option value = 'Team' selected>Team</option>";  }  txt += "</select>";  break;  case "country":  txt += this.printSelectHeader(name);  wrd = value.split('_').join(' ');  clen = params.country.length;  for(o = 0; o < clen; o++){  wd = params.country[o].replace(/_/g, ' ');  if(wrd == params.country[o])  txt += "<option value = '"+params.country[o]+"' selected>"+wd+"</option>";  else if(params.country[o] == "United States" && value == "")  txt += "<option value = '"+params.country[o]+"' selected>"+wd+"</option>";  else  txt += "<option value = '"+params.country[o]+"'>"+wd+"</option>";  }  txt += "</select>";  break;  case "gender":  txt += this.printSelectHeader(name);  txt += "<option value = 'Male' selected>Male</option>";  txt += "<option value = 'Female'>Female</option>";  txt += "</select>";  break;  case "gender-both":  txt += this.printSelectHeader(name);  txt += "<option value = 'Men' selected>Men</option>";  txt += "<option value = 'Women'>Women</option>";  txt += "<option value = 'Coed'>Coed</option>";  txt += "</select>";  break;  case "menu":  txt += this.printSelectHeader(name);  if(menuoptions != null){  clen = menuoptions.length;  for(o = 0; o < clen; o++){  wd = menuoptions[o].replace(/_/g, ' ');  if(value == menuoptions[o])  txt += "<option value = '"+menuoptions[o]+"' selected>"+wd+"</option>";  else  txt += "<option value = '"+menuoptions[o]+"'>"+wd+"</option>";  }  }  txt += "</select>";  break;  }  return txt;  };    this.printInputType = function(type, name, m){  txt = "";  psv = params.value[m];  switch(type){  case "email":  rtname = 'valid_email_'+name;  txt += '<div  style = "float:right; overflow:auto; visibility:visible;">'+this.setInputType(type, rtname, params.value[m])+'</div>';  this.countType ++;  this.possibleReg.push('valid_email_'+name);  break;  case "text":  rtname = 'valid_text_'+name;  if(name == "Name"){  psv = psv.replace(/_/g, ' ');  if(cWiz.visible && cWiz.instructionlist[cWiz.cindex] != "register_Parent"){  psv = params.sname;  psv = psv.replace(/_/g, ' ');  }  }  txt += '<div  style = "overflow:auto; visibility:visible; float:right;">'+this.setInputType(type, rtname, psv)+'</div>';  this.countType ++;  this.possibleReg.push('valid_text_'+name);  break;  case "password":  rtname = 'valid_password_'+name;  txt += '<div style = "overflow:auto; visibility:visible; float:right;">'+this.setInputType(type, rtname, psv)+'</div>';  this.countType ++;  this.possibleReg.push(rtname);  break;  case "yy-mm-dd":  theword = new Array('','','');  if(params.value[m] != "")  theword = params.value[m].split('-');  txt += '<div style = "background:#fff; float:right; ';  if(IE){txt += 'width:194px; ';}  else{txt += 'width:192px;';}  txt += ' ">';    txt += '<div style = "float:right;  width:80px;">'+this.printRegYears(type, m, theword[0])+'</div>';  txt += '<div style = "float:right; width:50px;">'+this.printRegDays(type, m, theword[1])+'</div>';  txt +='<div style = "float:right; width:50px;">'+this.printRegMonths(type, m, theword[2])+'</div>';  this.countType += 3;  txt +='</div>';  break;  case "country":  case "sport":  case "menu":  case "gender":  case "league":  case "gender-both":  txt += '<div style = "float:right; ">';  txt += this.printRegMenu(type, name, m);  txt += '</div>';  this.countType ++;  break;  }  return txt;  };    this.printValidBox = function(name){  txt = "";  txt += '<div name = "valid_'+name+'" id = "valid_'+name+'" style = "width:2px; float:right; height:18px; margin-left:5px; border:1px solid #DDDDDD; "></div>';  return txt;  };    this.setBtnUndisable = function(){  if(cWiz.visible){  ccommand = cWiz.curcommand.toLowerCase();  this.undisableBtn('btn_'+ccommand);  }  else{  this.undisableBtn('signmein');  }  };    this.undisableBtn = function(objname){  document.getElementById(objname).disabled = false;  };    this.showIncompleteReg = function(btnname){    comprlen = this.possibleReg.length;  incomplete = false;  for(i = 0; i < this.possibleReg.length ; i ++){  showincomplete = false;  for(j = 1; j < comprlen;  j++) {  if(this.possibleReg[i] == this.completeReg[j]) break;  else if (j >= comprlen - 1){  document.getElementById(this.possibleReg[i]).style.border = "1px solid #FF0000";  incomplete = true;  }  }      }  if(incomplete){  if(cWiz.visible)  cWiz.processError("The red fields have been filled incorrectly.");  else  alert("The red fields have been filled incorrectly.");    this.undisableBtn(btnname);  }      };    this.register = function(registrationform, registrationurl){  proceed = document.getElementById('agree').checked;  if(proceed){   stoptheload();  resetCachedLinks();  document.getElementById(registrationform).action = (!innerAccount) ? registrationurl : registrationurl+"&prm=inner";  isregistering = true;  document.getElementById(registrationform).submit();  }  else{   stoptheload();  errortxt = 'You must agree to the Terms to Register';  if(cWiz.visible)  cWiz.processError(errortxt);  else  alert(errortxt);  this.setBtnUndisable();  }  };    this.getFilterHeader = function(filtername){  cxt = "";  cxt += '<div style = "float:left; margin-left:0px; font-size:11px; " onclick = "myFilterWindow.applyFilters()"><font style = "color:#888; float:left; ">Modify the filters then click&nbsp;</font><div style ="float:left; color:#0000dd; text-decoration: underline; cursor:pointer" onclick = "myFilterWindow.applyFilters()">here</div><font style = "color:#999; float:left; ">&nbsp;to apply</font></div>';  return cxt;  };    this.headerText = function(htxt){  cxt = "";  cxt += '<div style = "float:left; margin-left:5px; font-size:11px; color:#777">'+htxt+'</div>';  return cxt;  };    this.getUploadHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:0px; font-size:11px; cursor:pointer; "><div style = "color:#0000aa; font-size:11px; float:left;" onclick = "myTimer.queuePush(\'multiupload_400/250\')">Upload Photo</div></div>';  return cxt;  };    this.getUploadPlayerHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:0px; font-size:11px; cursor:pointer; "><div style = "color:#0000aa; font-size:11px; float:left;" onclick = "myTimer.queuePush(\'multiupload_400/250\')">Upload Photo</div><div style = "float:left; margin-left:25px; text-decoration:underline; color:#0000aa; font-size:11px; cursor:pointer;" onclick = "glazer.callAddAll()">Add All Players</div></div>';  return cxt;  };    this.getPartnerHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:0px; font-size:11px; "><font style = "color:#aaa">Request Partnership</font></div>';  return cxt;  };    this.getCommentHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:0px; font-size:11px; "><font style = "color:#aaa">Send us your comments</font></div>';  return cxt;  };    this.getRosterHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:0px; font-size:11px; "><font style = "color:#aaa">Edit Roster</font></div>';  return cxt;  };    this.getProfileImageHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:5px; font-size:11px; "><font style = "color:#009999; font-weight:bold">Locker: </font> <font style = "color:#777">Change My Locker Image</font></div>';  return cxt;  };    this.getSigninHeader = function(){  cxt = "";  cxt += '<div style = "float:left; margin-left:5px; font-size:11px; "><font style = "color:#009999; font-weight:bold">Action Requires</font> <font style = "color:#777">Account Verification</font></div>';  return cxt;  };    this.getSignupHeader = function(){  cxt = "";  cxt += '<div style = "float:left; width:90px; height:20px; margin:0px; padding:0px; color:#fff; background-image:url(\'http://s3.amazonaws.com/ldimages/signupimg.gif\'); font-size:11px; cursor:pointer;" onclick ="uReg.showSignup('+winWidth+', 30, \'setMini_showAccounts\')"></div>';  return cxt;  };    this.getTermsSelect = function(){  cxt = "";  cxt += '<div style = "float:left; "><input type = "checkbox" name = "agree" id = "agree" /></div>';  cxt += '<div style = "float:left; margin-left:5px; font-size:11px; margin-top:2px"><div style = "float:left;">I agree to the </div><div onclick = "uReg.startTerms()" style = "float:left; text-decoration:none; color:#0033ff; cursor:pointer;">&nbsp;Terms and Conditions</a></div>';  return cxt;  };    this.startTerms = function(){    stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/closeMini_minibox');  params.commandlist = 'callCommand_HOME/Terms/Terms_of_use';  myTimer.queuePush('callCommand_HOME/Terms/default');  };    this.goto = function(topl, csubl, tab){    showload = false;  curSelection = csubl;  thesec = midTabs.currentTab.split('(D)')[0];  subLinks.changeSublink(csubl);  currentSection = csubl;  currentLink = topl;  thesec = midTabs.currentTab.split('(D)')[0];  myTimer.queuePush('callAjax_'+topl+'/'+csubl+'/toptabs/'+tab);  myTimer.queuePush("pause_40/1");  myTimer.queuePush('closeMini_minibox');  };    this.submitReg = function(btnname, registrationform, registrationurl){  document.getElementById(btnname).disabled = true;  comprlen = this.completeReg.length;  checkreg = false; this.regFinished = false;  if((comprlen - 1 + this.adddefReg) == (this.countType)){  this.regFinished = true;  for(k = 1; k < comprlen ; k ++){  theword = this.completeReg[k].split('_');  obj = document.getElementById(this.completeReg[k]);  switch(theword[1]){  case "menu": theval = obj.options[obj.selectedIndex].value; break;  case "email":  this.validDBEmail(obj.value);  checkreg = true;  break;   default: theval = obj.value; break;  }        }      for(n = 0; n < this.extramenus.length; n++){  theword = this.extramenus[n].split('_');  obj = document.getElementById(this.extramenus[n]);  theval = obj.options[obj.selectedIndex].value;  }      document.getElementById('valid_user_account').value = this.theaccount;  }      else this.showIncompleteReg(btnname);   if(!checkreg && this.regFinished){  innerAccount = true;  resetCachedLinks();  stoptheload();  this.register(registrationform, registrationurl);  isregistering = true;  }  else {isregistering = false;}  };  }    var uReg = new Registration();   function TableEditor(){    this.editing = false;  this.fullattributes = new Array();  this.value = new Array();  this.inputtype = new Array();  this.fullattribute = new Array();  this.abbreviationid = new Array();  this.inputtextoption = new Array();  this.tablename = "";  this.tobjname = "";  this.previouscontent = "";  this.row = "";  this.col = "";  this.i = "";    this.height = 0;  this.style = new Array();  this.editing = false;  this.command = "";  this.clocation = "";  this.posttype = "";  this.euser = new Array();  this.objTable = '';  this.currentwidth = 0;  this.ctable = null;    this.setCurrentUser = function(i){  cid = params.id[i];  cid = cid.substr(1, (cid.length-2));  pid = cid.split('||');  usr = uusernameu.replace(/\s/g, '_');  acc = pid[0]; name = pid[1];  name = name.replace(/_/g, ' ');  sport = pid[2]; username = pid[3];  this.euser['account_type'] = acc;  this.euser['name'] = name;  this.euser['sport'] = sport;  this.euser['user_name'] = username;  };    this.deleteUser = function(type, i){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/editroster_delete/'+this.euser['value']+'/closecomplete');  };    this.editUser = function(type, i){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/editroster_edit/'+this.euser['value']+'/closecomplete');  };    this.validateEdit = function(name, email){  return(validate.validStringNum(name) && (email == "" || validate.validEmail(email)));  };    this.setRosterContent = function(type, i){  this.setCurrentUser(i);  currentname = document.getElementById('r_name').value;  currentemail = document.getElementById('r_email').value;  if(this.validateEdit(currentname, currentemail)){  this.euser['value'] = params.id[i]+',_'+currentname+',_'+currentemail;  typelist = new Array(type.toLowerCase()+'User', 'cancelRoster');  curSelection = type;  commandlist = new Array('Yes', 'Cancel');  txt = "";  txt +='<div style = "clear:both; height:30px; margin-top:40px;">';  txt +='<div style = "clear:both; color:#000; font-weight:bold; width:340px;  padding:5px; text-align:center;  font-size:12px;">Are you sure you want to '+type+'</div>';  txt +='<div style = "clear:both; color:#009999; font-weight:bold; width:340px;  padding:5px; text-align:center; font-size:12px;">'+this.euser['name']+'</div>';  txt +=this.createButtons(typelist, commandlist, i);  txt +='</div>';  document.getElementById('rostereditor').innerHTML = txt;  }  else  alert("Please enter a valid name and email.");  };    this.cancelRoster = function(type, i){  document.getElementById('rostereditor').innerHTML = this.initRosterContent(i);  };    this.createButtons = function(commandlist, typelist, i){  txt = "";  txt +='<div style = "clear:both; height:30px; margin-top:40px;">';  for(c = 0; c < typelist.length; c++){  txt +='<div style = "background-image:url(\'http://s3.amazonaws.com/ldimages/bg8.gif\'); margin-left:30px; float:left; width:120px; border:1px solid #aaa; cursor:pointer; text-align:center; height:20px; padding:6px; font-size:12px; ';  if(typelist[c] == 'Delete' || typelist[c] == "Cancel") txt += 'color:#aa0000; ';  txt +=' " onclick = "myTable.editor.'+commandlist[c]+'(\''+typelist[c].toLowerCase()+'\', '+i+')">'+typelist[c]+'</div>';  }  txt +='</div>';  return txt;  };    this.initRosterContent = function(i){  this.setCurrentUser(i);  ctxt = "";  if(params.id[i].match(/@/g)){  typelist  = new Array('setRosterContent', 'setRosterContent');  commandlist = new Array('Edit', 'Delete');  }  else{  typelist  = new Array('setRosterContent');  commandlist = new Array('Delete');  }  ctxt +='<div style = "clear:both; height:20px; padding:5px;">';  ctxt +='<div style = "float:left; padding:5px; width:100px;">Name:</div>';  ctxt +='<input type = "text" id = "r_name" name = "r_name" style = "float:left; width:200px;  border:1px solid #ddd;" value = "'+this.euser['name']+'"/>';  ctxt +='</div>';  ctxt +='<div style = "clear:both; height:20px; padding:5px">';  ctxt +='<div style = "float:left; padding:5px; width:100px;">Email:</div>';  ctxt +='<input type = "text" id = "r_email" name = "r_email"  style = "float:left; width:200px; border:1px solid #ddd;" />';  ctxt += '</div>';  ctxt +=this.createButtons(typelist, commandlist, i);  return ctxt;  };    this.setRosterEditor = function(i){  this.col = "";  xtxt = '<div id = "rostereditor" style = "float:left; border:1px solid #ddd; width:364px; height:193px; margin:10px; padding:5px; font-size:10px;">';  xtxt += this.initRosterContent(i);  xtxt +='</div>';  return xtxt;  };    this.setWindowContent = function(type, i){  txt = "";  switch(type){  case "Roster": txt += this.setRosterEditor(i); break;  }  return txt;  };    this.init = function(command, clocation, posttype){  this.id = params.id;  this.inputtype = params.inputtype;  this.fullattribute = params.fullattribute;  this.abbreviationid = params.abbreviationid;  this.inputtextoption = params.inputtextoption;  this.command = command;  this.clocation = clocation;  this.posttype = posttype;  this.euser = new Array();  };    this.resetNode = function(){  keylocation = "";  if(this.col != ""){  cid = this.id[this.row];  objid = this.abbreviationid[this.col];  content = this.getContent();  content = content.replace(/_/g, ' ');  objname = this.fullattribute[this.col];  command = this.command;  clocation = this.clocation;  cnode = this.posttype+',_'+cid+',_'+objname+',_'+objid+',_'+content;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+command+'_'+clocation+'/'+cnode+'/resettable');  }  };    this.resetEditor = function(){  cid = this.tobjname+"_"+this.row+"_"+this.col;  entry = '<div onclick = "'+this.tobjname+'.editor.startEdit('+this.row+', '+this.col+', '+this.i+', \''+this.content+'\', '+this.height+', \''+this.tobjname+'\')" style = "'+this.style[this.row+'_'+this.col]+'">'+this.setContent(this.content)+'</div>';    objTable = eval(this.tobjname);  nheight = (21 * (Math.round(this.content.length/objTable.maxwords) + 1));  pheight = (21 * (Math.round(this.previouscontent.length/objTable.maxwords)+1));  initheight = (nheight < objTable.maxwords && this.previouscontent != "");  this.resizeColWidth();  if((initheight || nheight != pheight) && !this.isselectable){  UI.resizeTable(this.tobjname);  }  else{  this.isselectable = false;  document.getElementById(cid).innerHTML = entry;  }  this.col = "";  };    this.getContent = function(){  tid = this.tobjname+'_input_'+this.row+'_'+this.col;  obj = document.getElementById(tid);  ccont = "";  switch(this.inputtype[this.col]){  case "year3": case "year":  case "sport": case "country": case "menu": case "position":  ccont = obj.options[obj.selectedIndex].value;  break;  default:  ccont = obj.value;  }  return ccont;  };    this.setContent = function(content){  content = content.replace(/\s/g, '&nbsp;');  xtxt = '<div style = "padding-left:5px; padding-right:5px;">'+content+'</div>';  return xtxt;  };      this.setYearSelect = function(){  startyear = myDays.year+10;  carray = new Array();  for (i = startyear; i > 1950; i--)  carray.push(i);  return carray;  };    this.setYearSelectReduce = function(){  startyear = myDays.year;  carray = new Array();  for (i = startyear; i > 1800; i--)  carray.push(i);  return carray;  };    this.setObjList = function(){  objlist = "";  switch(this.inputtype[this.col]){  case "menu": objlist = this.inputtextoption[this.col].split(',_'); break;  case "sport": objlist = params.sport; break;  case "country": objlist = params.country; break;  case "position": objlist = params.position; break;  case "year3": case "year2": objlist = this.setYearSelect(); break;  case "year": objlist = this.setYearSelectReduce(); break;  }  return objlist;  };    this.setOptions = function(opts, matched){  clen = opts.length;  curtext = "";  for(l = 0; l < clen; l++){  try{  wrd = opts[l].replace(/_/g, ' ');  }catch(e){wrd = opts[l];}  curtext += '<option value = "'+opts[l]+'" ';  if(opts[l] == matched) curtext += "selected";  curtext += ' >'+wrd+'</option>';  }  return curtext;  };    this.initInputer = function(){  this.previouscontent = this.content;  cid = this.tobjname+"_"+this.row+"_"+this.col;  tid = this.tobjname+'_input_'+this.row+'_'+this.col;  obj = document.getElementById(cid);  cont = "";  cwidth = 0;  switch(this.inputtype[this.col]){  case "year3": case "year": case "year2":  case "sport": case "country": case "menu": case "position":  objlist = this.setObjList();  keylocation = "edittable";  cwidth = 130;  cont = '<select id = "'+tid+'" style = "background:#eee; height:'+this.height+'px; font-size:10px; width:'+cwidth+'px;">';  cont += this.setOptions(objlist, this.content);  cont += '</select>';  this.isselectable = true;  break;  default:  keylocation = "tabletype";  cwidth = 34;  cont += '<input id = "'+tid+'" type = "text" style = "background:#eee; height:'+(this.height-8)+'px; font-size:10px; width:'+cwidth+'px" value = "'+this.content+'">';  }  setDefaults();  obj.innerHTML = cont;  cobj = document.getElementById(this.tobjname+'_col_'+this.col);  this.currentwidth = cobj.offsetWidth;  cobj.style.width = (cwidth+7)+'px';  this.resizeColWidth();  if((this.ctable.defaulttablewidth+cwidth) > defWidth)  this.ctable.resizeTable(this.ctable.defaulttablewidth+cwidth);  };    this.resizeColWidth = function(){    content = this.getContent();  cwidth = (content.length)*8;  if(cwidth < 34) cwidth = 34;  cobj = document.getElementById(this.tobjname+'_col_'+this.col);  if(cwidth+4 < this.currentwidth) cwidth = this.currentwidth - 4;  cobj.style.width = (cwidth+4)+'px';  tid = this.tobjname+'_input_'+this.row+'_'+this.col;  obj = document.getElementById(tid);  obj.style.width = (cwidth)+'px';    };    this.startEdit = function(row, col, i, content, cheight, objname){  if(state != 0){      this.resetNode();  if(this.col == ""){    this.col = col;  this.row = row;  this.i = i;  this.content = content;  this.height = cheight;  this.initInputer();  currenteditor = this;    }  }  else{  myTimer.queuePush('signin_400/250');  }  };    this.setEditing = function(val){  this.editing = val;  };    this.createENode = function(ctable, content, tablename, tobjname, cstyle, cheight, row, col, i){  this.tobjname = tobjname;  this.tablename = tablename;  this.height = cheight;  this.style[row+'_'+col] = cstyle;  this.ctable = ctable;  cid = tobjname+"_"+row+"_"+col;  txt = "";  txt += '<div id = "'+cid+'" onmouseover = "'+tobjname+'.editor.setEditing(true)" onmouseout = "'+tobjname+'.editor.setEditing(false)"><div onclick = "'+tobjname+'.editor.startEdit('+row+', '+col+', '+i+', \''+content+'\', '+cheight+', \''+tobjname+'\')" style = "'+cstyle+';" >'+this.setContent(content)+'</div></div>';  return txt;  };  } function UserMouse(){    this.X = 0;  this.Y = 0;    this.setMouseXY = function(e){  if (IE) {  myMouse.X = event.clientX + document.body.scrollLeft;  myMouse.Y = event.clientY + document.body.scrollTop;  }  else {  myMouse.X = e.pageX;  myMouse.Y = e.pageY;  }      if(movingbrace){   myFilterWindow.calculateMidRange();  }    };       this.callback = function(event){   if(event.preventDefault) event.preventDefault();     };    }  var myMouse = new UserMouse(); function RegistrationHandler(){  this.process = function(command, section, subsection, subcommand){  switch(subsection){  case "Country":  thecountry = req.responseXML.getElementsByTagName("country")[0].childNodes[0].nodeValue;  params.country = thecountry.split(',');  switch(uReg.designformat){  case "wizard":  uReg.setRegistration(false);  command = cWiz.getInstruction(cWiz.cindex, "command");  if(command == "reregister" || cWiz.curcommand == "SIGN IN"){  myTimer.queuePush('callCommand_HOME/default/default');  }  break;  case "accounts":  uReg.setRegistration(false);  break;  default:  uReg.setRegistration(true);  uReg.showRegistration();  break;  }  stoptheload();  break;  case "validAge":  complete = "0";  complete = req.responseXML.getElementsByTagName("complete")[0].childNodes[0].nodeValue;  if(complete == "0"){  byr_o = document.getElementById('valid_menu_year');  bmn_o = document.getElementById('valid_menu_month');  bd_o = document.getElementById('valid_menu_day');    byr_o.style.border = "1px solid #FF0000";  bmn_o.style.border = "1px solid #FF0000";  bd_o.style.border = "1px solid #FF0000";  stoptheload();  errortxt = 'You must create your account from a parent account because you\'re too young to register.';  switch(uReg.designformat){  case "wizard":  cWiz.processError(errortxt);  default:  alert(errortxt);  }  uReg.regFinished = false;  uReg.setBtnUndisable();  }  else{  switch(uReg.designformat){  case "wizard":  uReg.register('myform', cWiz.regurl);    break;  default:  uReg.register('registerform', 'register.php?loc='+currentLink);  }  }  break;  case "validUsername":  complete = "0";  complete = req.responseXML.getElementsByTagName("complete")[0].childNodes[0].nodeValue;  stoptheload();  if(complete == "0"){  usr = document.getElementById('valid_text_Username');  usr.style.border = "1px solid #FF0000";  usr.value = usr.value+ " ";  errortxt = 'Username already in use.';  switch(uReg.designformat){  case "wizard":  cWiz.processError(errortxt);  default:  alert(errortxt);  }  uReg.regFinished = false;  uReg.setBtnUndisable();  }  else{  byr_o = document.getElementById('valid_menu_year');  bmn_o = document.getElementById('valid_menu_month');  bd_o = document.getElementById('valid_menu_day');  byr = byr_o.options[byr_o.selectedIndex].value;  bmn = bmn_o.options[bmn_o.selectedIndex].value;  bd = bd_o.options[bd_o.selectedIndex].value;  psval= byr+'-'+bmn+'-'+bd;  uReg.validDBAge(psval);  }  stoptheload();  break;  case "validEmail":  complete = "0";  complete = req.responseXML.getElementsByTagName("complete")[0].childNodes[0].nodeValue;  stoptheload();  if(complete == "0"){  eml = document.getElementById('valid_email_Email');  eml.style.border = "1px solid #FF0000";  eml.value = eml.value + " ";  uReg.regFinished = false;  errortxt = 'Email already in use.';  switch(uReg.designformat){  case "wizard":  cWiz.processError(errortxt);  default:  alert(errortxt);  }  stoptheload();  uReg.setBtnUndisable();  }  else{  uReg.validDBUsername(document.getElementById('valid_text_Username').value);  }  break;  case "process":  myTimer.queuePush('callAjax_'+command+'/'+section+'/display');  break;  default:  params.setNameDOM(req.responseXML.getElementsByTagName("name"));  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Data_Type"));   params.setDisplayTypeDOM(req.responseXML.getElementsByTagName("Display_Data_Type"));  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("id"));  params.setInputDataTypeDOM(req.responseXML.getElementsByTagName("Input_Data_Text_Options"));  val = req.responseXML.getElementsByTagName("value");  if(val[0] != null) {params.setValueDOM(val);}  uReg.currentReg = subsection;  myTimer.queuePush('callAjax_HOME/Registration/Sport//setsport');  break;  }  };    } function FilterWindow(){    this.currentbrace = "";   this.currentMidRange = "";   this.obj = "";  this.obj2 = "";  this.sliderbar = "";  this.leftbar = "";  this.rightbar = "";  this.barwidth = 280;  this.objid = "";  this.leftrange = new Array();  this.rightrange = new Array();  this.ffixed = new Array();  this.filteredObjects = new Array();  this.leftobjs = new Array();  this.rightobjs = new Array();  this.leftstored = new Array();  this.rightstored = new Array();  this.marginstored = new Array();  this.widthstored = new Array();  this.cleftpos = "";  this.crightpos = "";  this.sport = "";  this.filterlist = "";  this.cmargin = "";  this.defstart = new Array();  this.defend = new Array();  this.winwidth = 640;  this.winheight = 300;  this.cursoropen = new Image();  this.cursorclosed = new Image();  this.cursoropen.src = "http://s3.amazonaws.com/ldimages/openhand.cur.ico";  this.cursorclosed.src = "http://s3.amazonaws.com/ldimages/closedhand.cur.ico";    this.setBrace = function(obj, brace){  objarray = obj.id.split(brace);  objid = objarray[0];  if(BrowserDetect.browser == "Firefox")  obj.style.cursor = "-moz-grabbing";  else  obj.style.cursor = "url('"+this.cursorclosed.src+"')";   this.objid = objid;  this.leftbar = document.getElementById(objid+'_leftrange');  this.rightbar = document.getElementById(objid+'_rightrange');  this.currentbrace = brace;  this.currentMidRange = document.getElementById(objid+'_midrange');  this.sliderbar = document.getElementById(objid+'_sliderbar');  this.obj = obj;  movingbrace = true;  };    this.restartFilter = function(){  this.resetFilters();  this.resetBrace();  retval = params.psports[params.spindex]+",_"+myMini.currentTopTab+',_';  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/getMainFilter/'+retval);  myUserList.filterUser = new Array();  myUserList.init(document.getElementById('midboxcontent'));  };    this.resetFilters = function(){  movingbrace = false;  this.leftrange = new Array();  this.rightrange = new Array();  this.ffixed = new Array();  this.filteredObjects = new Array();  this.leftobjs = new Array();  this.rightobjs = new Array();  this.leftstored = new Array();  this.rightstored = new Array();  this.marginstored = new Array();  this.widthstored = new Array();  this.cleftpos = "";  this.crightpos = "";  this.sport = "";  this.filterlist = "";  this.cmargin = "";  };    this.calculateMidRange = function(){  if(movingbrace){  thewidth = (document.documentElement.clientWidth) / 2;  twidth = thewidth-(this.winwidth/2);  slidestart = this.sliderbar.offsetLeft+twidth;  leftbar = this.leftbar.offsetLeft+twidth;  rightbar = this.rightbar.offsetLeft+twidth;  rwidth = this.rightbar.offsetWidth;  xloc = myMouse.X;  if(IE){  leftbar += 150;  rightbar += 150;  xloc -= 10;  }  this.cmargin = 0;  cond1 = false;  margin = xloc - slidestart;  margin = (margin < 0) ? 0 : margin;  lineend = slidestart+this.barwidth;  xloc = (xloc > lineend) ? lineend : xloc;  if(this.currentbrace == "_leftrange"){  if(margin > 0 && margin <= this.barwidth){  cwidth = (rightbar-rwidth) - xloc;  if(cwidth > 0){  this.leftbar.style.marginLeft = margin+"px";  cond1 = true;  }  }  }  else{  cwidth = xloc - (leftbar);  cwidth = (cwidth >= this.barwidth) ? this.barwidth : cwidth;  if(cwidth > 0){  cond1 = true;  }  }  if(cond1){  myFilterWindow.currentMidRange.style.width = cwidth+"px";   myFilterWindow.cmargin = margin;  myFilterWindow.setIncrementContent();  }  else {  this.resetBrace();  }    }    };    this.resetBrace = function(){  movingbrace = false;  this.currentbrace = "";   if(this.obj != ""){  if(BrowserDetect.browser == "Firefox")  this.obj.style.cursor = "-moz-grab";  else  this.obj.style.cursor = "url('"+this.cursoropen.src+"')";   }  if(this.obj2 != "")  this.obj2.style.cursor = "default";   };    this.updateFilteredObjects = function(cleft, cright, tempmargin){  if(!instack(this.filteredObjects, this.objid)){  this.filteredObjects.push(this.objid);  }  this.leftobjs[this.objid] = cleft;  this.rightobjs[this.objid] = cright;  this.leftstored[this.objid] = cleft;  this.rightstored[this.objid] = cright;  this.marginstored[this.objid] = tempmargin;  this.widthstored[this.objid] = this.currentMidRange.offsetWidth;  };    this.setFilterList = function(){  clen = this.filteredObjects.length;  startfilt = this.filterlist != "";  for(i =0; i < clen; i++){  objid = this.filteredObjects[i];  repl = objid+":"+this.leftobjs[objid]+"-"+this.rightobjs[objid]+";";  editlist = true;  iswidth = (this.leftobjs[objid] == this.defstart[objid] && this.rightobjs[objid] == this.defend[objid]);  if(!iswidth){  if(!this.filterlist.match(objid)){  this.filterlist += repl;  editlist = false;  }  }  else  repl = "";  if(editlist){  re = new RegExp(objid+".*?;");  this.filterlist = this.filterlist.replace(re, repl);  }    }  };    this.applyFilters = function(){  this.setFilterList();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/performFilter/'+myFilterWindow.filterlist+'/setfilterwindow2');  };    this.setBarCursor = function(obj){  if(obj != null)  this.obj2 = obj;  if(movingbrace){  if(BrowserDetect.browser == "Firefox")  this.obj2.style.cursor = "-moz-grabbing";  else  this.obj2.style.cursor = "url('"+this.cursorclosed.src+"')";   }  else this.obj2.style.cursor = "default";    };    this.setIncrementContent = function(){  obj = document.getElementById(this.objid+'_increment');  slidestart = this.sliderbar.offsetLeft;  leftbar = this.leftbar.offsetLeft;  rightbar = this.rightbar.offsetLeft;  if(IE){  leftbar += 150;  rightbar += 150;  }  rwidth = this.rightbar.offsetWidth;  fixednum = this.ffixed[this.objid]/1;  tempmargin = leftbar-slidestart;  leftpos = leftbar - slidestart;  rightpos = rightbar - slidestart;  diff = this.rightrange[this.objid] - this.leftrange[this.objid];  cleftpos = this.leftrange[this.objid] + (leftpos/this.barwidth)*diff;  crightpos = this.leftrange[this.objid] + (rightpos/this.barwidth)*diff;    crightpos = (crightpos > this.rightrange[this.objid]) ? this.rightrange[this.objid] : crightpos;  cleftpos = cleftpos.toFixed(fixednum);  crightpos = crightpos.toFixed(fixednum);  obj.innerHTML = cleftpos+" - "+crightpos;  this.updateFilteredObjects(cleftpos, crightpos, tempmargin);  };    this.convertValue = function(val){  cval = val.split('+');  switch(cval[0]){  case "cyear":  val = myDays.curryear;  break;  case "now":  val = myDays.curryear/1 + cval[1]/1;  break;  }  return val/1;  };    this.initFilter = function(){  ctxt = "";  ctxt += '<div style = "padding-left:5px; float:left; height:'+(this.winheight-30)+'px; width:'+(this.winwidth-10)+'px; overflow:auto;">';  ctxt +='<div style = "padding-top:10px; font-size:10px; color:#0000cc; cursor:pointer; font-size:10px" onclick = "myFilterWindow.restartFilter()">Reset Filters</div>';  tablen = params.fabr.length;  for(i = 0; i < tablen; i++){  wrd = params.fabr[i].replace(/_/g, ' ');    if(params.frange[i] != "None"){  farray = params.frange[i].split(', ');  this.defstart[params.fref[i]] = this.convertValue(farray[0]);  this.defend[params.fref[i]] = this.convertValue(farray[1]);  if(this.leftstored[params.fref[i]] == null){  start = this.defstart[params.fref[i]];  end = this.defend[params.fref[i]];  leftmargin = 0;  cwidth = this.barwidth;  }  else{  start = this.leftstored[params.fref[i]];  end = this.rightstored[params.fref[i]];  leftmargin = this.marginstored[params.fref[i]];  cwidth = this.widthstored[params.fref[i]];  }  leftmargin = leftmargin/1;  start = start/1; this.defstart[params.fref[i]] = this.defstart[params.fref[i]]/1;  end = end/1; this.defend[params.fref[i]] = this.defend[params.fref[i]]/1;  this.leftrange[params.fref[i]] = this.defstart[params.fref[i]];  this.rightrange[params.fref[i]] = this.defend[params.fref[i]];  this.ffixed[params.fref[i]] = params.ffixed[i]/1;  start = start.toFixed(this.ffixed[params.fref[i]]);  end = end.toFixed(this.ffixed[params.fref[i]]);  ctxt +='<div style = "clear:both; height:35px; padding-top:10px;">';  ctxt +='<div style = "padding-top:12px; font-size:10px; float:left;width:140px;">'+wrd+'</div>';  ctxt +='<div id = "'+params.fref[i]+'_sliderbar" style = "float:left; margin-left:10px; width:300px; height:35px; background-image:url(\'http://s3.amazonaws.com/ldimages/slider.gif\');"  onmouseover = "myFilterWindow.setBarCursor(this)">';  ctxt +='<div id = "'+params.fref[i]+'_leftrange" style = "margin-left:'+leftmargin+'px;';  if(BrowserDetect.browser == "Firefox")  ctxt += "cursor: -moz-grab; ";  else  ctxt += "cursor: url(\'"+this.cursoropen.src+"\'); ";   ctxt += ' float:left; width:8px; height:35px; background-image:url(\'http://s3.amazonaws.com/ldimages/leftbrace.gif\');" onmousedown = "myFilterWindow.setBrace(this, \'_leftrange\')" ></div>';  ctxt +='<div id = "'+params.fref[i]+'_midrange" style = "float:left; width:'+cwidth+'px; height:35px; background-image:url(\'http://s3.amazonaws.com/ldimages/midrange.png\');" onmouseup = "myFilterWindow.setBarCursor(this)" onmouseover = "myFilterWindow.setBarCursor(this)"></div>';  ctxt +='<div id = "'+params.fref[i]+'_rightrange" style = "';  if(BrowserDetect.browser == "Firefox")  ctxt += "cursor: -moz-grab; ";  else  ctxt += "cursor: url(\'"+this.cursoropen.src+"'); ";   ctxt +=' float:left; width:8px; height:35px; background-image:url(\'http://s3.amazonaws.com/ldimages/rightbrace.gif\');" onmousedown = "myFilterWindow.setBrace(this, \'_rightrange\')"></div>';  ctxt +='</div>';  ctxt +='<div style = "padding-top:5px; font-size:10px; float:left; width:120px;  height:28px; border-right:1px solid #eee; border-bottom:1px solid #eee;margin-top:1px; ">';  ctxt +='<div id = "'+params.fref[i]+'_increment" style = "color:#0000cc; font-size:10px; border:0px;padding-left:10px; width:100px;  margin-left:5px; " >'+start+' - '+end+'</div>';  ctxt += '</div>';  ctxt += '</div>';  }  }  ctxt +='<div style = "padding-bottom:10px; clear:both;"></div>';  ctxt += '</div>';  return ctxt;  };    this.setMainFilter = function(){  this.filteredObjects = new Array();  this.leftobjs = new Array();  this.rightobjs = new Array();  return this.initFilter();  };    this.setFilterCat = function(sport){  this.sport = sport;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/getSportFilterCat/'+this.sport+'/setFilterCategories');  };    this.setFilterContent = function(){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/getSportFilter/'+this.sport);  };    this.openFilterInfo = function(){  myTimer.queuePush('filterwindow_'+this.winwidth+'/'+this.winheight+'/'+this.sport);  };  }    var myFilterWindow = new FilterWindow(); function Wizard(){  this.content = "";  this.defaultinput = "";  this.defaultaccount = "";  this.resultset = new Array();  this.stages = 4;  this.optionlist = new Array();  this.instructionlist = new Array();  this.instructions = new Array();  this.accounttype = "";  this.cindex = 0;  this.width = 400;  this.height= 224;  this.visible = false;  this.regurl = "";  this.curaccount = "";  this.curstage = "";  this.curcommand = "";  this.currentlist = "-1";    this.createRow = function(inserttxt, bg){  temptxt = "";  temptxt += '<div style = "padding:15px; background:'+bg+';  color:#000; height:20px; font-size:14px; clear:both;">';  temptxt +=inserttxt;  temptxt +='</div>';  return temptxt;  };    this.setCommand = function(inserttxt, command){  temptxt = "";  temptxt += '<div style = "margin-left:20px; margin-right:20px;padding:4px; padding-left:8px; padding-right:8px; float:left; cursor:pointer; border: 1px solid #aaa; background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\'); font-size:14px;" onclick = "'+command+'">';  temptxt +=inserttxt;  temptxt += '</div>';  return temptxt;  };    this.initLDOption = function(command1, command2){  commandtxt = this.setCommand('Yes', 'cWiz.resetContent(\''+command1+'\')');  commandtxt += this.setCommand('No', 'cWiz.resetContent(\''+command2+'\')');  usraccount = (this.defaultaccount == "") ? "friend" : this.defaultaccount;  curtxt = "";  curtxt += '<div id = "friendrequest" name = "friendrequest" style = "width:430px; background:#374234; height:220px;">';  curtxt += this.createRow('Is your '+usraccount+' a LockerDome user?', "#fff");  curtxt +='<div style = "width:430px; height:10px; clear:both; background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\');">';  curtxt += '</div>';  curtxt +='<div style = "border:1px solid #ccc; margin-top:45px;  width:330px; background:#003300; margin-left:20px; height:50px; padding:4px; clear:both; ">';  curtxt += this.createRow(commandtxt, "#374234");  curtxt += '</div>';  curtxt += '</div>';  return curtxt;  };    this.setRequest= function(title, commandtype, command, bg, backlink){  commandtxt = "";  if(backlink != "")  commandtxt = this.setCommand('Back', 'cWiz.resetContent(\''+backlink+'\')');  commandtxt += this.setCommand(title, 'cWiz.sendRequest(\''+commandtype+'\', \'useremail\', \''+command+'\')');  inputval = this.createInput("text", "useremail", this.defaultinput);  curtxt = "";  curtxt += '<div style = "width:430px; background:#374234; height:220px;">';  curtxt += this.createRow(inputval, bg+"; overflow:auto");  curtxt +='<div style = "width:430px; height:10px; clear:both; background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\');">';  curtxt += '</div>';  curtxt +='<div style = "border:1px solid #ccc; margin-top:45px;  width:330px; background:#003300; margin-left:20px; height:50px; padding:4px; clear:both; ';  extra =(backlink == "") ? '; padding-left:90px' : '';  curtxt += '">';  curtxt += this.createRow(commandtxt, "#374234"+extra);  curtxt += '</div>';  curtxt += '</div>';  return curtxt;  };    this.setJoin = function(type, command){  switch(command){  case "start":  this.defaultaccount = "";  this.defaultinput = "--Type your "+type+"\'s lockerdome mail here--";  this.content = this.setRequest('Join '+type, 'ldmail', 'joinU'+type, '#f4f6ef', "");  break;  }  };    this.setUser = function(type, command){  switch(command){  case "start":  this.defaultaccount = type;  this.content = this.initLDOption('user_LD', 'user_EXT');  break;  }  };    this.setFriend = function(command){  switch(command){  case "start":  this.defaultaccount = "";  this.content = this.initLDOption('friend_LD', 'friend_EXT');  break;  }  };    this.setResponse = function(command){  switch(command){  case "friend_start":  this.content = this.initLDOption('friend_LD', 'friend_EXT');  break;  case "user_start":  this.content = this.initLDOption('user_LD', 'user_EXT');  break;  case "friend_LD":  this.defaultinput = "--Type your friend\'s lockerdome mail here--";  this.content = this.setRequest('Add Friend', 'ldmail', 'addUFriend', '#f4f6ef', "friend_start");  break;  case "friend_EXT":  this.defaultinput = "--Type your friend\'s email here--";  this.content = this.setRequest('Add Friend', 'email', 'addUFriend', '#f4f8f9', "friend_start");  break;  case "user_LD":  this.defaultinput = "--Type your "+this.defaultaccount+"\'s lockerdome mail here--";  this.content = this.setRequest('Add '+this.defaultaccount, 'ldmail', 'addU'+this.defaultaccount, '#f4f6ef', "user_start");  break;  case "user_EXT":  this.defaultinput = "--Type your "+this.defaultaccount+"\'s email here--";  this.content = this.setRequest('Add '+this.defaultaccount, 'email', 'addU'+this.defaultaccount, '#f4f8f9', "user_start");  break;  }  };    this.sendRequest = function(request, objname, command){  switch(request){  case "ldmail":  objval = document.getElementById(objname).value;  if(objval == this.defaultinput || objval == "")  alert('Please enter a valid lockerdome mail');  else{  if(validate.validLdmail(objval))  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+command+'_ldmail/'+objval+'/'+command);  else  alert('Invalid entry: You entered an invalid lockerdome mail');  }  break;  case "email":  objval = document.getElementById(objname).value;  if(objval == this.defaultinput || objval == "")  alert('Please enter a valid email address');  else {  if(validate.validEmail(objval)){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+command+'_email/'+objval+'/'+command);  }  else  alert('Invalid entry: You entered an invalid email address');  }  break;  }  };    this.resetContent = function(type){  this.setResponse(type);  myMini.setContent('minicontent', this.content, "topClose");  };    this.resetInput = function(obj){  if(obj.value == this.defaultinput){  obj.value = "";  }  };    this.createInput = function(type, id, initval){  mtxt = "";  switch(type){  case "text":  mtxt = '<input type = "text" id = "'+id+'" name = "'+id+'" style = "color:#444; border:1px solid #aaa; width:350px" value = "'+initval+'" onclick="cWiz.resetInput(this)"/>';  break;  }  return mtxt;  };    this.setGlaze = function(cwrd, message, flink, slink, stage, mheight){  ptxt = '';  ptxt +='<div style = " height:15px; font-weight:bold; padding:10px; padding-left:15px;width:'+(this.width-25)+'px; border-bottom:1px solid #333; background:#222;">';  ptxt += '<div style = "float:left; margin-left:7px; color:#fff;">'+cwrd+'</div>';  ptxt +='</div>';    ptxt +='<div style = "color:#fff; height:'+(this.height-115)+'px; width:'+this.width+'px; padding-top:15px; clear:both; text-align:left; ">'+message+'</div>';  ptxt +='<div style = "height:30px; width:'+this.width+'px;">';  ptxt +='<div style = "width:170px; float:right; padding-right:12px;">';  ptxt +=this.setUserCommand(flink, stage);  ptxt +=this.setUserCommand(slink, stage, "margin-left:20px;");  ptxt +='</div>';  ptxt +='</div>';  return ptxt;  };    this.initContent = function(){    cname = params.sname;  cname = cname.replace(/_/g, ' ');  message = '<div style = "padding:25px; padding-top:10px;">'+params.subject+'.</div>';  if(params.raccount == ""){  name = params.sname;  step1 = "Sign in to your account. ";  step2 = "Confirm the request";  this.instructions = new Array(step1, step2);  this.instructionlist = new Array("defsignin", "confirm_"+name);  }  return this.setGlaze(cname, message, "ACCEPT", "DECLINE", 0);  };    this.setInstructions = function(){  clen = this.instructions.length;  cinfo = '<div style = "float:left; padding-left:15px; clear:both;">';  for(i = 0; i < clen; i++){  cinfo += '<div style = "clear:both; padding:2px; padding-left:0px;">';  cinfo += '<div style = "float:left; padding:3px; ">'+(i+1)+'. ';  cinfo += this.instructions[i];  cinfo +='</div>';  cinfo += '</div>';  }  cinfo += '</div>';  return cinfo;  };    this.setCheckList = function(stage, ids){  cinfo = '<div style = "float:left; padding-left:15px; clear:both;">';  def = (this.resultset[stage] == "") ? 0 : this.resultset[stage];  clen = this.optionlist.length;  for(i = 0; i < clen; i++){  cinfo += '<div style = "clear:both; padding:4px; padding-left:0px;">';  cinfo +='<div style = "float:left">';  cinfo +='<input type = "checkbox" id = "'+ids[i]+'" name = "radiooption" value = "'+i+'" ';  if(i == def)  cinfo +=' checked ';  cinfo +='/>';  cinfo +='</div>';  cinfo += '<div style = "float:left; padding:3px; ">';  cinfo += this.optionlist[i];  cinfo +='</div>';  cinfo += '</div>';  }  cinfo += '</div>';  return cinfo;  };    this.setOptionList = function(stage){  cinfo = '<div style = "float:left; padding-left:15px; clear:both;">';  def = (this.resultset[stage] == "") ? 0 : this.resultset[stage];  clen = this.optionlist.length;  for(i = 0; i < clen; i++){  cinfo += '<div style = "clear:both; padding:4px; padding-left:0px;">';  cinfo +='<div style = "float:left; padding:4px; line-height:15px;">';  cinfo +='<input type = "radio"  style = "float:left; margin-top:0px; ';  if(IE)  cinfo +='margin-top:-2px;';  cinfo +='" name = "radiooption" value = "'+i+'" ';  if(i == def)  cinfo +=' checked ';  cinfo +='/>';  cinfo += '&nbsp;'+this.optionlist[i];  cinfo +='</div>';  cinfo += '</div>';  }  cinfo += '</div>';  return cinfo;  };    this.identifyUser = function(type, stage){  cwrd = "VERIFY IDENTITY";  name = params.sname;  name = name.replace(/_/g, ' ');  this.optionlist = new Array("I am "+name+" (I am over 13 years old)", name+" is my child. I will manage their account.", "I am the legal guardian of "+name+". I will manage their account.");  message = this.setOptionList(stage);  return this.setGlaze(cwrd, message, "BACK", "NEXT", stage);  };    this.setAccountInfo = function(type, stage){  cwrd = "ACCOUNT INFORMATION";  name = params.sname;  this.optionlist = new Array("I am a registered user. I have an account.", "I have not registered. I do not have an account");  message = this.setOptionList(stage);  return this.setGlaze(cwrd, message, "BACK", "NEXT", stage);  };    this.confirmAccount = function(type, stage){  cwrd = "ACCOUNT INFORMATION";  name = params.sname;  name = name.replace(/_/g, ' ');  this.optionlist = new Array("Yes", "No");  message = '<div style = "clear:both; padding-left:15px; width:380px;">';  message +='<div style = "padding-top:3px; padding-right:10px; float:left; padding-bottom:10px;">Have you already created a '+params.raccount+' account for '+name+'?</div>';  message += '</div>';  message += this.setOptionList(stage);  return this.setGlaze(cwrd, message, "BACK", "NEXT", stage);  };    this.setResultSet = function(cstage){  clen = this.optionlist.length;  cobj = document.myform.radiooption;  if(cobj != null){  for(c = 0; c < clen; c++){  if(cobj[c].checked){  this.resultset[cstage] = c;  }  }  }  };    this.showSignin = function(type){  name = params.sname;  ctype = (type == "Parent") ? type : "";  step1 = "Sign in to your "+ctype+" account. ";  step2 = "Select the "+params.raccount+" account";  step3 = "Confirm the request";  if(type == "Parent"){  this.instructions = new Array(step1, step2, step3);  this.instructionlist = new Array("signin_"+type, "selectaccount_"+params.raccount, "confirm_"+name);  }  else{  this.instructions = new Array(step1, step3);  this.instructionlist = new Array("signin_"+params.raccount, "confirm_"+name);  }  return this.setInstructions();  };    this.showRegistration = function(type){  name = params.sname;  ctype = (type == "Parent") ? type : params.raccount;  step1 = "Register for your "+ctype+" account. ";  name = name.replace(/_/g, ' ');  if(type == "Parent"){  step2 = "Register "+name+"\'s account";  step3 = "Confirm the request";  this.instructions = new Array(step1, step2, step3);  this.instructionlist = new Array("register_"+type, "reregister_"+params.raccount, "confirm_"+params.raccount);  }  else{  step2 = "Confirm the request";  this.instructions = new Array(step1, step2);  this.instructionlist = new Array("register_"+params.raccount, "confirm_"+params.raccount);  }  return this.setInstructions();  };    this.showSigninRegistration = function(type){  name = params.sname;  name = name.replace(/_/g, ' ');  ctype = (type == "Parent") ? type : "";  cmdtype = (type == "Parent") ? "signin_"+type : "signin";  step1 = "Sign in to your "+ctype+" account. ";  step2 = "Register "+name+"\'s account.";  step3 = "Confirm the request";  this.instructions = new Array(step1, step2, step3);  this.instructionlist = new Array(cmdtype, "register_"+params.raccount, "confirm_"+params.raccount);  return this.setInstructions();  };    this.interpretResult = function(type, stage){  isusr = (this.resultset[1] == 0);  regu = (this.resultset[2] == 0);  hasac = (this.resultset[3] == 0);    if(isusr && regu && hasac)  info = this.showSignin("User");  else if(!isusr && regu && hasac)  info = this.showSignin("Parent");  else if(!isusr && regu && !hasac)  info = this.showSigninRegistration("Parent");  else if (isusr && regu && !hasac)  info = this.showSigninRegistration("User");  else if(isusr && !regu)  info = this.showRegistration("User");  else if(!isusr && !regu)  info = this.showRegistration("Parent");    return this.processCommand(stage);  };    this.processRegistration = function(account, stage){  curindex = this.cindex;  cwrd = 'STEP '+(this.cindex+1)+": "+this.instructions[curindex];    terminfo = '<div style = "float:left;">I agree to the&nbsp;</div><div style = "float:left; color:#6D9EF2; text-decoration:underline; cursor:pointer" onclick = "uReg.startTerms()" >Terms and Conditions</div>';  this.optionlist = new Array(terminfo);  idlist = new Array('agree');  xtxt = this.setCheckList(stage, idlist);  wtxt = '<div style = "clear:both">'+uReg.regcontent+'</div>';  wtxt +='<div style = "clear:both; padding:5px;">';  wtxt +=xtxt;  wtxt +='</div>';  return this.setGlaze(cwrd, wtxt, "CANCEL", "REGISTER", stage);  };    this.processControl = function(account, stage){  curindex = this.cindex;  cwrd = 'STEP '+(this.cindex+1)+": "+this.instructions[curindex];  name = params.sname;  idlist = new Array("truedate", "trueinfo");  terminfo = '<div style = "float:left;">I am older than 13.</div>';  certifyinfo = '<div style = "float:left;">I certify that the information I provided is true.</div>';  this.optionlist = new Array(terminfo, certifyinfo);  txt = this.setCheckList(stage, idlist);  return this.setGlaze(cwrd, txt, "CANCEL", "FINISH", stage);  };    this.processSigninHelper = function(account, stage, command1, command2){  curindex = this.cindex;    txt = '<div style = "color:#fff; padding-left:30px; width:'+(this.width-30)+'px; height:100px;">';  txt +='<div style = "clear:both; height:28px; padding:5px; padding-left:45px;">';  txt +='<div style = "float:left; padding:2px; width:80px; margin-top:1px; ">USERNAME </div>';  txt +='<input id = "username" name = "username" type = "text" style = "color:#fff; border:1px solid #444; font-size:10px; float:left; width:140px; background:#222" />';  txt +='</div>';  txt +='<div style = "clear:both; height:25px; padding:5px; padding-left:45px;">';  txt +='<div style = "float:left; padding:2px; width:80px; margin-top:1px;">PASSWORD </div>';  txt +='<input id = "password" name = "password" type = "password" style = "border:1px solid #444; color:#fff; margin-top:1px; font-size:10px; float:left; width:140px; background:#222 " />';  txt +='</div>';  txt += '</div>';    cwrd = 'STEP '+(this.cindex+1)+": "+this.instructions[curindex];  message = '<div style = "clear:both; padding-left:15px;">';  message +='<div style = "padding-top:0px; float:left; ">'+txt+'</div>';  message += '</div>';  return this.setGlaze(cwrd, txt, command1, command2, stage);  };    this.processDefSignin = function(account, stage){  return this.processSigninHelper(account, stage, "CANCEL", "CONFIRM");  };     this.processSignin = function(account, stage){  return this.processSigninHelper(account, stage, "CANCEL", "SIGN IN", stage);  };    this.setMultiAccount = function(account, stage, ainfo){    cont = ainfo.substring(1, ainfo.length - 1);  carray = cont.split('><');  clen = carray.length;  obj = document.getElementById('req_content');  curindex = this.cindex;  name = params.sname;  name = name.replace(/_/g, ' ');  if(this.instructionlist.length == 0 || this.instructionlist[curindex-1].match(/_Parent/g))  cwrd = "You have multiple accounts. Select an account ";  else  cwrd = "You have multiple accounts. Select "+name;  txt = '<div style = "color:#fff; padding-left:30px; width:'+(this.width-30)+'px; height:100px;">';  txt +='<div style = "clear:both; height:28px; padding:5px; padding-left:45px;">';  txt +='<div style = "float:left; padding:2px; width:80px; margin-top:1px; ">USER </div>';  txt +='<select id = "uname" name = "uname" style = "color:#fff; border:1px solid #444; font-size:10px; float:left; width:140px; background:#222" >';  for(y = 0; y < clen; y++){  uinfo = carray[y].split('||');  if(uinfo.length > 2){  currentname = uinfo[1];  currentname = currentname.replace(/_/g, ' ');  if(params.raccount == "")  currentname += ": "+uinfo[0];  txt +='<option value = "'+carray[y]+'">'+currentname+'</option>';  }  }  txt +='</select>';  txt +='</div>';  txt += '</div>';        obj.innerHTML = this.setGlaze(cwrd, txt, "CANCEL", "SUBMIT", stage);  };    this.getInstruction = function(index, type){  cinfo = this.instructionlist[index];  command = ""; account = "";  if(cinfo != null){  carray = cinfo.split('_');  command = carray[0];  account = (carray.length > 1) ? carray[1] : "";  }  switch(type){  case "command": return command; break;  case "account": return account; break;  }    };    this.processCommand = function(stage){  cinfo = this.instructionlist[this.cindex];  if(cinfo != null){  carray = cinfo.split('_');  command = carray[0];  account = (carray.length > 1) ? carray[1] : "";  }  switch(command){  case "defsignin":  this.visible = true;  return this.processDefSignin(account, stage);  break;  case "signin":  this.visible = true;  return this.processSignin(account, stage);  break;  case "selectaccount":  this.visible = true;  myTimer.queuePush('callCommand_HOME/default/default');  params.commandlist = ('callAjax_HOME/'+currentSection+'/getmembers/'+account+'/setmultiaccount');  return "";  break;  case "reregister":  forceload = true;  case "register":  stoptheload();  this.setRegistration(account, stage);  uReg.startRegistration(account, "wizard");  return "";  break;  default:  this.setControl();  stoptheload();  myTimer.queuePush('confirmrequest_400/250');  myTimer.queuePush('callCommand_HOME/default/default');  forceload = true;  return "";  }    };    this.processError = function(error){  this.cindex--;  alert(error);  };    this.setContent = function(type, stage){  obj = document.getElementById('req_content');  if(params.raccount != ""){  switch(stage){  case 0:  obj.innerHTML = this.initContent();  break;  case 1:  obj.innerHTML = this.identifyUser(type, stage);  break;  case 2:  obj.innerHTML = this.setAccountInfo(type, stage);  break;  case 3:  obj.innerHTML = this.confirmAccount(type, stage);  break;  case 4:  this.cindex = 0;  obj.innerHTML = this.interpretResult(type, stage);  break;  default:  if(this.instructionlist[this.cindex] != this.currentlist){  rcontent = this.processCommand(stage);  if(rcontent != "")  obj.innerHTML = rcontent;  this.currentlist = this.instructionlist[this.cindex];  }  }  }  else{  content = this.processCommand(stage);  if(content != "")  obj.innerHTML = content;  }    };    this.callCommand = function(obj, type, stage){  obj.disabled = true;  this.curcommand = type;  switch(type){  case "NEXT":  this.setResultSet(stage);  case "ACCEPT":  if(stage == 2 && !(this.resultset[2] == 0))  this.setContent(type, stage+2);  else  this.setContent(type, ++stage);  break;  case "FINISH":  validdate = document.getElementById('truedate').checked;  validentry = document.getElementById('trueinfo').checked;  if(validdate && validentry){  this.regurl = "processrequest.php?command=confirmrequest";  regf = document.getElementById('myform');  regf.action = this.regurl;  regf.submit();  stoptheload();  if(params.raccount == ""){  alert("You have confirmed the request.  You can click your network link to see your friends");  }  else{  alert("You have confirmed the request.  You can click your network link to see your teams");  }  stoptheload();  myTimer.queuePush('closeMini_minibox');  this.cindex = 0;  }  else{  alert('This request cannot be confirmed until all requirments are checked.');  myTimer.queuePush('confirmrequest_400/250');  }    break;  case "SUBMIT":  forceload = true;  stoptheload();  info = this.instructionlist[this.cindex];  cobj = document.getElementById('uname');  cacc = cobj.options[cobj.selectedIndex].value;  regf = document.getElementById('myform');  this.regurl = "processrequest.php?command=usersignin&type="+type+"&stage="+stage+"&account="+cacc;  regf.action = this.regurl;  regf.submit();  break;  case "CONFIRM":  forceload = true;  stoptheload();  this.cindex++;  stage++;  regf = document.getElementById('myform');  this.regurl = "processrequest.php?command=signin&type="+type+"&stage="+stage+"&account=";  regf.action = this.regurl;  regf.submit();  break;  case "SIGN IN":  forceload = true;  stoptheload();  info = this.instructionlist[this.cindex];  crray = info.split('_');  cacc = (crray.length > 1) ? crray[1] : "User";  this.cindex++;  stage++;  regf = document.getElementById('myform');  this.regurl = "processrequest.php?command=accountsignin&type="+type+"&stage="+stage+"&account="+cacc;  regf.action = this.regurl;  regf.submit();  break;  case "REGISTER":  stoptheload();  isregistering = false;  this.cindex++;  stage++;  this.visible = true;  cregf = 'myform';  this.regurl = "processrequest.php?command=register&type="+type+"&stage="+stage;  uReg.submitReg("btn_register", cregf, this.regurl);  break;  case "BACK":  if(this.cindex > 0 && stage >= 4)  this.cindex--;  if(stage == 4 && !(this.resultset[2] == 0))  this.setContent(type, stage-2);  else  this.setContent(type, --stage);  break;  case "CANCEL":  case "DECLINE":  myTimer.queuePush('closeMini_minibox');  break;  }  };    this.setUserCommand = function(type, stage, cstyle){  mtxt = '';  smalltype = type.toLowerCase();  mtxt +='<input id = "btn_'+smalltype+'" type = "button" style = "width:70px; text-align:center; padding:2px; font-size:10px;  color:#000;  float:left; '+cstyle+'" onclick = "cWiz.callCommand(this, \''+type+'\', '+stage+')" value="'+type+'">';  return mtxt;  };    this.setUserRequest = function(){  this.display = true;  for(c = 0; c < this.stages; c++)  this.resultset[c] = '';  txt = '';  txt +='<form name="myform" id = "myform" action = "" onsubmit="event.returnValue = false; return false;"';  txt +=' method="post" style = " float:left;" target="target_register">';  txt += '<iframe id="target_register" name="target_register" src="" style="width:0px;height:0px;border:0; "></iframe>';  txt += '<div id = "req_content" style = "color:#fff; width:'+this.width+'px; height:'+this.height+'px; font-size:10px; float:left; clear:both; background-image:url(\'http://s3.amazonaws.com/ldimages/imgsignin.gif\');">';  txt +=this.initContent();  txt += '</div>';  txt += '</form>';  return txt;  };    this.setUserControl = function(){  txt = '';  txt +='<form name="myform" id = "myform" action = "" onsubmit="event.returnValue = false; return false;"';  txt +=' method="post" style = " float:left;" target="target_register">';  txt += '<iframe id="target_register" name="target_register" src="" style="width:0px;height:0px;border:0; "></iframe>';  txt += '<div id = "req_content" style = "color:#fff; width:'+this.width+'px; height:'+this.height+'px; font-size:10px; float:left; clear:both; background-image:url(\'http://s3.amazonaws.com/ldimages/imgsignin.gif\');">';  txt +=this.processControl(this.curaccount, this.curstage);  txt += '</div>';  txt += '</form>';  return txt;  };    this.setRegistration = function(account, stage){  this.visible = true;  this.width = 500;  this.height = 360;  this.curaccount = account;  this.curstage = stage;  };    this.setControl = function(account, stage){  this.width = 400;  this.height= 224;  this.curaccount = account;  this.curstage = stage;  };    this.displayRegistration = function(){    txt = '';  txt +='<form name="myform" id = "myform" action = "" onsubmit="event.returnValue = false; return false;"';  txt +=' method="post" style = " float:left;" ';  txt +=' target="target_register" ';  txt +='>';  txt += '<iframe id="target_register" name="target_register" src="" style="width:0px;height:0px;border:0; "></iframe>';  txt +=  '<div id = "req_content" style = "width:'+this.width+'px; font-size:10px; height:'+this.height+'px; background-image:url(\'http://s3.amazonaws.com/ldimages/imgregister2.gif\');">';  txt += this.processRegistration(this.curaccount, this.curstage);  txt += '</div>';  txt +='</form>';  return txt;  };    this.setRequestHeader = function(){  txt = '';  txt += '<div style = "clear:both; float:left; color:#444; font-size:10px; padding:1px;">NETWORK REQUEST WIZARD</div>';  return txt;  };  }    var cWiz = new Wizard(); function UserHandler(){    this.processCommand = function(thecommand){  switch(thecommand[0]){  case "deleterosteruser": case "renamerosteruser":   stoptheload();  this.processRoster();  myLocker.setRoster();  myTimer.queuePush('closeMini_minibox');  break;  case "emailrosteruser":  stoptheload();  myTimer.queuePush('closeMini_minibox');  break;  case "addnewroster": case "addnetroster":  this.processRoster();  myLocker.setRoster();  stoptheload();  myRoster.enableAdd();  result = req.responseXML.getElementsByTagName("mreq")[0].childNodes[0].nodeValue;  switch(result){  case "reqsent": alert("Membership request sent."); break;  case "reqerror": alert("The user is already in your roster"); break;  case "useradded": alert("The user was successfully added to your roster"); break;  case "useradderror": alert("The user already exists in your roster"); break;  }    break;  case "setrosternetwork":  params.setRosterNameDOM(req.responseXML.getElementsByTagName("rstrname"));  params.setRosterIDDOM(req.responseXML.getElementsByTagName("id"));  myRoster.setNetworkList();  myTimer.queuePush('rosterreq_400/250/'+AJAX.cpost);  break;  case "deleteMedia":  ctoken = req.responseXML.getElementsByTagName("utoken")[0];  if(ctoken != null){  utoken = ctoken.childNodes[0].nodeValue;  utokenn = req.responseXML.getElementsByTagName("utokenn")[0].childNodes[0].nodeValue;  setCookie('cde_u_1x8_l',utoken,1);  setCookie('cderu_0_1xx0x',utokenn,1);  usrImg = new Image();  picture = 'none';  usrImg.src = 'http://s3.amazonaws.com/ldimages/sp_'+usport.toLowerCase()+'.gif';  loadMainPicture('userimg', myHomePage.imgwidth, myHomePage.imgheight);  }  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+currentSubsection+',_'+exceltab);    break;  case "setaccountimage":  ctoken = req.responseXML.getElementsByTagName("utoken")[0];  utoken = ctoken.childNodes[0].nodeValue;  utokenn = req.responseXML.getElementsByTagName("utokenn")[0].childNodes[0].nodeValue;  userpic = req.responseXML.getElementsByTagName("upic")[0].childNodes[0].nodeValue;  setCookie('cde_u_1x8_l',utoken,1);  setCookie('cderu_0_1xx0x',utokenn,1);  usrImg = new Image();  picture = userpic;  usrImg.src = upldDir+picture;  loadMainPicture('userimg', myHomePage.imgwidth, myHomePage.imgheight);  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+currentSubsection+',_'+exceltab);  break;  case "accountswitch":  resetCachedLinks();  ctoken = req.responseXML.getElementsByTagName("utoken")[0];  utoken = ctoken.childNodes[0].nodeValue;  utokenn = req.responseXML.getElementsByTagName("utokenn")[0].childNodes[0].nodeValue;  typ = req.responseXML.getElementsByTagName("typ")[0].childNodes[0].nodeValue;  mclose = true; dothefade = true;  if(typ == "ru"){  setCookie('cde_u_1x8_l',utoken,1);  setCookie('cderu_0_1xx0x',utokenn,1);  generalProcess.loggedin = true;  myTimer.queuePush('callCommand_HOME/default/default');  }  else if(typ == "ur"){  setCookie('ur_u_scde_0x',utoken,1);  setCookie('cde_uru_0x',utokenn,1);  myTimer.queuePush('callCommand_LOCKER/default/default');  }    break;  case "viewMember":  resetCachedLinks();  ctoken = req.responseXML.getElementsByTagName("utoken")[0];  utoken = ctoken.childNodes[0].nodeValue;  utokenn = req.responseXML.getElementsByTagName("utokenn")[0].childNodes[0].nodeValue;  if(ctoken != null){  setCookie('ur_u_scde_0x',utoken,1);  setCookie('cde_uru_0x',utokenn,1);  }  topLinks.addToDefaultLinks("LOCKER");  currentLink = "LOCKER";  currentSection = "default";  currentSubsection = "default";  myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/default');  break;  case "setAccount":  params.setFNameDOM(req.responseXML.getElementsByTagName("Account_Options"));  params.setNameDOM(req.responseXML.getElementsByTagName("Questions"));  params.setValueDOM(req.responseXML.getElementsByTagName("inputtype"));  accountManager.startMini();  myTimer.queuePush('setMini_setAAdmin/Grant_Access');  break;  case "showAccess":  case "userAdmin":  params.account = new Array();  params.user = new Array();  acc = req.responseXML.getElementsByTagName("acc");  if(acc != null){  params.setAccDOM(acc);  params.setNameDOM(req.responseXML.getElementsByTagName("name"));  params.setSportDOM(req.responseXML.getElementsByTagName("sport"));  params.setUserDom(req.responseXML.getElementsByTagName("usnm"));  }  accountManager.startMini();  psval = (thecommand[0] == "userAdmin") ? 'setMini_setAAcess//mn_delete' : 'setMini_setAAcess/mn_switch/mn_delete';  myTimer.queuePush(psval);  break;  case "gettheaccounts":  stoptheload();  params.account = new Array();  params.user = new Array();  params.setUserDom(req.responseXML.getElementsByTagName("usnm"));  params.setNameDOM(req.responseXML.getElementsByTagName("name"));  params.setSportDOM(req.responseXML.getElementsByTagName("sport"));  if(thecommand[1] == "1") {accountManager.initChange();}  else{  myTimer.queuePush('setMini_setAContent/mn_switch/mn_delete');    }  break;  case "boardsubscribe":  resp = req.responseXML.getElementsByTagName("resp")[0].childNodes[0].nodeValue;  switch(resp){  case "complete":  alert('You have successfully subscribed');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/boardlink/'+myBoard.currentselection);  break;  case "error":  alert('You have already subscribed');  break;  }  myBoard.resetCommand('');  stoptheload();  myLarge.removeGlaze();  break;  case "setboardlike":  this.processBoardLikes();  myBoard.openWindow("likes");  break;  case "addBoardFriend":  resp = req.responseXML.getElementsByTagName("resp")[0].childNodes[0].nodeValue;  switch(resp){  case "Complete":    alert("Friendship request sent");  break;  default:  alert("Request has already been sent");  }  myBoard.resetCommand('');  myBoard.cobj.disabled = false;  stoptheload();  myLarge.removeGlaze();  break;  case "boardlink":  case "refreshBoard":  this.processBoardInfo();  this.processBoard();  myLocker.setBoard();  myBoard.resetCommand('');  stoptheload();  myLarge.removeGlaze();  break;  case "defaultseason":  case "changeseason":  switch(currentSubsection){  case "Create_Event":  this.processEvent();  myLocker.setEvent();  break;  case "Calendar": case "Tournaments": case "Matchups": case "Tryouts":  case "Pickup_Games": case "Practices": case "Miscellaneous":  this.processCalendar();  myLocker.setCalendar();  break;  case "Team_Stats": case "Player_Stats": case "Coach_Stats":  if(exceltab == "Season_Stats"){  if(currentLink == "MEMBERS"){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setuserstats_'+currentSubsection+'/'+mySeason.currentseason+',_'+uEvent.parent+',_'+uEvent.eventname+',_'+params.psports[params.spindex]);  }  else{  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setuserstats_'+currentSubsection+'/'+mySeason.currentseason+',_'+uEvent.parent+',_'+uEvent.eventname);  }  }  else  myLocker.setStat();  break;  case "Rosters":  this.processRoster();  myLocker.setRoster();  break;  }  myTimer.queuePush('closeMini_minibox');  break;  }  };    this.processRatings = function(){  params.valid = new Array();  params.value = new Array();  params.currentinfo = new Array();  val = req.responseXML.getElementsByTagName("value");  if(val[0] != null){params.setCategoryDOM(val);}  params.seteventCategory(req.responseXML.getElementsByTagName("valid"));  params.currentinfo = params.eventcategory;  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"), "EE_Name");  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Abbreviation"), "&nbsp;");  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"), "&nbsp;");  cat = req.responseXML.getElementsByTagName("Category");  if(cat[0] != null) {params.setGroupSpace(cat);}  params.setAbbreviationSpace(req.responseXML.getElementsByTagName("Attribute"));   params.fullattribute = params.abbreviation;  };    this.processRoster = function(){  params.defval = null;  params.group = new Array();  params.valid = new Array();  params.value = new Array();  params.eventcategory = new Array();  params.upic = new Array();  params.currentlink = "";  params.setGroupSpace(req.responseXML.getElementsByTagName("Grouping"));  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"), "Name");  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"), "Name");  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"), "Name");  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"), "none");  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Text_Options"), "none");  params.setCollist(req.responseXML.getElementsByTagName("Update_Import"), "none");  val = req.responseXML.getElementsByTagName("value");  params.loc = req.responseXML.getElementsByTagName("loc")[0].childNodes[0].nodeValue;    if(val[0] != null && val[0].childNodes[0] != null){  params.seteventCategory(val);   params.setIdDOM(req.responseXML.getElementsByTagName("id"));  }  params.currentinfo = params.eventcategory;  params.setPosition(req.responseXML.getElementsByTagName("position"));  this.setSeasonInfo();  };    this.processRateUser = function(){  params.valid = new Array();  params.value = new Array();  params.currentinfo = new Array();  val = req.responseXML.getElementsByTagName("value");  if(val[0] != null){params.setCategoryDOM(val);}  params.seteventCategory(req.responseXML.getElementsByTagName("valid"));  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Abbreviation"));   params.setIdDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"));    cat = req.responseXML.getElementsByTagName("Category");  if(cat[0] != null) {params.setGroupSpace(cat);}  params.setAbbreviationSpace(req.responseXML.getElementsByTagName("Attribute"));   params.abbreviationid = params.abbreviation;  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"), "&nbsp;");  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Text_Options"), "&nbsp;");  params.currentinfo = params.category;  params.fullattribute = params.abbreviation;  };    this.processBoardLikes = function(){  params.setLikesDOM(req.responseXML.getElementsByTagName("likes"));   params.setLikesImgDOM(req.responseXML.getElementsByTagName("likesimg"));   };    this.processBoardInfo = function(){  params.follower = new Array();  params.following = new Array();  params.setFollowersDOM(req.responseXML.getElementsByTagName("brdflw"));   params.setFollowingDOM(req.responseXML.getElementsByTagName("brdflwng"));   params.setFollowingImgDOM(req.responseXML.getElementsByTagName("flwngimg"));   params.setFollowersImgDOM(req.responseXML.getElementsByTagName("flwimg"));   };    this.processBoard = function(){  params.setDisplayTypeDOM(req.responseXML.getElementsByTagName("boardinfo"));   params.setFrefDOM(req.responseXML.getElementsByTagName("boardlink"));   myBoard.currentselection = req.responseXML.getElementsByTagName("cboard")[0].childNodes[0].nodeValue;  params.setFNameDOM(req.responseXML.getElementsByTagName("usrs"));   params.setDateDOM(req.responseXML.getElementsByTagName("dts"));   params.setValueDOM(req.responseXML.getElementsByTagName("msg"));   params.setInfoDOM(req.responseXML.getElementsByTagName("lks"));   params.setNameDOM(req.responseXML.getElementsByTagName("nm"));   params.setIdDOM(req.responseXML.getElementsByTagName("rt"));  params.setCActionDOM(req.responseXML.getElementsByTagName("act"));  params.setObjectDOM(req.responseXML.getElementsByTagName("chld"));  params.setPictureDOM(req.responseXML.getElementsByTagName("pic"));  params.currentPic = req.responseXML.getElementsByTagName("upic")[0].childNodes[0].nodeValue;  params.currentUser = req.responseXML.getElementsByTagName("uuser")[0].childNodes[0].nodeValue;  };    this.processNetwork = function(){  params.valid = new Array();  params.value = new Array();  params.eventcategory = new Array();  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Abbreviation"));   params.setDisplayTypeDOM(req.responseXML.getElementsByTagName("Display_Data_Type"));  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Import_Source"));  val = req.responseXML.getElementsByTagName("value");  if(val[0]!= null){  params.seteventCategory(val);   params.setValidDOM(req.responseXML.getElementsByTagName("valid"));  params.setIdDOM(req.responseXML.getElementsByTagName("id"));  }  };    this.processSeason = function(){  params.currentinfo = new Array();  params.value = new Array();  params.valid = new Array();  params.eventcategory = new Array();  params.group = new Array();  params.currentinfo = new Array();  params.setGroup(req.responseXML.getElementsByTagName("Grouping"));  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"), "Name");  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"), "Name");  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"), "Name");  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"), "none");  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Text_Options"), "none");  val = req.responseXML.getElementsByTagName("value");  if(val[0] != null){   params.seteventCategory(val);   params.setIdDOM(req.responseXML.getElementsByTagName("id"));  params.setValidDOM(req.responseXML.getElementsByTagName("valid"));  }  params.currentinfo = params.eventcategory;  };    this.processCalendar = function(){  params.currentinfo = new Array();  params.value = new Array();  params.valid = new Array();  params.eventcategory = new Array();  params.group = new Array();  params.currentinfo = new Array();  params.setGroupSpace(req.responseXML.getElementsByTagName("Grouping"));  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"), "Name");  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"), "Name");  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"), "Name");  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"), "none");  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Text_Options"), "none");    this.setSeasonInfo();  val = req.responseXML.getElementsByTagName("value");  if(val[0] != null){   params.seteventCategory(val);   params.setIdDOM(req.responseXML.getElementsByTagName("id"));  params.setEvIdDOM(req.responseXML.getElementsByTagName("evid"));  params.setEvTypeDOM(req.responseXML.getElementsByTagName("evtype"));  params.setUidDOM(req.responseXML.getElementsByTagName("uid"));  params.setValidDOM(req.responseXML.getElementsByTagName("valid"));  }  params.currentinfo = params.eventcategory;  };    this.setSeasonInfo = function(){  seasonlist =  req.responseXML.getElementsByTagName("seasonlist")[0].childNodes[0];  cseason = req.responseXML.getElementsByTagName("cseason")[0].childNodes[0];  mySeason.seasonlist = "";  mySeason.currentseason = "";  if(cseason != null)  mySeason.currentseason = cseason.nodeValue;  if(seasonlist != null){  mySeason.seasonlist = seasonlist.nodeValue;  }  };    this.processEvent = function(){  params.subfolders = new Array("Tournament");  params.eventlist = new Array();  params.subeventlist = new Array();  eventinfo = req.responseXML.getElementsByTagName("ufiles");  subeventinfo = req.responseXML.getElementsByTagName("subevents");  parentinfo = req.responseXML.getElementsByTagName("pid");  sportevent =  req.responseXML.getElementsByTagName("sportevent")[0].childNodes[0];  if(sportevent != null) sportevent = sportevent.nodeValue;  params.sportevents = (sportevent == null || sportevent == "none") ? new Array() : sportevent.split(',_');  this.setSeasonInfo();  if(parentinfo[0] != null){  params.setEventFileListDOM(parentinfo, eventinfo, subeventinfo);  }  params.setNameDOM(req.responseXML.getElementsByTagName("Event"));    };    this.processStats = function(){  params.subfolders = new Array();  cat = req.responseXML.getElementsByTagName("category");  scat = req.responseXML.getElementsByTagName("subcategory");  sfolder = req.responseXML.getElementsByTagName("subfolder");  ctemp = req.responseXML.getElementsByTagName("eventlist")[0].childNodes[0].nodeValue;  params.setEventListDOM(cat, scat, '');  params.name = ctemp.split(',_');  this.setSeasonInfo();  if(sfolder[0] != null){  val = sfolder[0].childNodes[0].nodeValue;  params.subfolders = params.name;    }  };    this.processRecruiting = function(){  params.setGroup(req.responseXML.getElementsByTagName("gr"));  params.setNameDOM(req.responseXML.getElementsByTagName("nm"));  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"));  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"));  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"));  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Text_Options"));  params.setValueDOM(req.responseXML.getElementsByTagName("value"));  params.setFNameDOM(req.responseXML.getElementsByTagName("Editable"));  temp = req.responseXML.getElementsByTagName("sports")[0].childNodes[0].nodeValue;  params.sports = temp.split(',_');  temp = req.responseXML.getElementsByTagName("countries")[0].childNodes[0].nodeValue;  params.country = temp.split(',');  params.setPosition(req.responseXML.getElementsByTagName("position"));      previewPage.border = req.responseXML.getElementsByTagName("profile_border")[0].childNodes[0].nodeValue;  previewPage.fsize = req.responseXML.getElementsByTagName("profile_font_size")[0].childNodes[0].nodeValue;  previewPage.width = req.responseXML.getElementsByTagName("profile_title_width")[0].childNodes[0].nodeValue;  };    this.processTxtCommand = function(thecommand){  switch(thecommand){  case "setuserpage":  stoptheload();  PEditor.resetInput(req.responseText);  myLarge.removeGlaze();  break;  case "setaccountwin":  resp = req.responseText;  vallist = new Array();  if(resp != ''){  val = resp.substr(1, resp.length-2);  vallist = val.split('><');  }  accountManager.setUserAccount(vallist);  stoptheload();  break;  }  };    this.process = function(command, section, subsection, subcommand){  if(section == "Registration"){  regH = new RegistrationHandler();  regH.process(command, section, subsection, subcommand, false);  }  else{  switch(subsection){  case "Friends": case "Board_Room": case "Watch_List": case "General_Rating":  case "Athletic_Rating": case "View_Photos": case "View_Videos": case "View_Posts":  case "Trash": case "Inbox": case "Sent_Mail": case "Requests": case "Trash":  case "All_Mail": case "Compose": case "New_Post": case "Friends": case "Coaches":  case "Scouts": case "Teams": case "Players": case "Teammates": case "Leaguemates":  case "Leagues": case "Coachmates": case "Roster": case "Rosters":  case "Rate_Team": case "Rate_Player": case "Rate_Fan": case "Rate_Scount":  case "Rate_League": case "Rate_Parent": case "Rate_Coach": case "Seasons":  case "Create_Event": case "Team_Stats": case "Player_Stats": case "Coach_Stats":  case "Recruiting_Page": case "Bio_Page": case "Calendar": case "Coach_Stats":  case "Tournaments": case "Matchups": case "Tryouts": case "Pickup_Games":  case "Practices": case "Miscellaneous": case "Player_Stats": case "Team_Stats":  case "Matchup_Log":  privatelockerlink = false;  if(currentLink == "LOCKER"){  templ = req.responseXML.getElementsByTagName("privatelink")[0].childNodes[0].nodeValue;  privatelockerlink = (templ == "yes");  }    if(params.exceltablist.length != 0){  contentTabs.setExcelTabs(subsection);  }  this.setPage(subsection);  break;  case "Event_Editor":  contentTabs.setMultiTabs("Event_Editor,_"+exceltab);  this.setPage("Event_Editor");  break;  case "process":  stoptheload();  switch(currentSubsection){  case "Tournaments": case "Matchups": case "Tryouts":  case "Pickup_Games": case "Practices": case "Miscellaneous":  switch(cexcel){  case "Event_Viewer":  currenttype = uEvent.currenttype;  if(params.ucountries[0] == null)  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventview_setcountries/'+currenttype+',_'+uEvent.eventname+',_'+uEvent.currentuser+',_'+mySeason.currentseason);  else  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventview/'+currenttype+',_'+uEvent.eventname+',_'+uEvent.currentuser+',_'+mySeason.currentseason);  break;  default:  this.processCalendar();  myLocker.setCalendar();  break;  }  break;    case "Board_Room":  this.processBoardInfo();  this.processBoard();  myLocker.setBoard();  break;  case "Watch_List":  this.processNetwork();  myLocker.setEyes();  break;  case "General_Rating": case "Athletic_Rating":  this.processRatings();  myLocker.setRating();  break;  case "Rate_Team": case "Rate_Player": case "Rate_Fan":  case "Rate_Scount": case "Rate_League": case "Rate_Parent":  case "Rate_Coach":  this.processRateUser();  myLocker.setRateUser();  break;  case "View_Photos": case "View_Videos":  mediaH = new MediaHandler();  mediaH.process(command, section, subsection, subcommand, false);  break;  case "View_Posts": case "Trash": case "Inbox":  case "Sent_Mail": case "Requests": case "Trash":  case "All_Mail": case "Compose": case "New_Post":  messageH = new MessageHandler();  messageH.process(command, section, subsection, subcommand, false);  break;  case "Friends": case "Coaches": case "Scouts":  case "Teams": case "Players": case "Teammates":  case "Leaguemates": case "Leagues": case "Coachmates":  this.processNetwork();  myLocker.setNetwork();  break;  case "Roster": case "Rosters":  this.processRoster();  myLocker.setRoster();  break;  case "Seasons":  this.processSeason();  myLocker.setSeasons();  break;  case "Create_Event":  switch(cexcel){  case "Event_Manager":  this.processEvent();  myLocker.setEvent();  break;  case "Event_Editor":  evnttype = uEvent.setEventType();  /* Tournament not set (will have to fix this)*/  if(evnttype == "Tournament" && uEvent.level > 1) evnttype = "Matchup";  uEvent.currenttype = evnttype;  if(params.ucountries[0] == null)  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventinfo_setcountries/'+evnttype+',_'+uEvent.eventname+',_'+uEvent.currentuser+',_'+mySeason.currentseason);  else  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventinfo/'+evnttype+',_'+uEvent.eventname+',_'+uEvent.currentuser+',_'+mySeason.currentseason);  break;    }  break;  case "Team_Stats": case "Player_Stats": case "Coach_Stats": case "Matchup_Log":  switch(cexcel){  case "Matchup_Stats":  case "Season_Stats":  if(currentLink == "MEMBERS"){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setuserstats_'+currentSubsection+'/'+mySeason.currentseason+',_'+uEvent.parent+',_'+uEvent.eventname+',_'+params.psports[params.spindex]);  }  else{  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setuserstats_'+currentSubsection+'/'+mySeason.currentseason+',_'+uEvent.parent+',_'+uEvent.eventname);  }  break;  default:  this.processStats();  myLocker.setStat();  break;  }  break;  case "Recruiting_Page":  case "Bio_Page":  this.processRecruiting();  previewPage.init();  break;  case "Calendar":  switch(cexcel){  case "Event_List":  this.processCalendar();  myLocker.setCalendar();  break;  case "Event_Viewer":  currenttype = uEvent.currenttype;  if(params.ucountries[0] == null)  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventview_setcountries/'+currenttype+',_'+uEvent.eventname+',_'+uEvent.currentuser);  else  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventview/'+currenttype+',_'+uEvent.eventname+',_'+uEvent.currentuser);  break;  }  break;  }  myLarge.removeGlaze();  break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  }  };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processtablist = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };  } function MessageHandler(){    this.processTxtCommand = function(thecommand){  switch(thecommand){  case "setNewParticipant":  params.messagetype =  "LD3";  themessage = req.responseText.split('|||');  params.message = themessage[0];  params.messagepass = themessage[1];  params.subject = "Request For Participation";  subLinks.changeSublink("Mail");  currentSection = "Mail";  myTimer.queuePush('callAjax_'+currentLink+'/Mail/toptabs/Compose,'+midTabs.currentTab+','+filterContent.currentBotTab);  break;  case "setNewUser":  params.messagetype =  "LD";  themessage = req.responseText.split('|||');  params.message = themessage[0];  params.messagepass = themessage[1];  params.subject = account+" membership request";  subLinks.changeSublink("Mail");  currentSection = "Mail";  myTimer.queuePush('callAjax_'+currentLink+'/Mail/toptabs/Compose,'+midTabs.currentTab+','+filterContent.currentBotTab);  break;  case "setNewContent":  params.messagetype =  "LD";  themessage = req.responseText.split('|||');  params.message = themessage[0];  params.messagepass = themessage[1];  params.subject = themessage[2];  subLinks.changeSublink("Mail");  currentSection = "Mail";  myTimer.queuePush('callAjax_'+currentLink+'/Mail/toptabs/Compose');  break;  case "setNewMessage":  params.to = req.responseText;  subLinks.changeSublink("Mail");  currentSection = "Mail";  myTimer.queuePush('callAjax_'+currentLink+'/Mail/toptabs/Compose');  break;  case "setMessage":  stoptheload();  cont = req.responseText;  myMail.resetMail();  myMail.setContent(cont);  break;  case "setcomposeinfo":  params.to = myMail.tempto;  myMail.setComposeInfo(req.responseText, true);  myLarge.removeGlaze();  stoptheload();  break;  case "setto":  wrd = req.responseText;  swrd = wrd.split(":");  if(swrd.length > 1){ alert('No '+swrd[1]);}  else {  myMail.setTo(wrd);  }  myMail.previousloc = myMail.currentloc;  stoptheload();  myLarge.removeGlaze();  break;  }  };    this.processCompose = function(){  ufrom = req.responseXML.getElementsByTagName("em")[0].childNodes[0];  params.from = "";  if(ufrom != null){  params.from = ufrom.nodeValue;   myMail.deffrom = params.from;  }  };    this.processToList = function(){  params.setDropListDOM(req.responseXML.getElementsByTagName("uid"));  params.setDropNameDOM(req.responseXML.getElementsByTagName("uidn"));  };    this.processMessageList = function(){  params.setFRangeDOM(req.responseXML.getElementsByTagName("chld"));  params.setIdDOM(req.responseXML.getElementsByTagName("rt"));  params.setDateDOM(req.responseXML.getElementsByTagName("dt"));  params.setContDOM(req.responseXML.getElementsByTagName("subj"));    params.setSenderDOM(req.responseXML.getElementsByTagName("frm"));  params.setUserDom(req.responseXML.getElementsByTagName("to"));  params.setInfoDOM(req.responseXML.getElementsByTagName("opn"));  params.setValueDOM(req.responseXML.getElementsByTagName("xcrpt"));  params.setPicDOM(req.responseXML.getElementsByTagName("pic"));  params.setFileUserDOM(req.responseXML.getElementsByTagName("puser"));  };      this.processMessage = function(){  params.setIdDOM(req.responseXML.getElementsByTagName("rt"));  params.setContDOM(req.responseXML.getElementsByTagName("subj"));    params.setSenderDOM(req.responseXML.getElementsByTagName("frm"));  params.setUserDom(req.responseXML.getElementsByTagName("to"));  params.setValueDOM(req.responseXML.getElementsByTagName("content"));  params.setPicDOM(req.responseXML.getElementsByTagName("pic"));  params.setDateDOM(req.responseXML.getElementsByTagName("date"));  };    this.processBlog = function(){    params.currentUser = req.responseXML.getElementsByTagName("cu")[0].childNodes[0].nodeValue;  pic = req.responseXML.getElementsByTagName("pic")[0].childNodes[0].nodeValue;  subject = req.responseXML.getElementsByTagName("subject")[0].childNodes[0].nodeValue;  message = req.responseXML.getElementsByTagName("message")[0].childNodes[0].nodeValue;  date = req.responseXML.getElementsByTagName("date")[0].childNodes[0].nodeValue;  usr = req.responseXML.getElementsByTagName("usr")[0].childNodes[0].nodeValue;  params.setObjectDOM(req.responseXML.getElementsByTagName("cmt_cont"));  params.setFRangeDOM(req.responseXML.getElementsByTagName("cmt_date"));  params.setNameDOM(req.responseXML.getElementsByTagName("cmt_subj"));  params.setUsrList(req.responseXML.getElementsByTagName("cmt_usr"));    params.setFileCommentIdDOM(req.responseXML.getElementsByTagName("cid"));  params.setUpicDOM(req.responseXML.getElementsByTagName("upic"));  params.setEtypeDOM(req.responseXML.getElementsByTagName("uedit"));  myBlogs.initPostVals(pic, subject, message, date, usr);    };    this.processBlogList = function(){  params.currentUser = req.responseXML.getElementsByTagName("cu")[0].childNodes[0].nodeValue;  params.setIdDOM(req.responseXML.getElementsByTagName("rt"));  params.setContDOM(req.responseXML.getElementsByTagName("subj"));  params.setValueDOM(req.responseXML.getElementsByTagName("xcrpt"));  params.setPicDOM(req.responseXML.getElementsByTagName("pic"));  params.setDateDOM(req.responseXML.getElementsByTagName("dt"));  params.setFileUserDOM(req.responseXML.getElementsByTagName("puser"));  params.setObjectDOM(req.responseXML.getElementsByTagName("cmnt"));  params.setTypeDOM(req.responseXML.getElementsByTagName("typ"));    };    this.processBlogEntry = function(){  message = req.responseXML.getElementsByTagName("message")[0];  myBlogs.initValues('', '', '');  params.currentUser = req.responseXML.getElementsByTagName("cu")[0].childNodes[0].nodeValue;  if(message != null){  tempusr = req.responseXML.getElementsByTagName("usr")[0].childNodes[0].nodeValue;  if(params.currentUser != tempusr)  myTimer.queuePush('callCommand_HOME/default/default/');  else{  id = req.responseXML.getElementsByTagName("id")[0].childNodes[0].nodeValue;  subject = req.responseXML.getElementsByTagName("subject")[0].childNodes[0].nodeValue;  msg = message.childNodes[0].nodeValue;  myBlogs.initValues(id, subject, msg, '');  }    }  };    this.initNewBlog = function(){  this.processBlogEntry();  myBlogs.initNewPost();   };    this.initBlogList = function(){  switch(cexcel){  case "Blog_Post":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/openblog/'+myBlogs.uid);  break;  default:  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setbloglist/'+currentSubsection+',_'+cexcel);  }  };    this.initComposeMail = function(){  this.processCompose();   myMail.setCompose();   };    this.initMessageList = function(){  switch(cexcel){  case "Message":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/openmessage/'+myMail.currentid);  break;  default:  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setmessagelist/'+currentSubsection+',_'+cexcel);  }  };      this.processCommand = function(thecommand){  switch(thecommand[0]){  case "gettheimages":  params.files = new Array();   params.name = new Array();  params.value = new Array();  fnm = new Array();  fnm = req.responseXML.getElementsByTagName("fnm");  if(fnm[0] != null){  params.setFilesDOM(fnm);  params.setNameDOM(req.responseXML.getElementsByTagName("fnmn"));  params.setValueDOM(req.responseXML.getElementsByTagName("fnmv"));  }  psv = (thecommand[1] != "") ? '/'+thecommand[1] : "";  myTimer.queuePush('setMini_AImage'+psv);  break;  case "setpreview":  stoptheload();  showlarge = false;  cn = req.responseXML.getElementsByTagName("content")[0].childNodes[0];  cont = (cn != null) ? cn.nodeValue : "";  posted = req.responseXML.getElementsByTagName("posted")[0].childNodes[0].nodeValue;  myMail.setPreview(posted, cont);  break;  case "openfile":  stoptheload();  cn = req.responseXML.getElementsByTagName("content")[0].childNodes[0];  cont = (cn != null) ? cn.nodeValue : "";  usremail = req.responseXML.getElementsByTagName("usremail")[0].childNodes[0].nodeValue;  myMail.setContent(cont, usremail);  myLarge.removeGlaze();  break;  case "openlist":  stoptheload();  params.setFilesDOM(req.responseXML.getElementsByTagName("fnm"));  params.setEvents(req.responseXML.getElementsByTagName("fnms"));  params.setFNameDOM(req.responseXML.getElementsByTagName("fnma"));  params.setNameDOM(req.responseXML.getElementsByTagName("fnmn"));  params.setValueDOM(req.responseXML.getElementsByTagName("fnmv"));  params.setInfoDOM(req.responseXML.getElementsByTagName("info"));  params.setIdDOM(req.responseXML.getElementsByTagName("id"));  params.setSenderDOM(req.responseXML.getElementsByTagName("snd"));  params.setReceiverDOM(req.responseXML.getElementsByTagName("rcvr"));  params.setUpicDOM(req.responseXML.getElementsByTagName("upic"));  myMail.addExtraMail();  myLarge.removeGlaze();  break;  case "fileinfo2":  stoptheload();  params.fname = new Array();  params.sport = new Array();  params.setFilesDOM(req.responseXML.getElementsByTagName("fnm"));  params.setNameDOM(req.responseXML.getElementsByTagName("fnmn"));  params.setValueDOM(req.responseXML.getElementsByTagName("fnmv"));  user = req.responseXML.getElementsByTagName("ud")[0].childNodes[0].nodeValue;  autoheight = true;  myUserList.displayRollOver(myUserList.curobj, myUserList.curloc, user);  break;  case "getfiledescription":  fname = req.responseXML.getElementsByTagName("ftype")[0].childNodes[0];  if(fname != null) glazer.filename = fname.nodeValue;  fname = req.responseXML.getElementsByTagName("fdescr")[0].childNodes[0];  if(fname != null) glazer.description = fname.nodeValue;  fname = req.responseXML.getElementsByTagName("ftag")[0].childNodes[0];  if(fname != null) glazer.tags = fname.nodeValue;  glazer.setFileInfo();  stoptheload();  myLarge.removeGlaze();  break;  case "getfilecomment":  cimbobj = req.responseXML.getElementsByTagName("cimg");  params.cont = new Array();  params.uid = new Array();  params.pic = new Array();  if(cimbobj != null){  params.setPicDOM(cimbobj);  params.setUidDOM(req.responseXML.getElementsByTagName("cus"));  params.setContDOM(req.responseXML.getElementsByTagName("content"));  glazer.setCommentInfo();  }  stoptheload();  myLarge.removeGlaze();  break;  case "settolist":  this.processToList();  myMail.initDropDown();  stoptheload();  myLarge.removeGlaze();  break;  case "openmessage":  this.processMessage();  myMail.resetMail();  myMail.initMessage();  stoptheload();  myLarge.removeGlaze();  break;  case "setmessagelist":  this.processMessageList();  myMail.resetMail();  myMail.initMessageList();  stoptheload();  myLarge.removeGlaze();  break;  case "callrequest":  resp = (req.responseXML.getElementsByTagName("resp")[0].childNodes[0].nodeValue);  switch(resp){  case "confirm":   alert("Request has been confirmed");   myMail.resetToList();  break;  case "decline": alert("Request has been declined"); break;  }  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setmessagelist/'+currentSubsection+',_'+cexcel);  break;  case "deletemail": case "restoremail": case "archivemail":  case "reportspam": case "movetoinbox": case "removemail":  contentTabs.callCommand("Local");  break;  case "setbloglist":  this.processBlogList();  myBlogs.initList();  stoptheload();  myLarge.removeGlaze();  break;  case "deleteblogchild":  alert("Comment Deleted");  case "openblogcomments":  this.processBlog();  myBlogs.initComments();  myBlogs.resetCommand();  stoptheload();  myLarge.removeGlaze();  break;  case "openblog":  this.processBlog();  myBlogs.initPost();  stoptheload();  myLarge.removeGlaze();  break;  case "reportblogroot": case "reportblogchild":  alert("Thank you for reporting.  If the content is inappropriate, it will be removed.");  myBlogs.resetCommand();  stoptheload();  myLarge.removeGlaze();  break;  case "restoreblog":  alert("Blog restored");  myBlogs.resetCommand();  contentTabs.callCommand('Local');  break;  case "republishblog":  alert("Blog published");  myBlogs.resetCommand();  contentTabs.callCommand('Local');  break;  case "unpublishblog":  alert("Blog unpublished");  myBlogs.resetCommand();  contentTabs.callCommand('Local');  break;  case "removeblog":  case "deleteblogroot":   alert("Blog Deleted");  myBlogs.resetCommand();  contentTabs.callCommand('Local');  break;  case "blogsubscribe":  cloc = (req.responseXML.getElementsByTagName("nurl")[0].childNodes[0].nodeValue);  window.location = ('http://'+cloc);  break;  case "setcontactinfo":  params.contactid = req.responseXML.getElementsByTagName("cid")[0].childNodes[0].nodeValue;  params.contactname = req.responseXML.getElementsByTagName("cname")[0].childNodes[0].nodeValue;  myMail.setContactInfo();  myTimer.queuePush("mailcontact_500/360");  break;  case "addfriend":  alert("Friendship request sent");  stoptheload();  myLarge.removeGlaze();  break;  }  };    this.process = function(command, section, subsection, subcommand){  switch(subsection){  case "All_Blogs":  case "Players":  case "Coaches":  case "Teams":  case "Fans":  case "Scouts":  case "Parents":  case "Leagues":  if(params.exceltablist.length != 0){  contentTabs.setExcelTabs(subsection);  }  this.setPage(subsection);  break;  case "process":  switch(currentSection){  case "Blogs": case "Blog":   switch(currentSubsection){  case "New_Post": this.initNewBlog(); break;  default: this.initBlogList(); break;  }  break;  case "Mail":   switch(currentSubsection){  case "Compose": this.initComposeMail(); break;  default: this.initMessageList(); break;  }  break;  }  stoptheload();  myLarge.removeGlaze();  break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processcontenttabs = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };    } function StatHandler(){    this.process = function(command, section, subsection, subcommand, isprivate){  switch(subsection){  case "process":  myFilters.init(isprivate);  params.setSportDOM(req.responseXML.getElementsByTagName("sport"));  if(exceltab == "All"){  myTimer.queuePush('callAjax_'+command+'/'+section+'/display');  params.cursel = "";  }  else{  theword = '';  params.group = new Array(); params.valid = new Array();  params.value = new Array(); params.abbreviation = new Array();  params.abbreviationid = new Array(); params.fullattribute = new Array();  params.currentinfo = "";  params.defcat = null;   defc=req.responseXML.getElementsByTagName("default_cat");  if(defc[0] != null && defc[0].childNodes[0] != null)  {params.defcat = defc[0].childNodes[0].nodeValue; }  cat = req.responseXML.getElementsByTagName("Category");  if(cat[0].childNodes[0] != null) {params.setCategoryDOM(cat);}  grp = req.responseXML.getElementsByTagName("Grouping");  if(grp[0] != null) {params.setGroupSpace(grp); }  fa = req.responseXML.getElementsByTagName("Full_Attribute");  if(fa[0] != null) {params.setFullAttributeDOM(fa,'&nbsp;');}  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"),'&nbsp;');  uid = new Array();  params.upic = new Array();  uid = req.responseXML.getElementsByTagName("uid");  if(uid[0] != null && uid[0].childNodes[0] != null) {params.setUIdDOM(uid);}  params.setUpicDOM(req.responseXML.getElementsByTagName("upic"));  params.seteventCategory(req.responseXML.getElementsByTagName("valid"));  params.currentinfo = params.eventcategory;  params.currentlink = "";  myTimer.queuePush('callAjax_'+command+'/'+section+'/listevents/'+curStatEvent+'/calldisplay2');  }  break;  }  };  } function EventHandler(){    this.processTxtCommand = function(thecommand){  switch(thecommand){  case "deleteEvent":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/toptabs');  break;  case "calendarstart":  stoptheload();  break;  case "defaultseason":  response = req.responseText;   if(response == ""){  myTimer.queuePush('closeMini_minibox');  alert("The season already exists");  }  else{  alert("Season Created");  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/defaultseason/'+response);  }  break;  case "reseteventdate":  stoptheload();  myLarge.removeGlaze();  eventEditor.cdate = req.responseText;   eventEditor.prepareDate();  document.getElementById('eventdate').innerHTML = eventEditor.cdate;  break;  }  };    this.processStats = function(){  params.currentinfo = new Array();  params.value = new Array();  params.valid = new Array();  params.eventcategory = new Array();  params.group = new Array();  params.currentinfo = new Array();  params.selected = new Array();  params.setGroupSpace(req.responseXML.getElementsByTagName("Grouping"));  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"), "Name");  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"), "Name");  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"), "Name");  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Data_Type"), "none");  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Data_Text_Options"), "none");    opt = req.responseXML.getElementsByTagName("selected")[0];  if(opt != null){  params.selected = (opt.childNodes[0] != null) ? opt.childNodes[0].nodeValue.split(',_') : "";  }  val = req.responseXML.getElementsByTagName("value");  if(val[0] != null){   params.seteventCategory(val);   params.setIdDOM(req.responseXML.getElementsByTagName("id"));  }  opt = req.responseXML.getElementsByTagName("position");  if(opt[0] != null){  params.setPosition(opt)  }  params.currentinfo = params.eventcategory;  };    this.processResponse = function(){  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"));  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"));  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"));  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Data_Type"));  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Data_Text_Options"));  params.setValueDOM(req.responseXML.getElementsByTagName("value"));  params.userid = "";  cobj = req.responseXML.getElementsByTagName("moderator")[0];  if(cobj.childNodes[0] != null)  params.userid = cobj.childNodes[0].nodeValue;  };    this.processUserStats = function(){  params.setGroupSpace(req.responseXML.getElementsByTagName("Grouping"));  params.setAbbreviationDOM(req.responseXML.getElementsByTagName("Abbreviation"), "Name");  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"), "Name");  params.setFullAttributeidDOM(req.responseXML.getElementsByTagName("Full_Attribute"), "Name");  val = req.responseXML.getElementsByTagName("value");  params.currentinfo = new Array();  if(val[0] != null){   params.seteventCategory(val);   params.setIdDOM(req.responseXML.getElementsByTagName("id"));  params.currentinfo = params.eventcategory;  return true;  }  return false;  };    this.processEventInfo = function(){  cevent = req.responseXML.getElementsByTagName("evdetails");  if(params.ucountries[0] == null){  temp = req.responseXML.getElementsByTagName("countries")[0].childNodes[0].nodeValue;  params.ucountries = temp.split(',');  }  params.country = params.ucountries;  if(cevent[0] != null && cevent[0].childNodes[0] != null)  eventEditor.eventlist = cevent[0].childNodes[0].nodeValue;  st = req.responseXML.getElementsByTagName("evstats");  if(st[0] != null){  statlist = st[0].childNodes[0];  eventEditor.statlist = (statlist != null) ? statlist.nodeValue : "";  }  st = req.responseXML.getElementsByTagName("evphotos");  if(st[0] != null){  photo = st[0].childNodes[0];  eventEditor.photoval = (photo != null) ? photo.nodeValue : "";  }    eventEditor.cdate = req.responseXML.getElementsByTagName("evdate")[0].childNodes[0].nodeValue;  tname = req.responseXML.getElementsByTagName("evname")[0];  if(tname != null && tname.childNodes[0] != null)  eventEditor.cname = tname.childNodes[0].nodeValue;    st = req.responseXML.getElementsByTagName("photoimages");  if(st[0] != null){  eventEditor.opponent['img'] = st[0].childNodes[0].nodeValue;  eventEditor.opponent['usr'] = req.responseXML.getElementsByTagName("photousern")[0].childNodes[0].nodeValue;  eventEditor.opponent['id'] = req.responseXML.getElementsByTagName("photoid")[0].childNodes[0].nodeValue;  }    st = req.responseXML.getElementsByTagName("parentimages");  if(st[0] != null){  eventEditor.evparent['img'] = st[0].childNodes[0].nodeValue;  eventEditor.evparent['usr'] = req.responseXML.getElementsByTagName("parentusern")[0].childNodes[0].nodeValue;  eventEditor.evparent['id'] = req.responseXML.getElementsByTagName("parentid")[0].childNodes[0].nodeValue;  }    st = req.responseXML.getElementsByTagName("activeimages");  params.uimg = new Array();  params.usr = new Array();  params.id = new Array();  if(st[0] != null){  params.setUImgDOM(st);  params.setUsrDOM(req.responseXML.getElementsByTagName("activeusern"));  params.setIdDOM(req.responseXML.getElementsByTagName("activeid"));  }  };    this.processCommand = function(thecommand){  switch(thecommand[0]){  case "geteventstats":  this.processStats();  if(glazer.currenttype == "Opponent" && !eventEditor.hasopponent){  var re = new RegExp(thecommand[1]);  if(eventEditor.statlist.match(re))  eventEditor.setTable(thecommand[1]);  }  else  eventEditor.setTable(thecommand[1]);  stoptheload();  if(params.commandarray.length == 0){  myHomePage.resizePage();  myLarge.removeGlaze();  }  else{  myTimer.queuePush(params.commandarray[0]);  params.commandarray.splice(0, 1);  }  break;  case "editevent":  case "setstatentry":  this.processStats();  myHomePage.resizePage();  eventEditor.setTable(thecommand[1]);  stoptheload();  myLarge.removeGlaze();  break;  case "seteventview":  eventEditor.resetEditor();  this.processEventInfo();  this.processResponse();  stoptheload();  myLarge.removeGlaze();  if(getUserId() == params.userid && currentLink == "HOME")  eventEditor.init(true);  else   eventEditor.init(false);  break;  case "seteventinfo":  eventEditor.resetEditor();  this.processEventInfo();  this.processResponse();  stoptheload();  myLarge.removeGlaze();  eventEditor.init(true);  break;  case "addevent":  cname = req.responseXML.getElementsByTagName("pid")[0].childNodes[0].nodeValue;  cval = req.responseXML.getElementsByTagName("ufiles")[0].childNodes[0];  cval2 = req.responseXML.getElementsByTagName("subevents")[0].childNodes[0];  if(cval != null){  cevent = cval.nodeValue;  cinfo = (cval2 != null) ? cval2.nodeValue : "";  params.eventlist[cname] = cevent;  uEvent.folderlist[cname] = cevent;  uEvent.folderinfo[cname] = cinfo;  uEvent.resetFolder(cname, uEvent.level, uEvent.i, uEvent.c);  uEvent.folderlist[cname] = cevent;  uEvent.folderinfo[cname] = cinfo;    }  stoptheload();  myLarge.removeGlaze();  uEvent.eventadded = false;  break;  case "addseason":  alert("Season Created");  mySeason.seasonlist = "";  cval = req.responseXML.getElementsByTagName("seasonlist")[0].childNodes[0];  if(cval != null){  mySeason.seasonlist = cval.nodeValue;  }  if(thecommand[1] == "defaultseason"){  cval = req.responseXML.getElementsByTagName("cseason")[0].childNodes[0];  if(cval != null){  mySeason.currentseason = cval.nodeValue;  }  }  UI.initView('user');  myTimer.queuePush('closeMini_minibox');    break;  case "renamefile":  cname = req.responseXML.getElementsByTagName("pid")[0].childNodes[0].nodeValue;  cval = req.responseXML.getElementsByTagName("ufiles")[0].childNodes[0];  ctype = req.responseXML.getElementsByTagName("ctype")[0].childNodes[0].nodeValue;  cval2 = req.responseXML.getElementsByTagName("subevents")[0].childNodes[0];  if(cval != null){  cseason = cval.nodeValue;  cinfo = (cval2 != null) ? cval2.nodeValue : "";  params.eventlist[cname] = cseason;  uEvent.folderlist[cname] = cseason;  uEvent.folderinfo[cname] = cinfo;  cval = uEvent.getParentLevel(ctype);  uEvent.resetFolder(cname, (uEvent.level-1), uEvent.c, cval);    }  stoptheload();  myLarge.removeGlaze();  break;  case "deletefile":  type = req.responseXML.getElementsByTagName("ctype")[0];  cval = req.responseXML.getElementsByTagName("ufiles")[0];  if(type != null){  ctype = type.childNodes[0].nodeValue;   if(cval == null){  params.eventlist[ctype] = null;  uEvent.folderlist[ctype] = null;  cval = uEvent.getParentLevel(ctype);  clevel = (uEvent.level > 0) ? uEvent.level - 1 : 0;  uEvent.resetFolder(ctype, clevel, uEvent.c, cval);  }  else {  cn = req.responseXML.getElementsByTagName("pid")[0];  cval2 = req.responseXML.getElementsByTagName("subevents")[0].childNodes[0];  cinfo = (cval2 != null) ? cval2.nodeValue : "";  cname = cn.childNodes[0].nodeValue;  cseason = cval.childNodes[0].nodeValue;  params.eventlist[cname] = cseason;  uEvent.folderlist[cname] = cseason;  uEvent.folderinfo[cname] = cinfo;  cval = uEvent.getParentLevel(ctype);  clevel = (uEvent.level > 0) ? uEvent.level - 1 : 0;  uEvent.resetFolder(cname, (clevel), uEvent.c, cval);  }  stoptheload();  myTimer.queuePush('closeMini_minibox');  }  else{  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+currentSubsection);  params.commandlist = "closeMini_minibox";  }    break;  case "renameseason":  cname = req.responseXML.getElementsByTagName("ctype")[0].childNodes[0].nodeValue;  cval = req.responseXML.getElementsByTagName("cseason")[0].childNodes[0];  if(cval != null){  cseason = cval.nodeValue;  params.eventlist[cname] = cseason;  uEvent.folderlist[cname] = cseason;  cval = uEvent.getParentLevel(cname);  uEvent.resetFolder(cname, (uEvent.level-1), uEvent.c, cval);    }  stoptheload();  myLarge.removeGlaze();  break;  case "deleteseason":  cname = req.responseXML.getElementsByTagName("ctype")[0].childNodes[0].nodeValue;  cval = req.responseXML.getElementsByTagName("cseason")[0].childNodes[0];  if(cval == null){  params.eventlist[cname] = null;  uEvent.folderlist[cname] = null;  cval = uEvent.getParentLevel(cname);  uEvent.resetFolder(cname, (uEvent.level-1), uEvent.c, cval);  }  else{  cseason = cval.nodeValue;  params.eventlist[cname] = cseason;  uEvent.folderlist[cname] = cseason;  cval = uEvent.getParentLevel(cname);  uEvent.resetFolder(cname, (uEvent.level-1), uEvent.c, cval);  }  stoptheload();  myLarge.removeGlaze();  myTimer.queuePush('closeMini_minibox');  break;  case "incryear":  val = req.responseXML.getElementsByTagName("value");  params.defval = req.responseXML.getElementsByTagName("defrange")[0].childNodes[0].nodeValue;  params.setValidDOM(req.responseXML.getElementsByTagName("valid"));  params.setIdDOM(req.responseXML.getElementsByTagName("id"));  params.seteventCategory(val);   params.currentinfo = params.eventcategory;  document.getElementById('midboxcontent').innerHTML = myLocker.printRoster();  myLarge.removeGlaze();  stoptheload();  break;  case "increment":  stoptheload();  if(cexcel == "Days")  document.getElementById('midboxcontent').innerHTML = myLocker.processSublink();  else{  params.setValidDOM(req.responseXML.getElementsByTagName("valid"));  myEvent.setTable(params.valid);  cs = cleanTab(currentSection);  switch(cs){  case "Calendar":  myTimer.queuePush("fadefull");  document.getElementById('midboxcontent').innerHTML = myEvent.printMainTime(thecommand[1]);  break;  }  }  myLarge.removeGlaze();  break;  case "setuserstats":  stoptheload();  this.processUserStats();  myLocker.setUserStats();  myLarge.removeGlaze();  break;  case "defaultseason":  myEvents.start(mySeason.currentseason);  myTimer.queuePush('closeMini_minibox');  break;  }  };    this.process = function(command, section, subsection, subcommand, isprivate){  };  } function HelpHandler(){    this.process = function(command, section, subsection, subcommand){  switch(subsection){  case "Help":  if(params.exceltablist.length != 0){  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  }  else{  this.setPage(subsection);  }  break;  case "help":  exceltab = cexcel = "Help";  currentPageAction = subsection;  if(contentTabs.tlist != "")  contentTabs.setMultiTabs(contentTabs.tlist+",_Help", "Help");  content = req.responseXML.getElementsByTagName("content")[0].childNodes[0].nodeValue;  myHomePage.setContent('<div style = "padding:5px">'+content+'</div>');  myLarge.removeGlaze();  break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processcontenttabs = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };  } function MediaHandler(){    this.processTxtCommand = function(thecommand){  switch(thecommand){  case "setimages":  glazer.sidefiles = req.responseText.split(',_');  myTimer.queuePush('setMini_setGlazeInfo');  break;  case "setglazerimages":  glazer.contentarray = req.responseText.split(',_');  myTimer.queuePush('setMini_setGlazeInfo');  break;  case "setfileeditor":  glazer.setFileEditor(req.responseText);  myLarge.removeGlaze();  stoptheload();  break;  }  };      this.processCommand = function(){  switch(thecommand[0]){  case "deletecomment":  case "fcomment":  params.setFileCommentIdDOM(req.responseXML.getElementsByTagName("file_id"));  params.setFileCommentDOM(req.responseXML.getElementsByTagName("comment"));  params.setFileUserDOM(req.responseXML.getElementsByTagName("comment_uid"));  params.setFileCommentImgDOM(req.responseXML.getElementsByTagName("cimg"));  glazer.resetComments();  break;  case "frate":  frate = req.responseXML.getElementsByTagName("frate")[0].childNodes[0].nodeValue;  urate = req.responseXML.getElementsByTagName("urate")[0].childNodes[0].nodeValue;  glazer.resetRating(frate, urate);  break;  case "initglazeimage":  clist = req.responseXML.getElementsByTagName("filelist")[0].childNodes[0];  cimglist =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("ftype")[0].childNodes[0];  obj1 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("fdescr")[0].childNodes[0];  obj2 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("ftag")[0].childNodes[0];  obj3 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("frate")[0].childNodes[0];  obj4 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("urate")[0].childNodes[0];  obj5 =(clist != null) ? clist.nodeValue : "";    glazer.sidefiles = cimglist.split(',_');  glazer.initFileIno(obj1, obj2, obj3, obj4, obj5);    params.setFileCommentDOM(req.responseXML.getElementsByTagName("comment"));  params.setFileUserDOM(req.responseXML.getElementsByTagName("comment_uid"));  params.setFileCommentIdDOM(req.responseXML.getElementsByTagName("file_id"));  params.setFileCommentImgDOM(req.responseXML.getElementsByTagName("cimg"));    if(glazer.start){  myTimer.queuePush('setMini_setGlazeInfo');  glazer.start = false;  }  else{  glazer.setContent();  stoptheload();  }  break;  case "imageadder":  cimg = req.responseXML.getElementsByTagName("images");  if(cimg[0] != null){  params.setFNameDOM(cimg);   glazer.sidefiles = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("id"));  glazer.userid = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("usern"));  glazer.user = params.fname;  myTimer.queuePush('setMini_setGlazeInfo');  }  else{  myTimer.queuePush('multiupload_400/250');  }  break;  case "calladdall":  case "deleteeventimage": case "addeventimage":  case "seteventimages":  glazer.resetContent();  cimg = req.responseXML.getElementsByTagName("images");  if(cimg[0] != null){  params.setFNameDOM(cimg);  glazer.contentfiles = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("id"));  glazer.contentid = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("usern"));  glazer.contentname = params.fname;    }  if(glazer.currenttype != "" && myMini.visible['minibox'])  glazer.initObjects();  else{  switch(thecommand[1]){  case "Photos": eventEditor.setPhotos(); break;  case "Participants":   params.uimg = glazer.contentfiles;  params.id = glazer.contentid;  params.usr = glazer.contentname;  eventEditor.setParticipants();   break;  }  myLarge.removeGlaze();  }  stoptheload();  break;  case "seteditorimages":  glazer.resetContent();  cimg = req.responseXML.getElementsByTagName("images");  if(cimg[0] != null){  params.setFNameDOM(cimg);  glazer.contentfiles = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("id"));  glazer.contentid = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("usern"));  glazer.contentname = params.fname;  eventEditor.setPhotos();  }  stoptheload();  myLarge.removeGlaze();  break;  case "setmediapage":  this.processMedia();  stoptheload();  cpage = myUserList.page;  myUserList = new UserList(params.files, 250, 290, params.name);  myUserList.reinit(cpage);  myLarge.removeGlaze();  break;  case "setwinimgs":  cimg = req.responseXML.getElementsByTagName("imglist");  tempList.winimgs = new Array();  if(cimg[0] != null){  clist = cimg[0].childNodes[0].nodeValue;  tempList.winimgs = clist.split(',_');  myTimer.queuePush('imagewindow_'+tempList.windowwidth+'/'+tempList.windowheight);  }  else  myTimer.queuePush('launchuploader_'+myUploader.windowwidth+'/'+myUploader.windowheight+'/Photo/changeimage');    break;  }  };    this.processMedia = function(){  params.fname = new Array();  params.sport = new Array();  params.value = new Array();  params.files = new Array();  params.himg = new Array();  params.sponsor = new Array();  fnm = req.responseXML.getElementsByTagName("fnm");  if(fnm[0] != null){  params.setFilesDOM(fnm);  params.setHImgDOM(req.responseXML.getElementsByTagName("himg"));  params.setNameDOM(req.responseXML.getElementsByTagName("fnmu"));  fm = req.responseXML.getElementsByTagName("fnmn");  fs = req.responseXML.getElementsByTagName("fnms");  fa = req.responseXML.getElementsByTagName("fnma");  nt = req.responseXML.getElementsByTagName("ntwrk");  fr = req.responseXML.getElementsByTagName("frate");  fc = req.responseXML.getElementsByTagName("fcmnt");  fv = req.responseXML.getElementsByTagName("fview");  if(fm[0] != null) {params.setFNameDOM(fm);}  if(fs[0] != null) {params.setSportDOM(fs);}  if(fa[0] != null) {params.setAccountDOM(fa);}  if(nt[0] != null) {params.setNetworkDOM(nt);}    if(fr[0] != null) {params.setPicRateDOM(fr);}  if(fc[0] != null) {params.setPicCommentDOM(fc);}  if(fv[0] != null) {params.setPicViewDOM(fv);}  }  };    this.process = function(command, section, subsection, subcommand){  switch(subsection){  case "All_Photos":  case "All_Videos":  case "Players":  case "Coaches":  case "Teams":  case "Fans":  case "Scouts":  case "Parents":  case "Leagues":  if(params.exceltablist.length != 0){  contentTabs.setExcelTabs(subsection);  }  this.setPage(subsection);  break;  case "process":  this.processMedia();  stoptheload();  myUserList = new UserList(params.files, 250, 290, params.name);  myUserList.init();  myLarge.removeGlaze();    break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processcontenttabs = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };  } function SystemHandler(){    this.processTxtCommand = function(thecommand){  switch(thecommand){  case "setmultiaccount":  cWiz.cindex++;  cWiz.stage++;  cWiz.setMultiAccount(cWiz.account, cWiz.stage, req.responseText);  stoptheload();  break;  case "setFilterCategories":  params.eventcategories = req.responseText.split(',_');  myFilterWindow.setFilterContent();  break;  case "closecomplete":  alert(curSelection+" complete.");  myTimer.queuePush('closeMini_minibox');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+currentSubsection+',_'+exceltab);  break;  case "newPage":  homeUI.content[AJAX.cpost] = req.responseText;  homeUI.newPage(AJAX.cpost);  stoptheload();  if(myMini.visible['minibox'])  myTimer.queuePush('closeMini_minibox');  else  myLarge.removeGlaze();  break;  case "confirmRequest":    stoptheload();  myLarge.removeGlaze();  cval =  req.responseText;  if(cval == "Complete")  alert("Request Confirmed");  else{  arval = cval.split(',');  switch(arval[1]){  case "friend": alert("You are already friends with "+arval[0]); break;  case "network": alert(arval[0]+" is already in your network"); break;  }  }  break;  case "addUscout": case "addUplayer":  case "addUteam": case "addUcoach":  case "joinUteam":  stoptheload();    cval =  req.responseText;  if(cval == "Complete"){  alert("Membership Request Sent");  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+currentSubsection+',_'+exceltab);  }  else if (cval == "Invalid mail"){  alert("You entered an invalid team email.");  }  else{  alert("A request has already been mailed to this account");  }  myLarge.removeGlaze();  break;  case "addUFriend":  stoptheload();  myLarge.removeGlaze();  resp = req.responseText;  if(resp == "Complete")  alert("Friend Request Sent");  else  alert(resp);    myTimer.queuePush('closeMini_minibox');  break;  case "signin":  myTimer.queuePush('signin_400/250');  break;  case "setfilterwindow":  myTimer.queuePush('setMini_setfilterwindow');  stoptheload();  break;  case "setfilterwindow2":  cont = req.responseText;  if(myFilterWindow.filterlist != "")  myUserList.filterUser = (cont == "") ? new Array('None') : cont.split(',');  else  myUserList.filterUser = new Array();  myUserList.init(document.getElementById('midboxcontent'));  stoptheload();  break;  case "setpagecontent":  stoptheload();  myLarge.removeGlaze();  content = req.responseText;  content = myHomePage.setHomeContent(content);  myHomePage.setContent(content);  break;  case "resettable":  stoptheload();  myLarge.removeGlaze();  currenteditor.content = req.responseText;  currenteditor.resetEditor();  break;  case "getreponse":  stoptheload();  alert(req.responseText);  break;  case "removeglaze":  stoptheload();  myLarge.removeGlaze();  break;  case "entersite":  alert('Enter Site');  break;  case "setcountry":  params.country = req.responseText;  pagecreator = (pagecreate == "") ? "" : "/"+pagecreate;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/display'+pagecreator);  pagecreate = "";  break;  case "delete":  switch(req.responseText){  case "complete": alert('Delete complete.'); break;  case "deleteprofilepic":   alert('You have deleted your profile picture');   picture = "none";  break;  }  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/toptabs');  break;  case "deleteandclose":  switch(req.responseText){  case "complete": alert('Delete complete.'); break;  case "incomplete": alert('Cannot Delete.  Please try later'); break;  case "rootaccount": alert('Your signin account cannot be deleted.'); break;  case "errcurrentaccount": alert('Cannot delete your "current" account.'); break;  }  stoptheload();  myTimer.queuePush('closeMini_minibox');  break;  case "closeandcall":  myTimer.queuePush('closeMini_minibox');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  break;  case "deletedimage":  stoptheload();  alert('Image Deleted');  break;  case "addimage":  alert("Image added");  params.type.splice(0, 0, req.responseText);  myCustom.setPhoto();  stoptheload();  break;  case "setsport":  params.sport = req.responseText.split(',');  myTimer.queuePush('callAjax_HOME/Registration/Country');  break;  case "setaccountsport":  params.sport = req.responseText.split(',');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/account_country');  break;  case "callAccount":  params.sport = req.responseText.split(',');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setAccount');  break;  case "openhelp":  case "setcont2":  myHomePage.setContent(req.responseText);  myLarge.removeGlaze();  stoptheload();  break;  case "calldefault":  currentLink = 'HOME';  currentSection = 'Profile(D)';  subLinks.currentSub = 'Profile(D)';  relocate = "default/default";  stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/default');  break;  case "updategload":  stoptheload();  myLarge.removeGlaze();  glazer.updateLoad();  break;  case "updateload":  stoptheload();  uploadLoad();  break;  case "endrequest":  stoptheload();  alert(req.responseText);  break;  case "calldefault":  currentLink = 'HOME';  currentSection = 'Profile(D)';  subLinks.currentSub = 'Profile(D)';  relocate = "default/default";  stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/default');  break;  }  };    this.processCommand = function(thecommand){  switch(thecommand[0]){  case "deny": case "deny2": case "accept2": case "accept": case "confirm":  case "acdeny": case "acdeny2": case "acaccept2": case "acaccept":  resp = req.responseXML.getElementsByTagName("resp")[0].childNodes[0].nodeValue;  if(resp == "signed")  myTimer.queuePush('callCommand_HOME/'+thecommand[1]+'/default');  else{  myTimer.queuePush('callCommand_HOME/default/default');  params.commandlist = 'signin_400/250//'+thecommand[1];  }  break;  case "userrequest":  subj = req.responseXML.getElementsByTagName("recsubject")[0].childNodes[0];  nubj = req.responseXML.getElementsByTagName("recname")[0].childNodes[0];  aubj = req.responseXML.getElementsByTagName("recaccount")[0].childNodes[0];  params.subject = (subj != null) ? subj.nodeValue : "";  params.sname = (nubj != null) ? nubj.nodeValue : "";  params.raccount = (aubj != null) ? aubj.nodeValue : "";  if(params.subject != "")  myTimer.queuePush('callAjax_'+currentLink+'/default/default');  else{  initglaze = false;  introglaze = "";  this.processCommand(new Array('default'));  }  break;  case "setnetworks":  stoptheload();  params.setFNameDOM(req.responseXML.getElementsByTagName("Domain"));  params.setSportDOM(req.responseXML.getElementsByTagName("sports"));  params.setContDOM(req.responseXML.getElementsByTagName("LDDomain"));  break;  case "setHomePage":  params.setValueDOM(req.responseXML.getElementsByTagName("Selection"));  params.setInfoDOM(req.responseXML.getElementsByTagName("Content"));    params.setCategoryDOM(req.responseXML.getElementsByTagName("Header"));  params.setCaptionDOM(req.responseXML.getElementsByTagName("Title"));  params.setCActionDOM(req.responseXML.getElementsByTagName("Action"));  params.setObjectDOM(req.responseXML.getElementsByTagName("Location"));  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Type"));  header = req.responseXML.getElementsByTagName("botlinks")[0].childNodes[0].nodeValue;  params.header = header.split(',_');  flashWindow.setFolderList();  homeUI.makePage();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/setnetworks');  break;  case "redirect":  redirectSection = currentSection;  redirectSub = thecommand[1];  redirectPost = subcommand;  myTimer.queuePush('callAjax_'+currentLink+'/default/default');  break;  case "getMainFilter":  params.setFAbrDom(req.responseXML.getElementsByTagName("Abbreviation"));  params.setFRangeDOM(req.responseXML.getElementsByTagName("Min_Max"));  params.setFFixedDOM(req.responseXML.getElementsByTagName("Fixed"));  params.setFrefDOM(req.responseXML.getElementsByTagName("Reference_ID"));    if(myFilterWindow.filterlist == "")  myTimer.queuePush('setMini_setfilterwindow');  else{  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/performFilter/'+myFilterWindow.filterlist+'/setfilterwindow');  }  stoptheload();  break;  case "closeMini":  stoptheload();  myMini.closeMini(thecommand[1]);  stoptheload();  uReg.currentReg = null;  break;  case "say": alert('HI'); break;  case "sethometext":  cn = req.responseXML.getElementsByTagName("content")[0].childNodes[0].nodeValue;  acc = req.responseXML.getElementsByTagName("acc")[0].childNodes[0].nodeValue;  myHomePage.setHomeText(cn, acc);  stoptheload();  myLarge.removeGlaze();  break;  case "filter":  params.eventdisplay = null;  tname = req.responseXML.getElementsByTagName("name");  if(tname[0] != null){  params.setInfoFilterName(tname);  params.setInfoFilterValue(req.responseXML.getElementsByTagName("value"));  params.setDisplayTypeDOM(req.responseXML.getElementsByTagName("Display_Data_Type"));  }  params.setEvents(req.responseXML.getElementsByTagName("Event"));  filterContent.setMainFilter();  myLarge.removeGlaze();  stoptheload();  break;  case "glaze":  switch(thecommand[1]){  case "settoplinks":  params.curtab = req.responseXML.getElementsByTagName("deflinks")[0].childNodes[0].nodeValue;  params.seteventCategory(req.responseXML.getElementsByTagName("links"));  params.setGroup(req.responseXML.getElementsByTagName("ids"));  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("option"));  glazer.init();  glazer.display();  break;  }  break;  case "default":  AJAX.callSublink(currentLink, currentSection, thecommand[0]);  break;  case "getSportFilter":  myFilterWindow.openFilterInfo();  break;  case "bottabs":  usrtype = req.responseXML.getElementsByTagName("usrtype");  if(usrtype == null);  else {  cutype = usrtype[0].childNodes[0].nodeValue;  stab = req.responseXML.getElementsByTagName("sidetabs");  ttab = req.responseXML.getElementsByTagName("toptabs");  if(cutype == "ur")   params.setUr(stab, ttab);   else if(cutype == "ru")   params.setRu(stab, ttab);  }  AJAX.setMainPage(false);  break;  case "settablist":  opts = req.responseXML.getElementsByTagName("options");  ectab = req.responseXML.getElementsByTagName("excel_tab");  img = req.responseXML.getElementsByTagName("image");  usrsport = req.responseXML.getElementsByTagName("csprt")[0].childNodes[0].nodeValue;  params.psports = usrsport.split(',');  params.spindex = 0;  params.setTabList(opts, ectab, img);  ctabs = contentTabs.defaultlist;  if(processtablist != ""){   contentTabs.setExcelTabs(currentSubsection);  }  processtablist = "";  AJAX.setMainPage(false);  break;  case "sublinks":  newpage = true;  searchtext = "";  params.eventlist = new Array();  uacc = req.responseXML.getElementsByTagName("account_options")[0];  gact = req.responseXML.getElementsByTagName("guest_actions")[0];  params.setAlertsDOM(req.responseXML.getElementsByTagName("alerts"));  params.setAlertsidDOM(req.responseXML.getElementsByTagName("aid"));  params.setAlertslenDOM(req.responseXML.getElementsByTagName("alen"));  params.setAlertslinkDOM(req.responseXML.getElementsByTagName("alink"));  if(uacc != null){  uc = uacc.childNodes[0].nodeValue.replace(/\s/g, '_');  gt = gact.childNodes[0].nodeValue.replace(/\s/g, '_');  accountTypes = uc.split(',_');  guestActions = gt.split(',_');  }    myFilters.resetFilterEntries();  AJAX.setDefaults();  AJAX.resetUserLink();  AJAX.processSubs();  this.designPage();  if(params.exceltablist.length == 0)  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/settablist');  else  AJAX.setMainPage(false);  break;  case "display":  if(!comment.editing && comment.visible){comment.removeBox();}  params.objects = new Array();  params.urating = req.responseXML.getElementsByTagName("urate")[0].childNodes[0].nodeValue;  cobj = req.responseXML.getElementsByTagName("ulocation")[0];  if(cobj != null){  udomain = cobj.childNodes[0].nodeValue;  this.setSiteInfo(udomain);  }  if(!forceload)  myTimer.queuePush('displayMid');  else{  middle.initializeMidbox();  forceload = false;  }  AJAX.resetDisplay();      break;  }  };    this.designPage = function(){  switch(designtype){  case "version_0.1":  midcontt = document.getElementById('midboxcontent').style;  midcontt.background = midbackground;  document.getElementById('sub_links').style.background = midbackground;  topLinks.init(params.topsubs);  break;  }  };    this.setSiteInfo = function(udomain){  sitename = udomain;  lockerdomain = "http://"+udomain+".lockerdome.com/users/";  settinglink = "http://"+udomain+".lockerdome.com/settings/sttngsndpsswrd";  };    } function HomeViewer(){  this.refreshUI = function(){  myHomePage.init();  UI.setDefaultView("user");  };  } function MembersViewer(){  this.refreshUI = function(){  myHomePage.init();  UI.setDefaultView("members");  };  } function HelpViewer(){  this.refreshUI = function(){  myHomePage.init();  UI.setDefaultView("help");  };    } function UserViewer(){  this.refreshUI = function(){  myHomePage.init();    switch(currentSection){  case "Media": case "Profile": case "Mail":  case "Events": case "Stats":  UI.setDefaultView("user");  break;  case "Network":   UI.setDefaultView("network");  break;  case "Blog":   UI.setDefaultView("blog");  break;  case "default":  currentSection = "Profile";  UI.setDefaultView("user");  break;  }  };  } function MediaViewer(){  this.refreshUI = function(){  myHomePage.init();  UI.setDefaultView("media");  };    } function MessageViewer(){  this.refreshUI = function(){  myHomePage.init();  UI.setDefaultView("message");  };  } function HomeHandler(){  this.process = function(command, section, subsection, subcommand){  switch(section){  case "Registration":  regH = new RegistrationHandler();  regH.process(command, section, subsection, subcommand, false);  break;  case "Main":  this.setPage();  break;  default:  cloc = subsection.split('-');  cursect = subsection;  switch(cloc[0]){  case "newtab": cursect = cloc[1];  case "Terms_of_use":  case "Partner_list":  case "Privacy_Policy":  case "Account_Information":  case "General_Information":  if(params.exceltablist.length != 0){  ctabs = contentTabs.tablist;  ctabs = ctabs+",_"+cursect;  contentTabs.setTabList(ctabs, cursect);    }  this.setPage(cursect);  break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  }    };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processcontenttabs = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };  } function MembersHandler(){    this.processUser = function(){  params.fname = new Array();  params.sport = new Array();  params.value = new Array();  params.files = new Array();  params.sponsor = new Array();  fnm = req.responseXML.getElementsByTagName("fnm");  if(fnm[0] != null){  params.setFilesDOM(fnm);  params.setNameDOM(req.responseXML.getElementsByTagName("fnmu"));  fm = req.responseXML.getElementsByTagName("fnmn");  fs = req.responseXML.getElementsByTagName("fnms");  fa = req.responseXML.getElementsByTagName("fnma");  sp = req.responseXML.getElementsByTagName("spns");  nt = req.responseXML.getElementsByTagName("ntwrk");  if(fm[0] != null) {params.setFNameDOM(fm);}  if(fs[0] != null) {params.setSportDOM(fs);}  if(fa[0] != null) {params.setAccountDOM(fa);}  if(sp[0] != null) {params.setSponsorDOM(sp);}  if(nt[0] != null) {params.setNetworkDOM(nt);}  return true;  }  return false;  };    this.processRecruitingFilters = function(){  params.setGroup(req.responseXML.getElementsByTagName("gr"));  params.setFilterSectionDOM(req.responseXML.getElementsByTagName("nm"));  params.setAbbreviationIDDOM(req.responseXML.getElementsByTagName("Abbreviation_ID"));  params.setFullAttributeDOM(req.responseXML.getElementsByTagName("Full_Attribute"));  params.setInputTypeDOM(req.responseXML.getElementsByTagName("Input_Type"));  params.setFilterNameDOM(req.responseXML.getElementsByTagName("Default"));  params.setInputTextOptionDOM(req.responseXML.getElementsByTagName("Input_Text_Options"));  };    this.initMember = function(){  this.processUser();  stoptheload();  myUserList = new UserList(params.files, 250, 290, params.name);  myUserList.init();  myLarge.removeGlaze();  setPageCommands(new Array("Search", "Filter"));  bx= document.getElementById('ldbox');  bx.style.display = "none";    };    this.process = function(command, section, subsection, subcommand){  switch(subsection){  case "All_Users":  case "Players":  case "Coaches":  case "Teams":  case "Fans":  case "Scouts":  case "Parents":  case "Leagues":  if(params.exceltablist.length != 0){  contentTabs.setExcelTabs(subsection);  }  this.setPage(subsection);  break;  case "process":  this.initMember();  break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  };    this.processCommand = function(thecommand){  switch(thecommand[0]){  case "filterall":  myFilters.completeFilter();  case "search":  this.initMember();  break;  case "getFilters":    this.processRecruitingFilters();  if(thecommand[1] == "setcountries"){  params.setDomainPosition(req.responseXML.getElementsByTagName("position"));  temp = req.responseXML.getElementsByTagName("countries")[0].childNodes[0].nodeValue;  params.ucountries = temp.split(',');  }  myFilters.openFilter();  break;  }  };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processcontenttabs = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };    } function MediaHandler(){    this.processTxtCommand = function(thecommand){  switch(thecommand){  case "setimages":  glazer.sidefiles = req.responseText.split(',_');  myTimer.queuePush('setMini_setGlazeInfo');  break;  case "setglazerimages":  glazer.contentarray = req.responseText.split(',_');  myTimer.queuePush('setMini_setGlazeInfo');  break;  case "setfileeditor":  glazer.setFileEditor(req.responseText);  myLarge.removeGlaze();  stoptheload();  break;  }  };      this.processCommand = function(){  switch(thecommand[0]){  case "deletecomment":  case "fcomment":  params.setFileCommentIdDOM(req.responseXML.getElementsByTagName("file_id"));  params.setFileCommentDOM(req.responseXML.getElementsByTagName("comment"));  params.setFileUserDOM(req.responseXML.getElementsByTagName("comment_uid"));  params.setFileCommentImgDOM(req.responseXML.getElementsByTagName("cimg"));  glazer.resetComments();  break;  case "frate":  frate = req.responseXML.getElementsByTagName("frate")[0].childNodes[0].nodeValue;  urate = req.responseXML.getElementsByTagName("urate")[0].childNodes[0].nodeValue;  glazer.resetRating(frate, urate);  break;  case "initglazeimage":  clist = req.responseXML.getElementsByTagName("filelist")[0].childNodes[0];  cimglist =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("ftype")[0].childNodes[0];  obj1 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("fdescr")[0].childNodes[0];  obj2 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("ftag")[0].childNodes[0];  obj3 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("frate")[0].childNodes[0];  obj4 =(clist != null) ? clist.nodeValue : "";  clist = req.responseXML.getElementsByTagName("urate")[0].childNodes[0];  obj5 =(clist != null) ? clist.nodeValue : "";    glazer.sidefiles = cimglist.split(',_');  glazer.initFileIno(obj1, obj2, obj3, obj4, obj5);    params.setFileCommentDOM(req.responseXML.getElementsByTagName("comment"));  params.setFileUserDOM(req.responseXML.getElementsByTagName("comment_uid"));  params.setFileCommentIdDOM(req.responseXML.getElementsByTagName("file_id"));  params.setFileCommentImgDOM(req.responseXML.getElementsByTagName("cimg"));    if(glazer.start){  myTimer.queuePush('setMini_setGlazeInfo');  glazer.start = false;  }  else{  glazer.setContent();  stoptheload();  }  break;  case "imageadder":  cimg = req.responseXML.getElementsByTagName("images");  if(cimg[0] != null){  params.setFNameDOM(cimg);   glazer.sidefiles = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("id"));  glazer.userid = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("usern"));  glazer.user = params.fname;  myTimer.queuePush('setMini_setGlazeInfo');  }  else{  myTimer.queuePush('multiupload_400/250');  }  break;  case "calladdall":  case "deleteeventimage": case "addeventimage":  case "seteventimages":  glazer.resetContent();  cimg = req.responseXML.getElementsByTagName("images");  if(cimg[0] != null){  params.setFNameDOM(cimg);  glazer.contentfiles = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("id"));  glazer.contentid = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("usern"));  glazer.contentname = params.fname;    }  if(glazer.currenttype != "" && myMini.visible['minibox'])  glazer.initObjects();  else{  switch(thecommand[1]){  case "Photos": eventEditor.setPhotos(); break;  case "Participants":   params.uimg = glazer.contentfiles;  params.id = glazer.contentid;  params.usr = glazer.contentname;  eventEditor.setParticipants();   break;  }  myLarge.removeGlaze();  }  stoptheload();  break;  case "seteditorimages":  glazer.resetContent();  cimg = req.responseXML.getElementsByTagName("images");  if(cimg[0] != null){  params.setFNameDOM(cimg);  glazer.contentfiles = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("id"));  glazer.contentid = params.fname;  params.setFNameDOM(req.responseXML.getElementsByTagName("usern"));  glazer.contentname = params.fname;  eventEditor.setPhotos();  }  stoptheload();  myLarge.removeGlaze();  break;  case "setmediapage":  this.processMedia();  stoptheload();  cpage = myUserList.page;  myUserList = new UserList(params.files, 250, 290, params.name);  myUserList.reinit(cpage);  myLarge.removeGlaze();  break;  case "setwinimgs":  cimg = req.responseXML.getElementsByTagName("imglist");  tempList.winimgs = new Array();  if(cimg[0] != null){  clist = cimg[0].childNodes[0].nodeValue;  tempList.winimgs = clist.split(',_');  myTimer.queuePush('imagewindow_'+tempList.windowwidth+'/'+tempList.windowheight);  }  else  myTimer.queuePush('launchuploader_'+myUploader.windowwidth+'/'+myUploader.windowheight+'/Photo/changeimage');    break;  }  };    this.processMedia = function(){  params.fname = new Array();  params.sport = new Array();  params.value = new Array();  params.files = new Array();  params.himg = new Array();  params.sponsor = new Array();  fnm = req.responseXML.getElementsByTagName("fnm");  if(fnm[0] != null){  params.setFilesDOM(fnm);  params.setHImgDOM(req.responseXML.getElementsByTagName("himg"));  params.setNameDOM(req.responseXML.getElementsByTagName("fnmu"));  fm = req.responseXML.getElementsByTagName("fnmn");  fs = req.responseXML.getElementsByTagName("fnms");  fa = req.responseXML.getElementsByTagName("fnma");  nt = req.responseXML.getElementsByTagName("ntwrk");  fr = req.responseXML.getElementsByTagName("frate");  fc = req.responseXML.getElementsByTagName("fcmnt");  fv = req.responseXML.getElementsByTagName("fview");  if(fm[0] != null) {params.setFNameDOM(fm);}  if(fs[0] != null) {params.setSportDOM(fs);}  if(fa[0] != null) {params.setAccountDOM(fa);}  if(nt[0] != null) {params.setNetworkDOM(nt);}    if(fr[0] != null) {params.setPicRateDOM(fr);}  if(fc[0] != null) {params.setPicCommentDOM(fc);}  if(fv[0] != null) {params.setPicViewDOM(fv);}  }  };    this.process = function(command, section, subsection, subcommand){  switch(subsection){  case "All_Photos":  case "All_Videos":  case "Players":  case "Coaches":  case "Teams":  case "Fans":  case "Scouts":  case "Parents":  case "Leagues":  if(params.exceltablist.length != 0){  contentTabs.setExcelTabs(subsection);  }  this.setPage(subsection);  break;  case "process":  this.processMedia();  stoptheload();  myUserList = new UserList(params.files, 250, 290, params.name);  myUserList.init();  myLarge.removeGlaze();    break;  default:  contentTabs.resetTabs();  contentTabs.setTabList(contentTabs.tablist, subsection);  this.setPage();  break;  }  };    this.setPage = function(ctab){  if(ctab == null) ctab = "";  if(params.exceltablist.length == 0){  processcontenttabs = ctab;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  else{  AJAX.setMainPage(false);   }  };  } function Filter(){  this.showpicture = false;  this.trackMouse = 0;  this.defaultHeight = 146;   this.currentHeight = 146;  this.dragging = false;  this.curtop = 0;  this.samepage = false;  this.currentBotSize =(midright - 138);  this.collapsed = false;  this.onmenu = false;  this.currentid = "";  this.currentaction = "";  this.currentname = "";  this.maxlen = 0;  this.filtercontent = new Array();  this.defaultrange = new Array();  this.defaultid = new Array();  this.inputtype = new Array();  this.inputtextoption = new Array();  this.filter_id = new Array();  this.filterlist = new Array();  this.filterinfo = new Array();  this.filterloc = new Array();  this.cloc = "";  this.start = 0;   this.end = 0;  this.defend = 5;  this.adder = 0;  this.keyopen  = false;  this.curindex = "";    Filter.prototype.toString = function() {      return this.printDefaultFilters();  };    this.resize = function(){  if(winWidth > 800)  this.init(this.showpicture);  filterContent.resize();  };    this.printDefaultFilters = function(){  txt = "";  txt += ('<div id = "thefilters" style = "width:100%">');  txt += filterContent;  txt += ('</div>');  return txt;  };    this.init = function(showpic){    myFilters.showpicture = showpic;  myFilters.setAllFilterLists();  filterContent.setContent();  };    this.resetFilter = function(){   document.getElementById('thefilters').innerHTML = "";  };    this.reLoadFilters = function(){  try{  filt = document.getElementById('thefilters');  theboxlen = 0;  filt.style.width = (midright - 2) + "px";  if(myFilters.showpicture){  this.currentBotSize = (midright - 130);  document.getElementById('optionlist').style.width = (midright - 123)+"px";  }  else{  this.currentBotSize = (midright - 8);  document.getElementById('optionlist').style.width = (midright - 2)+"px";  }  }catch(e){}  };    this.toggleFilters = function(type){  fcont = document.getElementById('fccont');  fdisp = fcont.style.display;  ctype = (type == null) ?  fdisp : type;  if(ctype == "block" && fdisp == "block"){  this.toggle('down');  fcont.style.display = "none";  }else{  this.toggle('up');  fcont.style.display = "block";  }  filterContent.resize();  };    this.toggle = function(type){  themid = document.getElementById('midboxcontent');  winHeight = document.documentElement.clientHeight;  midHeight = winHeight - botmargin;  midHeight = (midHeight > minMidHeight) ? midHeight : minMidHeight;    switch(type){  case "up":  midHeight -= 96;  themid.style.height =(midHeight) + "px";  break;  case "down":  this.collapsed = true;  themid.style.height =(midHeight) + "px";  break;  }  };    this.resizeFilters = function(){  filtercont = document.getElementById('fccont');  filt = document.getElementById('thefilters');  themid = document.getElementById('midboxcontent');  if(filtercont.style.display == "none")  this.currentHeight = 146 - 86;  else  this.currentHeight = 146;  this.setMid();  filt.style.height = this.currentHeight + "px";  };    this.setMid = function(){  themid = document.getElementById('midmini');  theadjust = this.defaultHeight - this.currentHeight;  themid.style.height =(midHeight + theadjust) + "px";  document.getElementById('fccont').style.height = (this.currentHeight - 50)+"px";  };    this.setAllFilterLists = function(){  document.getElementById('midTabList').innerHTML = midTabs.setMidTabs();  };    this.startToggler = function(){  stoptheload();  myTimer.queuePush('togglefilters');  };    this.setFilterMenu = function(){  flen = this.filter_id.length;  lastx = flen - 1;  xtxt  = '<li onclick = "myFilters.openWindow(\'Add_Filter\', \'Add_Filter\', 0)" style = "';  if(flen > 0)  xtxt += 'border-bottom: 0px; ';  xtxt  += ' cursor:default;  background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\') "><div style = "cursor:pointer; float:left; padding:2px; padding-top:4px; text-align:center;"><font style = "color:#0011cc;  font-weight:normal; text-align:center; ">Add Filter</font></div>';  xtxt += '<div style = "float:right; width:20px; height:21px; border-left:1px solid #eee; background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\')" ></div></li>';  for(x = 0; x < flen; x++){  xtxt += '<li ';  if(x != lastx)  xtxt += 'style = "border-bottom: 0px; "';  wrd1 = this.filterlist[x].replace(/_/g, ' ');  wrd2 = this.filterinfo[this.filter_id[x]].replace(/_/g, ' ');  xtxt += '><div style = "float:left; padding:2px;  cursor:pointer;" onclick = "myFilters.callCommand(\'Call_Edit\', \''+this.filter_id[x]+'\', \''+this.filterinfo[this.filter_id[x]]+'\', \''+this.filterloc[x]+'\', '+x+')"><font style = "font-weight:bold; color:#444;">'+wrd1+': </font><font style = "font-weight:normal; color:#0033ff;">'+wrd2+'</font></div>';  xtxt += '<div style = "float:right; width:20px; height:21px; border-left:1px solid #ccc; background:#eee; background-image:url(\'http://s3.amazonaws.com/ldimages/grey-x.gif\'); background-repeat:no-repeat;  cursor:pointer;" onclick = "myFilters.callCommand(\'Remove_Filter_Open\', \''+this.filter_id[x]+'\', \''+this.filterinfo[this.filter_id[x]]+'\', \''+this.filterloc[x]+'\', '+x+')"></div></li>';  }  return xtxt;  };    this.openFilter = function(){  myTimer.queuePush('openfilter_400/250');  };    this.callCommand = function(type, cid, cname, curloc, index, index2){  switch(type){  case "Remove_Filter_Open":  this.keyopen = true;  this.removeFilter(cid, cname, curloc, index);   break;  case "Remove_Filter": this.removeFilter(cid, cname, curloc, index, index2); break;  case "Call_Edit": this.openWindow(cid, cname, curloc, index); break;  case "Edit_Filter": this.editFilter(cid, cname, curloc, index); break;  case "Add_Filter": this.addFilter(cid, cname, curloc, index); break;  }  };    this.returnEntryValue = function(index){  ctype = document.getElementById('filtertype_'+index);  obj = document.getElementById('filtercont_'+index);  switch(ctype){  case "position": case "country": case "menu":  val = obj.options[obj.selectedIndex].value;  break;  default:  val = obj.value;  break;  }  val = val.replace(/\s/g, '_');  val = val.replace(/;/g, '');  val = val.replace(/,_/g, ', ');  return val;  };    this.editFilter = function(cid, cname, curloc, index){  val = this.returnEntryValue(index);  if(val != this.filterinfo[cid]){  this.filterinfo[cid] = val;  this.performFilter(curloc);  }  };    this.addSearch = function(stext){  this.resetFilterEntries();  this.filter_id.push("BI_PI_Name");  this.filterlist.push("Search");  this.filterinfo["BI_PI_Name"] = stext;  this.filterloc.push("Search");  };    this.addFilter = function(cid, cname, curloc, index){  val = this.returnEntryValue(index);  cname = cname.replace(/\s/g, '_');  this.filter_id.push(cid);  this.filterlist.push(cname);  this.filterinfo[cid] = val;  this.filterloc.push(curloc);  this.performFilter(curloc, index);  };    this.removeFilter = function(cid, cname, curloc, ctoken, index){  this.filter_id.splice(ctoken, 1);  this.filterlist.splice(ctoken, 1);  this.filterinfo[cid] = '';  this.filterloc.splice(ctoken, 1);  this.performFilter(curloc, index);  };    this.performFilter = function(curloc, index){  this.curindex = index;  this.cloc = curloc;  idlen = this.filter_id.length;  idlist = this.filter_id.join(';');  vallist = '';  for(c = 0; c < idlen; c++){  vallist += this.filterinfo[this.filter_id[c]]+';';  }  vallist = vallist.substr(0, vallist.length - 1);  vallist = vallist.replace(/\//g, '%2F');  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/filterall_"+currentSubsection+"/"+idlist+',_'+vallist);  };    this.completeFilter = function(){  this.resetFilterMenu();  if(this.curindex != null){  cobj = document.getElementById('filtercommand_'+this.curindex);  cobj.innerHTML = this.displayAction(this.cloc, this.curindex);  }  };    this.openWindow = function(cid, cname, curloc, index){  this.currentid = cid;  this.currentname = cname;  this.start = 0;  this.end = 0;  this.defend = 5;  this.adder = 0;  this.keyopen = false;  this.cloc = curloc;  if(this.cloc != "Search"){  if(params.filtercontent[0] == null){  if(params.ucountries[0] == null || params.domainposition[0] == null)  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/getFilters_setcountries");  else  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/getFilters");  }  else  myTimer.queuePush('openfilter_400/250');  }  else  this.completeFilter();  };    this.getFilterMenu = function(){  xtxt = '';  xtxt += '<ul id = "filter_menu" style = "display:none">';  xtxt += '</ul>';  return xtxt;  };    this.setYearList = function(curval){  startyear = myDays.year+10;  curtxt = '';  for (yr = startyear; yr > 1950; yr--){  curtxt += '<option value = "'+yr+'" ';  if(curval == yr)  curtxt += 'selected';  curtxt += '>'+yr+'</option>';  }  return curtxt;  };    this.setOptions = function(infolist, curval){  mlen = infolist.length;  curtxt = '';  for(x = 0; x < mlen; x++){  cwrd = infolist[x].replace(/_/g, ' ');  curtxt += '<option value = "'+infolist[x]+'" ';  if(curval == infolist[x])  curtxt += 'selected';  curtxt += '>'+cwrd+'</option>';  }  return curtxt;  };    this.initContent = function(){  clen = params.filtersection.length;  if(this.filtercontent[params.filtersection[i]] == null){  for(i = 0; i < clen; i++){  if(this.filtercontent[params.filtersection[i]] == null){  this.filtercontent[params.filtersection[i]] = new Array();  this.defaultrange[params.filtersection[i]] = new Array();  this.defaultid[params.filtersection[i]] = new Array();  this.inputtype[params.filtersection[i]] = new Array();  this.inputtextoption[params.filtersection[i]] = new Array();  }  this.filtercontent[params.filtersection[i]].push(params.fullattribute[i]);  this.defaultrange[params.filtersection[i]].push(params.filtername[i]);  this.defaultid[params.filtersection[i]].push(params.abbreviationid[i]);  this.inputtype[params.filtersection[i]].push(params.inputtype[i]);  this.inputtextoption[params.filtersection[i]].push(params.inputtextoption[i]);  }  }  };    this.setFilterContent = function (){  mtxt = '';    clen = this.filtercontent[this.cloc].length;  this.start += this.adder;  if(this.start < 0) this.start = 0;     if(clen < 5)  this.end = clen;  else{  this.end = (this.adder != 0) ? this.start + Math.abs(this.adder) : this.defend;  if(this.end > clen)  this.end = clen;  }  for(i = this.start; i < this.end; i++){  curval = "";  def = this.defaultrange[this.cloc][i];  mtxt += '<div style = "float:left; margin-top:4px; margin-bottom:4px; ">';  mtxt +='<div style = "float:left; font-size: 10px; color:#fff; width:193px; padding-top:3px; ">'+this.filtercontent[this.cloc][i]+'</div>';  if(this.filterinfo[this.defaultid[this.cloc][i]] != null)  curval = this.filterinfo[this.defaultid[this.cloc][i]];  switch(this.inputtype[this.cloc][i]){  case "year3":  mtxt +='<select id  = "filtercont_'+i+'" style = "font-size:10px; width:133px; border-right:1px solid #aaa; float:left; ">';  mtxt +=this.setYearList(curval);  mtxt += '</select>';  break;  case "position":  mtxt +='<select id  = "filtercont_'+i+'" style = "font-size:10px; width:133px; border-right:1px solid #aaa; float:left; ">';  mtxt +=this.setOptions(params.domainposition, curval);  mtxt += '</select>';  break;  case "country":  mtxt +='<select id  = "filtercont_'+i+'" style = "font-size:10px; width:133px; border-right:1px solid #aaa; float:left; ">';  if(curval == "") curval = "United States";  curval = curval.replace(/_/g, ' ');  mtxt +=this.setOptions(params.ucountries, curval);  mtxt += '</select>';  break;  case "menu":  try{  cval = this.inputtextoption[this.cloc][i].replace(/^Non\-Applicable,_/g, '');  cval = cval.replace(/,_Non\-Applicable/g, '');  optionlist = cval.split(',_');  mtxt +='<select id  = "filtercont_'+i+'" style = "font-size:10px; width:133px;  border-right:1px solid #aaa; float:left; ">';  mtxt +=this.setOptions(optionlist, curval);  mtxt += '</select>';  }catch(e){}  break;  default:  if(def == "none" && curval == "") curval = "";  else if (curval == "") curval = def;  curval = curval.replace(/_/g, ' ');  mtxt +='<input id  = "filtercont_'+i+'" type = "text" style = "font-size:10px; width:130px;  float:left; border-right:1px solid #ccc;" value = "'+curval+'"/>';  }    mtxt +='<input id  = "filtertype_'+i+'" type = "hidden" value = "'+this.inputtype[this.cloc][i]+'"/>';  mtxt +='<div id = "filtercommand_'+i+'" style = "float:left; ">';  mtxt += this.displayAction(this.cloc, i);  mtxt +='</div>';  mtxt +='</div>';  }  return mtxt;  };    this.displayAction = function(loc, index){  ktxt = '';  objlen = this.filter_id.length;  found = false;  ctoken = 0;  for(y = 0; y < objlen; y++){  if(this.defaultid[loc][index] == this.filter_id[y]){  found = true;  ctoken = y;  break;  }  }  if(found){  ktxt +='<div style = "float:left; width:17px; height:17px; background-image:url(\'http://s3.amazonaws.com/ldimages/grey-remove.gif\'); background-repeat:no-repeat; background-position:-2px -1px; border:1px solid #aaa; border-right:1px solid #555; border-bottom:1px solid #aaa; border-left:0px; cursor:pointer" onclick = "myFilters.callCommand(\'Remove_Filter\', \''+this.defaultid[loc][index]+'\', \''+this.filtercontent[loc][index]+'\', \''+loc+'\', '+ctoken+', '+index+')"></div>';  ktxt += '<div style = "float:left; margin-left:3px; font-size:10px; color:#595959; padding-top:3px; cursor:pointer" onclick = "myFilters.callCommand(\'Edit_Filter\', \''+this.defaultid[loc][index]+'\', \''+this.filtercontent[loc][index]+'\', \''+loc+'\', '+index+')">Edit</div>';  }  else{  ktxt +='<div style = "float:left; width:17px; height:17px; background-image:url(\'http://s3.amazonaws.com/ldimages/grey-plus.gif\'); background-repeat:no-repeat; background-position:-2px -1px; border:1px solid #aaa; border-right:1px solid #555; border-bottom:1px solid #333; border-left:0px; cursor:pointer" onclick = "myFilters.callCommand(\'Add_Filter\', \''+myFilters.defaultid[loc][index]+'\', \''+this.filtercontent[loc][index]+'\', \''+loc+'\', '+index+')"></div>';  }  return ktxt;  };    this.changeWindow = function(obj){  this.start = 0;  theval = obj.options[obj.selectedIndex].value;  this.cloc = theval;  this.setFilterWindow(0);  };    this.setFilterWindow = function(cincr){  this.adder = cincr;  cobj = document.getElementById('filterwindow');  cobj.innerHTML = this.getFilterWindowContent();  };    this.getFilterWindowContent = function(){  nwrd = this.cloc.replace(/_/g, ' ');  xtxt = '';  xtxt +='<div style = " width:400px; height:224px; background-image:url(\'http://s3.amazonaws.com/ldimages/imgsignin.gif\');">';  xtxt +='<div style = "float:left; color:#fff; font-size:10px; height:200px; ">';  xtxt +='<div style = "clear:both; padding:15px; padding-top:10px; padding-bottom:10px; height:20px; border-bottom:1px solid #333; width:370px; background:#222; ">';  xtxt +='<div style = "float:left; width:193px; ">Filters: </div>';  xtxt +='<div style = "float:left; ">';  xtxt +='<select id = "filter_switch" onchange = "myFilters.changeWindow(this)" style = "float:left; width:151px;  font-size:10px; ">';  xtxt +=this.setOptions(params.group, this.cloc);  xtxt +='</select>';  xtxt +='</div>';  xtxt +='</div >';  xtxt +='<div style = "clear:both; padding:5px; padding-left:15px;">';  xtxt +=this.setFilterContent();  xtxt +='</div>';  xtxt +='</div>';    clen = this.filtercontent[this.cloc].length;  if(clen > 5){  pages = Math.ceil(clen/5);  curpage = Math.floor((this.end/clen)*pages);  xtxt +='<div style = "clear:both; width:400; height:20; margin-top:3px;">';  xtxt +='<div style = "float:right; width:70px; margin-right:10px; color:#888; font-size:10px; ">';  if(this.start >= 5)  xtxt +='<div style = "float:left; cursor:pointer; width:10px;" onclick = "myFilters.setFilterWindow(-5)"> < </div>';  else  xtxt +='<div style = "float:left; cursor:pointer; width:10px;" > &nbsp; </div>';  xtxt +='<div style = "float:left; width:50px; text-align:center; ">'+curpage+' of '+pages+'</div>';  if(this.end != clen)  xtxt +='<div style = "float:left; width:10px; cursor:pointer" onclick = "myFilters.setFilterWindow(5)"> > </div>';  xtxt +='</div>';  xtxt +='</div>';  }  xtxt += '</div>';  return xtxt;  };    this.initFilterWindow = function(){  if(this.cloc == "")  this.cloc = params.group[0];  this.initContent();  ctxt =  '<form id = "filterform" action = "" onsubmit="event.returnValue = false; return false;"';  ctxt +=' method="post" style = " float:left;" target="target_frm">';  ctxt += '<iframe id= "target_frm" name="target_frm" src="" style="width:0px;height:0px;border:0;"></iframe>';  ctxt = '<div id = "filterwindow">';  ctxt += this.getFilterWindowContent();  ctxt += '</div>';  ctxt += '</form>';  return ctxt;  };    this.resetFilterMenu = function(){  cmenu = document.getElementById('filter_menu');  cmenu.innerHTML = this.setFilterMenu();  maxlen = 12;  flen = this.filter_id.length;  for(x = 0; x < flen; x++){  wrd = this.filterlist[x]+'_'+this.filterinfo[this.filter_id[x]];  wrd = wrd.replace(/\s/g, '_');  wlen = wrd.length;  maxlen = (wlen > maxlen) ? wlen : maxlen;  }  cmenu.style.width = ((maxlen*8)+21)+'px';  };    this.resetFilterEntries = function(){  this.filtercontent = new Array();  this.defaultrange = new Array();  this.defaultid = new Array();  this.inputtype = new Array();  this.inputtextoption = new Array();  this.filter_id = new Array();  this.filterlist = new Array();  this.filterinfo = new Array();  this.filterloc = new Array();  this.cloc = "";  this.start = 0;   this.end = 0;  this.defend = 5;  this.adder = 0;  };    this.displayFilterMenu = function(){  csearch = searchtext.replace(/.*?,_/g, '');  if(csearch.match(/[a-zA-Z0-9]/)){  myFilters.addSearch(csearch);  searchtext = '';  }    this.onmenu = !this.onmenu;  cmenu = document.getElementById('filter_menu');  ftxt = document.getElementById('txt_filter');  fobj = document.getElementById('obj_filter');  if(this.onmenu){  this.resetFilterMenu();  cmenu.style.display = "block";    ftxt.style.border = '1px solid #ccc';  ftxt.style.borderBottom = '0px';  newimage = "url('http://s3.amazonaws.com/ldimages/grey-filter_up.gif')";    fobj.style.backgroundImage = newimage;  fobj.style.border = '1px solid #ccc';  fobj.style.borderLeft = '0px';  fobj.style.borderBottom = '0px';  }  else if (!this.keyopen){  cmenu.style.display = "none";  ftxt.style.border = '1px solid #fff';  ftxt.style.borderBottom = '0px';  newimage = "url('http://s3.amazonaws.com/ldimages/grey-filter_down.gif')";    fobj.style.backgroundImage = newimage;  fobj.style.border = '1px solid #fff';  fobj.style.borderLeft = '0px';  fobj.style.borderBottom = '0px';  }  this.keyopen = false;  };  }    var myFilters = new Filter(); function TopScroll () {    this.scroller = false;  this.theIncr = 100;    TopScroll.prototype.toString = function() {      return this.printDefaultScroll();  };    this.resize = function(){  navm = document.getElementById('navmain').style;  navi = document.getElementById('navInfo').style;  navm.width = (defWidth+10)+'px';  navi.width = (defWidth+10)+'px';  };    this.printDefaultScroll = function(){  txt = "";  txt += '<div id ="navmain" style = "clear:both; background-image:url(\'http://s3.amazonaws.com/ldimages/bg_top.gif\'); float:left; width:'+(defWidth+10)+'px;">';    txt += '<div id = "navInfo" style = "padding-top:2px; width:'+(defWidth+10)+'px;  height:17px;  border-bottom:1px solid #f9f9f9; border-left:1px solid #f9f9f9; padding-right:10px; float:right; text-align:right; font-size:10px; color:#0033FF; letter-spacing:2px; " >';    txt += '<div style = "float:right" id = "optlink"></div>';  txt +='</div>';  txt += '</div>';  return txt;  };  }    var topScroll = new TopScroll(); function BottomScroll () {    this.theIncr = 100;  this.scroller = false;  this.reduce = false;  this.overtab = false;  this.isopen = false;    BottomScroll.prototype.toString = function() {      return this.printDefaultScroll();  };    this.resize = function(){  cmargin = (defWidth/2) - 45 - resizeoffset;  botminimize = document.getElementById('botopen').style;  botbar = document.getElementById('botl').style;  botbar.width = (defWidth)+'px';  botminimize.marginRight = cmargin+'px';  };    this.tempreset = function(){  winHeight = document.documentElement.clientHeight;  midHeight = winHeight - botmargin;  midHeight = (midHeight > minMidHeight) ? midHeight : minMidHeight;  };    this.bottoggle = function(){  if(!newcommand){  filtercont = document.getElementById('fccont').style;  ctoggle = document.getElementById('botopen');  proceed = false;  setDefaults();  switch(currentLink){  case "HOME": proceed = (state != 0); break;  case "LOCKER": proceed = true; break;  }  if (proceed && filtercont.display == "none" && !this.overtab){  toolbarview = true;  filtercont.display = "block";  myFilters.toggleFilters('none');  this.setMaximizer('close');    }    }  };    this.bottoggledown = function(){  ctoggle = document.getElementById('botopen');  if(!newcommand){  filtercont = document.getElementById('fccont').style;  if(filtercont.display == "block"){  myFilters.toggleFilters('block');  this.setMaximizer('open');  }  }    };    this.setMaximizer = function(type){  /*  ctoggle = document.getElementById('botopen');  switch(type){  case "open": ctoggle.innerHTML = this.createMaximize(); break;  case "close": ctoggle.innerHTML = "";  }  */  };    this.onTab = function(isover){this.overtab = isover;};    this.botopener = function(){  cmargin = (defWidth/2) - 45;  xtxt = "";  xtxt += '<div id = "botopen" style = "margin-top:1px; margin-right:'+cmargin+'px; float:right;" >';  xtxt += this.createMaximize();  xtxt += '</div>';  return xtxt;  };    this.createMaximize = function(){  if((state == 0 && currentLink == "HOME" )|| currentLink == "MEMBERS"){  mtxt = "";  }  else{  mtxt ='<div style = "height:16px; width:120px; cursor:pointer;  background-image:url(\'http://s3.amazonaws.com/ldimages/redmaximize.gif\')" onmouseover = "bottomScroll.bottoggle()" onclick = "bottomScroll.bottoggle()"></div>';  }  return mtxt;  };    this.printDefaultScroll = function(){  txt = "";    txt += '<div id = "botl" style = "clear:both; border-top:1px solid #ddd; width:'+defWidth+'px; background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\'); float:left; height:20px; ">';  /*txt +='<div id= "ctTabs" style = "float:left; width:auto; height:20px; " ></div>';*/  txt +=this.botopener();  txt += '</div>';    return txt;  };    this.stopScroll = function(){  this.scroller = false;  };    this.initScroll = function(){  this.scroller = true;  this.scrollup();  };    this.scrollup = function(incr){  if(this.scroller){  if(IE) topincr = document.body.scrollTop;  else topincr =window.pageYOffset;  scrollBy(0, this.theIncr);  myTimer.queuePush('scroll_bottom');  }  };    }    var bottomScroll = new BottomScroll(); function FilterIcons(){  this.printAEIcons = function (upform, types, addaction, editaction, imgarray){  tempevents = new Array("Game Day1","Game Day2","Game Day3","Game Day4","Game Day5");  colswitch = 2;  thetext = "";  thetext  += '<div style = "float:left; padding:0px; margin:0px; margin-top:3px;">';  thetext +='<div style = "clear:both; width:100%; height:auto; ">';  for(i = 0; i < types.length; i++){  thetext +='<div style = "float:left; width:auto; height:65px; margin-left:7px;';  if(i > 0)  thetext +='margin-left:17px;';  thetext +='">';  thetext +='<div style = "float:left; ';  if(imgarray != null && imgarray[i] != null){  cwrd = imgarray[i].split(' ').join('_');  thetext += 'background-image:url(\'http://s3.amazonaws.com/ldimages/'+cwrd+'\');';  }  else    thetext += 'background-image:url(\'http://s3.amazonaws.com/ldimages/bg_coach.gif\');';  thetext +='width:50px; height:50px; ">';  thetext +='</div>';  thetext +='<div style = "float:left; width:20px; height:50px; margin-left:2px;">';  thetext +='<div style = "width:20px; cursor:pointer; height:22px; cursor:pointer;  background-image:url(\'http://s3.amazonaws.com/ldimages/bg_add.gif\');" onclick = "'+addaction+'(\''+types[i]+'\')">';  thetext +='</div>';  if(editaction != ""){  thetext +='<div style = "cursor:pointer;  width:20px; margin-top:4px; height:22px;  background-image:url(\'http://s3.amazonaws.com/ldimages/bg_switch.gif\');" onclick = "'+editaction+'(\''+types[i]+'\')">';  thetext +='</div>';  }  thetext +='</div>';  wrd = types[i].split('_').join(' ');  thetext +='<div style = "clear:both;width:75px; height:15px;  font-size:10px; color:#FFFFFF;">'+wrd+'</div>';  thetext +='</div>';  }  thetext += '</div>';  thetext += '</div>';  return thetext;  };    this.printIcons = function (upform, types, action, imgarray, typetxt){  typetxt = (typetxt == null) ? types : typetxt;  tempevents = new Array("Game Day1","Game Day2","Game Day3","Game Day4","Game Day5");  colswitch = 2;  thetext = "";  thetext  += '<div style = "float:left; padding:0px; margin:0px; margin-top:3px;">';  thetext +='<div style = "clear:both; width:100%; height:auto;">';  for(i = 0; i < types.length; i++){  thetext +='<div style = "float:left; width:auto; height:50px; margin-left:10px;';  thetext +='">';  thetext +='<div style = "float:left;';  if(imgarray != null && imgarray[i] != null){   wrd = imgarray[i].split(' ').join('_');  thetext += 'background-image:url(\'http://s3.amazonaws.com/ldimages/'+wrd+'\');';  }  else    thetext += ' background-image:url(\'http://s3.amazonaws.com/ldimages/bg_coach.gif\');';  thetext += 'width:50px; height:50px; cursor:pointer;" onclick = "'+action+'(\''+types[i]+'\')">';  thetext +='</div>';  wrd = typetxt[i].split('_').join(' ');  thetext +='<div style = "clear:both;float:left; width:75px; text-align:left; height:15px; font-size:10px; color:#FFFFFF;">'+wrd+'</div>';  thetext +='</div>';  }  thetext += '</div>';  thetext += '</div>';  return thetext;  };  }    var filterIcons = new FilterIcons(); function FilterContent() {    this.currentBotTab = "";  this.previousSubCategory = "";  this.subCategory = new Array();  this.midsize = 30;  this.tabList = new Array();    FilterContent.prototype.toString = function() {      return this.printDefaultFilterContent();  };    this.resize = function(){  contentTabs.removeOptions();  cwid = defWidth-(this.midsize+5) + resizeoffset;    fclist = document.getElementById('filtercontent').style;  cplist = document.getElementById('optionlist');  if(cplist != null){  oplist = cplist.style;  oplist.width = cwid+'px';  }  fclist.width = cwid+'px';  this.setMainFilter();  };    this.printDefaultFilterContent = function(){  txt = "";  txt +='<div id = "fccont" style = "clear:both; display:none;">';  txt += '<div id = "cusrimg" style = "float:left;"></div>';  txt += '<div id = "midTabList" style = "border-right:1px solid #555; float:left; height:98px; width:'+this.midsize+'px; background:#000;"></div>';  txt += '<div id = "filtercontent" style = "height:98px;  float:left; background:#000; width:'+(defWidth-(this.midsize+5))+'px;"></div>';  txt += '</div>';  return txt;  };    this.resetContent = function(){  document.getElementById('filtercontent').innerHTML = "";  };    this.displayPic = function(){  ptxt = "";  ptxt += '<div id = "mainimg" style = "background #f9f9f9; ';  if(currentLink == "HOME"){ ptxt +=  'cursor:pointer; '; }  ptxt += 'width:100%; text-align:center;clear:both;" ';  if(currentLink == "HOME"){ ptxt +=  ' onclick = "startImageSelector()" title ="Change Image"'; }  ptxt +=' >';  proportion = usrImg.height/usrImg.width;  pcompare = 80/105;  if(proportion > pcompare && proportion < 1) defImgProperty = 'height = "80" width= "105"';  else if(usrImg.height > usrImg.width) defImgProperty = 'height = "80"';  else defImgProperty = 'width = "105"';  ptxt +='<img id = "usrimg" name = "usrimg" src = "'+usrImg.src+'"  '+defImgProperty+' style = "margin:0px auto; text-align:left;"/>';  ptxt +='</div>';  theword = (unameu.length > 10) ? unameu.substring(0,7)+'...' : unameu;  theword = theword.replace(/_/g, ' ');  ptxt += '<div style = "color:#444; font-size:10px; padding:2px; float:left; padding-left:6px; padding-top:0px;" title = "'+unameu+'"><font style = "font-weight:bold">'+account+':</font>&nbsp;'+theword+'</div>';  return ptxt;  };      this.processTab = function(val){  dothefade = false;  this.currentBotTab = val;  this.setContent();  };    this.setMainFilter = function(){  fcont = document.getElementById("filtercommands");  thebot = cleanTab(this.currentBotTab);  cs = cleanTab(currentSection);  txt = "";  switch(thebot){  case "Photos":  case "Videos":  txt += contentManager.printUploader('uploadform', thebot);  break;  case "Add":  switch(cs){  case "Calendar":  case "Events":  txt += contentManager.displayEvents();  break;  case "Seasons":  txt += contentManager.displaySeasons();  break;  case "Roster":  txt += contentManager.displayRoster();  break;  }  break;  case "Create":  val = new Array('New_Entry');  switch(cs){  case "Blog": txt +=contentManager.displayMessage(val);break;  case "Mail": txt +=contentManager.displayMail(val); break;  }  break;  case "View":  switch(cs){  case "Blog":   val = new Array('View_Posts');   txt +=contentManager.displayMessage(val);  break;  case "Mail":   val = new Array('Inbox', 'Sent_Mail', 'All_Mail');  txt +=contentManager.displayMail(val);  break;  }  break;  case "Roster":    break;  case "Totals":  case "Averages":  txt +=contentManager.displayStats();  break;  case "Groups":  txt += contentManager.displayGroups();  break;  case "Sign Up":  txt += accountManager.displayNewUser();  break;  case "Add User":  txt += accountManager.displayAddUser();  break;  case "Take Action":  txt += accountManager.displayTakeAction();  break;  case "Administrators":  txt += accountManager.displayAdmin();  break;  case "Network":  txt += accountManager.displayNetwork();  break;  case "Add Account":  txt += accountManager.addAccount();  break;  case "Switch Account":  txt += accountManager.switchAccount();  break;  case "My Accounts":  txt += accountManager.displayAccounts();  break;  case "Control Panel":  txt += accountManager.controlPanel();  break;  case "Settings":  txt += accountManager.displaySettings();  break;  case "Questions":  txt +=contentManager.displayQuestion();  break;  case "Sports":  case "Bio":  txt += accountInfo.displayBio();  break;  case "School Info":  txt += accountInfo.displaySI();  break;  case "School Affiliation":  txt += accountInfo.displaySA();  break;  case "General Info":  txt += accountInfo.displayGI();  break;  case "Current Team":  txt += accountInfo.displayCT();  break;  case "Current Season":  txt += accountInfo.displayCS();  break;  case "All Teams":  txt += accountInfo.displayAT();  break;  case "LD Info":  txt += accountInfo.displayLDI();  break;  case "Advertise":  txt += contentManager.displayAdvertise();  break;  case "Press Inquiries":  txt += contentManager.displayPressInquiries();  break;  case "Feedback":  txt += contentManager.displayFeedback();  break;  case "":  txt += "";  break;  default:  txt += contentManager.displayCreate();  break;  }  if(fcont != null)  fcont.innerHTML = txt;  };    this.setContent = function(){  if(this.tabList.length > 0){  txt = "";  imgtxt = "";  thewidth = defWidth-(this.midsize);  this.subCategory = this.tabList[midTabs.currentId].split(',_');  txt += '<div id = "optionlist" style = "font-size:12px; float:left; height:auto; background:#222; width:'+thewidth+'px;">';  for (i = 0; i < this.subCategory.length; i++){  theword = cleanTab(this.subCategory[i]);  subcat = this.subCategory[i];  if(this.currentBotTab == ""){  if(this.subCategory[i].match(/\(D\)/g)){  this.currentBotTab = this.subCategory[i];  }  }  txt += '<div id = "'+subcat+'"style = "padding-top:5px; border-right:1px solid #545353; height:18px; padding-left:7px; padding-right:7px; ';  if(this.currentBotTab == this.subCategory[i])  txt += 'color:#fbfd4c; ';  else  txt +='color:#FFFFFF; ';  txt +='float:left; cursor:pointer;" onClick = "filterContent.processTab(\''+subcat+'\')">';  txt +=theword;  txt +='</div>';  }  txt +='</div>';  txt += '<div id = "filtercommands" style = "float:left;"></div>';  document.getElementById('cusrimg').innerHTML = imgtxt;  document.getElementById('filtercontent').innerHTML = txt;  startglazer = false;  stoptheload();  if((state != 0 && currentLink == "HOME") || currentLink == "LOCKER")  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/filter/'+this.currentBotTab);  }  };  }    var filterContent = new FilterContent(); function ContentTabs () {    this.theIncr = 100;  this.scroller = false;  this.currentTab = null;  this.tabs = new Array();  this.newTab = false;  this.tabEdit = new Array();  this.viewOptions = false;  this.onOptions = true;  this.numpages = 1;  this.pageName = "";  this.pageMap = false;  this.pageMapper = new Array();  this.currentMax = 0;  this.editing = true;  this.previousTab = "";  this.divheight = 0;  this.defaultlist = "";  this.tablist = "";  this.currentmultilist = "";  this.tlist = '';    this.resetInfo = function(){  this.theIncr = 100;  this.scroller = false;  this.currentTab = null;  this.tabs = new Array();  this.newTab = false;  this.tabEdit = new Array();  this.viewOptions = false;  this.onOptions = true;  this.numpages = 1;  this.pageName = "";  this.pageMap = false;  this.pageMapper = new Array();  this.currentMax = 0;  this.editing = true;  this.currentmultilist = "";  };    this.resetTabs = function(){  this.currentTab = null;  this.setTabList(this.defaultlist);  };      ContentTabs.prototype.toString = function() {      return "";  };    this.setMultiTabs = function(ctab, inittab){  this.tabEdit = new Array();  this.currentmultilist = ctab;  ctab = ctab.replace(/\(D\)/g, '');  tarray = ctab.split(',_');  tab = (inittab == null || inittab == "") ? tarray[0] : inittab;  ctabs = contentTabs.defaultlist;  ctabs = ctabs+",_"+tab;    tlen = tarray.length;  if(tlen > 1)  for(t = 0; t < tlen; t++)  if(!instack(this.tabEdit, tarray[t]))  this.tabEdit.push(tarray[t]);    contentTabs.setTabList(ctabs, tab);  };    this.setExcelTabs = function(sect){  ctab = params.exceltablist[sect];  this.setMultiTabs(ctab);  };    this.changeTab = function(id){  if(cexcel != id){  dothefade = true;  if(this.currentTab != id){  if (id != "New"){  myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/'+id);  }  else{  this.createPage('new');  }  }  this.previousTab = id;  }  };      this.createPage = function(command, val){  this.currentTab = this.pageName+"_"+(++this.numpages) ;  this.previousTab = this.currentTab;  newword = ""; wrd = "";  switch(command){  case "new":  wrd = currentSection.split('(D)').join('');  newword = wrd+"_"+this.numpages;  break;  default:  newword = exceltab + "_copy";  }  exceltab = newword;  cexcel = newword;  curCommand = command.toLowerCase();  curSelection = newword;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/toptabs');  };    this.setOnOptions = function(val){  this.onOptions = val;  };    this.openTabOptions = function(objname, num){  keylocation = "contentTabs";  content = document.getElementById('magicbox');  obj1 = document.getElementById('tabmain_'+objname);  myObject.setParentPosition(obj1);  left1 = myObject.curleft;  obj2 = document.getElementById('tab_'+objname);  myObject.setParentPosition(obj2);  left2 = myObject.curleft;  divwidth = (left2 - left1) + 30;  divheight = (this.tabEdit.length * 20) + 5;  this.divheight = divheight;  box = content.style;  thewrd = exceltab;  wlen = exceltab.length;  curmax = wlen;  for(i = 0; i < this.tabEdit.length; i++){  tlen = this.tabEdit[i].length;  curmax = (curmax > tlen) ? curmax : tlen;  }  diff = curmax - wlen;  divwidth += diff*3;  box.width = divwidth + 'px';  box.height = divheight + 'px';  box.top = ((myObject.curtop - divheight)-2) + 'px';  box.left = left1 + 'px';  box.border = "1px solid #ccc";  box.borderBottom = "0px";  content.innerHTML = this.setTabContent(divwidth, num);  box.display = "block";  box.background = "#fff";  this.viewOptions = true;  };    this.callCommand = function(theword, num){  this.removeOptions();  switch(theword){  case "Delete":  if(contentTabs.pageMapper.length > 1){  params.pages.splice(num, (1));  contentTabs.pageMapper.splice(num, (1));  this.currentTab = this.pageName+"_"+(this.numpages - 1) ;  alert(this.currentTab);  returnval = params.pages.join(',');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/pages/'+(theword+','+returnval)+'/pages');  }  break;  case "Duplicate": this.createPage('duplicate', num); break;  case "Rename": this.writeWord(num); break;  case "Help":  myTimer.queuePush('callAjax_'+currentLink+"/"+currentSection+"/Help");  break;  default:  tab = (currentLink == "MEMBERS" && currentSection == "Stats") ? currentSubsection+",_"+params.psports[params.spindex]  : currentSubsection+",_"+theword;  wrd = this.defaultlist+',_'+theword;  if(currentSection == "Stats")    tab += ',_'+mySeason.currentseason;  this.setTabList(wrd, theword);  if(cpost != "") tab += ',_'+cpost;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+tab);  break;  }    };    this.setEditing = function(val) {this.editing = val;};    this.writeWord = function(num){  this.input = true;  keylocation = "contentTabs";  tempdoc = document.getElementById("tabmain_"+this.currentTab);  this.tempcontent = tempdoc.innerHTML;  wordsize = Math.ceil(contentTabs.pageMapper[num].length *0.85);  tempwriter = '<input type = "text" value = "'+contentTabs.pageMapper[num].split('_').join(' ')+'" size = "'+wordsize+'" id = "currentwriter" style = "border:0px; font-size:10px; letter-spacing:2px; " onmouseover = "contentTabs.setEditing(true)" onmouseout = "contentTabs.setEditing(false)"/>';  tempdoc.innerHTML = tempwriter;  this.currentNum = num;  oTextbox = document.getElementById('currentwriter');  oTextbox.select();  oTextbox.focus();  };      this.setTabContent = function(width,num){  txt = "";  txt += '<div  id = "cttabs" onmouseover = "contentTabs.setOnOptions(true)" onmouseout = "contentTabs.setOnOptions(false)">';  txt += '<ul style = "width:'+width+'px">';  for(i = 0; i < this.tabEdit.length; i++){  theword = this.tabEdit[i].split('_').join(' ');  txt += '<li><a href = "javascript:contentTabs.callCommand(\''+this.tabEdit[i]+'\', '+num+')" style = "width:'+(width-6)+'px; padding:3px;" onclick = "contentTabs.setEditing(true)" >'+theword+'</a></li>';  }  txt += '</ul>';  txt += '</div>';  return txt;  };    this.removeOptions = function(){  document.getElementById('magicbox').style.display ="none";  this.viewOptions = false;  };        this.setTabList = function(clist, currenttab){  this.tablist = clist;  llist = clist.split(',_');  tablist = new Array();  this.currentTab = (currenttab != null) ? currenttab : "";  deftab = ""; matchtab = "";  for(i = 0; i < llist.length; i++){  ctab = llist[i].replace(/\(.\)/g, '');  if(llist[i].match(/\(D\)/g)) deftab = ctab;  if(currenttab != null && currenttab == ctab) matchtab = ctab;  tablist.push(ctab);  }  this.currentTab = (matchtab == "") ? deftab : matchtab;  exceltab = this.currentTab;  cexcel = this.currentTab;  this.tabs = tablist;  this.updateLinks();  };    this.setTabs = function(){  temptabs = new Array();  temptabs = this.tabs;  var txt = "";  currentT = "Bottom";  for(var i = 0; i < temptabs.length; i++){  theword = temptabs[i].split('_').join(' ');  txt += '<div id = "tabmain_'+temptabs[i]+'" onclick = " contentTabs.changeTab(\''+temptabs[i]+'\')" style = "cursor:pointer; float:left; ';  if(this.currentTab != temptabs[i])  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabm.gif\'); ';  else {  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabm1.gif\'); ';  txt += 'font-weight:bold; ';  }  if(theword != "New"){  txt += 'font-size:11px; color:#000; padding-left:15px; height:19px; padding-right:15px; ">';  txt += theword;  }  else {  txt += 'padding-left:3px; height:19px; ">';  txt += '<img src = "http://s3.amazonaws.com/ldimages/new.gif"  style = "margin-top:2px;"/>';  }  txt += '</div>';  txt += '<div  id = "tab_'+temptabs[i]+'" style = "cursor:pointer;';  iloh = ((this.tabEdit.length == 0)||(this.currentTab == "List"));  if(i != temptabs.length - 1){  if(this.currentTab == temptabs[i]){  if (iloh)  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl3.gif\');';  else   txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl6.gif\');';  }  else{  if(this.currentTab == temptabs[i+1])  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl5.gif\');';  else  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl.gif\');';  }  }  else{  if(this.currentTab == temptabs[i]){  if(!iloh){  if((this.currentTab == temptabs[i]) &&  this.tabEdit.length > 1)  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl8.gif\');';  else  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl4.gif\');';  }  else  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl4.gif\');';  }  else  txt += 'background-image:url(\'http://s3.amazonaws.com/ldimages/tabl2.gif\');';  }  txt += 'height:19px; float:left; width:25px; " ';  if((this.currentTab == temptabs[i] && this.tabEdit.length != 0) && (!iloh)){  txt += 'onclick = "contentTabs.openTabOptions(\''+temptabs[i]+'\', '+i+')" onmouseout = "contentTabs.setOnOptions(false)" onmouseover = "contentTabs.setOnOptions(true)"';  }  txt += '></div>';  }  return txt;    };      this.setScrolling = function(val){  botscrolling = val;  scrollbar = val;  moveScrollX();  };      this.changeScroll = function(obj, type){  if(type == "over")  obj.style.backgroundImage = "url('http://s3.amazonaws.com/ldimages/tabm.gif')";  else  obj.style.backgroundImage = "url('http://s3.amazonaws.com/ldimages/bg18.gif')";  };    this.isFirstTab = function(){  return(this.tabEdit[0] == exceltab);  };    this.setTopTabs = function(){  klen = this.tabEdit.length;  ktxt = '';  if(klen > 0){  this.tlist = this.tabEdit.join(',_');  lastk = klen - 1;  txtbg = "";  ktxt += '<div style = "width:100%; height:14px; background-image:url(\'http://s3.amazonaws.com/ldimages/tab_line.jpg\');">';  for(k=0 ; k < klen; k++){  wrd = this.tabEdit[k].replace(/_/g, '&nbsp;');  if(exceltab == this.tabEdit[k]){  bg = (k == lastk) ? 'background:url(\'http://s3.amazonaws.com/ldimages/tab_frontend.jpg\'); ' : 'background:url(\'http://s3.amazonaws.com/ldimages/tab_front.jpg\'); ';  ktxt += '<div style = "float:left; height:14px; background:#fff;" >';  ktxt +='<div style = "float:left;padding-top:0px; padding-bottom:1px; padding-left:3px; font-weight:bold; padding-right:10px; font-size:11px; height:11px; color: #000;">'+wrd+'</div>';  ktxt += '</div>';  ktxt +='<div style = "float:left; width:25px; height:14px; background-repeat:no-repeat; '+bg+';"></div>';  }  else{  if(k != lastk && this.tabEdit[k+1] == exceltab)  bg = 'background:url(\'http://s3.amazonaws.com/ldimages/tab_mid.jpg\'); ';  else{  bg = (k == lastk) ? 'background:url(\'http://s3.amazonaws.com/ldimages/tab_backend.jpg\'); ' : 'background:url(\'http://s3.amazonaws.com/ldimages/tab_back.jpg\');';  }  ktxt += '<div style = "float:left; height:14px;  cursor:pointer; " onclick = "contentTabs.callCommand(\''+this.tabEdit[k]+'\', 0)"><div style = "float:left; padding-top:0px; padding-bottom:1px; padding-left:3px; font-weight:bold; padding-right:10px; font-size:11px; color: #999; cursor:pointer;" ><div style = "float:left; " class = "hovercolor" ><a href = "#" onclick = "event.returnValue = false; return false;" style = "text-decoration:none; ">'+wrd+'</a></div></div><div style = "float:left; width:25px; height:14px; background-repeat:no-repeat;  '+bg+'"></div></div>';  }    }  ktxt += '</div>';  document.getElementById("top_right_bar").innerHTML = ktxt;  rcurve = document.getElementById("top_right_right").style;  lcurve = document.getElementById("top_right_left").style;  if(!this.isFirstTab()){  lcurve.height = "14px";  lcurve.borderBottom = "1px solid #ccc";  }  else {  lcurve.height = "15px";  lcurve.borderBottom = "0px";  }  rcurve.height = "14px";  rcurve.borderBottom = "1px solid #ccc";  }  else   this.tlist = cexcel;  };      this.updateLinks = function(){  /*  document.getElementById('ctTabs').innerHTML = this.setTabs();  cexcel = this.currentTab;  */  };  }    var contentTabs = new ContentTabs(); function Days(){    this.txt = "";  this.width = 0;  this.height = 0;  this.startday = 0;  this.leap = false;  this.daynum = new Array(31,28,31,30,31,30,31,31,30,31,30,31);  this.monthword = new Array ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' );  this.dayword = new Array("Sunday", "Monday", "Tuesday", "Wednessday", "Thursday", "Friday", "Saturday");  tempday = new Date();  this.curryear = tempday.getFullYear();  this.currday = tempday.getDate();  this.currmonth = tempday.getMonth();  this.defcday = tempday.getDay();   this.cday = tempday.getDay();   this.mday = tempday.getDate();   this.month = tempday.getMonth();  this.year = tempday.getFullYear();  this.widthPercent = false;  this.weekbg = "#EEEEEE";  this.daybg = "#000";  this.daytxt = "#FFFFFF";  this.printContentBox = false;  this.contentheight = 0;  this.daytextalign = "center";  this.daybgcolor = "";  this.tdays = new Array();  this.selection = false;  this.daystart = 0;  this.dayend = 0;  this.overobj = new Array();  this.startselection = false;  this.maindate = new Date();  this.startrange = false;  this.endrange = false;  this.valid = null;  this.started = false;  this.ismod = false;    this.createYearRange = function(showrange){  txt = "";  txt += '<option value = "default">--yyyy--</option>';  for(j = (this.year - 10); j <= this.year+5; j++){    txt += '<option value = "'+j+'">'+j+'</option>';  if(showrange){  sel = j+'-'+(j+1);  txt += '<option value = "'+sel+'">'+sel+'</option>';  }    }  return txt;  };    this.createYearRange2 = function(showrange){  txt = "";  txt += '<option value = "default">--yyyy--</option>';  for(j = (this.year - 12); j <= this.year+12; j++){    txt += '<option value = "'+j+'">'+j+'</option>';  if(showrange){  sel = j+'-'+(j+1);  txt += '<option value = "'+sel+'">'+sel+'</option>';  }  }  return txt;  };    this.createOptionlist = function(type, val, fullword){  txt = ""; fullword = (fullword == null) ? false: fullword;  type = type.split('_')[0];  switch (type){  case "month":  txt += '<option value = "default">--mm--</option>';  for(j = 0; j < this.monthword.length; j++){  if(fullword)  txt += '<option value = "'+(j+1)+'">'+this.monthword[j]+'</option>';   else  txt += '<option value = "'+(j+1)+'">'+(j+1)+'</option>';   }  break;  case "year":  txt += '<option value = "default">--yyyy--</option>';  for(j = (this.year - 100); j <= this.year+5; j++)  txt += '<option value = "'+j+'">'+j+'</option>';  break;  case "day":   txt += '<option value = "default">--dd--</option>';  for(j = 1; j <= this.daynum[val-1]; j++)  txt += '<option value = "'+j+'">'+j+'</option>';  break;  }  return txt;  };    this.setDayBackground = function(bg){  this.daybg = bg;  };    this.setDayTextAlign = function (align){  this.daytextalign = align;  };    this.setWeekBackground = function(weekbg ){  this.weekbg = weekbg;  };    this.setDayTxt = function(daytxt){  this.daytxt = daytxt;  };    this.setDayBgColor = function(bg){  this.daybgcolor = bg;  };    this.resetWeekBackground = function(){  this.weekbg = "#EEEEEE";  };    this.resetDayBackground = function(){  this.daybg = "#000";  };    this.resetDayTxt = function(){  this.daytxt = "#FFFFFF";  };    this.setContentBox = function(){  this.printContentBox = true;  };      this.setDay = function (currentDay){    leapyear = 1988;  this.cday = currentDay.getDay();   this.mday = currentDay.getDate();   this.month = currentDay.getMonth();  this.year = currentDay.getFullYear();  this.startday = this.cday - (this.mday % 7);  this.startday = (this.startday < 0) ? this.startday + 7 : this.startday;  this.leap = ((this.year - leapyear)%4) == 0 ? true: false;  if (this.leap)  this.daynum[1] = 29;  else  this.daynum[1] = 28;      };    this.createCalendar = function(date, thewidth, theheight){  txt = "";  var thetime = new Date();  val = thetime.getFullYear();  val = val + 15;  myDays.setDay(date);  txt += '<div style = "clear:both; background:#fff; padding-top:10px;">';  myDays.setWidthHeight(thewidth,theheight);  myDays.printDays();  txt += myDays.txt;  txt += '</div>';  return txt;      };    this.incr = function(loc, incr){  this.month += incr;  if(this.month == 12){   this.year++;  this.month = 0;  }  else if (this.month == -1){  this.year--;  this.month = 11;  }  myTable.resetDay(this.valid);  };    this.resetCalendar = function(loc){  this.year = myDays.curryear;  this.month = myDays.currmonth;  this.mday = myDays.currday;  myTable.resetDay(this.valid);  };    this.selectableDays = function(thedate){  this.selection = true;  cxt = "";  this.ismod = params.mod[currentPRow] == "";  this.maindate = thedate;  cxt += myEvent.printTopInfo("Monthly", 0, "myDays.incr", "myDays.resetCalendar");  cxt +='<div style = "clear:both;">';  cxt +='<div id = "daycalendar" style = "float:left; font-size:12px;">';  cxt += myDays.createCalendar(thedate, 45, 45);  cxt +='</div>';  cxt +='<div style = "float:left; width:auto; margin-top:10px; height:auto; padding:10px; background:#000; margin-left:15px; ">';  cxt +='<div id = "daytime" style = "clear:both; float:left; margin-top:10px;">';  cxt +=myDays.createTime("Start Time", 'st');  cxt +='</div>';  cxt +='<div id = "daytime" style = "clear:both; float:left; margin-top:10px;">';  cxt +=myDays.createTime("End Time", 'et');  cxt +='</div>';  cxt +='</div>';  cxt +='</div>';  return cxt;  };    this.breakTime = function(type, word){  timear = word.split('-');  switch(type){  case "h":  tval = timear[0].split(':');  return tval[0];  break;  case "m":  tval = timear[0].split(':');  return tval[1];  break;  case "r":  return timear[1];  break;  }  };    this.createTime = function(title, idroot){  mxt = "";  timelist = new Array();  if(this.valid[1] != null){  trange = this.valid[1];  trangear = trange.split(',');  llist = new Array('r', 'm', 'h');  c = (idroot == "st") ? 0 : 1;   for (m = 0; m < 3; m++){  timelist[llist[m]] = this.breakTime(llist[m], trangear[c]);  }  }  mxt +='<div style = " float:left; margin-left:5px; padding-right:5px; text-align:right; margin-top:2px; width:80px; font-size:12px; color:#fff;">'+title+' :</div>';  mxt += '<div style = "float:left; margin-left:5px;"><select id = "'+idroot+'_0" onchange = "myDays.setEndTime()" ';  if(currentLink != "HOME" || !this.ismod)  mxt += 'disabled';  mxt += '>';  for(c =0; c <= 12; c++){  mxt +='<option value = "'+c+'" ';  if(timelist['h'] == c && this.started)  mxt +='selected';  mxt += '>'+c+'</option>';  }  mxt += '</select></div>';  mxt += '<div style = "float:left; color:#fff; margin-left:3px;">:</div>';  mxt += '<div style = "float:left; margin-left:5px;"><select id = "'+idroot+'_1" onchange = "myDays.setEndTime()" ';  if(currentLink != "HOME" || !this.ismod )  mxt += 'disabled';  mxt += '>';  for (c = 0; c < 60; c+=5){  val = (c < 10) ? "0"+c : c;  mxt +='<option value = "'+val+'" ';  if(timelist['m'] == val && this.started)   mxt +='selected ';  mxt +='>'+val+'</option>';  }  mxt += '</select></div>';  mxt += '<div style = "float:left; margin-left:5px;"><select id = "'+idroot+'_2" onchange = "myDays.setEndTime()" ';  if(currentLink != "HOME" || !this.ismod)  mxt += 'disabled';  mxt += '>';  mxt +='<option value = "am" ';  if(timelist['r'] == "am" && this.started)   mxt +='selected';  mxt +='>am</option>';  mxt +='<option value = "pm" ';  if(timelist['r'] == "pm" && this.started)   mxt +='selected';  mxt +='>pm</option>';  mxt += '</select></div>';  return mxt;  };    this.setStartDay = function(obj){  if(!this.startselection){  this.daystart = (obj.id).replace(/day_/g, '');  this.daystart = this.daystart/1;  obj.style.background = "#000";  obj.style.color = "#fff";  this.startselection = true;  }  };    this.setIsOver = function(obj){  this.dayend = (obj.id).replace(/day_/g, '');  this.dayend = this.dayend/1;  };    this.setOverDay = function(obj){  if(this.startselection){  obj.focus();  document.getElementById('daycalendar').innerHTML = myDays.createCalendar(this.maindate, 45, 45);  }  };    this.showEContent = function(xcurdate, dcol){  mtxt = "";  if(this.valid != null){  drange = this.valid[0];  if(drange != null){  if(dcol.match(/\-0\d/g)){  dcol = dcol.replace(/\-0/g, '-');  drange = drange.replace(/\-0/g, '-');  }  drangear = drange.split(',');  this.startrange = this.startrange || (dcol == drangear[0]);  this.endrange = (dcol == drangear[1]);  if(this.startrange){  this.started = true;  cr = currentPRow/1;  mtxt = this.setMonthlyBg(params.etype[cr]);  }  if(this.endrange){  this.startrange = false;  }  }  }  return mtxt;  };    this.printDays = function (showd){  showd = (showd == null) ? false : showd;  this.txt = "";  if(!this.widthPercent)  thewidth = this.width+'px';  else   thewidth = this.width+'%';  val = "";  if(!this.widthPercent) weekwidth = ((this.width + 1) * 7) + 'px';  else weekwidth = (100) + '%';    val += '<div style = "float:left; width:'+weekwidth+'">';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'SUN';  val += '</div>';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'MON';  val += '</div>';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'TUE';  val += '</div>';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'WED';  val += '</div>';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'THU';  val += '</div>';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'FRI';  val += '</div>';  val += '<div class = "dayheader" style = "background:'+this.daybg+'; color:'+this.daytxt+'; width:'+thewidth+'">';  val += 'SAT';  val += '</div>';  extra = "";  extra += '<div style = "float:left; height:0px; width:0px;">';      lastMonthLastDay = (this.month == 0) ? this.daynum[11] : this.daynum[this.month - 1];  lastMonthDay = (this.month == 0) ? new Date((this.year - 1), 12, lastMonthLastDay) : new Date((this.year), (this.month - 1), lastMonthLastDay);  lastMD = lastMonthDay.getDay();      countdown = this.startday;  week = 0;  theval = 0;      curdate = (this.year == this.curryear && this.currmonth == this.month);  theweek = Math.floor((this.currday + this.startday )/7);  mnt = this.month+1;  mnt = (mnt < 10) ? "0"+mnt : mnt;    if(!this.widthPercent) thewidth = this.width + 'px';  else thewidth = (this.width) + '%';  for( x = 0; x < this.startday + this.daynum[this.month] + 1; x ++){  sameday = (lastMD == 6 && x < 7 && this.month != 0);  xcurdate = ((x - this.startday) == this.currday && curdate);  wcurdate = (theweek == week && curdate);  tempday = (x > this.startday) ? (x - this.startday) : (lastMonthLastDay - countdown);    tval = tempday;  tempday = (tempday < 10) ? "0"+tempday : tempday;  dcol = this.year+"-"+(mnt)+"-"+tempday;    if (x % 7 == 0 && !sameday){  extra += '</div><div class = "week" style = "clear:both; ">';  week ++;  }        if(this.printContentBox ){  extra +='<div style = "display:block; background:#fff; border-right:1px solid #DDDDDD; border-bottom:1px solid #DDDDDD; height:'+this.contentheight+'px; width:'+thewidth+'; float:left;';  if(x % 7 == 0) extra +='border-left:1px solid #DDDDDD; ';  extra +='">';  }  if(!sameday){  extra += '<div ';  if(x > this.startday) extra +='id = "day_'+tval+'"';  extra +=' class = "day" style = "background:#fff; color:#000000;';    if (!showd){   if(xcurdate) extra += 'background:#4FA9C9; ';  else if( this.daybgcolor != "") extra +=' background-image:url(\''+this.daybgcolor+'\'); ';  }  if(!this.printContentBox) extra +='width:'+thewidth+'; ';  else extra +='width:100%; ';    this.ctitle = "";  extra +='height:'+this.height+'px; text-align:'+this.daytextalign+'; ';  if(this.selection && x > this.startday){ extra += this.showEContent(xcurdate, dcol);}  else if (showd && x > this.startday && !this.printContentBox) extra += this.showYContent(xcurdate, dcol);  if(this.startselection && (this.daystart <= tval  && this.dayend >= tval) && (x > this.startday))  extra +=' background: #000; color:#fff; ';  extra += '" ';  if(this.selection && x > this.startday && currentLink == "HOME" && this.ismod){  extra += ' onmousedown = "myDays.setStartDay(this)" onmouseup = "myDays.setEndDay(this)" onmouseout = "myDays.setOverDay(this)" onmouseover = "myDays.setIsOver(this)" ';  }  extra += this.ctitle;  extra += '>';  if(x > this.startday){  if(xcurdate) extra += '<font style = "text-decoration:underline; font-size:11px; color:#ffffff; margin-right:3px;">'+(tempday)+'</font>';  else extra += '<font style = "margin-right:3px;">'+(tempday)+'</font>';  }  else {  if(!sameday){  extra += '<font style = "margin-right:3px; color:#BBBBBB;">'+(tempday)+'</font>';  countdown --;  }  }  extra += '</div>';  }  if(this.printContentBox){  if(x > this.startday){  extra += '<div style = "height:'+(this.contentheight - this.height)+'px; width:100%">';  extra += this.showContent(thewidth, xcurdate, dcol);  extra +='</div>';  }  extra += '</div>';  }    theval ++;  }  extra += '</div>';  val += extra+'</div>';  this.txt = val;  this.resetWeekBackground();  this.resetDayBackground();  this.resetDayTxt();  };    this.showContent = function(thewidth, curd, dcol){  ctxt = '';  this.ctitle = "";  rtval = this.getDContent("", curd, dcol, "Monthly");  ctxt +='<div style = "width:'+(thewidth+2)+'px; clear:both; display:block; text-align:center; border:1px solid #ccc; border-left:0px; border-right:0px; border-top:0px; height:'+(this.contentheight - this.height)+'px; cursor:pointer;';  if(curd)  ctxt += ' background:#4FA9C9; color:#fff; ';   ctxt += rtval+'" ';  ctxt += this.ctitle+'><div style = "padding-top:15px">'+this.context+'</div></div>';  return ctxt;  };    this.showYContent = function(curd, dcol){  ctxt = "";  if(curd)  ctxt += ' background:#4FA9C9; color:#fff;';  ctxt += this.getDContent("", curd, dcol, "Yearly");  return ctxt;  };    this.resetDInfo = function(){  this.types = new Array();  this.status = new Array();  this.tdays = new Array();  this.strtrange = new Array();  this.endrange = new Array();  this.trange = new Array();  this.name = new Array();  this.id = new Array();  this.mod = new Array();  this.dayrange = new Array();  this.context = "";  this.sthr ="";  this.endhr = "";  this.curloc = "";  this.context = "";  };    this.inStack = function(thear, comp){  len = thear.length;  for(s = 0; s < len; s++){  if(thear[s] == comp){  return true;  }  }  thear.push(comp);  return false;  };    this.inrange = function(strtrange, endrange, findit){  try{  stvalar = strtrange.split('am');   endvalar = endrange.split('am');   findvalar = findit.split('am');     if(stvalar.length > 1)    sttime = "am";  else {  stvalar = strtrange.split('pm');  sttime = "pm";  }  if(endvalar.length > 1)   endtime = "am";  else {  endvalar = endrange.split('pm');  endtime = "pm";  }  if(findvalar.length > 1)  findtime = "am";  else {  findvalar = findit.split('pm');  findtime = "pm";  }  stval = stvalar[0]; endval = endvalar[0]; findval = findvalar[0];  strthrmin = stval.split(':'); endhrmin = endval.split(':'); findhrmin = findval.split(':');    if(strthrmin[0] == 12) strthrmin[0] = 0;  if(endhrmin[0] == 12) endhrmin[0] = 0;  if(findhrmin[0] == 12) findhrmin[0] = 0;    strthr = strthrmin[0]/1;  endhr = endhrmin[0]/1;  findhr = findhrmin[0]/1;    if(sttime != "am") strthr = strthrmin[0]/1+12;  if(endtime != "am") endhr = endhrmin[0]/1+12;   if (findtime != "am") findhr = findhrmin[0]/1+12;     strmin = strthrmin[1]/60;  endmin =endhrmin[1]/60;  findmin = findhrmin[1]/60;    st =strthr+strmin; ed=endhr+endmin;  fd=findhr+findmin;    return ((st <= fd) && (fd <= ed));  }catch(e){return false;}  };    this.setMonthlyBg = function(etype){  v = "";  switch(etype){  case "Matchup":  v += ' background:#E7F4F7; ';  break;  case "Practice":  v += ' background:#F2F2D3; ';  break;  case "Pickup Game":  v += ' background:#E4EBED; ';  break;  case "Other":  v += ' background:#B0DFEA; ';  break;  case "Tournament":  v += ' background:#C3EAD7; ';  break;  default:  v += ' background:#ddd; ';  }  return v;  };    this.getDContent = function(pstime, curday, dcol, thetype){  txt = "";  dlen = this.tdays.length;  context = ""; lexit = false;   ttles = new Array();  prevtype = new Array();  thetitle = new Array();  ttle = "";  mod = new Array();  id = new Array();  strtr =  new Array();  endr =  new Array();  psv = new Array();  for(c = 0; c < dlen; c++){  for(k = 0; k < this.strtrange[this.tdays[c]].length; k++){  boolval = (thetype == "Weekly" || thetype == "Daily") ? (this.tdays[c] == dcol && this.inrange(this.strtrange[this.tdays[c]][k], this.endrange[this.tdays[c]][k], pstime)) : (this.tdays[c] == dcol);  if(boolval){  if(prevtype[this.tdays[c]] == null)  prevtype[this.tdays[c]] = new Array();  txt += 'color:#000;  ';  if(!curday){  txt += this.setMonthlyBg(this.types[this.tdays[c]][k]);  }  else {  if(thetype == "Weekly")  txt += ' background:#999; ';  else  txt += ' background:#4FA9C9; ';  txt += ' color:#fff; ';   }    ttle = this.name[this.tdays[c]][k];  theval = this.types[this.tdays[c]][k]+ '('+ttle+') ';  if(!this.inStack(id, this.id[this.tdays[c]][k])){  thetitle.push(theval);  ttles.push(ttle);  strtr.push(this.strtrange[this.tdays[c]][k]);  endr.push(this.endrange[this.tdays[c]][k]);  psv.push(this.dayrange[this.tdays[c]][k]);  mod.push(this.mod[this.tdays[c]][k]);  }    if (thetitle.length > 1){  context = "Multi-event";  switch (thetype){  case "Weekly": case "Daily":  if(!curday) txt += ' background-image:url(\'http://s3.amazonaws.com/ldimages/bg6.gif\');';  else txt += ' background:#999; color:#fff;';   break;  case "Monthly":  if(!curday) txt += 'background:#ccc; color:#444; ';  else txt += ' background:#4FA9C9; color:#fff;';  break;  case "Yearly":  if(!curday) txt += ' background:#ccc; color:#444; ';  else txt += ' background:#4FA9C9; color:#fff;';   break;  }  }  else context = this.types[this.tdays[c]][k];   prevtype[this.tdays[c]][pstime] = this.types[this.tdays[c]][k];  }  }  }  this.ctitle = 'title = "'+thetitle+'" onclick = "myEvent.showDialogBox(this, \''+psv+'\', \''+dcol+'\', \''+pstime+'\' , \''+ttles+'\', \''+strtr+'\', \''+endr+'\', \''+thetitle+'\', \''+id+'\', \''+mod+'\')"';  this.context = context;  return txt;  };    this.setWidthPercent = function(){  this.widthPercent = true;  };    this.resetWidthPercent = function(){  this.widthPercent = false;  };    this.setWidthHeight = function(width, height){  this.width = width;  this.height = height;  };    this.setWidthHeightContent = function(width, height, contentH){  this.width = width;  this.height = height;  this.contentheight = contentH;    };    this.changeDayStyle = function (val, thebackground, thecolor){  if(thebackground.split('/')[0] != 'images')  val.style.background = thebackground;  else  val.style.backgroundImage = 'url(\''+thebackground+'\')';  val.style.color = thecolor;  };    }  var myDays = new Days(); function Obj(){    this.curleft = 0;  this.curtop = 0;    this.setParentPosition = function (obj){  this.curleft = 0;  this.curtop = 0;  this.defaultleft = 0;  if (obj.offsetParent) {  this.curleft = obj.offsetLeft;  this.curtop = obj.offsetTop;  this.defaultleft = this.curleft;  while (obj = obj.offsetParent) {  this.curleft += obj.offsetLeft;  this.curtop += obj.offsetTop;  }  }  };  }  var myObject = new Obj(); function DropDown(){    this.contentlist = new Array();  this.contentnames = new Array();  this.direction = "";  this.objname = "";  this.onList = false;  this.currentterm = '';  this.width = 0;  this.cnames = "";  this.clist = "";  this.cid = "";    this.setContentList = function(contentlist, contentnames){  this.contentnames = contentnames;  this.contentlist = contentlist;  };    this.setOnList = function(val){  this.onList = val;  if(this.onList)   keylocation = "tolist";  };    this.setDirections = function(cwidth){  ctxt = '';  ctxt += '<div style = "padding:2px; padding-left:5px; font-size:10px; color:#555;">';  ctxt +='Type the name of a friend or email address.';  ctxt += '</div>';  return ctxt;  };    this.makeLetterBg =  function(cwrd, overstyle, normalstyle, letter, cregExp){  nregExp = new RegExp('>'+letter+'<');  if(!cwrd.match(nregExp)){  cfont = '</div><div style = "'+overstyle+'">'+letter+'</div><div style = "'+normalstyle+'">';  cwrd = cwrd.replace(cregExp, cfont);  }  return cwrd;  };    this.setWord = function(cwrd, normalstyle, overstyle){  matchterm = this.currentterm;  tarray = matchterm.split(" ");  tlen = tarray.length;  for(t = 0; t < tlen; t++){  regExp = new RegExp(tarray[t], "ig");  if(cwrd.match(regExp)){  ar = regExp.exec();  if(ar != null){  alen = ar.length;  regExp2 = new RegExp(tarray[t], 'i');  for(a = 0; a < alen; a++){  cwrd = this.makeLetterBg(cwrd, overstyle, normalstyle, ar[a], regExp2);  }   }  return cwrd;  }  }  return cwrd;  };    this.moveSelection = function(type){  switch(type){  case "down":  cid = this.cid+1;  if(cid < this.clist.length){   dropDown.setOver(cid);  }  break;  case "up":  cid = this.cid-1;  if(cid >= 0){   dropDown.setOver(cid);  }  break;  }  stoptheload();  };    this.setOver = function(c){  if(this.cid != c)  this.setDropDownOver(c);    };    this.setDropDownOver = function(c){  pid = this.cid;  this.cid = c;  uobj = document.getElementById('dropdownrow_'+this.cid);  uobj.innerHTML = this.setInnerContent(this.cid);    uobj = document.getElementById('dropdownrow_'+pid);  uobj.innerHTML = this.setInnerContent(pid);  stoptheload();  };    this.setDropDownLink = function(currentwrd, andstyle, normalstyle, overstyle){  objval = this.currentterm;  wrdarray = currentwrd.split(' ');  wlen = wrdarray.length;  mpsv = '';  for(m = 0; m < wlen; m++){  if(m > 0){  mpsv += '</div><div style = "'+andstyle+'">&nbsp;</div><div style = "'+normalstyle+'">';  mpsv += this.setWord(wrdarray[m], normalstyle, overstyle);  }  else  mpsv = this.setWord(wrdarray[m], normalstyle, overstyle);  }  return mpsv;  };    this.setInnerContent = function(c){  xtxt = '<div style = "height:15px; width:'+this.cwidth+'px; ';  if(c == this.cid){  normalstyle = ' float:left; background:#0A3A7F; color:#fff; padding-bottom:2px; ';  overstyle =  ' background:#0066aa; color:#fff; font-weight:bold; float:left; padding-bottom:2px; ';  andstyle = normalstyle;  rowstyle = 'background:#0A3A7F; ';  }  else{  normalstyle = ' float:left; background:#fff; color:#222; padding-bottom:2px; ';  overstyle =  ' background:#ddd; color:#000; font-weight:bold; float:left; padding-bottom:2px; ';  andstyle = ' background:#fff;float:left;';  rowstyle = ' background:#fff;';  }    curwrd = this.setDropDownLink(this.cnames[c], andstyle, normalstyle, overstyle);  xtxt += rowstyle;  curwrd = curwrd.replace(/_/g, ' ');  xtxt += '"><div style = "'+normalstyle+'">'+curwrd+'</div></div>';  return xtxt;  };    this.selectList = function(c){  selection = this.cnames[c];  if(selection != null){  this.cid = c;  obj = document.getElementById(this.objname);  obj.value = selection;  }  };    this.setList = function(){  vtxt = '';  clen = this.clist.length;  twidth = (this.width) - 7;  objval = this.currentterm;  vtxt +='<div style = "overflow-y:auto; overflow-x:hidden; width:'+this.width+'px; height:112px; background:#fff;">';    for(c = 0; c < clen; c++){  vtxt += '<div id = "dropdownrow_'+c+'" name = "dropdownrow_'+c+'" style = "cursor:pointer; height:15px; width:'+this.width+'px; font-size:10px; border-bottom:1px solid #ddd; "  onmouseover = "dropDown.setOver('+c+')" onclick = "dropDown.selectList('+c+')">';  vtxt += this.setInnerContent(c);  vtxt += '</div>';  }  vtxt +='</div>';  return vtxt;  };    this.matchWord = function(matchterm, curwrd){  regExp = new RegExp(matchterm, "gi");  return curwrd.match(regExp);  };    this.initList = function(){  cwrd = this.currentterm;  carray = cwrd.split(' ');  calen = carray.length;  cnlen = this.contentnames.length;  contentnames = this.contentnames;  contentlist = this.contentlist;  cnlen = contentlist.length;  cnames = new Array();  clist = new Array();  for(x = 0; x < cnlen; x++){  setlist = true;  isset = false;  for(k = 0; k < calen; k++){  if(carray[k] != ""){  isset = this.matchWord(carray[k], contentnames[x]);  if(!(isset && !instack(clist, contentlist[x]))){  setlist = false;  }  }  }  if(setlist){  clist.push(contentlist[x]);  cnames.push(contentnames[x]);  }  }  this.cnames = cnames;  this.clist = clist;  };    this.displayContent = function(curleft, curtop, cwidth, objval){  hascontent = (objval != "");  uobj = document.getElementById('commentbox');  newobj = uobj.style;  newobj.display = "block";  newobj.border = "1px solid #ccc";  newobj.borderTop = "0px";  newobj.left = (curleft)+"px";  newobj.top = (curtop+22)+"px";  objwidth = (IE) ? (cwidth+8) : (cwidth+10) ;  newobj.width = objwidth+"px";  newobj.background = "#eee";  this.width = objwidth;  if(hascontent){  this.initList();  hascontent = this.clist.length > 0;  }    if(!hascontent){  uobj.innerHTML = this.setDirections(this.width);  newobj.height = '21px';  }  else{  this.currentterm = objval;  this.cid = 0;  uobj.innerHTML = '<div style = "width:'+this.width+'px;">'+this.setList()+'</div>';  cllen = this.clist.length;  if(cllen > 8)  newobj.height = '112px';  else  newobj.height = (cllen*16)+'px';  }  };    this.init = function(objname, direction, motion){  keylocation = "tolist";  this.cid = "";  this.objname = objname;  this.direction = direction;  this.currentterm = '';  this.width = 0;  this.cnames = new Array();  this.clist = new Array();  this.cid = "";  obj = document.getElementById(objname);  cobj = document.getElementById(objname+'_container');  myObject.setParentPosition(cobj);  objval = obj.value;  this.currentterm = objval;    if(objval == "")  this.displayContent(myObject.curleft, myObject.curtop, obj.offsetWidth, objval);  else  this.displayContent(myObject.curleft, myObject.curtop, obj.offsetWidth, objval);    };  }    var dropDown = new DropDown(); function SideLink(){    this.currentSection = "";  this.currentSubection = "";  this.width = 210;  this.height = 490;    this.performCommand = function(folder){  this.currentFolder = folder;  setPageAction = false;  switch (currentLink){  case "HOME":  case "LOCKER":  switch(currentSection){  case "Register":  uReg.startRegistration(folder, "default");  break;  default:  switch(folder){  case "Upload_Photo": myTimer.queuePush('launchuploader_'+myUploader.windowwidth+'/'+myUploader.windowheight+'/Photo/upload'); break;  case "Upload_Video": myTimer.queuePush('launchuploader_'+myUploader.windowwidth+'/'+myUploader.windowheight+'/Video/upload'); break;  case "Compose": myMail.startCompose(); break;  default:   currentPage = folder;  setPageAction = true;  currentSection = this.currentSection;  myTimer.queuePush('addTab_'+folder);   break;  }  break;  }  break;  case "MEMBERS":  switch(currentSection){  case "Videos": case "Photos":  case "Users": case "Blogs":  case "Events": case "Stats":  myTimer.queuePush('addTab_'+folder);  break;  }  break;  }  };    this.setSubsection = function(cindex){  vtxt = '';  vtxt += '<div style = "float:left;">';  clist = params.optionlist[cindex].split(',_');  nlen = clist.length;  cselection = 0;  mwidth= this.width-2;  elen = nlen - 1;  for(y = 0; y < nlen; y++){  current = (clist[y] == this.currentSubection && currentSection == this.currentSection);  wrd = clist[y].replace(/_/g, ' ');  brd = (y == elen) ? "#888" : "#ccc";  clr = (current) ? " color:#000; " : "color:#0066cc; ";  vtxt +='<div style = "float:left; width:'+this.width+'px; height:20px;  background:#fff; border-bottom:1px solid '+brd+'; clear:both; font-weight:bold; '+clr+'" >';  if(current){  vtxt +='<div style = "float:left; padding-top:2px; padding-left:35px; font-size:11px; "> '+wrd+'</div>';  }  else  vtxt +='<div style = "width:'+mwidth+'px; height:20px; float:left;  font-size:11px; " class = "left_sidelinks" onclick = "sideLink.performCommand(\''+clist[y]+'\')"><div style = "padding-top:2px; padding-left:35px;"> '+wrd+'</div></div>';  vtxt +='</div>';    }  vtxt += '</div>';  return vtxt;  };    this.setUserInfo = function(){    rtxt = '';  uimg = 'http://s3.amazonaws.com/ldimages/bg_face.gif';  rtxt += '<div style = "float:left;">';  rtxt +='<div style = "width:'+this.width+'px; padding-top:10px; padding-bottom:10px; border-bottom:1px solid #999; background:#fff; clear:both; ">';  rtxt +='<div style = "margin-left:30px; width:140px; border:1px solid #ccc; border-right:1px solid #bbb; border-bottom:1px solid #999; padding:4px; background:#f9f9f9;  text-align:center;">';  rtxt +='<img id = "userimg" src = "'+uimg+'" width = "'+this.imgwidth+'" height = "'+this.imgheight+'"  style = "margin-left:auto; margin-right:auto; "/>';  rtxt +='<div style = "clear:both"></div>';  rtxt +='</div>';  rtxt +='<div style = "clear:both"></div>';  rtxt +='</div>';  rtxt += '</div>';  return rtxt;  };    this.resetSection = function(csection){  this.currentSection = csection;  this.currentSubection = currentSubsection;  obj = document.getElementById('leftlinks');  obj.innerHTML = this.setSection();  };    this.setSection = function(){  rtxt = '';  len = params.caption.length;  for(x = 0; x < len; x++){  cloc = x+1;  wrd = params.caption[x].replace(/_/g, ' ');  wrd = wrd.toUpperCase();  if(this.currentSection == params.topsubs[cloc]){  imgstate = "open";  cindex = x;  }  else   imgstate = "closed";  rtxt +='<div style = "float:left; width:'+this.width+'px; height:20px; padding-top:2px; padding-bottom:2px; border-bottom:1px solid #888; background:#bbb; clear:both; ';  if(imgstate == "closed" )  rtxt +='cursor:pointer; " onclick = "sideLink.resetSection(\''+params.topsubs[x+1]+'\')" >';  else  rtxt +='" >';  rtxt +='<div style = "float:left; width:30px; height:20px; background-image:url(\'http://s3.amazonaws.com/ldimages/homelink_'+imgstate+'.jpg\');"></div>';  rtxt +='<div style = "float:left; padding-top:3px; padding-left:5px; color:#fff; font-size:12px; font-weight:bold">'+wrd+'</div>';  rtxt +='</div>';  if(imgstate == 'open')  rtxt += this.setSubsection(cindex);    }  return rtxt;  };    this.display = function(){  ctxt = '';  cheight = midHeight - 55;  if(currentSubsection == "Help") currentSubsection = "default";  if(currentSection == "Home(D)" || currentSection == "default"){   currentSection = "Profile";  if(account != "Player" && currentSubsection == "default") currentSubsection = "Bio_Page";  else currentSubsection = "Recruiting_Page";  }  this.currentSection = currentSection;  this.currentSubection = currentSubsection;    ctxt += '<div style = "float:left; margin-left:5px;">';  ctxt += myHomePage.addTopCurve(this.width, "left");  ctxt += '<div style = "clear:both; float:left; width:'+this.width+'px; height:'+this.height+'px; border-left:1px solid #999; border-right:1px solid #999; background:#fff;">';  ctxt +='<div style = " width:'+this.width+'px;">';  ctxt +=this.setUserInfo();  ctxt += '<div id = "leftlinks" style = "float:left;">';  ctxt +=this.setSection();  ctxt +='</div>';  ctxt +='<div style = "clear:both;"></div>';  ctxt +='</div>';  ctxt +='</div>';  ctxt += myHomePage.addBotCurve(this.width, "left");  ctxt += '</div>';  return ctxt;  };    }    var sideLink = new SideLink(); function MidTabs () {    this.tabList = new Array();  this.currentTab = "";  this.previousTab = "";  this.tabwidth = 123;  this.sidewidth = 28;  this.currentContent = "";  this.currentId = 0;    MidTabs.prototype.toString = function() {      return this.printDefaultMidTabs();  };    this.resetContent = function(){  document.getElementById("midTabList").innerHTML = "";  };    this.resize = function(){};    this.processTab = function(c){  this.currentTab = this.tabList[c];  this.currentId = c;  filterContent.currentBotTab = "";  document.getElementById("midTabList").innerHTML = this.setMidTabs();  filterContent.setContent();  };      this.setMidTabs = function(){  temp = "";    for(c = 0; c < this.tabList.length; c++){  theword = cleanTab(this.tabList[c]);  temp += '<div style = "width:'+(this.sidewidth)+'px; cursor:pointer; border-bottom:1px solid #777; height:23px; ';  wrd = theword.replace(/\s/g, '_');  wrd = wrd.toLowerCase();  if(this.currentTab == ""){  if(this.tabList[c].match(/\(D\)/g)){  this.currentTab = this.tabList[c];  this.currentId = c;  }  }  if(this.tabList[c] == this.currentTab){  temp += 'background-image:url(\'http://s3.amazonaws.com/ldimages/si_'+(wrd)+'.gif\'); ';  }  else{  temp += 'background-image:url(\'http://s3.amazonaws.com/ldimages/so_'+(wrd)+'.gif\'); ';  }  temp += ' " title= "'+theword+'" ';   temp +='onclick = " midTabs.processTab('+c+')" id = "'+this.tabList[c]+'"';  temp +='></div>';  }  return temp;  };    this.setMidList = function(){  return "";  };    }    var midTabs = new MidTabs(); function LoadBox(){  this.showLoadBox = function(txt){  ldbox = document.getElementById('loadboxes');  ldbox.style.display = "block";  ldbox.innerHTML = txt;  };    this.removeLoadBox = function(){  try{  ldbox = document.getElementById('loadboxes');  ldbox.style.display = "none";  }catch(e){}  };    LoadBox.prototype.toString = function() {      return this.printDefaultLoadBox();  };    this.printDefaultLoadBox = function(){  txt ="";  txt += ('<div id = "loadboxes" style = "width:'+ldboxWidth+'px; position:absolute; left:'+ (defWidth - ldboxWidth) +'px;  top:0px; display:none; padding:3px; height:13px; background:#5f97ff;  color:#FFFFFF; z-index:1100; font-size:10px; letter-spacing:1px;"></div>');  return txt;  };  }    var loadBox = new LoadBox(); function Valid(){    this.validNumber = function(elem){  var numericExpression = /^[0-9]+$/;  if(elem.match(numericExpression))  return true;  return false;  };      this.validTextAndNums = function(elem){  var alphaExp = /^[a-zA-Z_0-9]*$/;  if(elem.match(alphaExp))  return true;  return false;  };      this.validInfo = function(elem){  var alphaExp = /^[a-zA-Z_0-9\s\.\?'!,\-]*$/;  if(elem.match(alphaExp))  return true;  return false;  };      this.validEmail = function(elem){  var alphaExp = /^[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;  if(elem.match(alphaExp))  return true;  return false;  };      this.validurl = function(elem){  var alphaExp = /^(http:\/\/)?www\.[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z0-9])?$/;  if(elem.match(alphaExp))  return true;  return false;  };      this.validTag = function(elem){  var alphaExp = /^[a-zA-Z\s_,]*$/;  if(elem.match(alphaExp) ){  return (elem.length < 210);  }      return false;  };      this.validString = function(elem){  var alphaExp = /^[a-zA-Z\s_]*$/;  if(elem.match(alphaExp))  return true;  return false;  };      this.validStringNum = function(elem){  var alphaExp = /^[a-zA-Z\s_0-9\.]*$/;  if(elem.match(alphaExp))  return true;  return false;  };      this.validateYDM = function(elem){  return (elem != "default");  };    this.validMenu = function(elem){  return (elem != "default" && elem != null && elem != "undefined");  };    this.validPasswordLength = function(value){  if(value.length > 6)  return true;  };      this.validateAct = function(value){  if(this.validNumber(value) && value < 37)   return true;  else   return false;  };      this.validCity = function(value){  return (this.validInfo(value));  };      this.validDegree = function(value){  var alphaExp = /^[0-9]+(\.[0-9]*)?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validDistance = function(value){  var alphaExp = /^[0-9]+(\.[0-9]*)?(\s)*(km|m|mi|yard)s?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validEventValue = function(value){  var alphaExp = /^[0-9]+(\.[0-9]*)?(\s)*(lbs|kg|km|m)$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validFloat = function(value){  return this.validDegree(value);  };      this.validGPA = function(value){  return this.validDegree(value);  };      this.validHandicap = function(value){  var alphaExp = /^[0-9]+(\.[0-9])?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validInches = function(value){  var alphaExp = /^[0-9]+(in|inches|inch)?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validLbs = function(value){  var alphaExp = /^[0-9]+((lb|pound|kg)s?)$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validLdmail = function(value){  var alphaExp = /^[0-9a-zA-Z_]+\.[0-9a-zA-Z_]+\.(pl|te|co|fa|pa|le)$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validHMS = function(value){  return this.validHMSMS(value);  };      this.validHMSMS = function(value){  var alphaExp = /^(\d{1,2}:)?(\d{1,2}:)?\d{1,2}(\.\d{1,2})?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validMS = function(value){  return this.validHMSMS(value);  };      this.validMSMS = function(value){  return this.validHMSMS(value);  };      this.validSM = function(value){  return this.validHMSMS(value);  };      this.validMoney = function(value){  var alphaExp = /^.?[0-9]+(\.[0-9]+)?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validSpeed = function(value){  var alphaExp = /^[0-9]+(\.[0-9]+)?(\s)*(mph|kph)$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validPercentage = function(value){  var alphaExp = /^[0-9]+(\.[0-9]+)?%?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validPostalCode = function(value){  var alphaExp = /^[0-9a-zA-Z]+$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validPSAT = function(value){  if(this.validNumber(value) && value <= 240)   return true;  return false;  };      this.validPSI = function(value){  var alphaExp = /^[0-9]+\.$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validSAT = function(value){  if(this.validNumber(value) && value <= 2400)   return true;  return false;  };      this.validState = function(value){  return this.validInfo(value);  };      this.validStreetAddress = function(value){  return this.validInfo(value);  };      this.validStreetAddress = function(value){  return this.validInfo(value);  };      this.validTag = function(value){  return this.validInfo(value);  };      this.validWeigth = function(value){  this.validEventValue(value);  };      this.validTimeRange = function(value){  var alphaExp = /^\d{1,2}:\d{1,2}-(am|pm),\d{1,2}:\d{1,2}-(am|pm)$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validText = function(value){  return this.validInfo(value);  };      this.validateCont = function(value){  var alphaExp = /[\)\(\|><"]/;  if(!value.match(alphaExp))  return true;  return false;  };      this.validWeight = function(value){  var alphaExp = /^[0-9]+(\.[0-9]*)?(\s)*(lb|kg)s?$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validHeight = function(value){  var alphaExp = /^([0-9]+(\.[0-9]*)?(\s)*(ft|m|feet|in|cm|inches)(\s)?)+$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validHeight2 = function(value){  var alphaExp = /^([0-9]+(\.[0-9]*)?(\s)*(in|cm|inches)(\s)?)+$/;  if(value.match(alphaExp))  return true;  return false;  };      this.validateTextArea = function(value){  if(this.validateCont(value))  return (value.length < 210);  return false;  };    this.validateVideo = function(filename){  extar = filename.split('.');  ext = extar[extar.length-1];  clen = params.videotypes.length;  found = false;  ext = ext.toLowerCase();  for(c = 0; c < clen; c++)  if(ext == params.videotypes[c])  found = true;  return found;  };    this.validateFile = function(filename){  extar = filename.split('.');  ext = extar[extar.length-1];  clen = params.filetypes.length;  found = false;  ext = ext.toLowerCase();  for(c = 0; c < clen; c++)  if(ext == params.filetypes[c])  found = true;  return found;  };    this.validateFullName = function(cword){  if(uReg.currentReg == "Team")  return validate.validStringNum(cword);  else if (cword.match(/[a-zA-Z]+\s[a-zA-Z]+/g))  return validate.validStringNum(cword);  return false;  };    this.verifyAge = function(cword){    };    this.validateEntry = function(type, cword){    switch(type){  case "number": case "number(optional)":   case "seconds":   return(validate.validNumber(cword));  break;  case "fullname":  return (validate.validateFullName(cword));  break;  case "textandnum": return(validate.validTextAndNums(cword)); break;  case "email": return(validate.validEmail(cword)); break;  case "URL": case "url": return(validate.validurl(cword)); break;  case "textbox": case "text": case "username": case "password":  case "password2": case "name":  return(validate.validText(cword));  break;  case "headerldmail": case "headertext":  return (validate.validString(cword));   break;  case "textarea": return validate.validateTextArea(cword); break;  case "timerange":  cword = cword.replace(/\s/g, '');  return validate.validTimeRange(cword);  break;  case "number_radio":  cword = cword.replace(/\s/g, '');  return this.validateCont(cword);  break;  case "string": return validate.validateCont(cword); break;  case "distance": return (validate.validDistance(cword)); break;  case "act": return (validate.validateAct(cword)); break;  case "tag": case "tag1": return(validate.validTag(cword)); break;  case "city": return(validate.validCity(cword)); break;  case "degrees": return(validate.validDegree(cword)); break;  case "eventvalue": return(validate.validEventValue(cword)); break;  case "float": return(validate.validFloat(cword)); break;  case "gpa": return(validate.validGPA(cword)); break;  case "handicap": return(validate.validHandicap(cword)); break;  case "inches": return(validate.validInches(cword)); break;  case "lbs": return(validate.validLbs(cword)); break;  case "ldmail": return(validate.validLdmail(cword)); break;  case "hours:minutes:seconds": return(validate.validHMS(cword)); break;  case "minutes:seconds": return(validate.validMS(cword)); break;  case "minutes:seconds:milliseconds": return(validate.validMSMS(cword)); break;  case "seconds:milliseconds": return(validate.validSM(cword)); break;  case "money": return(validate.validMoney(cword)); break;  case "speed": return(validate.validSpeed(cword)); break;  case "percentage": return(validate.validPercentage(cword)); break;  case "postalcode": return(validate.validPostalCode(cword)); break;  case "psat": return(validate.validPSAT(cword)); break;  case "psi": return(validate.validPSI(cword)); break;  case "sat": return(validate.validSAT(cword)); break;  case "state": return(validate.validState(cword)); break;  case "weight": return(validate.validWeight(cword)); break;  case "height": return(validate.validHeight(cword)); break;  case "height2": return(validate.validHeight2(cword)); break;  case "streetaddress": return(validate.validStreetAddress(cword)); break;  case "menu":  case "position":   return(validate.validMenu(cword));  break;  case "number": return(validate.validNumber(cword)); break;  case "country": case "accounttype": return(validate.validMenu(cword)); break;  case "year2": case "year": case "year3": case "day": case "month":  case "feet-inches": case "gender": case "sport":  return(validate.validMenu(cword)); break;  break;  case "postalcode":    break;  case "yy-mm-dd2":  case "yy-mm-dd":  return(validate.validMenu(cword)); break;  break;  }  };  }    var validate = new Valid(); function Events(){    this.windowwidth = 640;  this.windowheight = 300;  this.content = "";  this.types = new Array("Game", "Practice", "Tryout", "Pickup Game", "Tournament", "Other");  this.currentCommand = "Pickup Game";  this.currentL = "";   this.currentSS = "";    Events.prototype.toString = function() {  addaction = 'myEvents.addEvent';  editaction = 'myEvents.editEvent';  if(params.eventdisplay != null)  this.types = params.eventdisplay;  return filterIcons.printAEIcons('eventform', this.types, addaction, editaction);  };      this.editName = function(param){  param.style.color = "#000000";  if(param.value == "Event Name")  param.value = "";  };    this.displayFeedback = function(){  myTimer.queuePush('comment_400/250');  };    this.init = function(){  myLarge.displayLargeDisplay(this.windowwidth, this.windowheight);  myMini.showMini('minibox2', winWidth, 30);  myTimer.queuePush("setMini_eventadd");  };      this.displayEvent = function(){  myTimer.queuePush("setMini_setEvent");  myTimer.queuePush("fadefull");  };      this.addObj = function(eventname){  this.show(eventname);  };      this.addEvent = function(eventname){  curSelection = "";  exceltab = "List";  addexcel = "";  curCommand = "List";  curselect = "";  cexcel = "";  curs = "";  if(currentSection != "Events"){  currentSection = "Events";  subLinks.changeSublink(currentSection);  myTimer.queuePush('callAjax_'+currentLink+'/Events/addEvent_'+eventname+'//stopload');    }  else{  currentSection = "Events";  subLinks.changeSublink(currentSection);  myTimer.queuePush('callAjax_'+currentLink+'/Events/addEvent_'+eventname+'//calltoptabs');  }  };      this.seasonRequest = function(eventname){  switch(eventname){  case "Add_Season":  size = (params.value[0] == null) ? 0 : params.value.length;   myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/addSeason/'+size+'/calltoptabs');  break;   default:  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seasonRequest_'+eventname+'//seasonreq');  }  };      this.editEvent = function(eventname){  alert('edit: '+eventname);  };      this.changeStats = function(eventname){  contentManager.currentEvent  = eventname;  curSelection = eventname;  refreshtab = false;  contentTabs.currentTab = "";  isstat = (currentSection == "Stats");  subLinks.changeSublink(currentSection);  psv = (params.cursel != null) ?  params.cursel : "page";  psv = (psv == "") ? 'page' : psv;  currentSection = "Stats";  exceltab = null;  cexcel = "";  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/toptabs');  };      this.editObj = function(eventname){  alert('edit: '+eventname);  };      this.showQuestion = function(command){  showload = false;  command = command.split(' ').join('_');  this.currentCommand = command;  curSelection = command;  this.currentL = "Q_A";  subLinks.changeSublink(this.currentL);  switch(command){  case "New_Entry": this.currentSS = "Question_Entry(P)"; break;  case "View_Posts": this.currentSS = "Questions(D)"; break;  case "Trash": this.currentSS = "Trash(P)"; break;  }  currentSection = this.currentL;  theword = filterContent.currentBotTab.split('(D)')[0];  theword = theword +'(D)';  this.processMessage(command);  };    this.showNetwork = function(command){  this.currentL = "Network";  switch(command){  case "Friends": this.currentSS = "Friends(D)"; break;  default: this.currentSS = command; break;  }  this.show(command);  };    this.showMail = function(command){  showload = false;  command = command.split(' ').join('_');  this.currentCommand = command;  curSelection = command;  this.currentL = "Mail";  subLinks.changeSublink(this.currentL);  switch(command){  case "Inbox": this.currentSS = "Inbox(D)"; break;  case "New_Entry": this.currentSS = "Compose"; break;  default: this.currentSS = command; break;  }  currentSection = this.currentL;  theword = filterContent.currentBotTab.split('(D)')[0];  thesec = midTabs.currentTab.split('(D)')[0];  this.processMessage(command);  };    this.showBlog = function(command){  showload = false;  command = command.split(' ').join('_');  this.currentCommand = command;  curSelection = command;  this.currentL = "Blog";  subLinks.changeSublink(this.currentL);  switch(command){  case "New_Entry":  this.currentSS = "Blog_Entry(P)";  break;  case "View_Posts":  this.currentSS = "Blog_Posts(D)";  break;  }  currentSection = this.currentL;  theword = filterContent.currentBotTab.split('(D)')[0];  thesec = midTabs.currentTab.split('(D)')[0];  this.processMessage(command);  };      this.processMessage = function(eventtype){  switch(eventtype){  case "Trash": case "Trash_":  case "Delete": case "Restore":  getCheckedMail(eventtype);  break;  default:  myTimer.queuePush('callAjax_'+currentLink+'/'+this.currentL+'/toptabs/'+this.currentSS+','+midTabs.currentTab+','+theword);  }  };    this.show = function(command){  showload = false;  command = command.split(' ').join('_');  this.currentCommand = command;  curSelection = command;  subLinks.changeSublink(this.currentL);  myTimer.queuePush('callAjax_'+currentLink+'/'+this.currentL+'/toptabs/'+this.currentSS);  };    this.printEventForm = function(){  txt = "";  txt +='<div>';  for(i = 0; i < params.fullAttribute.length; i++){  txt += '<div style = "overflow:auto; visibility:visible; width:630px; padding-top:2px; height:20px; padding-bottom:4px; margin-left:5px; clear:both; border:1px solid #EEEEEE; border-top:0px;">';  txt += this.createEvent(params.inputtype[i], i);  txt += '</div>';  }  txt +=  '</div>';  return txt;  };    this.createEvent = function(type, i){  return myMini.setFieldOptions(type, i);  };    this.startStats = function(){  uEvent.editable = false;  myHomePage.setContent(uEvent.init());  extra = mySeason.setSeason();  if(mySeason.seasonlist.match(/,_/g))  setPageCommands(new Array("Change_Season"), extra);  else  setPageCommands(new Array(""), extra);  };    this.startUserStats = function(){  extra = mySeason.setSeason();  if(params.currentinfo.length > 0){  myHomePage.setContent('<div id = "pagetable"></div>');  this.statAr = new Array();  this.statAr = myTable.setTable(params.currentinfo);  this.statAr.push(params.abbreviation);  myTable.setEditor('statwriter', "Stats", uusernameu);  myTable.init(this.statAr, false, 'horizontal', true);  myTable.start(true, "pagetable", "");  cdiv = document.createElement("div");  cdiv.setAttribute('style', 'clear:both; height:20px;');  myHomePage.addElement(cdiv);  }  else{  content = 'There are no recorded stats for this section';  myHomePage.setContent('<div style = "color:#888; font-size:12px; padding:5px;">'+content+'</div>');  }    if(mySeason.seasonlist.match(/,_/g))  setPageCommands(new Array("Change_Season", "Download PDF"), extra);  else  setPageCommands(new Array("Download PDF"), extra);  };    this.startEvents = function(){  uEvent.editable = true;  if(mySeason.currentseason != ""){  myHomePage.setContent(uEvent.init());  extra = mySeason.setSeason();  if(mySeason.seasonlist.match(/,_/g))  setPageCommands(new Array("Change_Season", "Add_Season"), extra);  else  setPageCommands(new Array("Add_Season"), extra);  }  else{  myHomePage.setContent(printGettingStarted());  setPageCommands(new Array("Add_Season"));  }  };  }    var myEvents = new Events; function AccountInfo(){    this.windowwidth = 640;  this.windowheight = 300;  this.content = "";  this.command = "";  this.selection = "";  this.content = "";    this.displayInColumns = function(type){  txt = "";  txt += '<div style = " font-size:11px; letter-spacing:2px; color:#FFFFFF;">';  count = 0;  for(i = 0; i < params.infoName.length; i++){  if(params.displaytype[i] != "none"){  thename = params.infoName[i].split('_').join(' ');  innerCont = winWidth - 200;  contentwidth = Math.floor(innerCont/3);  wordlength = Math.floor((contentwidth)/9)-thename.length;  theval = (thename != "LD Mail") ? params.infoVal[i].split('_').join(' ') : params.infoVal[i];  theval = (theval.length > wordlength) ? theval.substring(0,wordlength)+'...' : theval;  thename = thename.substring(0,1).toUpperCase()+thename.substring(1);  if (count == 0)  txt += '<div> ';  if(count%4 == 0){  txt += '</div><div style = "padding-left:10px; border:1px solid #222; border-left:0px; padding-top:5px; float:left; height:60px;  width:'+contentwidth+'px; ';  if(i != 0)  txt += 'padding-left:25px; padding-right:25px; ';   txt += '">';  }  txt += '<div style = "clear:both; height:15px;">';  txt += '<div style = "float:left; width:auto; ">';  txt += thename;  txt += ': </div>';  txt += '<div style = "padding-left:5px; padding-right:15px; float:left; color:#BDD8EF; width:auto;">';  txt += theval;  txt += '</div>';  txt += '</div>';  count ++;  }  }  txt += '</div>';  return txt;  };    this.displayInRows = function(thearray){  txt = "";  txt += '<div style = "color:#EEEEEE;  padding-left: 30px; padding-right:30px;  height auto; font-size:11px; letter-spacing:2px; border:1px solid #cccccc; float:left; border-left:0px; width:auto;">';  for(i = 0; i < thearray.length; i++){  txt += '<div style = "float:left; padding:1px; clear:both; ';  txt += '">';  txt += '<a href = "#" style = " text-decoration:none; letter-spacing:2px; ';  if(i != 0)  txt += 'color:#BDD8EF';  else  txt += 'color:#FFFFFF; text-decoration:none;';  txt += '">'+thearray[i]+'</a>';  txt += "</div>";  }  txt += '</div>';  return txt;  };    this.displayBio = function() {  return this.displayInColumns('Bio');  };    this.displaySI = function() {  return this.displayInColumns('School_Info');  };    this.displaySA = function() {  return this.displayInColumns('School_Affiliation');  };    this.displayCT = function() {  return this.displayInColumns('Current_Team');  };    this.displayCS = function() {  return this.displayInColumns('Current_Season');  };    this.displayAT = function() {  team = new Array ("Team", "Bulls", "Reds", "Eagles");  sport = new Array("Sport", "BasketBall", "Hockey", "Football");  if(account == "Player")  position = new Array("Position", "Center", "Striker", "Defense");  else   position = new Array("Role", "Head", "Hitting", "Fielding");  season = new Array("Season", "Spring", "Fall ", "Summer");  year = new Array("Year", "2005", "2006", "2007");  txt = "";  txt += this.displayInRows(team);  txt += this.displayInRows(sport);  txt += this.displayInRows(position);  txt += this.displayInRows(season);  txt += this.displayInRows(year);  txt += '<div style = "float:left; margin-left:30px; color:#BDD8EF; font-size:11px;"><a href = "javascript:accountInfo.displayInfo(\'All_Teams\')" style = "color:#BDD8EF;">more</a></div>';  return txt;  };    this.displayLDI = function() {  return this.displayInColumns('LDI');  };    this.init = function(){  myLarge.displayLargeDisplay(this.windowwidth, this.windowheight);  myMini.showMini('minibox2', winWidth, 30);  myTimer.queuePush("setMini_accountcategories");  };    this.displayAccount = function(){  myTimer.queuePush(this.command);  myTimer.queuePush("fadefull");  };    this.printAccountForm = function(){  txt = "";  txt +='<div>';  for(i = 0; i < params.fullAttribute.length; i++){  txt += '<div style = "overflow:auto; visibility:visible; width:630px; padding-top:2px; height:20px; padding-bottom:4px; margin-left:5px; clear:both; border:1px solid #EEEEEE; border-top:0px;">';  txt += this.createAccount(params.inputtype[i], i);  txt += '</div>';  }  txt +=  '</div>';  return txt;  };      this.createAccount = function(type, i){  return myMini.setFieldOptions(type, i);  };    this.displayInfo = function(type){  this.windowheight = 300;  switch(type){  case "Bio":  this.command = "setMini_setBioInfo";  break;  case "Current_Team":  this.command = "setMini_setCurrentTeamInfo";  break;  case "Current_Season":  this.command = "setMini_setCurrentSeasonInfo";  this.windowheight = 330;  break;  case "All_Teams":  this.command = "setMini_setAllTeamInfo";  break;  case "School_Info":  this.command = "setMini_setSchoolInfo";  break;  case "School_Affiliation":  this.command = "setMini_setSchoolAffiliation";  break;  }  this.selection = type;  this.showInfo();  };    this.showInfo = function(type){  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/account_category/"+this.selection);  };  }    var accountInfo = new AccountInfo(); function AccountManager(){    this.windowwidth = 500;  this.windowheight = 320;  this.content = "";  this.currentEvent = "";  this.topbarclr = "#999";  this.overbarclr = "#f9f9f9";  this.topbarfnt = "#fff";  this.currentTab = "";  this.accounttype = "Player";  this.instructions = "";  this.stage = 0;  this.currentCommand = "";  this.selectcontent = '';  this.currentuser = '';  this.newaccount = '';    this.displayAddUser = function(){  if(account == "Team")  this.types = new Array('Player', 'Coach', 'Scout');  else if (account == "League")  this.types = new Array("Player", 'Team');  addaction = 'accountManager.addUser';  editaction = 'accountManager.editUser';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayTakeAction = function(){  addaction = 'accountManager.takeAction';  ulist = guestActions;  return filterIcons.printIcons('accountform', ulist, addaction, getImg(ulist));  };    this.takeAction = function(evnt){  if(state != "0"){  switch(evnt){  case "Watch_User":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/addtoeyes//getreponse');  myTimer.queuePush("callCommand_HOME/default/default");  params.commandlist = 'callCommand_HOME/Profile/Watch_List';  myTimer.queuePush(params.commandlist);  break;  case "Befriend":  myTimer.queuePush("callAjax_"+currentLink+'/'+currentSection+'/addfriend');  break;  case "Contact":  myTimer.queuePush("callAjax_"+currentLink+'/'+currentSection+'/setcontactinfo');  break;    }  }  else{  myTimer.queuePush('signin_400/250');  }  };    this.addAccount = function(){  this.types = accountTypes;  addaction = 'accountManager.createAccount';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.switchAccount = function(){  this.types = accountTypes;  addaction = 'accountManager.changeAccount';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayAccounts = function() {  this.types = accountTypes;  addaction = 'accountManager.createAccount';  editaction = 'accountManager.changeAccount';  return filterIcons.printAEIcons('accountform', this.types, addaction, editaction, getImg(this.types));  };    this.displayNewUser = function (){  this.types = accountTypes;  addaction = (state == 0) ? 'accountManager.createNewAccount' : 'accountManager.createAccount';  return filterIcons.printIcons('accountform', this.types, addaction,  getImg(this.types));  };    this.changeAccount = function(obj){  uReg.currentReg = obj;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/gettheaccounts_1/'+uReg.currentReg);  };    this.initChange = function(){  uReg.showRegistration(null, "setMini_cAccount", "setMini_showAccounts2", this.windowwidth, this.windowheight);  };    this.setSwitchContent = function(){  thetxt = "";  thetxt += '<iframe id="target_content"  vspace="1" hspace="1" marginwidth="1" marginheight="1" frameborder="0"  scrolling = "yes" src="" style="  width:'+(this.windowwidth-10)+'px; border:1px solid #ddd; margin-left:5px; float:left; height:'+(this.windowheight-35)+'px; overflow:auto;"></iframe>';  return thetxt;  };    this.deleteAccount = function(name, sport, username, acc, type, showswitch){  switch(type){  case "access":  psacc = (acc != "" && acc != null) ? ","+acc : "";  ext = (showswitch != "") ? "access" : "";  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deleteAccess_'+ext+'/'+name+','+sport+','+username+psacc+'/deleteandclose');  break;  case "account":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deleteAccount/'+name+','+sport+','+username+','+uReg.currentReg+'/deleteandclose');  break;  }  };    this.aswitch = function(name, sport, username, acc){  window.parent.resetCachedLinks();  currentLink = "HOME";  psval = (username != "" && username != null && username != "Me") ? ","+username : "";  psacc = (acc != "" && acc != null) ? acc : uReg.currentReg;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/accountswitch/'+psacc+','+name+','+sport+psval);  };    this.clearContent = function(){  myMini.cMini('minibox');  };    this.accountContentHelper = function(title, width, parray, background, checkmod, showswitch, showclose, isaccount, type){  var ptxt = "";  ptxt += '<div style = "font-size:13px; width:'+width+'; font-family:arial;  height:auto; '+background+'; border-bottom:1px solid #ddd; border-right:1px solid #ddd; float:left;">';  ptxt +='<div style = "clear:both; color:#009999; font-weight:bold; padding-left:15px; padding-right: 10px; width:'+130+'px;   height:20px;">'+title+' </div>';  plen = parray.length;  cls = (showclose != null && showclose != "");  clw = (showswitch != null && showclose != "" );  for(i = 0; i < plen; i++){   pac = (isaccount) ? params.account[i] : "";   curval = parray[i].replace(/_/g, ' ');   ptxt += '<div style = "clear:both; border-bottom:1px solid #eee; color:#777">';   ptxt +='<div style = "height:20px; float:left; padding-left:15px; padding-right:15px;">';   if(checkmod == null || !checkmod)  ptxt += curval;   else{  if(parray[i] == "Me") ptxt += '<div style = "margin-left:5px; width:65px; height:15px; margin-top:2px; background-image:url(\'http://s3.amazonaws.com/ldimages/mn_admin.gif\');"></div>';  else{   ptxt += '<div style = "color:#009999;">'+curval+'</div>';  }   }   ptxt +=  '</div>';   if(showclose !=  "")   if (cls && (!isaccount || (isaccount && whois() == "me")))  ptxt +='<div style = "float:right; width:20px; height:20px; background-image:url(\'http://s3.amazonaws.com/ldimages/'+showclose+'.gif\'); border-left:1px solid #ddd; cursor:pointer;" title = "Delete" onclick = "window.parent.accountManager.deleteAccount(\''+params.name[i]+'\' , \''+params.sport[i]+'\', \''+params.user[i]+'\', \''+pac+'\', \''+type+'\', \''+showswitch+'\')"></div>';    if(showswitch != "")  if (clw&& (!isaccount || (isaccount && whois() == "me"))){  ptxt +='<div style = "float:right; width:20px; height:20px; background-image:url(\'http://s3.amazonaws.com/ldimages/'+showswitch+'.gif\'); border-left:1px solid #ddd; cursor:pointer;" title = "Sign in" onclick = "window.parent.accountManager.aswitch(\''+params.name[i]+'\' , \''+params.sport[i]+'\', \''+params.user[i]+'\', \''+pac+'\')"></div>';   }   ptxt += '</div>';   }   ptxt += '</div>';   return ptxt;  };    this.accountImages = function(psv){  mxt = "";  flen = params.files.length;  picperline = 4;  mxt += '<div style = "float:left; overflow-x: hidden;">';  winsize = this.windowwidth-30;  for(i = 0; i < flen; i++){  if(i%4 == 0){  mxt += '</div><div style = "clear:both; padding-top:10px; height:auto; width:'+(winsize)+'px;">';  }  mxt +='<div style = "cursor:pointer; float:left; margin-left:5px; width:80px; border: 1px solid #ddd; height:auto;">';  mxt +='<div style = "float:left; width:74px; background:#eee; padding:3px;"><img src = "'+(upldDir+params.files[i])+'" width = "74" ';  switch(psv){  case "addPhoto":  mxt += ' onclick = "window.parent.setProfilePicture(\''+(params.files[i])+'\')" ';  break;  default:  mxt += ' onclick = "window.parent.setMainPicture(\''+(params.files[i])+'\')" ';  }  mxt += '/></div>';  mxt +='</div>';  }  if(flen <= 0) {  mxt += '<div style = "float:left; margin-left:5px; font-size:12px; clear:both; margin-top:4px; ">';  mxt +='<div style = "float:left; clear:both; margin-top:5px; height:20px; color:#cc0000; font-weight:bold ">You have no uploaded images</div>';  mxt +='<div style = "clear:both; margin-top:5px; height:20px; ">';  mxt +='<div style = "float:left; ">Click </div>';  mxt +='<div style = "float:left; color:#0000cc; text-decoration:underline; cursor:pointer; font-weight:bold" onclick = "window.parent.myUploader.startMultiUpload()">&nbsp;here&nbsp;</div>';  mxt +='<div style = "float:left"> to Upload Images</div>';  mxt +='</div>';  mxt +='</div>';  }  mxt += '</div>';  return mxt;  };    this.accountContent = function(showswitch, showclose, type){   txt = ""; ttxt = ""; cxt = ""; mxt = "";   nm = (uReg.currentReg != null) ? uReg.currentReg+" Name" : "Name";   clen = params.name.length;   if(clen > 0){   txt += this.accountContentHelper(nm, "auto", params.name, "background:#f9f9f9");   isaccount = false;   if(params.account[0] != null) {  cxt += this.accountContentHelper("Account", "auto", params.account, "background:#f9f9f9");  isaccount = true;   }   ttxt +=  this.accountContentHelper("Sport", "250px", params.sport, "background:#fff", false, showswitch, showclose, isaccount, type);   thetxt = '<div style = "width:auto; height:auto; ';   if(nm == "") thetxt += 'font-size:12px;';   thetxt += '">'+txt+mxt+cxt+ttxt+'</div>';   }   else thetxt = '<div style = "float:left; width:'+(this.windowwidth-60)+'px; margin-left:5px; margin-top:5px; font-size:12px; clear:both; font-family:arial; margin-top:4px; color:#009999; font-weight:bold; height:20px; border:#f9f9f9; padding:3px;">No Accounts</div>';   return (thetxt);   };    this.accountAdmin = function(title){  title = title.split('_').join(' ');  ttxt =  '<form id ="registeruser" target="target_register" action = "registeruser.php"  method="post" style = "float:left;">';  ttxt += '<iframe id="target_register" name="target_register" src="" style="width:0px;height:0px;border:0; "></iframe>';  ttxt += '<div style = "margin-top:5px; background:#f9f9f9; color:#444; font-size:12px; width:'+(this.windowwidth - 20)+'px; height:auto; float:left; height:20px;"><div style = "margin-left:15px; font-size:12px; color:#009999; font-weight:bold;">'+title+' To:</div></div>';  ttxt += '<div style = "margin-top:5px; background:#f9f9f9; color:#444; font-size:12px; width:'+(this.windowwidth - 20)+'px; height:auto; float:left">';  xlen = params.name.length;  xtxt = ""; ctxt = "";  for(i = 0 ; i < xlen; i++){  extra = null;  retval = "";  xtxt += '<div style = "margin-left:5px; padding-top:5px; padding-right:10px; text-align:right; width:240px; clear:both; height:30px;">'+params.name[i]+'</div>';  if(params.value[i] == "menu"){   extra = params.fname;  extra = accountTypes;  retval = "Player";  }  ctxt += '<div style = "margin-left:5px; padding-top:5px; padding-right:10px; text-align:right; width:200px; clear:both; height:30px;">'+setInputType(params.value[i], params.name[i], retval, extra)+'</div>';  }  ttxt += '<div style = "float:left; width:260px; border:2px solid #fff; border-top:0px; padding-top: 2px; background:#ddd; height:140px;">'+xtxt+'</div>';  ttxt += '<div style = "float:left;  width:260px;  height:140px;">'+ctxt+'</div>';  ttxt += '<div style = "clear:both; width:inherit; padding-top:10px; text-align:center;">';  ttxt +='<div style = "background-image:url(\'http://s3.amazonaws.com/ldimages/submit.gif\'); margin:4px auto; cursor:pointer; height:25px; width:150px;" onclick = "accountManager.grantAccess()"></div>';  ttxt += '</div>';  ttxt += '</div>';  return (ttxt);  };    this.grantAccess = function(){  document.getElementById("registeruser").submit();  };    this.setAccounts = function(info){  var mbox = document.getElementById("target_content");  var doc = mbox.contentDocument;  if (doc == undefined) {   doc = mbox.contentWindow.document;  }  doc.open();  doc.write(info);  doc.close();  };    this.displayAdmin = function() {  this.types = new Array('User_Admin');  addaction = 'accountManager.addAdmin';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayNetwork = function(){  this.types = params.eventdisplay;  tlen = this.types.length;  types2 = new Array();  for(i = 0; i < tlen; i++)  types2[i] = (this.types[i] != "Members") ? this.types[i] : utypeu+'s';  addaction = 'myEvents.showNetwork';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(types2), types2);  };    this.addNetwork = function(eventtype){  alert('Add: '+eventtype);  };    this.removeNetwork = function(eventtype){  alert('Remove: '+eventtype);  };    this.addAdmin = function(eventtype){  switch(eventtype){  case "Grant_Access":  myTimer.queuePush('callAjax_HOME/Registration/Sport//callAccount');  break;  case "User_Admin":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/userAdmin');  break;  }  };    this.removeAdmin = function(eventtype){  alert('Remove: '+eventtype);  };    this.processControl = function(eventtype){  switch(eventtype){  case "My_Access":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/showAccess');  break;  case "LD_Firewall":  break;  case "Personalize":  break;  case "Advertise":  break;  default:  eventtype = eventtype.toLowerCase();  eventtype = eventtype.replace(/join\s/g, '');  myTimer.queuePush('join_400/250/'+eventtype);  break;  }  };      this.switchContent = function(){    };    this.controlPanel = function(){  this.types = params.eventdisplay;  addaction = 'accountManager.processControl';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.createAccount = function(obj){  innerAccount = true;  uReg.startRegistration(obj, "default");  };    this.createNewAccount = function(obj){  innerAccount = false;  uReg.startRegistration(obj, "default");  };    this.editAccount = function(obj){  alert("Remove "+obj);  };    this.addUser = function(obj){  obj = obj.toLowerCase();  obj = obj.replace(/add_/g, '');  window.parent.myTimer.queuePush('addUser_400/250/'+obj);  };    this.editUser = function(obj){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sendMessage/remove_'+obj+'/setmessage');  };    this.displaySettings = function() {  this.types = new Array('General',  'Permissions', 'Black_List');  addaction = 'myEvents.addEvent';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.editName = function(param){  param.style.color = "#000000";  if(param.value == "Event Name")  param.value = "";  };    this.init = function(){  myLarge.displayLargeDisplay(this.windowwidth, this.windowheight);  myMini.showMini('minibox2', winWidth, 30);  myTimer.queuePush("setMini_eventadd");  };      this.startMini = function(){  myLarge.displayLargeDisplay(this.windowwidth, this.windowheight);  };    this.displayEvent = function(){  myTimer.queuePush("setMini_setEvent");  myTimer.queuePush("fadefull");  };    this.addEvent = function(eventname){  this.showEvent(eventname);  };    this.editEvent = function(eventname){  alert('edit: '+eventname);  };    this.printEventForm = function(){  txt = "";  txt +='<div>';  for(i = 0; i < params.fullAttribute.length; i++){  txt += '<div style = "overflow:auto; visibility:visible; width:630px; padding-top:2px; height:20px; padding-bottom:4px; margin-left:5px; clear:both; border:1px solid #EEEEEE; border-top:0px;">';  txt += this.createEvent(params.inputtype[i], i);  txt += '</div>';  }  txt +=  '</div>';  return txt;  };    this.createEvent = function(type, i){    };    this.showEvent = function(command){  showload = false;  command = command.split(' ').join('_');  this.currentEvent = command;  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/event_category/"+command);  };    this.callRegistration = function(){  this.currentCommand = '';  cobj = document.getElementById('agree');  if(cobj.checked){  uReg.submitReg('btn_finish', 'uploadform', 'register.php?loc='+currentLink);  }  else{  alert('You must agree to the Terms to Register');  document.getElementById('btn_finish').disabled = false;  }  };    this.performCommand = function(command, obj){  obj.disabled = true;  if(command != this.currentCommand){  this.currentCommand = command;  switch(command){  case "NEXT":  this.stage++;  this.setAccountType();  this.resetWindow(this.currentTab);  break;  case "BACK":  this.stage--;  this.resetWindow(this.currentTab);  break;  case "CANCEL":  myTimer.queuePush('closeMini_minibox');  break;  case "SWITCH":  this.callSwitch();  break;  case "FINISH":  this.callRegistration();  break;  }  }    };    this.setCommands = function(){  if(this.stage == 0) commands = new Array("CANCEL", "NEXT");  else{  if(this.currentTab == "Switch_Account")   commands = new Array("SWITCH", "BACK");  else  commands = new Array("FINISH", "BACK");    }      mtxt = '';  mtxt += '<div style = "width:100%; clear:both; padding-top:8px;">';  mtxt +='<div style = "padding-right:15px;">';  for(x = 0; x < 2; x++){  wrd = commands[x].toLowerCase();  mtxt +='<div style = "float:right; padding:5px; padding-right:5px;">';  mtxt +='<input id = "btn_'+wrd+'" name = "btn_'+wrd+'" type = "button" style = "padding-left:10px; padding-right:10px; font-size:10px; " value = "'+commands[x]+'" onclick = "accountManager.performCommand(\''+commands[x]+'\', this)"/>';  mtxt +='</div>';  }  mtxt +='</div>';  mtxt +='<div style = "clear:both"></div>';  mtxt +='</div>';  return mtxt;  };    this.callSwitch = function(){  if(this.newaccount != "")  this.currentuser = this.newaccount;  if(this.currentuser == ''){  alert("You have to select a "+this.accounttype+' before you can switch. ');  document.getElementById('btn_switch').disabled = false;  this.currentCommand = '';  }  else{  user = setUser(this.currentuser, 'ansu');  lockerLink(user['sport'], uusernameu, user['account'], user['name']);  }  };    this.setInstructions = function(){  switch(this.currentTab){  case "Switch_Account":  this.instructions = new Array(  "<b>Step 1:</b> Select the type of account you want to switch to.",  "<b>Step 2:</b> Select the "+this.accounttype+" you want to switch to and click switch.");  break;  case "Add_Account":  this.instructions = new Array(  "<b>Step 1:</b> Select the type of account you want to create.",  "<b>Step 2:</b> Complete the form to create your "+this.accounttype+" account.");  break;  }  };    this.setAccountType = function(){    clen = accountTypes.length;  cobj = document.uploadform.account_type;  if(cobj != null){  for(c = 0; c < clen; c++){  if(cobj[c].checked){  this.accounttype = cobj[c].value;  }  }  }  };    this.setSelectAccountType = function(){  ltxt = '';  ltxt += '<div style = "float:left;">';  clen = accountTypes.length;  for(c = 0; c < clen; c++){  ltxt += '<div style = "clear:both; padding:7px; padding-left:25px; ">';  ltxt += '<input type = "radio" name = "account_type" style = "float:left; padding-top:2px;" value = "'+accountTypes[c]+'" ';  if(accountTypes[c] == this.accounttype)  ltxt +='checked';  ltxt += '/>';  ltxt +='<div style = "float:left; padding-left:10px; padding-top:3px; color:#0022aa; font-weight:bold">'+accountTypes[c]+'</div>';  ltxt +='</div>';  }  ltxt += '</div>';  return ltxt;  };    this.setSelectAccount = function(){  vtxt = '';  vtxt += '<div style = "float:left; width:100%; border:1px; solid #ccc;">';  vtxt +='<div style = "padding:7px; ">'+this.selectcontent+'</div>';  vtxt +='<div style = "clear:both;"></div>';  vtxt += '</div>';  return vtxt;  };    this.setCreateAccount = function(){  vtxt = '';  vtxt += '<div style = "float:left">';  vtxt +='<div style = "padding-top:10px;">'+uReg.regcontent+'</div>';  vtxt += '</div>';  vtxt += '<div style = "clear:both; padding-top:15px;"><input name = "agree" id = "agree" type = "checkbox" style = "float:left;"/><div style = "margin-top:3px; float:left;">I agree to the&nbsp;</div><div style = "float:left; color:#0033aa; cursor:pointer; font-weight:bold; margin-top:3px; " onclick = "uReg.startTerms()" class = "hoverblue" ><a href = "#" onclick = "event.returnValue = false; return false; ">Terms and Conditions</a></div></div>';  return vtxt;  };    this.setAccountContent = function(){  vtxt = '';  switch(this.currentTab){  case "Switch_Account":  if(this.stage == 0) vtxt = this.setSelectAccountType();  else vtxt = this.setSelectAccount();  break;  case "Add_Account":  if(this.stage == 0) vtxt = this.setSelectAccountType();  else this.setCreateAccount();  break;  }  return vtxt;  };    this.setAccountInfo = function(){  this.setInstructions();  rtxt = '';  rtxt += '<div style = "float:left; width:100%; background:'+this.overbarclr+'; height:215px;  border-bottom:1px solid #ccc; overflow:auto;">';  rtxt +='<div style = " width:95%; "><div style = "padding:10px;">'+this.instructions[this.stage]+'</div></div>';  rtxt +='<div style = "width:95%; "><div style = "padding:10px; padding-top:0px;">'+this.setAccountContent()+'</div><div style = "clear:both"></div></div>';  rtxt += '</div>';  return rtxt;  };    this.setAccountLink = function(type){  wrd = type.replace(/_/g, ' ');  ztxt = '';  ztxt += '<div style = "float:right; padding:5px; padding-left:15px; font-weight:bold; padding-right:15px; border-left:1px solid #999; ';  if(type == this.currentTab){  ztxt += 'background: '+this.overbarclr+'; color:#000;" >'+wrd;  }  else{  ztxt +='background: '+this.topbarclr+'; color:'+this.topbarfnt+';  cursor:pointer; " onclick = "accountManager.changeSelection(\''+type+'\')" class = "hovercolor2"';  ztxt +='><a href = "#" onclick = "event.returnValue = false; return false;">'+wrd+'</a>';  }  ztxt += '</div>';  return ztxt;  };    this.changeSelection = function(type){  this.stage = 0;  this.accounttype = "Player";  this.resetWindow(type);  };    this.initWindowContent = function(){  obj = document.getElementById('req_content');  obj.innerHTML = this.setAccountWin();  };    this.selectUser = function(x){  this.currentuser = this.userlist[x];  document.getElementById('user_accounts').innerHTML = this.setAccountList(this.userlist);  };    this.displayAccountRow = function(name, i, isselected){  btxt = '';  if(isselected)  btxt += '<div class = "account_list_selected" >';  else  btxt += '<div class = "account_list" onclick = "accountManager.selectUser('+i+')" >';  btxt += '<div style = "clear:both; padding:5px;">';  btxt +='<div style = "float:left; ">'+name+'</div>';  btxt +='</div>';  btxt +='<div style = "clear:both;"></div>';  btxt +='</div>';  return btxt;  };    this.setAccountList = function(vallist){  rtxt = '';  len = vallist.length-1;  this.userlist = vallist;  if(this.newaccount != "")   this.currentuser = this.newaccount;  for(i = len; i >= 0; i--){  user = setUser(vallist[i], 'ansu');  name = user['name'].replace(/_/g, ' ');  uid = vallist[i]+"||"+uusernameu;  if(this.currentuser == vallist[i] || this.currentuser == uid)  rtxt += this.displayAccountRow(name, i, true);  else{  rtxt += this.displayAccountRow(name, i, false);  }  }  return rtxt;  };    this.setUserAccount = function(vallist){  this.userlist = new Array();  mtxt = '';  mtxt += '<div id = "user_accounts" style = "float:left; width:100%; clear:both;">';  if(vallist.length > 0){  mtxt += this.setAccountList(vallist);  }  else {  mtxt += '<div style = "padding-top:7px;">You have no '+this.accounttype.toLowerCase()+" accounts.</div>";  }  mtxt +='<div style = "clear:both"></div>';  mtxt += '</div>';  this.selectcontent = mtxt;  this.initWindowContent();  };    this.resetWindow = function(type){  this.currentTab = type;  if(this.stage == 0)   this.initWindowContent();   else{  if(this.currentTab == "Add_Account")  uReg.startRegistration(this.accounttype, "accounts");  else if (this.currentTab == "Switch_Account"){  myTimer.queuePush("callAjax_"+currentLink+'/'+currentSection+'/getmembers/'+this.accounttype+'/setaccountwin');  }  }    };    this.setOptionSelect = function(){  mtxt = '';  mtxt += '<div style = "float:left; width:100%; border-bottom:1px solid '+this.overbarclr+'; border-top:1px solid #555; background:'+this.topbarclr+';">';  mtxt +=this.setAccountLink("Switch_Account");  mtxt +=this.setAccountLink("Add_Account");  mtxt += '</div>';    return mtxt;  };    this.setTab = function(ctab){  this.currentTab = ctab;  };    this.setNewAccount = function(uid){  this.newaccount = uid;  };    this.setAccountWin = function(){  this.currentCommand = '';  this.currentuser = '';  xtxt = '';  xtxt += '<div style = "float:left; width:100%;">';  xtxt +=this.setOptionSelect();  xtxt +=this.setAccountInfo();  xtxt +=this.setCommands();  xtxt += '</div>';  return xtxt;  };    this.initWin = function(type){  this.currentTab = type;  this.newaccount = '';  this.stage = 0;  txt = '';  txt += '<form id="uploadform" name="uploadform" target = "target_upload" action = "" enctype="multipart/form-data" method="post" style = "float:left;">';  txt += '<iframe id="target_upload" name="target_upload" src="" style="width:0px;height:0px;border:0; "></iframe>';  txt +=  '<div id = "req_content" style = "border:2px solid #ccc; width:'+(this.windowwidth-4)+'px; font-size:10px; height:'+(this.windowheight-30)+'px; background:#999; ">';  txt +=this.setAccountWin();  txt += '</div>';  txt +='</form>';  return txt;  };  }    var accountManager = new AccountManager(); function ContentManager(){    this.windowwidth = 640;  this.windowheight = 300;  this.content = "";  this.currentEvent = "";    this.displaySports = function(){  return "";  };    this.printUploaderHelper = function (utxt, pic, ulink){  thetext = "";  thetext += '<div style = "clear:both; padding:10px; float:left; font-size:12px;  width:auto; height:auto;" >';  thetext += '<div style = "width:100px; padding-top:3px; float:left; color:#FFFFFF;" >'+utxt+'</div>';  thetext +='<div style = "float:left; width:30px; cursor:pointer;">';  thetext +='<img src = "http://s3.amazonaws.com/ldimages/'+pic+'" style = "float:left; cursor:pointer; border:0px;" onclick = "'+ulink+'" />';  thetext +='</div>';  thetext += "</div>";  return thetext;  };    this.printUploader = function (upform, type){  colswitch = 2;  ctext = "";  switch(type){  case "Photos":  ctext += this.printUploaderHelper('Upload Photos', 'upload.gif', 'myUploader.startMultiUpload()');  break;  case "Videos":  ctext += this.printUploaderHelper('Upload Video', 'upload.gif', 'myUploader.startVideoUpload()');  break;  }  return ctext;  };    this.displayStats = function(){  this.types = params.eventdisplay;  this.currentEvent = curSelection;   myEvents.currentL = "Stats";  myEvents.currentSS = currentSection;  addaction = 'myEvents.changeStats';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayPressInquiries = function(){  this.types = new Array('Inquiries');  addaction = 'myEvents.displayFeedback';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayAdvertise = function(){  this.types = new Array('Advertise');  addaction = 'myEvents.displayFeedback';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayFeedback = function(){  this.types = new Array('Comment');  addaction = 'myEvents.displayFeedback';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayRoster = function(){  if(account == "Team")  this.types = new Array('Add_Player', 'Add_Coach', 'Add_Scout');  else if (utypeu == "Team")  this.types = new Array('Add_Team');  else if (utypeu == "Player")  this.types = new Array('Add_Player');  addaction = 'accountManager.addUser';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };      this.displayGroups = function() {  this.types = new Array('Create', 'Join', 'Media', 'Subscription', 'Settings');  addaction = 'myEvents.addEvent';  editaction = 'myEvents.editEvent';  return filterIcons.printAEIcons('accountform', this.types, addaction, editaction);  };      this.displayEvents = function() {  this.types = params.eventdisplay;  newtype = new Array();  tlen = this.types.length;  x = 0;  for(i = 0; i < tlen; i++)  if(this.types[i] != "Tournament")   newtype[x++] = this.types[i];    myEvents.currentL = "Events";  myEvents.currentSS = "Event_Entry(P)";  addaction = 'myEvents.addEvent';  return filterIcons.printIcons('accountform', newtype, addaction, getImg(newtype));  };      this.displayMessage = function(type) {  this.types = type;  myEvents.currentL = "Blog";  addaction = 'myEvents.showBlog';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displaySeasons = function() {  this.types = new Array('Add_Season');  addaction = 'myEvents.seasonRequest';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayQuestion = function() {  switch(thesection){  case "Q|A": case "Q_A": case "Q A":  if(thectab != "Trash") this.types = new Array('New_Entry', 'View_Posts', 'Delete');  else this.types = new Array('New_Entry', 'View_Posts', 'Restore');  break;  default:  this.types = new Array('New_Entry', 'View_Posts', 'Trash');  }  myEvents.currentL = "Question";  addaction = 'myEvents.showQuestion';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.displayMail = function(type) {  this.types = type;  myEvents.currentL = "Mail(D)";  addaction = 'myEvents.showMail';  return filterIcons.printIcons('accountform', this.types, addaction, getImg(this.types));  };    this.editName = function(param){  param.style.color = "#000000";  if(param.value == "Event Name")  param.value = "";  };    this.init = function(){  myLarge.displayLargeDisplay(this.windowwidth, this.windowheight);  myMini.showMini('minibox2', winWidth, 30);  myTimer.queuePush("setMini_eventadd");  };    this.displayEvent = function(){  myTimer.queuePush("setMini_setEvent");  myTimer.queuePush("fadefull");  };    this.addEvent = function(eventname){  this.showEvent(eventname);  };    this.editEvent = function(eventname){  alert('edit: '+eventname);  };    this.printEventForm = function(){  txt = "";  txt +='<div>';  for(i = 0; i < params.fullAttribute.length; i++){  txt += '<div style = "overflow:auto; visibility:visible; width:630px; padding-top:2px; height:20px; padding-bottom:4px; margin-left:5px; clear:both; border:1px solid #EEEEEE; border-top:0px;">';  txt += this.createEvent(params.inputtype[i], i);  txt += '</div>';  }  txt +=  '</div>';  return txt;  };    this.createEvent = function(type, i){    };    this.showEvent = function(command){  showload = false;  command = command.split(' ').join('_');  this.currentEvent = command;  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/event_category/"+command);  };    this.displayCreate = function(){  cctxt = "";  cctxt += '<div style = "float:left; padding:3px; width:250px; color:#00FFFF; font-size:10px;">&nbsp;Currently Disabled</div>';  return cctxt;  };  }    var contentManager = new ContentManager(); function Glaze (){  this.windowwidth = 780;  this.windowheight = 550;  this.sidewidth = 70;  this.prevpic = null;  this.currentloc = "";  this.form = null;  this.sideimgs = new Array();  this.sidefiles = new Array();  this.picsperload = Math.round(winHeight/100);  this.picsperload = (this.picsperload > 8) ? this.picsperload : 8;  this.counter = 1;  this.imgstart = 0;  this.moreload = false;  this.filename = "";  this.description = "";  this.rating = "";  this.tags = "";  this.userid = new Array();  this.user = new Array();  this.glazetype = "Image";  this.temprow = "";  this.contentfiles = new Array();  this.contentid = new Array();  this.contentname = new Array();  this.eventname = "";  this.h = 0;  this.currate = 7;  this.objwidth = '';  this.title = '';  this.urate = '';  this.start = true;  this.previousobj = "";    this.initFileIno = function(fname, fdescr, ftags, frate, urate){  this.filename = fname;  this.description = fdescr;  this.tags = ftags;  this.rating = frate;  this.urate = urate;  };    this.setHeight = function(pic){    w = (this.windowwidth-272);    h = (this.windowheight-280);    this.h = h;    curImg = new Image();    curImg.src = pic;    complete = false;    if(curImg.width == 0){  stoptheload();  myTimer.queuePush('resizefile_'+pic);  }  else{  this.h = (this.windowheight-280);  cwidth = curImg.width;    cheight = curImg.height;  ratio = cheight/cwidth;  if(ratio < 1){   this.h = Math.floor(ratio * w);  this.h -= 10;  }  complete = true;  }  return complete;  };        this.resetContent = function(){  this.contentfiles = new Array();  this.contentid = new Array();  this.contentname = new Array();  };    this.resetFileContent = function(){  this.filename = "";  this.description = "";  this.tags = "";  };    this.printFileContent = function(title, id, type, value, disabled){  disabled = (disabled == null) ? "" : disabled;  xtxt = '';  xtxt += '<div style = "clear:both; width:'+(this.windowwidth-340)+'px; padding-top:10px; color:#222;">';  xtxt += '<div style = "float:left; margin-left:6px; font-size:14px; color:#555; font-family:arial; width:100px; text-align:right; margin-right:10px; ">'+title+': </div>';  xtxt += '<div style = "width:280px; float:left; margin-left:6px;">';  value = value.replace(/_/g, ' ');  switch(type){  case "text":  case "password":  xtxt += '<input type = "'+type+'" value = "'+value+'" id = "'+id+'" name= "'+id+'" style= "border:1px solid #ccc; width:250px; color:#444; " '+disabled+'/>';  break;  case "textarea":  xtxt += '<textarea id = "'+id+'" name= "'+id+'" style= "height:85px; border:1px solid #ccc; width:250px; color:#444; " col = "4" '+disabled+'>'+value+'</textarea>';  break;  }  xtxt += '</div>';    xtxt += '</div>';  return xtxt;  };    this.updateLoad = function(){  this.initSideImgs();  };    this.initSideImgs = function(){  slen = this.sidefiles.length;  end = slen;  count = this.counter * this.picsperload;  end = (end > count) ? count : end;      content = this.printSideImgs(this.imgstart, end);  cDiv = document.createElement("div");  cDiv.innerHTML = this.printSideImgs(this.imgstart, end);  document.getElementById('sideimgs').appendChild(cDiv);  this.setSideImgs(this.imgstart, end);  this.imgstart = end;  this.counter ++;  this.moreload = (slen > count);  stoptheload();  };    this.switchCurrentImage = function(){  first = this.sidefiles[0];  cid = this.getCurrentId();  };    this.getCurrentId = function(){  clen = this.sidefiles.length;  cid = 0;  for(i = 0; i < clen; i ++){  if(params.currentPic == this.sidefiles[i])   cid = i;  }  return cid;  };    this.printSideImgs = function(start, end){  ctxt = "";  for(x = start; x < end; x++){    if(this.sidefiles[x] == params.currentPic)  ctxt += this.sidePrinter(x, "border: 1px solid #0033ff; background:#fff; ", this.sidefiles[x]);  else  ctxt += this.sidePrinter(x, "border: 1px solid #ccc; background:#ccc", this.sidefiles[x]);  }  return ctxt;  };    this.callAddAll = function(){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/calladdall_'+this.currenttype+'/'+this.eventname+',_'+mySeason.currentseason);   };    this.initObjects = function(){  cobj = document.getElementById('glazercontent');  cobj.innerHTML = "";  llen = this.contentfiles.length;  ctxt = "<div>";  picperpage = Math.floor((this.windowwidth-310)/143);  for(l = 0; l < llen; l++){  if(this.contentfiles[l] != ""){  filename = this.setImgFileName(this.contentfiles[l]);  if(l%picperpage == 0)  ctxt += '</div><div  style = "clear:both;">';  ctxt +='<div style = "margin:10px; width:120px; float:left; border:1px solid #ddd">';  ctxt += '<div style = "float:left; clear:both; margin-left:15px;"><img src = "'+filename+'" width = "80" /></div>';  ctxt += '<div style = "float:left;  clear:both; font-size:10px; width:120px;  text-align:center;">';  ctxt += '<div style = "clear:both; padding-top:2px; width:100%; color:#555; height:20px; border:1px solid #f9f9f9; border-top:0px; ">'+this.contentname[l]+'</div>';  switch(this.currenttype){  case "Parent":  break;  default:  ctxt += '<div style = "background-image:url(\'http://s3.amazonaws.com/ldimages/bg8.gif\'); clear:both;padding-top:2px; cursor:pointer; width:100%; height:20px;   color:#aa0000;" onclick = "glazer.deleteObject('+l+')">Delete</div>';  }  ctxt += '</div>';  ctxt +='</div>';  ctxt +='</div>';  }  }  ctxt +='</div>';  cobj.innerHTML = ctxt;  switch(this.currenttype){  case "Photos": eventEditor.setPhotos();break;  case "Players":   case "Coaches":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/geteventstats_'+this.currenttype+'_'+uEvent.currenttype+'/'+this.eventname+',_,_'+uEvent.currentuser+',_'+uEvent.curevent); break;  case "Participants":  params.uimg = glazer.contentfiles;  params.id = glazer.contentid;  params.usr = glazer.contentname;  eventEditor.setParticipants();  break;  case "Opponent":   eventEditor.opponent['img'] = glazer.contentfiles[0];  eventEditor.opponent['usr'] = glazer.contentname;  eventEditor.opponent['id'] = glazer.contentid;  eventEditor.resetOpponent();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/geteventstats_Teams_'+uEvent.currenttype+'/'+this.eventname+',_,_'+uEvent.currentuser+',_'+uEvent.curevent);   break;  case "Parent":  eventEditor.evparent['img'] = glazer.contentfiles;  eventEditor.evparent['usr'] = glazer.contentname;  eventEditor.evparent['id'] = glazer.contentid;  eventEditor.resetParent();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/geteventstats_Teams_'+uEvent.currenttype+'/'+this.eventname+',_,_'+uEvent.currentuser+',_'+uEvent.curevent);   break;  }    };    this.deleteObject = function(l){  switch(this.currenttype){  case "Photos":  objectid = this.contentfiles[l];  break;  default:  objectid = this.contentid[l];  }  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deleteeventimage_'+this.currenttype+'/'+this.eventname+',_'+objectid+',_'+mySeason.currentseason);  };    this.selectObject = function(l, cobj){  switch(this.currenttype){  case "Photos":  objectid = this.sidefiles[l];  break;  default:  objectid = this.userid[l];  }  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/addeventimage_'+this.currenttype+'/'+this.eventname+',_'+objectid+',_'+mySeason.currentseason);  };      this.sidePrinter = function(l, cborder){  txt = "";  commandtype = (this.glazetype == "Image") ? "changePicture" : "selectObject";  if(this.userid[l] != ""){  txt +='<div id = "'+this.sidefiles[l]+'_obj" style = "width:110px; margin:9px; cursor:pointer; '+cborder+'" ';  if(this.userid[l] != "adduser")  txt +=' onclick = "glazer.'+commandtype+'(\''+l+'\', this)" ';  txt +='> ';  txt += '<img id = "img_'+l+'" src = "http://s3.amazonaws.com/ldimages/spacer.gif" width = "100" style = " margin:5px;" />';  txt +='</div>';  if(this.glazetype == "Selector"){  txt +='<div style = "width:110px; clear:both margin:9px; color:#000099; text-decoration:underline; text-align:center; font-size:10px; cursor:pointer; ';  txt +='" ';  if(this.userid[l] != "adduser")  txt +=' onclick = "glazer.'+commandtype+'(\''+l+'\')" ';  txt += ' id = "user_'+l+'"> ';  txt +='</div>';  }  }  return txt;  };    this.setSideImgs = function(start, end){  switch(this.currenttype){  case "Photos":  cobj = this.sidefiles;  break;  default:  cobj = this.userid;  }  for(c = start; c < end; c++){  if(cobj[c] != "")  this.setImgSrc(c);  }  };    this.setImgFileName = function(ufile){  if(ufile != "none")  filename = upldDir+ufile;  else  filename = "http://s3.amazonaws.com/ldimages/noimage.gif";  return filename;  };    this.selectInput = function(){  ninput = document.getElementById('nameinput').value;  einput = document.getElementById('emailinput').value;  ninput = ninput.replace(/,/g, '');  einput = einput.replace(/,/g, '');  objectid = ninput+",_"+einput;  if(validate.validEmail(einput)){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/addeventimage_'+this.currenttype+'_userentry/'+this.eventname+",_"+objectid+',_'+mySeason.currentseason);  }  else  alert('You entered an invalid email address');  };    this.setAdder = function (){  xtxt = "";  xtxt +='<div style = "clear:both; width:160px;">';  xtxt += '<div style = "clear:both; padding-top:5px;padding-left:20px;">';  xtxt +='<input id = "nameinput" type = "text" style = "width:120px; font-size:10px;" value = "NAME"/>';  xtxt +='</div>';  xtxt += '<div style = "clear:both; padding-top:5px; padding-left:20px;">';  xtxt +='<input id = "emailinput" type = "text" style = "width:120px; font-size:10px;" value = "EMAIL"/>';  xtxt +='</div>';  xtxt += '<div onclick = "glazer.selectInput()" style = "clear:both; height:15px; text-align:center; color:#0000aa; text-decoration:underline; width:inherit; padding-top:5px;">';  switch(this.currenttype){  case "Coaches": xtxt +='Add Coach'; break;  case "Players": xtxt +='Add Player'; break;  case "Parent": xtxt +='Change Opponent'; break;  case "Opponent": xtxt +='Add Opponent'; break;  }  xtxt +='</div>';  xtxt +='</div>';  return xtxt;  };    this.setImgSrc = function(c){  cimg = document.getElementById('img_'+c);  currentuser = document.getElementById('user_'+c);  filename = this.setImgFileName(this.sidefiles[c]);  if(currentSection != "Videos" && currentSubsection != "View_Videos")  cimg.src = filename;  else  cimg.src = filename+'.png';  if(this.glazetype == "Selector"){  if(this.userid[c] == "adduser")  currentuser.innerHTML = this.setAdder();  else{  switch(this.currenttype){  case "Parent":  switch(account){  case "Team": title = 'Add My Team'; break;  default: title = "Add Me";  }  currentuser.innerHTML = title;  break;  default:  currentuser.innerHTML = 'Add '+this.user[c];  }  }  }  };    this.changePicture = function(val, cobj){  temppic = params.currentPic;  params.currentPic = this.sidefiles[val];  cobj.style.border = "1px solid #0033ff";  cobj.style.background = "#fff";  this.previousobj = document.getElementById(temppic+'_obj');  if(this.previousobj != null && this.previousobj != cobj){  this.previousobj.style.border = "1px solid #ccc";  this.previousobj.style.background = "#ccc";  this.display();  }    };    this.showRating = function(val){  for(i = 0; i < 5; i++){  if (i >= val)  window.frames[1].document.getElementById('star_'+i).src = 'http://s3.amazonaws.com/ldimages/star1.gif';  else  window.frames[1].document.getElementById('star_'+i).src = 'http://s3.amazonaws.com/ldimages/star.gif';  }  };    this.showGlazeInfo = function(){  myTimer.queuePush('setMini_setGlazeInfo');  myTimer.queuePush("fadefull");  };    this.init = function(){  this.start = true;  this.h = (this.windowheight -100);  this.w =(this.windowwidth-340);  myLarge.displayLargeDisplay(this.windowwidth, this.windowheight);  };    this.display = function(commandtype, selection){    if(commandtype != null){  this.counter = 1;  this.imgstart = 0;  this.moreload = false;  this.sidefiles = new Array();  this.userid = new Array();  this.user = new Array();  this.currenttype = "";  this.start = true;  }  else  commandtype = "";  switch(commandtype){  case "":  clink = (currentLink != "MEMBERS") ? currentSubsection.replace(/View_/g, '') : currentSection;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/initglazeimage_'+clink+'/'+params.curuid+',_'+params.currentPic);  this.glazetype = "Image";  break;  default:    myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/'+commandtype+'_'+selection+'/'+mySeason.currentseason);  this.glazetype = "Selector";  this.currenttype = selection;  this.eventname = eventEditor.eventname;  }  };    this.changeWindow = function(location, cobj){    cobj.style.border = "2px solid #0066ff";  cobj.style.background = "#fff";  if(this.previousobj != ""){  this.previousobj.style.background  }  params.currentId = location;  this.setContent();  this.previousobj = cobj;  };    this.sayHI = function(){  alert('HI');  };    this.setNav = function(title, img, param){  xt = "";  xt += '<div id = "cur_'+param+'" title= "'+title+'" style = "cursor:pointer; background-image:url(\'http://s3.amazonaws.com/ldimages/'+img+'\'); margin:5px; border:1px solid #ddd; width:40px; height:40px; ';  if(params.currentId == param)  xt += 'border:2px solid #0066ff;';  xt +='" onclick = "glazer.changeWindow(\''+param+'\', this)"></div>';  return xt;  };    this.setRating = function(trate){  if(state != 0){  msection = currentSubsection.replace(/View_/g, '');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/frate/'+params.currentPic+',_'+(trate+1)+',_'+msection);  }  else  alert("You must sign in before you can perform this action");  };    this.displayImgRate = function(urate){  clearimg = 'url("'+clearRateImg.src+'")';  coloredimg = 'url("'+coloredRateImg.src+'")';  if(this.currate != urate){  for(s = 0; s < 5; s++){  obj = document.getElementById('rateimg_'+s);  dimg = obj.style;  if(s <= urate)  dimg.backgroundImage = coloredimg;  else  dimg.backgroundImage = clearimg;  }  }  this.currate = urate;  };    this.clearImgRate = function(){  this.currate = 7;  document.getElementById('uimagerate').innerHTML = this.getRateContent() ;  };    this.getRateContent = function(){  ntxt = '';  cimg = '';  for(m = 0; m < 5; m++){  if(this.urate > 0 && this.urate > m){  cimg = coloredRateImg.src;  }  else  cimg = clearRateImg.src;  ntxt +='<div id = "rateimg_'+m+'" style = "float:left; padding-right:10px; cursor:pointer; width:20px; height:20px; background-image:url(\''+cimg+'\'); background-repeat:no-repeat; " onclick = "glazer.setRating('+m+')" onmouseover = "glazer.displayImgRate('+m+')"  onmouseout = "glazer.clearImgRate()"></div>';  }  return ntxt;  };    this.setUserRate = function(){  ztxt = "";  ztxt +='<div id = "uimagerate" style = "float:left; padding:5px; padding-left:0px; width:150px; height:20px;" >';  ztxt += this.getRateContent();  ztxt +='</div>';  return ztxt;  };    this.resetRating = function(frate, urate){  this.rating = frate;  this.urate = urate;  this.clearImgRate();  document.getElementById('ufilerating').innerHTML = this.getFileRating();  myLarge.removeGlaze();  stoptheload();  cid = params.currentId.substr(0, params.currentId.length - 1);  alert("You rated this "+cid.toLowerCase()+": "+this.urate+" stars.");  };    this.getFileRating = function(){  mtxt = '';  mtxt +='<div style = "padding:5px; padding-left:0px; ">';  crate = this.rating-1;  for(s = 0; s < 5; s++){  if(crate >= 0 && crate >= s){  mtxt +='<div style = "float:left; margin-right:10px; width:20px; height:20px; background-image:url(\''+coloredRateImg.src+'\')"></div>';  }  else if(crate >= 0 && crate+0.5 == s){  mtxt +='<div style = "float:left; margin-right:10px; width:20px; height:20px; background-image:url(\''+halfColoredRateImg.src+'\')"></div>';  }  else  mtxt +='<div style = "float:left; margin-right:10px; width:20px; height:20px; background-image:url(\''+clearRateImg.src+'\')"></div>';  }  mtxt +='</div>';  return mtxt;  };    this.setImgRating = function(){  rtxt = "";  rtxt +=  '<div id = "ufilerating" style = "clear:both; height:40px; padding-top:10px; ">';  rtxt +=this.getFileRating();  rtxt += '</div>';  return rtxt;  };    this.setImg = function(cheight, objwidth, cwidth){  rtxt = '';  rtxt += '<div style = "clear:both; float:left; padding-top:10px; width:'+(objwidth)+'px; border:1px solid #ccc; height:'+(cheight + 10)+'px; text-align:center; "><img src = "'+curImg.src+'" height = '+cheight+' style = "margin-left:auto; margin-right:auto; width:'+cwidth+'px " />';  rtxt += '</div>';  return rtxt;  };    this.setFileEditor = function(value){  this.setEditField(this.objwidth, this.title, value, 'Edit');  };    this.callCommand = function(type, name, id, objwidth){  cvalue = document.getElementById(id).value;  this.objwidth = objwidth;  this.title = name;  cvalue = cvalue.replace(/,_/g, ', ');  msection = currentSubsection.replace(/View_/g, '');  if(state != 0){  if(cvalue != ""){  switch(type){  case "Submit":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/fedit_'+name+'/'+params.currentPic+',_'+cvalue+'/setfileeditor');  break;  case "Submit_Comment":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/fcomment/'+params.currentPic+',_'+cvalue+',_'+msection);  break;  }  }  }  else  alert("You must sign in before you can perfom this action.");  };    this.getFEditContent = function(objwidth, title, value, type){  value = value.replace(/_/g, ' ');  value = value.replace(/<br\s\/>/g, '\r');  value = value.replace(/"/g, '&quot;');  pvalue = value.replace(/'/g, "\\'");  switch(type){  case "Submit":  xtxt = '<input id = "curedit_'+title+'" type = "text" style = "float:left; width:'+(objwidth-198)+'px; background:#fff; font-size:10px; padding-right:15px;" value = "'+value+'">';  xtxt += '<div style = "padding-left:15px; float:left; width:60px; color:#0033ff; font-weight:bold; cursor:pointer" onclick = "glazer.callCommand(\'Submit\', \''+title+'\', \'curedit_'+title+'\', '+objwidth+')">Submit</div>';  break;  case "Edit":  xtxt = '<input type = "text" style = "float:left; width:'+(objwidth-198)+'px; background:#fff; font-size:10px; padding-right:15px; border:1px solid #fff" value = "'+value+'" disabled >';  xtxt +='<div style = "padding-left:15px; float:left; width:60px; color:#0033ff; font-weight:bold; cursor:pointer" onclick = "glazer.setEditField('+objwidth+', \''+title+'\', \''+pvalue+'\', \'Submit\')">Edit</div>';  break;  }  return xtxt;  };    this.setEditField = function(objwidth, title, value, type){  objname = title+"_id";  obj = document.getElementById(objname);  vtxt = this.getFEditContent(objwidth, title, value, type);  obj.innerHTML = vtxt;  cobj = document.getElementById('curedit');  if(cobj != null)  cobj.focus();  };    this.setFileRow = function(objwidth, title, value, editable){  wrd = title.replace(/_/g, ' ');  vtxt = '';  vtxt +='<div style = "width:'+objwidth+'px; padding-bottom:5px; clear:both;">';  vtxt +='<div style = "padding-top:5px; font-size:10px; ">';  vtxt +='<div style = "float:left; font-weight:bold; width: 100px; color:#333; ">'+wrd+'</div>';  if(currentLink != "HOME" || !editable){  if(editable)  value = value.replace(/_/g, ' ');  vtxt +='<div style = "float:left; width:'+(objwidth-100)+'px;">'+value+'</div>';  }  else{  vtxt +='<div id = "'+title+'_id" style = "float:left;">';  vtxt += this.getFEditContent(objwidth, title, value, 'Edit');  vtxt +='</div>';  }  vtxt +='</div>';  vtxt += '</div>';  return vtxt;  };      this.setFileInfo = function(objwidth){  rtxt = '';  ratetxt = 'Rate_'+params.currentId.substring(0, params.currentId.length-1);   rtxt += '<div style = "clear:both; padding-top:10px; ">';  rtxt +=this.setFileRow(objwidth, 'File_Title', this.filename, true);  rtxt +=this.setFileRow(objwidth, 'Description', this.description, true);  rtxt += this.setFileRow(objwidth, '<div style = "padding-top:8px;">'+ratetxt+'</div>', this.setUserRate(), false);  rtxt += '</div>';  return rtxt;  };    this.startComment = function(cwidth){  cobj = document.getElementById('ucomment');  if(cobj.style.display == "none"){  cobj.style.display = 'block';  rtxt = '';  rtxt += '<textarea id = "curtextarea" style = "width:'+(cwidth-26)+'px; height:100px; background:#eee" ></textarea>';  rtxt +='<div style = "clear:both; font-size:10px; float:left; margin-top:5px; width:'+(cwidth-26)+'px;">';  rtxt +='<div style = "float:right; color:#0033cc; font-weight:bold; margin-right:5px; cursor:pointer; " onclick = "glazer.callCommand(\'Submit_Comment\', \'Comment\', \'curtextarea\', '+cwidth+')">Submit Comment</div>';  rtxt +='</div>';  cobj.innerHTML = rtxt;  }  };    this.displayCommentLink = function(objwidth){  rtxt = '';  rtxt += '<div style = "width:'+objwidth+'px; clear:both; padding-top:5px;">';  rtxt +='<div style= "float:left; clear:both;  color:#0033cc; font-size:10px; font-weight:bold; cursor:pointer; " onclick = "glazer.startComment('+objwidth+')">Post A Comment';  rtxt +='</div>';  rtxt +='<div id = "ucomment" style = "display:none; float:left; margin-top:10px; border:1px solid #aaa; width:'+(objwidth-20)+'px; height:130px; background:#eee;">';  rtxt +='</div>';  rtxt += '</div>';  return rtxt;  };    this.resetComments = function(){  document.getElementById('commentlist').innerHTML = this.setComments(this.objwidth);  document.getElementById("ucomment").style.display = "none";  myLarge.removeGlaze();  stoptheload();  };    this.deleteComment = function(fid){  msection = currentSubsection.replace(/View_/g, '');  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deletecomment/'+params.currentPic+',_'+fid+',_'+msection);  };    this.displayComment = function(objwidth, usr_comment, user, fid, cimg){  usr_comment = usr_comment.replace(/_/g, ' ');  uarray = user.split('||');  vtxt = '';  if(uarray.length > 1){  acc = uarray[0];  usr_name = uarray[1];  sport = uarray[2];  username = uarray[3];  imgurl = (cimg == "none") ? "http://s3.amazonaws.com/ldimages/noimage.gif" : upldDir+cimg;  clickinfo = 'onclick = "lockerLink(\''+sport+'\', \''+username+'\', \''+acc+'\', \''+usr_name+'\')"';  deleteinfo = 'onclick = "glazer.deleteComment(\''+fid+'\')"';  usr_name = usr_name.replace(/_/g, ' ');  vtxt += '<div style = "padding-bottom:15px;">';  vtxt += '<div style = "width:'+(objwidth-42)+'px; padding:10px; background:#eee; border:1px solid #bbb; ">';  vtxt +='<div style = "float:left; width:80px; padding-top:3px; padding-left:3px; border:1px solid #aaa;"><img src = "'+imgurl+'" width = "74"><div style = "clear:both"></div></div>';  vtxt +='<div style = "float:left; font-size:10px; padding:10px;  width:'+(objwidth-185)+'px; padding-top:0px; ">';  vtxt +='<div style = "float:left;">';  vtxt +='<div style = "height:20px; clear:both; width:'+(objwidth-195)+'px;">';  vtxt +='<div style = "float:left; font-weight:bold; color:#0033cc; cursor:pointer; text-decoration:underline; " '+clickinfo+'>'+usr_name+'</div>';  if(currentLink == "HOME" || isSameUser(user, '||'))  vtxt +='<div style = "float:right; padding:1px; padding-left:10px; padding-right:10px; border:1px solid #fff; border-right:2px solid #ccc; border-bottom:2px solid #ccc; cursor:pointer; color:#777" '+deleteinfo+'>Delete</div>';  vtxt +='</div>';  vtxt +='<div style = "color:#000; clear:both;">'+usr_comment+'</div>';  vtxt += '</div>';  vtxt +='</div>';  vtxt +='<div style = "clear:both"></div>';  vtxt +='</div>';  vtxt +='</div>';  }  return vtxt;  };    this.setComments = function(objwidth){  numcomments = params.filecomment.length - 1;  if(numcomments < 0) numcomments = 0;  ntxt = '';  ntxt += '<div style = "width:'+objwidth+'px; clear:both; padding-top:10px; padding-bottom:10px; font-size:10px;">';  ntxt +='<div style = "clear:both; font-weight:bold;">Comments ('+numcomments+')</div>';  ntxt += '</div>';  for(y = 0; y < numcomments; y++){  ntxt += this.displayComment(objwidth, params.filecomment[y], params.fileuser[y], params.filecommentid[y], params.filecommentimg[y]);  }  return ntxt;  };    this.displayCommentList = function(objwidth){  rtxt = '';    rtxt +='<div id = "commentlist" style = "clear:both; float:left;">';  rtxt +=this.setComments(objwidth);  rtxt += '</div>';  return rtxt;  };    this.initImg = function(type){  if(upldDir == "/usr/uploads/")  filename = upldDir+params.currentPic;  else  filename = upldDir+'large_'+params.currentPic;  if(!this.setHeight(filename) && type == "Photos")  myTimer.queuePush('initimg_'+type);  else{  cwidth = (curImg.width/curImg.height) * this.h;  ctxt = '<form action = "" onsubmit="event.returnValue = false; return false;"';  ctxt +=' method="post" style = " float:left;" target="midbox">';  ctxt += this.setImgRating();  switch(type){  case "Photos":  ctxt +=this.setImg(this.h, (this.windowwidth-272), cwidth);  break;  case "Videos":  ctxt +=this.setVideo(360, (this.windowwidth-272), 480);  break;  }  ctxt +=this.setFileInfo((this.windowwidth-272));  ctxt += this.displayCommentLink((this.windowwidth-272));  ctxt += this.displayCommentList((this.windowwidth-272));  ctxt += '</form>';  document.getElementById('glazercontent').innerHTML = ctxt;  if(type == "Videos"){  flowplayer("player", "UI/flash/flowplayer-3.1.0.swf",  {   clip: {   autoPlay: false,    autoBuffering: true  }   });  }  }  };    this.setVideo = function(cheight, objwidth, cwidth){  cflv = 'http://s3.amazonaws.com/ldvideos/'+params.currentPic+'.flv';  cimg = 'http://s3.amazonaws.com/ldimages/splash.jpg';    btxt = '<div style = "width:'+objwidth+'px; float:right; height:'+cheight+'px; text-align:center;">';  btxt += '<a  href="'+cflv+'" id= "player" ';  btxt += 'style="display:block;  margin-left:auto; margin-right:auto; border:0px; width:'+cwidth+'px; height:'+cheight+'px;" >';  btxt += '</a> ';  btxt += '</div>';  return btxt;  };    this.showVideo = function(cid){  w = (this.windowwidth);    h = (this.windowheight-140);   tw = (w-340);  cflv = 'http://s3.amazonaws.com/ldvideos/'+params.currentPic+'.flv';  cimg = 'http://s3.amazonaws.com/ldimages/splash.jpg';    curwidth = midWidth-200;  if(curwidth >= 700){ cwidth = "480px"; cheight = "360px"; }  else{ cwidth = "380px"; cheight = "260px"; }    xtxt = '<div style = "width:'+tw+'px; float:right; height:'+h+'px; text-align:center; margin: 5px auto;">';  xtxt += '<a  href="'+cflv+'" id="'+cid+'" ';  xtxt += 'style="display:block; float:right;  margin-right:20px; border:0px; width:'+cwidth+'; height:'+cheight+';" >';  xtxt += '</a> ';  xtxt += '</div>';    document.getElementById('glazercontent').innerHTML = xtxt;  };    this.setContent = function(){  switch(this.glazetype){  case "Image":  this.initImg(params.currentId);  break;  default:  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/seteventimages_'+thecommand[1]+'/'+this.eventname);  }  };    this.initContent = function(){  txt = "";  cheight = this.windowheight - 28;  txt += '<div id="glazercontent" style= "font-family:arial; width:'+(this.windowwidth-160)+'px; padding-left:5px; float:left; height:'+(cheight)+'px; background:#fff; overflow-x:hidden; overflow-y:auto; "></div>';  txt += '<div id= "glazerselection" style="width:150px; float:left; height:'+(cheight)+'px; overflow-x:hidden; overflow-y:scroll;background:#eee; border-left:1px solid #999;"><div id = "sideimgs"></div></div>';    return txt;  };    }  var glazer = new Glaze();   function MiniBox(){  this.width = new Array(2);  this.height = new Array(2);  this.left = new Array(2);  this.top = new Array(2);  this.visible = new Array(2);  this.defaultSpeed = new Array(2);  this.width['minibox'] =  this.width['minibox2'] = this.width['minibox3'] = 0;  this.height['minibox'] =  this.height['minibox2'] = this.height['minibox3'] = 0;  this.left['minibox'] = 0;  this.top['minibox'] = 0;  this.left['minibox2'] = 0;  this.top['minibox2'] = 0;  this.previousTopTab = "";  this.visible['minibox'] = false;  this.visible['minibox2'] = false;  this.visible['minibox3'] = false;  this.defaultSpeed['minibox'] = 20;  this.currentTopTab = "";  this.extraparams = "";  this.deflinkbg = "#111111";  this.showCloseInfo = "";      this.printDefaultMini = function(){  txt = "";  txt += ('<div style = "z-index:101; overflow:hidden; background:#FFFFFF; display:none; position:absolute; height:0px; width:0px; left:'+(winWidth/2)+'px; top:'+(winHeight/2)+'px;" id = "minibox" >');  txt += ('<div id = "minicontent" style = "width:auto;height:auto;">');  txt += ('</div>');  txt += ('</div>');  txt += ('<div style = "z-index:101; background-image:url(\'http://s3.amazonaws.com/ldimages/imgmini2.gif\'); display:none;  top:0px; left:0px; position:absolute; height:0px; width:0px;" name = "minibox2" id = "minibox2" >');    txt += ('<div id = "mini2content" style = " width:auto;height:auto;">');  txt += ('</div>');  txt += ('</div>');  txt += ('<div style = "z-index:101; background:#888; display:none; top:0px; left:0px; position:absolute; border-right:1px solid #444; height:0px; width:0px;" name = "minibox3" id = "minibox3" >');  txt += ('<div id = "mini3content" style = "width:auto;height:auto;">');  txt += ('</div>');  txt += ('</div>');  return txt;  };      this.changeMini = function(id, param, command, nextlink){    this.setCurrentTab(id.id);  cval = param.split('/');  switch(cval[0]){  case "filterwindowcontent":  myMini.currentTopTab = command;  retval = params.psports[params.spindex]+",_"+myMini.currentTopTab+',_';  myFilterWindow.setFilterList();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/getMainFilter/'+retval);  break;  case "showAccounts":  this.defaultSpeed['minibox'] = 10;  uReg.showSignUpOptions(command);  break;  case "showAccounts2":  uReg.currentReg = id.id;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/gettheaccounts_2/'+uReg.currentReg);  break;  case "Sign in":  this.defaultSpeed['minibox'] = 10;  myTimer.queuePush("signin_400/250");  break;  case "defaultFiles":  this.defaultSpeed['minibox'] = 10;  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/file_setup/"+id.id);  break;  case "Save":  break;  case "Save and Continue":  myTimer.queuePush('setMini_setFiles/'+nextlink);  break;  case "showGlaze":  for(c = 0; c < params.group.length; c++){  if(params.eventcategory[c] == id.id){  params.currentId = params.group[c];  break;  }  }  myTimer.queuePush('setMini_updateGlaze');  myTimer.queuePush("pause_10/1");  myTimer.queuePush("fadefull");  break;  case "accountcategories":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/account_setup/'+accountInfo.selection+', '+command + this.extraparams);  this.extraparams = "";  break;  case "eventadd":   myTimer.queuePush("setMini_eventadd");  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/event_display/'+command+', '+myEvents.currentEvent);  break;  case "Save and Finish":  this.cMini('minibox');  break;  }  };    this.initMini = function(thecontent){  signin = false;  blender.changeOpac(0, "hider" );  this.setContent('minicontent', thecontent, "topClose");  myTimer.queuePush("fadefull");  };    this.removeBorder = function(id){  if(id != this.previousTopTab)  id.style.border = "1px solid #AAAAAA";  };    this.setCurrentTab = function(tab){  thetab = document.getElementById(tab);   this.setClicked(thetab);  this.previousTopTab = tab;  };    this.setClicked =  function(obj){  obj.style.background = this.deflinkbg;  obj.style.color = "#fff";  if(this.previousTopTab != "" && this.previousTopTab != null){  ptab = document.getElementById(this.previousTopTab);  ptab.style.background = "#fff";  ptab.style.color = "#000";  ptab.style.border = "1px solid #AAAAAA";  }  };    this.drawBorder = function(id){  if(id != this.previousTopTab)  id.style.border = "1px solid #111111";  };    this.setContent = function(id, content, param, info, rightlinks, closeit){  txt = "";  switch(id){  case "minicontent":  theinvisible = '<div id = "hider" style = "float:left">';  theinvisible += content;  theinvisible += '</div>';  if(param != null){  txt = this.drawTopClose();  txt += theinvisible;  }  break;  case "mini2content":  thetxt =  "";  thenextlink = null;  if(content.length > 0){  thetxt += '<div style = "float:left;">';  thetxt += '<div style = "float:left; margin-left:5px; color:#111111; font-weight:bold; margin-top:10px; margin-right:15px; font-size:12px; ">'+info+'</div>';  for(i = 0; i < content.length; i++){  theword = content[i].split('_').join(' ');  thewords = theword.split('(M)');  if((thewords.length > 1 && state != 0) || thewords.length <= 1){  thetxt +='<div style = "border:1px solid #AAAAAA; float:left; margin:5px; margin-bottom: 10px; margin-top: 10px; padding-left:17px; background:#fff; padding-right:17px; font-size:12px; cursor:pointer;';  if(content[i] == this.currentTopTab){  thetxt += 'background:'+this.deflinkbg+'; color:#FFFFFF; border: 1px solid '+this.deflinkbg;  thenextlink = 0;  if(i < content.length - 1)  thenextlink = content[i+1];  }  thetxt += '" onmouseout = "myMini.removeBorder(this)" onmouseover = "myMini.drawBorder(this)" id = "'+content[i]+'" onclick = "myMini.changeMini(this, \''+param+'\', \''+content[i]+'\')">';  thetxt +=thewords[0];  thetxt +='</div>';  }  }  /*if(closeit)  thetxt += '<div style = "float:right; margin:10px; margin-right:20px; width:15px; cursor:pointer; height:15px; border:1px solid #AAAAAA;" onclick = "myMini.cMini(\'minibox2\')"></div>';*/  linklength = rightlinks.length;  thenextlink = (thenextlink == null) ? "null" : "\'"+thenextlink+"\'";  if(linklength > 0){  for(j = 0; j < linklength; j++){  theword = rightlinks[j].split('_').join(' ');  thetxt += '<div style = "margin-right:15px ;border:1px solid #AAAAAA; float:right; margin:5px; margin-bottom: 10px; margin-top: 10px; padding-left:17px; background:#fff; padding-right:17px; font-size:12px; cursor:pointer;" onmouseout = "myMini.removeBorder(this)" onmouseover = "myMini.drawBorder(this)" id = "'+rightlinks[j]+'" onclick = "myMini.changeMini(this, \''+rightlinks[j]+'\', \''+rightlinks[j]+'\', '+thenextlink+')">'+theword+'</div>';  }  }  thetxt += '</div>';  txt += thetxt;  }  break;  case "mini3content":  txt = '<div style = "float:left">';  txt += content;  txt += '</div>';  break;  }  document.getElementById(id).innerHTML = txt;  stoptheload();  };    this.showMini = function(id, thewidth, theheight, savecontent){  cobject = document.getElementById(id);  themini = cobject.style;  switch(id){  case "minibox":  themini.display = "none";  thetop = (winHeight/2 - (theheight/2)) + "px";  theleft = (winWidth/2 - (thewidth/2)) + "px";  this.width[id] = thewidth;  this.height[id] = theheight;  this.top[id] = thetop;  this.left[id] = theleft;  mini = themini;  mini.width = (this.width[id])+ "px";  mini.height = (this.height[id]) + "px";  mini.top = thetop;  mini.left = theleft;  mini.background = "#f9f9f9";  if(savecontent == null || !savecontent)  document.getElementById("minicontent").innerHTML = "";  mini.display = "block";  break;  case "minibox2":  this.width[id] = thewidth;  this.height[id] = theheight;  myTimer.tempborder = "0px";  myTimer.bottomBorder = "3px solid #329DD8";  themini.display = "block";  themini.left ="0px";  themini.top= "0px";  themini.borderBottom= "3px solid #0099CC";  this.top[id] = 0;  this.left[id] = 0;  expander.expandImage(id, thewidth, 0, thewidth, theheight, this.left[id], this.top[id], 'default', 4, "menudropdown");  break;  case "minibox3":  this.width[id] = thewidth;  this.height[id] = theheight;  themini.display = "block";  themini.left = (this.left['minibox'] +5) + "px";  themini.top= (this.top['minibox'] + 26) + "px";  expander.expandImage(id, 0, theheight, thewidth, theheight, (this.left['minibox'] +5), (this.top['minibox'] + 26), 'default', 4, "menudropdown");  break;  }  this.visible[id] = true;  AJAX.ldRemove();  dothefade = false;  };    this.drawTopClose = function(){  txt = "";  txt += '<div style = "width:inherit; height:25px; background-image:url(\'http://s3.amazonaws.com/ldimages/imgmini2.gif\'); border-bottom:1px solid #DDDDDD;">';  txt += '<div style = "float:right; cursor:pointer; margin-right:10px;  margin-top:2px; width:35px; height:20px; background-image:url(\'http://s3.amazonaws.com/ldimages/bg_close.gif\')" onclick = "myMini.cMini(\'minibox\')"></div>';  txt += '<div id = "closeinfo" style = "float:left; padding-top:5px; margin-left:10px; font-weight:bold color:#444">';  if(this.showCloseInfo != "")  txt += this.showCloseInfo;  txt += '</div>';  txt += '<div style = " padding-top:5px; float:right; font-weight:bold; font-size:12px; letter-spacing:2px; color:#777; margin-right:5px;"></div>';  txt += '</div>';  this.showCloseInfo = "";  return txt ;  };    this.resetMiniVars = function(id){  switch(id){  case "minibox":  showload = true;  this.defaultSpeed[id] = 20;  break;  }  this.width[id] = 0;  this.height[id] = 0;  this.visible[id] = false;  };    this.setBoxSize = function(id, thewidth, theheight, thetop, theleft){  try{  thebox = document.getElementById(id).style;  thebox.width = thewidth + "px";  thebox.height = theheight + "px";  thebox.top = thetop + "px";  thebox.left = theleft + "px";  }catch(e){}  };    this.cMini = function(id){  myTimer.queuePush('closeMini_'+id);  };    this.closeMini = function(id){  switch(id){  case "minibox":  if(this.visible['minibox2'])  this.closeMini('minibox2');  myTimer.queuePush("pause_10/1");  myTimer.queuePush('resetMini_minibox');  divid = Math.round(this.height['minibox']/3);  dl = Math.round(divid/2);  myMini.top['minibox'] += dl;  myMini.left['minibox'] += dl;  this.width['minibox'] -= divid;  this.height['minibox'] -= divid;  this.defaultSpeed[id] += Math.round(dl/3);  myTimer.queuePush('terminateMini');  myLarge.closeLarge();  uReg.displayingReg = null;  uReg.currentReg = null;  break;  case "minibox2":  if(this.visible['minibox3'])  this.closeMini('minibox3');  myTimer.queuePush('resetMini_minibox2');  myTimer.queuePush("pause_10/1");  expander.expandImage(id, this.width['minibox2'], this.height['minibox2'], this.width['minibox2'], 0,  0, 0,  'default', 4, "menudropdown");  break;  case "minibox3":  myTimer.queuePush('resetMini_minibox3');  myTimer.queuePush("pause_10/1");  expander.expandImage(id, this.width['minibox3'], this.height['minibox3'], 0, this.height['minibox3'],  0, 0,  'default', 4, "menudropdown");  break;  }  myTimer.queuePush('remove_'+id);  this.resetMiniVars(id);  dothefade = true;  };      this.resetContent = function(){  this.miniTopTabs = new Array();  this.resetMinibox();  this.resetMinibox2();  };      this.callMiniTopTab = function(i){  myMini.currentMiniTop = this.miniTopTabs[i];  window.parent.myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/file_setup/'+this.miniTopTabs[i]);  };      this.resetMinibox = function(){  document.getElementById('minicontent').innerHTML = "";  };      this.resetMinibox2 = function(){  document.getElementById('mini2content').innerHTML = "";  };      this.resetMinibox3 = function(){  document.getElementById('mini3content').innerHTML = "";  };    }    var myMini = new MiniBox(); function Middle (){    this.info = "";  this.start = false;  this.temphash = "";  this.firstpage = true;  this.urllist = new Array();    Middle.prototype.toString = function() {      return this.printDefaultMiddle();  };    this.resetMid = function(){  try{myRollOverBox.removeRollOverBox();} catch (e){}  try{myRollOverBox.removeRollOverClickBox();} catch (e){}  };    this.resize = function(){   mids = document.getElementById('midboxcontent').style;  mids.height = midHeight+'px';  mids.width =(defWidth)+'px';  };    this.initializeMidbox = function(){  UI.setHash();  if(IE)  UI.iepageinit();  else  UI.initializeChild();  };    this.removeBoxes = function(){  try{  if(contentTabs.viewOptions && !contentTabs.onOptions)  contentTabs.removeOptions();  }catch(e){}  };    this.printDefaultMiddle = function (){  dtxt = '';  dtxt += '<div id = "midboxcontent" style = "clear:both; height:'+midHeight+'px; width:'+(defWidth-5)+'px; background:#555; overflow:auto; clear:both; background-repeat:no-repeat; background-position:center;"></div>';  return dtxt;  };    }    var middle = new Middle();   function TopLinks () {    this.previous_toplink = "";  this.deflinks = new Array("HOME");  this.links = new Array("HOME");  this.currentSection = "";  this.defaultnumoflinks = this.links.length;  this.numlinks = this.links.length;  this.commandlist = new Array();  this.currentlink = "";    TopLinks.prototype.toString = function() {      return this.setDefLinks();  };    this.setDefLinks = function(){  txt = '';  txt +='<div id ="top_links" style = "clear:both; float:left; background:#555; height:82px; width:100%;"></div>';  return txt;  };    this.callAction = function(caction, callink){  if(callink){  switch(caction){  case "Sign_in":  myTimer.queuePush('signin_400/250');  break;  case "Register":  uReg.startRegistration('Player', "default");  break;  case "Sign_out":  signout();  break;  }  }  else{  if(window.opener != null)   window.location = "/";  else  newwindow=window.open("/", "ldmain");  }  };    this.setActionLink = function(title, callink){  vtxt = '';  wrd = title.replace(/_/g, ' ');  if(callink){  calltxt = "true";  txtbg = 'background-image:url(\'http://s3.amazonaws.com/ldimages/'+designdescription+'_circle.gif\'); ';  txtpd = "padding-right:0px; ";  }  else{  calltxt = "false";  txtbg = "";  txtpd = "padding-right:10px; ";  }  vtxt += '<div style = "float:right;padding:4px; font-size:11px; margin:4px; color:'+toptextcolor+'; cursor:pointer;" onclick = "topLinks.callAction(\''+title+'\', '+calltxt+')">';  vtxt += '<div style = "float:left; height:15px; width:15px; '+txtbg;  vtxt +='"></div><div style = "float:left; padding-left:3px; '+txtpd+' ">'+wrd+'</div>';  vtxt += '</div>';  return vtxt;  };    this.signinText = function(){  ctxt = '';  ctxt += '<div style = "float:right; height:30px; padding-top:5px;">';  if(state == 0){  ctxt += this.setActionLink('Sign_in', true);  ctxt += this.setActionLink('Register', true);  }  else  ctxt += this.setActionLink('Sign_out', true);  ctxt += this.setActionLink(sitetitle, false);      ctxt += '</div>';  return ctxt;  };    this.callLink = function(clink){  if((clink != "HOME") || clink == "HOME" && state != '0'){  param = "callCommand_"+clink+"/default/default";  dothefade = true;  newcommand = true;  myTimer.queuePush(param);  }  else  myTimer.queuePush('signin_400/250');    };    this.createLink = function(title){  wrd = title.toLowerCase();  if(title == "HOME" && state != 0)    wrd = 'myaccount';    if(currentLink == title) wrd += 'up';  else wrd += 'out';  xtxt = '<div onclick = "topLinks.callLink(\''+title+'\')" style = "float:right;  width:140px; height:40px; color:'+toptextcolor+'; cursor:pointer; background-image:url(\'http://s3.amazonaws.com/ldimages/'+designdescription+'_'+wrd+'.gif\'); ">';  xtxt += '</div>';  return xtxt;  };    this.setLinks = function(){  mtxt = '';  cbackground = 'http://s3.amazonaws.com/ldimages/'+mainlocation+'_logo.gif';  mtxt += '<div style = "float:left; width:100%; height:82px; background-image:url(\'http://s3.amazonaws.com/ldimages/'+designdescription+'_top.gif\');">';  mtxt +='<div style = "float:left; width:250px; height:82px; ">';  mtxt +='<div style = "width:250px; height:70px; background-image:url(\''+cbackground+'\');"></div>';  mtxt +='</div>';  mtxt +='<div  style = "float:right; width:500px; padding-right:10px; height:82px; ">';  mtxt +='<div style = "clear:both; float:right; height:40px;">';  mtxt +=this.signinText();  mtxt +='</div>';  mtxt +='<div style = "float:right; width:430px; clear:both; height:42px;">';  for(i = 0; i < this.links.length; i++){  mtxt += this.createLink(this.links[i]);    }  mtxt +='</div>';  mtxt +='</div>';  mtxt +='</div>';  return mtxt;  };    this.callTopLink = function(command){  dothefade = true;  newcommand = true;  myTimer.queuePush(command);  };    this.resize = function(){  tplink = document.getElementById('toplinks').style;  tlist = document.getElementById('toplinklist').style;  tlist.width = (defWidth-120)+'px';  tplink.width = (defWidth)+'px';  };      this.addToDefaultLinks = function(newlink){    isdefault = (this.numlinks == this.defaultnumoflinks);  if(isdefault){   this.addToToplinks(newlink);  this.numlinks++;  }  };    this.resetTopLinks = function(){this.links = this.deflinks;};    this.linkAvailable = function(thecurrentlink){  llen = this.links.length;  found = false;  for(i = 0 ; i < llen; i++){  if(this.links[i] == thecurrentlink){  found = true;  break;  }  }  return found;  };    this.init = function (tablist){  if(state != '0' || currentLink == "LOCKER"){  document.getElementById('top_links').innerHTML = this.setLinks();  subLinks.init(tablist);  }  };    this.reInit = function(){  document.getElementById('top_links').innerHTML = this.setLinks();  subLinks.init(tablist);  };    this.addToToplinks = function(newlink){   if(this.links.length < 2){  this.links.splice(0, 0, newlink);  }  };    }    var topLinks = new TopLinks(); function SubLinks() {    this.sublinkwidth = 93;  this.currentSub = "";  this.MAXSUBS = 14;  this.sublinkers = new Array();  this.previousSub = "";  this.defaultSub = "";    SubLinks.prototype.toString = function() {      return this.setDefLinks();  };    this.setDefLinks = function(){  txt = '';  setDefaults();  cwidth = defWidth;  txt +='<div id ="sub_links" style = "clear:both;float:left; height:50px; background:#555; width:'+cwidth+'px"></div>';  return txt;  };    this.resize = function(){  setDefaults();  cwidth = defWidth;  slink = document.getElementById('sub_links').style;  slink.width = (cwidth)+'px';  };    this.performAction = function(command){  if(state != "0"){  switch(command){  case "Edit_Bio":  if(currentSubsection != "Bio_Page" && currentSubsection != "Recruiting_Page"){  folder = (account != "Player") ? "Bio_Page" : "Recruiting_Page";  currentPage = folder;  setPageAction = true;  myTimer.queuePush('callCommand_'+currentLink+'/Profile/'+folder+'/'+folder);  }  break;  case "Write_to_Board":   if(currentSubsection != "Board_Room"){  currentPage = "Board_Room";  setPageAction = true;  myTimer.queuePush('callCommand_'+currentLink+'/Profile/'+currentPage);  }  break;  case "Change_Image": myTimer.queuePush("callAjax_"+currentLink+'/'+currentSection+'/setwinimgs'); break;  case "Accounts": myTimer.queuePush('showaccounts_'+accountManager.windowwidth+'/'+accountManager.windowheight+'/Switch_Account'); break;  case "Upload": myTimer.queuePush('launchuploader_'+myUploader.windowwidth+'/'+myUploader.windowheight+'/Photo/upload'); break;  case "Befriend": myTimer.queuePush("callAjax_"+currentLink+'/'+currentSection+'/addfriend'); break;  case "Alerts": myTimer.queuePush('openalert_400/250'); break;  case "Contact": myTimer.queuePush("callAjax_"+currentLink+'/'+currentSection+'/setcontactinfo'); break;  }  }  else  myTimer.queuePush("signin_400/250");  };    this.setActions = function(commands){  clen = commands.length;  mtxt = '';  for(i = 0; i < clen; i++){  wrd = commands[i].replace(/_/g, ' ');  wlink = designdescription+'_'+commands[i].toLowerCase()+'.jpg';  mtxt +='<div style = "float:left; margin-right:25px; cursor:pointer; " onclick = "subLinks.performAction(\''+commands[i]+'\')"><div style = "float:left; margin-left:5px; margin:5px; width:20px; height:20px; background-image:url(\'http://s3.amazonaws.com/ldimages/'+wlink+'\');"></div><div style = "float:left; padding-top:9px;">'+wrd+'</div></div>';  }  return mtxt;  };    this.setCommandList = function(){  rtxt = '';  rtxt += '<div style = "float:left; color:#fff; font-size:11px; font-weight:bold;">';  switch(currentLink){  case "HOME": commands = new Array("Upload", "Edit_Bio", "Write_to_Board", "Change_Image", "Accounts"); break;  case "LOCKER": commands = new Array("Contact", "Write_to_Board", "Befriend"); break;  }  rtxt += this.setActions(commands);  rtxt += '</div>';  return rtxt;  };    this.setDisplay = function(){  txt = '';  if(state != '0' || currentLink == "LOCKER"){  txt += '<div style = "width:100%; background:'+midbackground+';">';  txt += '<div style = " float:left; height:32px; padding-bottom:8px;  width:100%; background-image:url(\'http://s3.amazonaws.com/ldimages/'+designdescription+'_curvebg.jpg\'); background-repeat:repeat-x;">';  txt += '<div style = "float:left; width:15px; height:32px; background-image:url(\'http://s3.amazonaws.com/ldimages/'+designdescription+'_curve-left.jpg\');"></div>';  txt +=this.setCommandList();  txt += '</div>';  txt +='<div id = "subfade" style = "clear:both; height:10px; background:'+midbackground+'; width:100%; "></div>';  txt +='<div style = "clear:both"></div>';  txt += '</div>';  }  return txt;  };    this.processSl = function(c){  subl = this.sublinkers[c];  myHomePage.currentId = c-1;  this.changeSublink(subl);  ajaxprocessor = false;  dothefade = true;  stoptheload();  contentTabs.resetTabs();  myLarge.showGlaze();  showLoadBox();  clist = params.optionlist[myHomePage.currentId];  if(clist.match(/link\[/g)){  info = clist.substr(5, clist.length-6);  clink = info.split(',_');  stoptheload();  params.commandlist = 'callCommand_'+clink[0]+'/'+clink[1]+'/'+clink[2];  myTimer.queuePush(params.commandlist);  }  else  myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/default');    };    this.changeSublink = function (subl){  if(this.previousSub != subl){  currentSection = subl;  this.currentSub = subl;  }  };    this.init = function (sublinkers){  if(sublinkers != null){  this.sublinkers = sublinkers;  }else  this.sublinks = params.topsubs;  cobj = document.getElementById('sub_links');  cobj.innerHTML = this.setDisplay();  };  }    var subLinks = new SubLinks(); function AjaxOp(){    this.processReady = false;  this.previousState = null;  this.tempcounter= 0;  this.txt = null;  this.curl = "";  this.cpost = "";  this.relocatesub = false;    this.initRequest = function () {      if (window.XMLHttpRequest) {          req = new XMLHttpRequest();      } else if (window.ActiveXObject) {          isIE = true;          req = new ActiveXObject("Microsoft.XMLHTTP");      }  };    this.processUrl = function(url, type, postus, ctxt){  AJAX.txt = ctxt;      var postdata = null;  if(storepost) upost = postus;  if(storetemppost){ tpost = postus; storetemppost = false;}  if (postus != "")  {postdata = "id=" + encodeURIComponent(postus);}      this.initRequest();       req.onreadystatechange = this.processRequest;  url = URLencode(url);  url = url;  this.curl = url;  this.cpost = postus;    if(postus.match(/^search_/))  searchtext = postus;  this.serveraction(url, type, postus, postdata);      };    this.serveraction = function(url, type, postus, postdata){  switch (type){  case "postit":  req.open("POST", url, true);  req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");  req.send(postdata);  break;  default:  req.open("GET", url, true);  req.send(null);  break;  }  };    this.processSubs = function(){  srt = req.responseXML.getElementsByTagName("sublinks");  disp = req.responseXML.getElementsByTagName("display");  opts = req.responseXML.getElementsByTagName("options");  params.culink = req.responseXML.getElementsByTagName("ulink")[0].childNodes[0].nodeValue;  params.sulink = req.responseXML.getElementsByTagName("spnslink")[0].childNodes[0].nodeValue;  ctabs = req.responseXML.getElementsByTagName("ctabs")[0].childNodes[0].nodeValue;    designtype = req.responseXML.getElementsByTagName("Design_Type")[0].childNodes[0].nodeValue;  designbar = req.responseXML.getElementsByTagName("Design_Bar")[0].childNodes[0].nodeValue;  designdescription = req.responseXML.getElementsByTagName("Design_Description")[0].childNodes[0].nodeValue;  midbackground = req.responseXML.getElementsByTagName("Mid_Background")[0].childNodes[0].nodeValue;  sitetitle = req.responseXML.getElementsByTagName("Site_Name")[0].childNodes[0].nodeValue;  toptextcolor = req.responseXML.getElementsByTagName("Top_Text_Color")[0].childNodes[0].nodeValue;  mainlocation = req.responseXML.getElementsByTagName("mainlocation")[0].childNodes[0].nodeValue;    params.setHomeInfoDom(req.responseXML.getElementsByTagName("nm"));  params.setHomeValueDom(req.responseXML.getElementsByTagName("value"));    contentTabs.defaultlist = ctabs;  if(processcontenttabs != ""){   carray = ctabs.split(processcontenttabs);  if(carray.length == 1)  ctabs+=',_'+processcontenttabs;  contentTabs.setTabList(ctabs, processcontenttabs);  }  else{  contentTabs.setTabList(ctabs);  }    processcontenttabs = "";  params.setTopsubDOM(srt);  params.setTopdispDom(disp);  params.setTopoptDom(opts);    };    this.processMid = function(){  generalProcess.searcher();  if(dothefade){this.ldRemove();}  dothefade = true;  };    this.ldRemove = function(){   loadBox.removeLoadBox();  };    this.callSublink = function(clink, csection, csubsection){  if(params.bottabs_responce1[clink+"_"+csection+"_"+midTabs.currentTab] == null)  {myTimer.queuePush('callAjax_'+clink+'/'+csection+'/sublinks');}  else  {this.callprocesses(clink, csection, "sublinks", csubsection);}  };    this.callBotTabs = function(clink, csection, csubsection){  if(params.bottabs_responce1[clink+"_"+csection+"_"+midTabs.currentTab] == null)  {myTimer.queuePush('callAjax_'+clink+'/'+csection+'/bottabs/'+midTabs.currentTab);}  else  {this.callprocesses(clink, csection, "bottabs", csubsection);}  };    this.callMidTabs = function(clink, csection, csubsection){  myTimer.queuePush('callAjax_'+clink+'/'+csection+'/midtabs');  };    this.resetDisplay = function(){  glazecolor = "#444";  bottomScroll.setMaximizer('open');  signmeup = false; registerme = false;   curcomm = "";  contentTabs.currentTab = null;  contentTabs.pageMap = false;  contentTabs.pageMapper = new Array();  contentTabs.currentMax = 0;  refreshtab = true;  thepreviousedit = "";  currentCol = "";  keylocation = "";  };    this.setMainPage = function(picinit){  if(previousLink == "") previousLink = currentLink;  if((myHomePage.allowdisplay || newpage) && previousLink == currentLink){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/display');  myHomePage.allowdisplay = false;  this.setUserImg();  this.userDefaults();  }  else{  newpage = true;  previousLink = currentLink;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/sublinks');  }  };    this.processText = function(){  switch(AJAX.txt){  case "confirmRequest": case "addUFriend": case "addUscout": case "addUplayer":   case "addUteam": case "addUcoach": case "joinUteam": case "setFilterCategories":  case "signin": case "setfilterwindow": case "setfilterwindow2": case "setpagecontent":   case "getreponse": case "removeglaze": case "entersite": case "setcountry": case "delete":   case "deleteandclose": case "closeandcall": case "setimage": case "deletedimage":   case "addimage": case "setfiltersport": case "setsport": case "setaccountsport":   case "callAccount": case "openhelp": case "setcont2": case "endrequest": case "closecomplete":  case "updategload":case "updateload": case "calldefault":  case "resettable":  case "newPage": case "setmultiaccount":  systemH = new SystemHandler();  systemH.processTxtCommand(AJAX.txt);  break;  case "setNewUser": case "setNewMessage":  case "setNewParticipant": case "setNewContent":  case "setMessage": case "setcomposeinfo":   case "setto":   messageH = new MessageHandler();  messageH.processTxtCommand(AJAX.txt);  break;  case "deleteEvent": case "calendarstart":  case "seteventimages": case "reseteventdate":  case "defaultseason":   eventH = new EventHandler();  eventH.processTxtCommand(AJAX.txt);  break;  case "setimages": case "setfileeditor":  mediaH = new MediaHandler();  mediaH.processTxtCommand(AJAX.txt);  break;  case "setuserpage": case "setaccountwin":  userH = new UserHandler();  userH.processTxtCommand(AJAX.txt);  break;  case "publishdesign":  adminUI.completeDesign();  break;  case "resetdesign":  adminUI.resetLinks();  break;  case "resetadmin":  adminUI.interpret();  break;  case "setportal":   portalUI.interpret();  break;  case "callcommandlist":  stoptheload();  startglazer = false;  myTimer.queuePush(params.commandlist);  break;  case "callcommandlink":  stoptheload();  startglazer = false;  myLarge.removeGlaze();  window.location = req.responseText;  break;  }  };    this.processMe = function(){  var command = "";  var section = "";  var subsection = "";  var subcommand = "";  try{  command = req.responseXML.getElementsByTagName("command")[0].childNodes[0].nodeValue;  section = req.responseXML.getElementsByTagName("section")[0].childNodes[0].nodeValue;  subsection = req.responseXML.getElementsByTagName("subsection")[0].childNodes[0];  subsection = (subsection != null) ? subsection.nodeValue : "";  if(setPageAction)  currentPageAction = subsection;  ulocation = req.responseXML.getElementsByTagName("ulocation")[0].childNodes[0].nodeValue;  subc = req.responseXML.getElementsByTagName("subcommand");  if(subc[0].childNodes[0] != null) {subcommand = subc[0].childNodes[0].nodeValue;}  currentSubcommand = (subcommand != null)? subcommand : "";  }catch(e){  if(req.responseText == ""){  alert("There was an error communicating with the servers.  Please try later.");  stoptheload();  myLarge.removeGlaze();  }  else{  resetCachedLinks();  addexcel = "";  exceltab ="";  curCommand = "";  curSelection = "";    if(currentLink != "HOME"){  currentLink = "HOME";  signout();  }  }  }  this.callprocesses(command, section, subsection, subcommand);  };    this.setUserImg = function(){  picture = req.responseXML.getElementsByTagName("picture");  picture = (picture[0].childNodes[0] == null) ? "" : picture[0].childNodes[0].nodeValue;  usrImg = new Image();  usrImg.src = upldDir+picture;  };    this.userDefaults = function(){  try{  state = req.responseXML.getElementsByTagName("state")[0].childNodes[0].nodeValue;  user = req.responseXML.getElementsByTagName("user")[0].childNodes[0].nodeValue;  cuuser = req.responseXML.getElementsByTagName("cuser")[0].childNodes[0].nodeValue;  cusname = req.responseXML.getElementsByTagName("cusname")[0].childNodes[0].nodeValue;  ruser = req.responseXML.getElementsByTagName("ruser")[0].childNodes[0].nodeValue;  uruser = req.responseXML.getElementsByTagName("uruser")[0].childNodes[0].nodeValue;  suser = req.responseXML.getElementsByTagName("suser")[0].childNodes[0].nodeValue;  utypeu = req.responseXML.getElementsByTagName("utype")[0].childNodes[0].nodeValue;  account = req.responseXML.getElementsByTagName("account");  account = (account[0].childNodes[0] == null) ? "": account[0].childNodes[0].nodeValue;  unameu = req.responseXML.getElementsByTagName("usname")[0].childNodes[0].nodeValue;  usport = req.responseXML.getElementsByTagName("usport")[0].childNodes[0].nodeValue;  uusernameu = req.responseXML.getElementsByTagName("ussname")[0].childNodes[0].nodeValue;  }catch(e){}  };      this.pageDefaults = function(){  params.userinfo = new Array();  generalProcess.loggedin = false;  currentLink = (currentLink != "LOCKER") ? currentLink : "HOME";  };      this.setDefaults = function(){    this.setUserImg();  this.userDefaults();    contentTabs.resetInfo();  params.topdefault = true;  midTabs.currentTab = "";  filterContent.currentBotTab = "";  curStatEvent = "";  exceltab = "";  };      this.resetUserLink = function(){  isme = (whois() == "me");  isadmin = (whois() == "admin");  availablelocker = topLinks.linkAvailable("LOCKER");  adminlocation = (availablelocker && isme) || (availablelocker && isadmin);  maxlinklength = topLinks.deflinks.length + 1;  inrange = (topLinks.links.length <= maxlinklength);  if(adminlocation && currentLink == "LOCKER") {  topLinks.resetTopLinks();   currentLink = "HOME";  myTimer.queuePush('callCommand_'+currentLink+'/default/default');  }  else if (currentLink == "LOCKER" && !availablelocker && inrange){  if(topLinks.links.length == topLinks.deflinks.length)  {topLinks.addToToplinks('LOCKER');}  }  };    this.callprocesses = function(command, section, subsection, subcommand){  updateLink = true;  midTabs.defaultTab = "Options";  thecommand = subsection.split('_');  theword = section.split('(D)')[0];  thesec = theword.split('_').join(' ');  this.userDefaults();  if(storepost)  usubsection = subsection;  storepost = true;  if(thesec == "Sign out"){  curCommand = "";  curSelection = "";  curs = "";  exceltab = "";  params.cursel = "";  curStatEvent = "";  resetCachedLinks();  this.pageDefaults();  signedin = false;  myTimer.queuePush('callCommand_'+currentLink+'/default/default');  }  setIntroGlaze(thecommand[0]);  if((subsection == "help")||(currentSubsection == "Help" && subsection == "")){    helpH = new HelpHandler();  helpH.process(command, section, subsection, subcommand, false);  }  else{  switch(thecommand[0]){  case "incryear": case "increment":  eventH = new EventHandler();  eventH.processCommand(thecommand);  break;  case "deny": case "deny2": case "accept2": case "accept": case "confirm":  case "acdeny": case "acdeny2": case "acaccept2": case "acaccept":  case "getMainFilter":  case "say":   case "sethometext": case "redirect": case "relocate":  case "filter": case "glaze": case "default":  case "getSportFilter": case "bottabs":  case "settablist": case "sublinks": case "toptabs":  case "midtabs": case "bottabs": case "display":  case "closeMini": case "setHomePage":   case "setnetworks": case "userrequest":  systemH = new SystemHandler();  systemH.processCommand(thecommand);  break;  case "setAccount": case "accountswitch":  case "showAccess": case "userAdmin":  case "gettheaccounts": case "viewMember":  case "setaccountimage":case "deleteMedia":  case "changeseason": case "defaultseason":  case "setrosternetwork": case "addnewroster":  case "addnetroster": case "deleterosteruser":  case "renamerosteruser": case "emailrosteruser":  case "refreshBoard": case "boardlink":  case "boardsubscribe": case "setboardlike":  case "addBoardFriend":  userH = new UserHandler();  userH.processCommand(thecommand);  break;  case "search": case "getFilters":  case "filterall":  membersH = new MembersHandler();  membersH.processCommand(thecommand);  break;  case "addseason": case "deletefile": case "renamefile":  case "addevent": case "deleteseason": case "renameseason":  case "seteventinfo": case "editevent": case "geteventstats":  case "setstatentry": case "setuserstats": case "seteventview":  eventH = new EventHandler();  eventH.processCommand(thecommand);  break;  case "setpreview": case "openfile":  case "openlist": case "fileinfo2": case "gettheimages":  case "getfiledescription": case "getfilecomment":  case "settolist": case "setmessagelist": case "openmessage":  case "deletemail": case "restoremail": case "archivemail":  case "reportspam": case "movetoinbox": case "removemail":  case "setbloglist": case "openblog": case "openblogcomments":  case "deleteblogroot": case "deleteblogchild":  case "reportblogroot": case "reportblogchild":  case "restoreblog": case "unpublishblog": case "republishblog":  case "removeblog": case "blogsubscribe": case "setcontactinfo":  case "callrequest": case "addfriend":  messageH = new MessageHandler();  messageH.processCommand(thecommand);  break;  case "imageadder": case "setglazerimages":  case "deleteeventimage": case "addeventimage":  case "seteventimages": case "seteditorimages":  case "calladdall": case "initglazeimage":  case "frate": case "fcomment": case "deletecomment":  case "setmediapage": case "setwinimgs":  mediaH = new MediaHandler();  mediaH.processCommand(thecommand);  break;  case "Help":  helpH = new HelpHandler();  helpH.process(command, section, subsection, subcommand, false);  break;  default:  switch(command){  case "PORTAL":  portalUI.interpret();  break;  case "ADMIN":  adminUI.interpret();  break;  case "LOCKER":  userH = new UserHandler();  userH.process(command, section, subsection, subcommand, false);  break;  case "HOME":  if (state == 0){  homeH = new HomeHandler();  homeH.process(command, section, subsection, subcommand, false);  }  else{  userH = new UserHandler();  userH.process(command, section, subsection, subcommand, false);  }  break;  case "MEMBERS":  switch(currentSection){  case "Users":  membersH = new MembersHandler();  membersH.process(command, section, subsection, subcommand, false);  break;  case "Photos":  case "Videos":  mediaH = new MediaHandler();  mediaH.process(command, section, subsection, subcommand, false);  break;  case "Blogs":  messageH = new MessageHandler();  messageH.process(command, section, subsection, subcommand, false);  break;  case "Events": case "Stats":    userH = new UserHandler();  userH.process(command, section, subsection, subcommand, false);  break;  }  break;  }  }  }  };    this.processRequest = function () {  if (req.readyState == 4 ){  if (req.status == 200){  loadBox.removeLoadBox();  startglazer = true;  if(AJAX.txt == null || AJAX.txt == ""){  AJAX.processMe();  }  else{  AJAX.processText();  }  myTimer.waiting = false;  processrequest = true;  }  }  else if (req.readyState == 1 ){  bx=document.getElementById('ldbox');  if(startglazer)  myLarge.showGlaze();    if(bx != null){  bxs = bx.style;  if(bxs.display != "block"){  bxs.left = (window.parent.midWidth/2 -80)+"px";  bxs.top = (window.parent.midHeight/2 )+"px";  blender.changeOpac(70, "ldbox");  bxs.display ="block";  }  }  }  };  }    var AJAX = new AjaxOp();  var req;  var target;  var isIE; function ProcessGeneral(val){    this.loggedin = false;    this.callAjax = function (loc, comm, subsec, value, thelink, ctxt){   theval = (value == null) ? "" : value;   thelink = (thelink == null) ? "brain.php" : thelink;  currentUrl = "";  cSubsection = subsec;  if(ajaxprocessor)  AJAX.processUrl('/'+thelink+'/prm/'+loc+'/sctn/'+comm+'/sbsctn/'+subsec, "postit", theval, ctxt);  else{  myTimer.queuePush('displayMid');  ajaxprocessor = true;  }  currentUrl = '/prm/'+loc+'/sctn/'+comm+'/sbsctn/'+subsec+'/'+theval;  return currentUrl;  };    this.processCommand = function (loc, comm, subsec, value, thelink){  if (comm == "Login" && state == 0){  myTimer.queuePush("signin_400/250");  return;  }  prcommand = true;  thecurrentUrl = this.callAjax(loc, comm, subsec, value, thelink);  currentLink = loc;  currentSection = comm;  currentSubsection = subsec;  previousLink = currentLink;  previousSection = currentSection;  previousSubsection = currentSubsection;  };    this.processLink = function(linker, comm, subsection){  if (comm == "Sign in" && state == 0)  myTimer.queuePush("signin_400/250");  else  generalProcess.processCommand(linker, comm, subsection);  };    this.searcher = function(){    middle.initializeMidbox();  };  }  var generalProcess = new ProcessGeneral(); function Params(){    this.complevel = new Array();  this.city = new Array();  this.sportevents = new Array();  this.account = "";  this.ctabs = "";  this.psports = new Array();  this.exceltablist = new Array();  this.imgtablist = new Array();  this.urttabs = new Array();  this.ruttabs = new Array();  this.urstabs = new Array();  this.rustabs = new Array();  this.filelist = new Array();  this.cont = new Array();  this.pic = new Array();  this.uid = new Array();  this.eventlist = new Array();  this.subeventlist = new Array();  this.subfolders = new Array();  this.season = new Array();  this.selected = new Array();  this.monthword = new Array ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');  this.filetypes = new Array("gif","jpeg","bmp","jpg","png");  this.videotypes = new Array("avi", "mov", "mpeg", "mpg", "wmv", "divx", "xvid", "asf", "flv", "swf", "mp4", "m4v");  this.glaze = new Array("setpreview");  this.currentId = "";  this.currentPic= "";  this.currentUser = "";  this.abbreviation = new Array();  this.message = "";  this.messagetype = "default";  this.subject ="";  this.sname ="";  this.fname = new Array();  this.actype = new Array();  this.sport = new Array();  this.value = new Array();  this.inputtype = new Array();  this.attribute = new Array();  this.eventcategory= new Array();  this.inputtextoption = new Array();  this.category = new Array();  this.loptions = new Array();  this.etype = new Array();  this.id = new Array();  this.cunit = new Array();  this.group = new Array();  this.defcat = null;  this.storevals = new Array();  this.usr = new Array();  this.country = new Array();  this.sublinks_responce = new Array();  this.link_responce = new Array();  this.toptabs_responce = new Array();  this.midtabs_responce = new Array();  this.optiontabs_responce = new Array();  this.bottabs_responce1 = new Array();  this.bottabs_responce2 = new Array();  this.optlinks = new Array();  this.optlinks2 = new Array();  this.optdropdown = new Array();  this.optdropdown2 = new Array();  this.setoptlinks = new Array();  this.files = new Array();  this.info = new Array();  this.sender = new Array();  this.receiver = new Array();  this.lineup = new Array();  this.cursel = "";  this.usergroup = "none";  this.reqevent = "none";  this.displayword = new Array();  this.rowdisplay = new Array();  this.usrlist = new Array();  this.uid = new Array();  this.type = new Array();  this.upic = new Array();  this.sponsor = new Array();  this.fabr = new Array();  this.frange = new Array();  this.fincr = new Array();  this.ffixed = new Array();  this.fref = new Array();  this.optionlist = new Array();  this.commandlist = "";  this.commandlink = "";  this.evid = new Array();  this.evtype = new Array();  this.usrsport = new Array();  this.homeinfo = new Array();  this.homevalue = new Array();  this.ucountries = new Array();  this.filtercontent = new Array();  this.filterlist = new Array();  this.filterinfo = new Array();  this.filter_id = new Array();  this.filterset = new Array();  this.defaultrange = new Array();  this.defaultid = new Array();  this.domainposition = new Array();  this.filtername = new Array();  this.filtersection = new Array();  this.filecomment = new Array();  this.fileuser = new Array();  this.filecommentid = new Array();  this.filecommentimg = new Array();  this.rosterid = new Array();  this.rostername = new Array();  this.alerts = new Array();    this.picrate = new Array();  this.piccomment = new Array();  this.picview = new Array();    this.following = new Array();  this.follower = new Array();  this.followingimg = new Array();  this.followerimg = new Array();  this.contactid = '';  this.contactname = '';  this.commandarray = new Array();    this.setTopstats = function(val){  this.topstats = new Array();  this.topstats = val;  };    this.setAbbreviationDOM = function(val, prm){  this.abbreviation = new Array();  this.abbreviation[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.abbreviation[i] = val[i-strt].childNodes[0].nodeValue;  this.abbreviation[i] = this.abbreviation[i].split('^').join('-');  }  };    this.setValueDOM = function(val){  this.value = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.value = this.tempstring.split('<>');  };    this.setCaptionDOM = function(val){  this.caption = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.caption = this.tempstring.split('<>');  };    this.setCActionDOM = function(val){  this.caction = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.caction = this.tempstring.split('<>');  };    this.setCToptabDOM = function(val){  this.ctoptab = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.ctoptab = this.tempstring.split('<>');  };    this.setRosterNameDOM = function(val){  this.rostername = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.rostername = this.tempstring.split('<>');  };    this.setRosterIDDOM = function(val){  this.rosterid = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.rosterid = this.tempstring.split('<>');  };    this.setCSublinkDOM = function(val){  this.csublink = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  this.csublink = this.tempstring.split('<>');  };      this.setValueidDOM = function(val, prm){  try{  this.value = new Array();  this.storavals = new Array();  this.tempstring = "";  strt = (prm == null) ? 0 : 1;  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null){  this.storavals[l] = val[l].childNodes[0].nodeValue;  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  }  else  this.tempstring += '<>';  }  vals = this.tempstring.split('<>');    for(i = strt; i < vals.length + strt; i++){  this.value[this.abbreviationid[i]] = vals[i - strt];  }  }  catch(e){}  };    this.setAbbreviationIDDOM = function(val, prm){  this.abbreviationid = new Array();  this.abbreviationid[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.abbreviationid[i] = val[i-strt].childNodes[0].nodeValue;  }  };    this.setFFixedDOM = function(val){  this.ffixed = new Array();  for(i = 0; i < val.length; i++){  this.ffixed[i] = val[i].childNodes[0].nodeValue;  }  };    this.setFrefDOM = function(val){  this.fref = new Array();  for(i = 0; i < val.length; i++){  this.fref[i] = val[i].childNodes[0].nodeValue;  }  };    this.setDropListDOM = function(val){  this.droplist = new Array();  for(i = 0; i < val.length; i++){  this.droplist[i] = val[i].childNodes[0].nodeValue;  }  };    this.setAlertslinkDOM = function(val){  this.alertslink = new Array();  for(i = 0; i < val.length; i++){  this.alertslink[i] = val[i].childNodes[0].nodeValue;  }  };    this.setAlertslenDOM = function(val){  this.alertslen = new Array();  for(i = 0; i < val.length; i++){  this.alertslen[i] = val[i].childNodes[0].nodeValue;  }  };    this.setAlertsidDOM = function(val){  this.alertsid = new Array();  for(i = 0; i < val.length; i++){  this.alertsid[i] = val[i].childNodes[0].nodeValue;  }  };    this.setAlertsDOM = function(val){  this.alerts = new Array();  for(i = 0; i < val.length; i++){  this.alerts[i] = val[i].childNodes[0].nodeValue;  }  };    this.setDropNameDOM = function(val){  this.dropname = new Array();  for(i = 0; i < val.length; i++){  this.dropname[i] = val[i].childNodes[0].nodeValue;  }  };    this.setFIncrtDOM = function(val){  this.fincr = new Array();  for(i = 0; i < val.length; i++){  this.fincr[i] = val[i].childNodes[0].nodeValue;  }  };    this.setSeasonDOM = function(val){  this.season = new Array();  for(i = 0; i < val.length; i++){  this.season[i] = val[i].childNodes[0].nodeValue;  }  };    this.setFRangeDOM = function(val){  this.frange = new Array();  for(i = 0; i < val.length; i++){  this.frange[i] = val[i].childNodes[0].nodeValue;  }  };    this.setHomeInfoDom = function(val){  this.homeinfo = new Array();  for(i = 0; i < val.length; i++){  this.homeinfo[i] = val[i].childNodes[0].nodeValue;  }  };    this.setFileCommentImgDOM = function(val){  this.filecommentimg = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.filecommentimg = this.tempstring.split('<>');  };    this.setFileCommentIdDOM = function(val){  this.filecommentid = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.filecommentid = this.tempstring.split('<>');  };    this.setFileCommentDOM = function(val){  this.filecomment = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.filecomment = this.tempstring.split('<>');  };    this.setFileUserDOM = function(val){  this.fileuser = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.fileuser = this.tempstring.split('<>');  };    this.setHomeValueDom = function(val){  this.homevalue = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.homevalue = this.tempstring.split('<>');  };    this.setFAbrDom = function(val){  this.fabr = new Array();  for(i = 0; i < val.length; i++){  this.fabr[i] = val[i].childNodes[0].nodeValue;  }  };    this.setPicDOM = function(val){  this.pic = new Array();  for(i = 0; i < val.length; i++){  this.pic[i] = val[i].childNodes[0].nodeValue;  }  };    this.setLikesDOM = function(val){  this.likes = new Array();  for(i = 0; i < val.length; i++){  this.likes[i] = val[i].childNodes[0].nodeValue;  }  };    this.setLikesImgDOM = function(val){  this.likesimg = new Array();  for(i = 0; i < val.length; i++){  this.likesimg[i] = val[i].childNodes[0].nodeValue;  }  };    this.setEventFileListDOM = function(parentinfo, eventinfo, subeventinfo){  for(i = 0; i < parentinfo.length; i++){  if(parentinfo[i] != null){  pid = parentinfo[i].childNodes[0].nodeValue;  if(eventinfo[i].childNodes[0] != null){  eid = eventinfo[i].childNodes[0].nodeValue;  params.eventlist[pid] = eid;  if(subeventinfo[i].childNodes[0] != null){  eid = subeventinfo[i].childNodes[0].nodeValue;  params.subeventlist[pid] = eid;  }  else   params.subeventlist[pid] = '';  }  }  }  };    this.setEventListDOM = function(cat, val, ext){  this.setNameDOM(cat);  this.eventlist = new Array();  this.subeventlist = new Array();  this.cat = new Array();    for(i = 0; i < val.length; i++){  temp = val[i].childNodes[0].nodeValue;  cval = cat[i].childNodes[0].nodeValue;  if(!instack(this.cat, cval))  this.cat.push(cval);  curtemp = temp.substr(0,temp.length-2);  this.eventlist[params.name[i]] = curtemp;  }  };    this.setContDOM = function(val){  this.cont = new Array();  for(i = 0; i < val.length; i++){  if(val[i] == null || val[i].childNodes[0] == null)  this.cont[i] = "";  else  this.cont[i] = val[i].childNodes[0].nodeValue;  }  };    this.setObjectDOM = function(val){  this.objects = new Array();  for(i = 0; i < val.length; i++){  this.objects[i] = val[i].childNodes[0].nodeValue;  }  };    this.setRowDisplay = function(val){  this.rowdisplay = new Array();  for(i = 0; i < val.length; i++){  this.rowdisplay[i] = val[i].childNodes[0].nodeValue;  }  };    this.setUIdDOM = function(val){  this.uid = new Array();  for(i = 0; i < val.length; i++){  this.uid[i] = val[i].childNodes[0].nodeValue;  }  };      this.setUpicDOM = function(val){  this.upic = new Array();  for(i = 0; i < val.length; i++){  try{this.upic[i] = val[i].childNodes[0].nodeValue;}  catch(e){this.upic[i] = "";}  }  };    this.setReceiverDOM = function(val){  this.receiver = new Array();  for(i = 0; i < val.length; i++){  this.receiver[i] = val[i].childNodes[0].nodeValue;  }  };    this.setSenderDOM = function(val){  this.sender = new Array();  for(i = 0; i < val.length; i++){  this.sender[i] = val[i].childNodes[0].nodeValue;  }  };      this.setUr = function(stab, ttab){  slen = stab.length;  this.urttabs = new Array(slen);  for(i = 0; i < slen; i++){  this.urstabs[i] = stab[i].childNodes[0].nodeValue;  this.urttabs[i] = ttab[i].childNodes[0].nodeValue;  }  };    this.setRu = function(stab, ttab){  slen = stab.length;  this.ruttabs = new Array(slen);  for(i = 0; i < slen; i++){  this.rustabs[i] = stab[i].childNodes[0].nodeValue;  this.ruttabs[i] = ttab[i].childNodes[0].nodeValue;  }  };    this.setInfoDOM = function(val){  this.info = new Array();  for(i = 0; i < val.length; i++){  this.info[i] = val[i].childNodes[0].nodeValue;  }      };      this.setCategoryDOM = function(val){  this.category = new Array();  for(i = 0; i < val.length; i++){  this.category[i] = val[i].childNodes[0].nodeValue;  }      };      this.setTypeDOM = function(val){  this.type = new Array();  for(i = 0; i < val.length; i++){  this.type[i] = val[i].childNodes[0].nodeValue;  }      };      this.setAccDOM = function(val){  this.account = new Array();  for(i = 0; i < val.length; i++){  this.account[i] = val[i].childNodes[0].nodeValue;  }      };    this.setFollowersDOM = function(val){  this.follower = new Array();  if(val != null){  for(i = 0; i < val.length; i++){  this.follower[i] = val[i].childNodes[0].nodeValue;  }  }  };    this.setFollowingDOM = function(val){  this.following = new Array();  if(val != null){  for(i = 0; i < val.length; i++){  this.following[i] = val[i].childNodes[0].nodeValue;  }  }  };    this.setFollowersImgDOM = function(val){  this.followerimg = new Array();  if(val != null){  for(i = 0; i < val.length; i++){  this.followerimg[i] = val[i].childNodes[0].nodeValue;  }  }  };    this.setFollowingImgDOM = function(val){  this.followingimg = new Array();  if(val != null){  for(i = 0; i < val.length; i++){  this.followingimg[i] = val[i].childNodes[0].nodeValue;  }  }  };    this.setUsrList = function(val){  this.usrlist = new Array();  for(i = 0; i < val.length; i++){  this.usrlist[i] = val[i].childNodes[0].nodeValue;  }  };      this.setCunitDOM = function(val){  this.cunit = new Array();  for(i = 0; i < val.length; i++){  this.cunit[i] = val[i].childNodes[0].nodeValue;  }      };      this.setUserDom  = function(val){  this.user = new Array();  for(i = 0; i < val.length; i++){  this.user[i] = val[i].childNodes[0].nodeValue;  }      };      this.setCunitOptDOM = function(val){  this.cunitopt = new Array();  for(i = 0; i < val.length; i++){  this.cunitopt[i] = val[i].childNodes[0].nodeValue;  }      };      this.setDateDOM = function(val){  this.date = new Array();  for(i = 0; i < val.length; i++){  this.date[i] = val[i].childNodes[0].nodeValue;  }      };    this.setHImgDOM = function(val){  this.himg = new Array();  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] != null)  this.himg[i] = val[i].childNodes[0].nodeValue;  }  };    this.setValidDOM = function(val){  this.valid = new Array();  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] != null)  this.valid[i] = val[i].childNodes[0].nodeValue;  }  };    this.setModDom = function(val){  this.mod = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.mod = this.tempstring.split('<>');  };      this.setEvents = function(val){  this.eventdisplay = new Array();  for(i = 0; i < val.length; i++){  this.eventdisplay[i] = val[i].childNodes[0].nodeValue;  }  };    this.setNetworkDOM = function(val){  this.network = new Array();  for(i = 0; i < val.length; i++){  this.network[i] = val[i].childNodes[0].nodeValue;  }  };    this.setInfoFilterName = function(val){  this.infoName = new Array();  for(i = 0; i < val.length; i++){  this.infoName[i] = val[i].childNodes[0].nodeValue;  this.infoName[i] = this.infoName[i].split('^').join('-');  }      };      this.setDefaultDOM = function(val, prm){  this.tempstring = "";  this.defaultVal = new Array();  this.defaultVal[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] != null)  this.tempstring += val[i].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0){  vals = this.tempstring.split('<>');  for(i = strt; i < vals.length + strt; i++)  this.defaultVal[i] = vals[i - strt];  }  };      this.setInfoFilterValue = function(val){  this.infoVal = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0)  this.infoVal = this.tempstring.split('<>');  };    this.setCollist = function(val, prm){  this.tempstring = "";  this.collist = new Array();  this.collist[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] != null)  this.tempstring += val[i].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0){  vals = this.tempstring.split('<>');  for(i = strt; i < vals.length + strt; i++)  this.collist[i] = vals[i - strt];  }  };    this.setInputTextOptionDOM = function(val, prm){  this.tempstring = "";  this.inputtextoption = new Array();  this.inputtextoption[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] != null)  this.tempstring += val[i].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0){  vals = this.tempstring.split('<>');  for(i = strt; i < vals.length + strt; i++)  this.inputtextoption[i] = vals[i - strt];  }  };          this.setInputTextOptionidDOM = function(val, prm){  this.tempstring = "";  this.inputtextoption[this.abbreviationid[0]] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] != null)  this.tempstring += val[i].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0){  vals = this.tempstring.split('<>');  for(i = strt; i < vals.length + strt; i++){  this.abbreviationid[i] = (this.abbreviationid[i] != null) ? this.abbreviationid[i] : "0";  this.inputtextoption[this.abbreviationid[i]] = vals[i - strt];  }  }    };      this.setFullAttributeDOM = function(val, prm){  this.fullattribute = new Array();  this.fullattribute[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.fullattribute[i] = val[i-strt].childNodes[0].nodeValue;  }      };      this.setFullAttributeidDOM = function(val, prm){  this.fullattribute = new Array();  this.fullattribute[0] = (prm == null) ? "" : prm;  this.attribute[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.fullattribute[i] = val[i-strt].childNodes[0].nodeValue;  this.attribute[this.abbreviationid[i]] = val[i-strt].childNodes[0].nodeValue;  }      };      this.setGroup = function(val){  this.group = new Array();  for(i = 0; i < val.length; i++){  this.group[i] = val[i].childNodes[0].nodeValue;  }      };      this.setPictureDOM = function(val){  this.picture = new Array();  for(i = 0; i < val.length; i++){  this.picture[i] = val[i].childNodes[0].nodeValue;  }      };      this.setGr = function(val){  this.gr = new Array();  for(i = 0; i < val.length; i++){  this.gr[i] = val[i].childNodes[0].nodeValue;  }  };      this.setNm = function(val){  this.nm = new Array();  for(i = 0; i < val.length; i++){  this.nm[i] = val[i].childNodes[0].nodeValue;  }  };      this.setFileId = function(val){  this.fileid = new Array('none');  for(i = 0; i < val.length; i++){  this.fileid.push(val[i].childNodes[0].nodeValue);  }      };      this.setGroupSpace = function(val){  this.group = new Array('none');  for(i = 0; i < val.length; i++){  this.group.push(val[i].childNodes[0].nodeValue);  }      };      this.setInputDataTypeDOM = function(val){  this.inputdatatextoptions = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0)  this.inputdatatextoptions = this.tempstring.split('<>');  };      this.setInputDataTypeIdDOM = function(val){  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0){  vals = this.tempstring.split('<>');  for(i = 0; i <vals.length; i++)  this.inputdatatextoptions[this.abbreviationid[i]] = vals[i];  }  };        this.categoryHelper = function(category, val){    found = false;  for(m = 0; m < category.length; m++){  if(category[m] == val){  found = true;  break;  }      }      if(!found)  category.push(val);  };      this.setCategoriesDOM = function(val){  this.categories = new Array();  this.subcategories = new Array();  this.subsubcategories = new Array();  previous = "";  previous2 = "";  x = 0; y = 0;  this.currentmain = "";  if (val.length > 0){  for(i = 0; i <val.length; i++){  for(j= 0;j < val[i].childNodes.length; j++){  switch(val[i].childNodes[j].nodeName){  case "name":  this.categoryHelper(this.categories, val[i].childNodes[j].childNodes[0].nodeValue);  this.currentmain = (this.currentmain == "") ? this.categories[0] : this.currentmain;  break;  case "subcategory":  if(val[i].childNodes[0].childNodes[0].nodeValue == this.currentmain){  try{this.categoryHelper(this.subcategories, val[i].childNodes[j].childNodes[0].nodeValue);}catch(e){}      this.currentsub = (this.currentsub == "") ? this.subcategories[0] : this.currentsub;  }      break;  case "subsubcategory":  if(val[i].childNodes[0].childNodes[0].nodeValue == this.currentmain && val[i].childNodes[1].childNodes[0].nodeValue == this.currentsub){  try{this.categoryHelper(this.subsubcategories, val[i].childNodes[j].childNodes[0].nodeValue);}catch(e){}  this.currentsubsub = (this.currentsubsub == "") ? this.subsubcategories[0] : this.currentsubsub;  }      break;  }      }        }      }      };      this.setAbbreviation = function(val){  this.abbreviation = new Array();  for(i = 0; i < val.length; i++){  this.abbreviation[i] = val[i].childNodes[0].nodeValue;  }      };      this.setAbbreviationSpace = function(val){  this.abbreviation = new Array('&nbsp;');  for(i = 0; i < val.length; i++){  this.abbreviation.push(val[i].childNodes[0].nodeValue);  }      };      this.setInputTypeDOM = function(val, prm){  this.inputtype = new Array();  this.inputtype[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){    this.inputtype[i] = val[i-strt].childNodes[0].nodeValue;    }      };    this.setEvIdDOM = function(val){  this.evid = new Array();  for(i = 0; i < val.length; i++){  this.evid[i] = val[i].childNodes[0].nodeValue;  }      };      this.setEvTypeDOM = function(val){  this.evtype = new Array();  for(i = 0; i < val.length; i++){  this.evtype[i] = val[i].childNodes[0].nodeValue;  }      };    this.setIdDOM = function(val){  this.id = new Array();  for(i = 0; i < val.length; i++){  this.id[i] = val[i].childNodes[0].nodeValue;  }      };    this.setUidDOM = function(val){  this.uid = new Array();  for(i = 0; i < val.length; i++){  this.uid[i] = val[i].childNodes[0].nodeValue;  }      };    this. setUImgDOM = function(val){  this.uimg = new Array();  for(i = 0; i < val.length; i++){  this.uimg[i] = val[i].childNodes[0].nodeValue;  }      };    this. setUsrDOM = function(val){  this.usr = new Array();  for(i = 0; i < val.length; i++){  this.usr[i] = val[i].childNodes[0].nodeValue;  }      };      this.setInputTypeIdDOM = function(val, prm){  this.inputtype[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.inputtype[this.abbreviationid[i]] = val[i-strt].childNodes[0].nodeValue;  }      };      this.setTabList = function(opts, ectab, img){  olen = opts.length;  this.exceltablist = new Array(olen);  for(i = 0; i < olen; i++){  coption = opts[i].childNodes[0].nodeValue;  cectab = ectab[i].childNodes[0].nodeValue;  cimg = img[i].childNodes[0].nodeValue;  this.exceltablist[coption] = cectab;  this.imgtablist[coption] = cimg;  }  };    this.setEtypeDOM = function(val, prm){  this.etype = new Array();  for(i = 0; i < val.length; i++){  this.etype[i] = val[i].childNodes[0].nodeValue;  }      };      this.setEvntsDOM = function(val){  this.evnts = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0)  this.evnts = this.tempstring.split('<>');  };      this.setExtDom = function(val){  this.ext = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0)  this.ext = this.tempstring.split('<>');  };      this.setCityDOM = function(val){  this.city = new Array();  for(i = 0; i < val.length; i++){  this.city[i] = val[i].childNodes[0].nodeValue;  }      };      this.setStatesDOM = function(val){  this.states = new Array();  for(i = 0; i < val.length; i++){  this.states[i] = val[i].childNodes[0].nodeValue;  }      };      this.setFullAttribute = function(val){  this.fullAttribute = new Array();  for(i = 0; i < val.length; i++){  this.fullAttribute[i] = val[i].childNodes[0].nodeValue;  }      };      this.seteventCategory = function(val, prm){  this.eventcategory = new Array();  this.eventcategory[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.eventcategory[i] = val[i-strt].childNodes[0].nodeValue;  }      };      this.seteventCategoryid = function(val){  for(i = 0; i < val.length; i++){  this.eventcategory[this.abbreviationid[i]] = val[i].childNodes[0].nodeValue;  }      };      this.setCountryDOM = function(val){  this.country = new Array();  for(i = 0; i < val.length; i++){  this.country[i] = val[i].childNodes[0].nodeValue;  }      };      this.setComplevelDOM = function(val){  this.complevel = new Array();  for(i = 0; i < val.length; i++){  this.complevel[i] = val[i].childNodes[0].nodeValue;  }      };      this.resetComplevel = function(){  this.complevel = new Array(new Array());  };      this.setFiles2DOM = function(val){  this.files2 = new Array();  for(i = 0; i < val.length; i++){  this.files2[i] = val[i].childNodes[0].nodeValue;  }      };    this.setFilesDOM = function(val){  this.files = new Array();  for(i = 0; i < val.length; i++){  this.files[i] = val[i].childNodes[0].nodeValue;  }      };      this.setSportDOM = function(val){  this.sport = new Array();    for(i = 0; i < val.length; i++){  this.sport[i] = val[i].childNodes[0].nodeValue;  }      };    this.setSponsorDOM = function(val){  this.sponsor = new Array();    for(j = 0; j < val.length; j++){  this.sponsor[j] = val[j].childNodes[0].nodeValue;  }    };    this.setAccountDOM = function(val){  this.actype = new Array();    for(j = 0; j < val.length; j++){  this.actype[j] = val[j].childNodes[0].nodeValue;  }    };      this.setName2DOM = function(val){  this.name2 = new Array();  for(i = 0; i < val.length; i++){  this.name2[i] = val[i].childNodes[0].nodeValue;  }  };      this.setFilterSectionDOM = function(val){  this.filtersection = new Array();  for(i = 0; i < val.length; i++){  this.filtersection[i] = val[i].childNodes[0].nodeValue;  }      };    this.setPicRateDOM = function(val){  this.picrate = new Array();  for(i = 0; i < val.length; i++){  if(val[i] == null || val[i].childNodes[0] == null)  this.picrate[i] = "";  else  this.picrate[i] = val[i].childNodes[0].nodeValue;  }    };    this.setPicCommentDOM = function(val){  this.piccomment = new Array();  for(i = 0; i < val.length; i++){  if(val[i] == null || val[i].childNodes[0] == null)  this.piccomment[i] = "";  else  this.piccomment[i] = val[i].childNodes[0].nodeValue;  }    };    this.setPicViewDOM = function(val){  this.picview = new Array();  for(i = 0; i < val.length; i++){  if(val[i] == null || val[i].childNodes[0] == null)  this.picview[i] = "";  else  this.picview[i] = val[i].childNodes[0].nodeValue;  }    };    this.setNameDOM = function(val){  this.name = new Array();  for(i = 0; i < val.length; i++){  if(val[i] == null || val[i].childNodes[0] == null)  this.name[i] = "";  else  this.name[i] = val[i].childNodes[0].nodeValue;  }    };      this.setGeneral = function(val){  this.general = new Array();  for(i = 0; i < val.length; i++){  this.general[i] = val[i].childNodes[0].nodeValue;  }      };      this.setFilterNameDOM = function(val){  this.filtername = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.filtername = this.tempstring.split('<>');  };    this.setFNameDOM = function(val){  this.fname = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }  if(val.length > 0)  this.fname = this.tempstring.split('<>');  };          this.setRequiredDOM = function(val){  this.required = new Array();  for(i = 0; i < val.length; i++){  this.required[i] = val[i].childNodes[0].nodeValue;  }      };        this.setDisplayTypeDOM = function(val, prm){  this.displaytype = new Array();  this.displaytype[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.displaytype[i] = val[i-strt].childNodes[0].nodeValue;  }      };      this.setDisplayTypeIdDOM = function(val, prm){  this.displaytype = new Array();  this.displaytype[0] = (prm == null) ? "" : prm;  strt = (prm == null) ? 0 : 1;  for(i = strt; i < val.length + strt; i++){  this.displaytype[this.abbreviationid[i]] = val[i-strt].childNodes[0].nodeValue;  }      };        this.setSports = function(val){  this.sports = val;  };      this.setAbrlistDOM = function(val){  this.abrlist = new Array();  for(i = 0; i < val.length; i++){  this.abrlist.push(val[i].childNodes[0].nodeValue);  }      };      this.setHeader = function(val){  this.header = new Array();  this.tempstring = "";  for(l = 0; l < val.length; l++){  if(val[l].childNodes[0] != null)  this.tempstring += val[l].childNodes[0].nodeValue+"<>";  else  this.tempstring += '<>';  }    if(val.length > 0)  this.header = this.tempstring.split('<>');  };      this.setDomainPosition = function(val){  this.domainposition = new Array();  for(i = 0; i < val.length; i++){  this.domainposition[i] = val[i].childNodes[0].nodeValue;  }      };    this.setPosition = function(val){  this.position = new Array();  for(i = 0; i < val.length; i++){  this.position[i] = val[i].childNodes[0].nodeValue;  }      };        this.setDropDownDOM = function(val){  this.dropdowns = new Array();  for(i = 0; i < val.length; i++){  this.dropdowns[i] = val[i].childNodes[0].nodeValue;  }      };      this.setSublinksDOM = function (val){  this.sublinks = new Array();  for(i = 0; i < val.length; i++){  this.sublinks[i] = val[i].childNodes[0].nodeValue;  }      };    this.setSublinks= function (val){  this.sublinks = val;  };      this.resetSublinks = function (){  this.sublinks = new Array();  };    this.setTopoptDom = function(val){  this.optionlist = new Array();j=1;  for(i = 0; i < val.length-1; i++){  this.optionlist[i] = val[j].childNodes[0].nodeValue;  j++;  }  };    this.setTopdispDom = function(val){  this.caption = new Array();j=1;  for(i = 0; i < val.length-1; i++){  this.caption[i] = val[j].childNodes[0].nodeValue;  j++;  }  };    this.setTopsubDOM = function (val){  this.topsubs = new Array();  for(i = 0; i < val.length; i++){  if(val[i].childNodes[0] == null)  this.topsubs[i] = "";  else{  this.topsubs[i] = val[i].childNodes[0].nodeValue;  temp = this.topsubs[i].split('(D)');  if (temp[1] !=null && currentSection == "default"){  subLinks.currentSub = this.topsubs[i];  currentSection = this.topsubs[i];  }  }  }  };      this.setTopsub = function (val){  this.topsubs = new Array();  for(i = 0; i < val.length; i++){  this.topsubs[i] = val[i];  temp = this.topsubs[i].split('(D)');  if (temp[1] !=null && currentSection == "default"){  subLinks.currentSub = this.topsubs[i];  currentSection = this.topsubs[i];  }  }    };      this.setTopsubs= function (val){  this.topsubs = val;  };      this.resetTopsubs = function (){  this.topsubs = new Array();  };  }    var params = new Params();   function LargeDisplay(){    this.source ="";  this.type ="";  this.width = 0;  this.height = 0;  this.showmini = false;    this.setDisplay = function(source, type){  this.source = source;  this.type = type;  };      this.getHeight = function(){  size = document.documentElement.clientHeight ;  return size;  };      this.resize = function(){  if(myMini.visible['minibox']){  setDefaults();  this.displayLargeDisplay(this.width, this.height, this.showmini, true);  if(keylocation == "tolist")  myTimer.queuePush("removeBox_commentbox");  }    };    this.getLeftincr = function (){  if(IE)  leftincr = document.body.scrollLeft;  else  leftincr = window.pageXOffset;  return leftincr;  };    this.setMiniBoxSize = function(){  try{  thewidth = Math.floor((defWidth/2) + (defWidth/4));  theheight = Math.floor((winHeight/2) + (winHeight/4));  thetop = (Math.floor(winHeight/2) - Math.floor(thebox.height/2));  theleft = (Math.floor(winWidth/2) - Math.floor(thebox.width/2));  myMini.setBoxSize('minibox', thewidth, theheight, thetop, theleft);  }catch(e){}  };      this.showGlaze = function(){    if(!myMini.visible['minibox']){  setDefaults();  thedisplay = document.getElementById('displaybox').style;  thedisplay.height =  winHeight+"px";  thedisplay.width =  winWidth+"px";  thedisplay.top = "0px";  thedisplay.left = "0px";    thedisplay.display = "block";  thedisplay.background = glazecolor;  blender.changeOpac(30, 'displaybox', '');  }  };    this.removeGlaze = function(){  if(!myMini.visible['minibox']){  thedisplay = document.getElementById('displaybox').style;  thedisplay.display = "none";  }  };    this.displayLargeDisplay = function(thewidth, theheight, showmini, savecontent){  this.width = thewidth;  this.height = theheight;  this.showmini = showmini;  setDefaults();  myRollOverBox.removeRollOverBox();  thedisplay = document.getElementById('displaybox').style;  thedisplay.height =  (document.documentElement.clientHeight+45)+"px";  thedisplay.width =  (document.documentElement.clientWidth)+"px";  thedisplay.top = "0px";  thedisplay.left = "0px";    if(!myMini.visible['minibox']){  thedisplay.display = "block";  thedisplay.background = "#444444";  this.fadeInDisplay();    }    thewidth2 = (document.documentElement.clientWidth) / 2;  theheight2 = (document.documentElement.clientHeight) / 2;  thetop =(myMini.top['minibox'])/1;  theleft = (myMini.left['minibox'])/1;  myMini.showMini('minibox', thewidth, theheight, savecontent);  myMini.visible['minibox'] = true;  };    this.exitLargeDisplay = function(){  this.fadeOutDisplay();  };    this.closeLarge = function(){  myTimer.queuePush("pause_10/1");  myTimer.queuePush("fadeout_70/0/displaybox/10/");  myTimer.queuePush('remove_displaybox');  };      this.printDefaultLargeDisplay = function(){  xtxt = "";  xtxt += '<div style = "z-index:100; overflow:hidden; position:absolute;" id = "displaybox" >';  xtxt += '</div>';  return xtxt;  };    this.fInDisplay = function(){    sfade = blender.getOpac('displaybox');  if(BrowserDetect.browser == "Explorer" && BrowserDetect.version < 7){  sfade = 0;  myTimer.flushlist();  myTimer.queuePush("fadein_"+sfade+"/"+largefade+"/displaybox/"+largeincr+"/");  }  };    this.fadeInDisplay = function(){    sfade = blender.getOpac('displaybox');  if(BrowserDetect.browser == "Explorer" && BrowserDetect.version < 7)  sfade = 0;  myTimer.flushlist();  myTimer.queuePush("fadein_"+sfade+"/"+largefade+"/displaybox/"+largeincr+"/");  };  }  myLarge = new LargeDisplay(); function RollOverBox(){    this.width = 0;  this.height = 0;  this.left = 0;  this.top = 0;  this.checkIfOverInterval = 0;  this.topOffset = 0;  this.leftOffset = 0;  this.rightMargin = 0;  this.bottomMargin = 0;    this.setAbsParentPosition = function (obj){  myObject.setParentPosition(obj);  };      RollOverBox.prototype.toString = function() {  return this.printDefaultRolloverBox();  };      this.printDefaultRolloverBox = function(){   txt = "";  txt += '<div style = "z-index:1009; position:absolute; " id = "magicbox" ></div>';  txt += '<div style = "z-index:1010; position:absolute; background:#f4f8f4; padding:2px; border:1px outset #eee; display:none; width:104px; height:22px; " id = "ldbox" ><div style = "padding:1px;  background:#fff; border:1px solid #eee; width:100px; height:18px;"><div style = "float:left;"><img  src = "http://s3.amazonaws.com/ldimages/ajld.gif" /></div><div style = "float:left; margin-left:5px; letter-spacing:2px; font-size:10px; font-weight:bold; color:#044C8A">Loading...</div></div></div>';  return txt;  };      this.printDefaultRolloverClickBox = function(){  txt = "";  txt += ('<div style = "z-index:1202; position:absolute; display:none;" id = "magicbox2" ></div>');  return txt;  };      this.setDefPosition = function(){  this.left = myObject.curleft;  this.top = myObject.curtop;  };      this.setWidthHeight = function (width, height){  this.width = width;  this.height = height;  };      this.setHeightWidth = function (height, width){  this.setWidthHeight(width, height);  };      this.updateBox = function (){  try{  if(IE) topincr = document.body.scrollTop;  else topincr = window.pageYOffset;  mywidth = midright - 25;  myheight = midHeight;    theheight = myheight+topincr;  this.bottomMargin = 0;  this.rightMargin = ((this.left + this.width) > mywidth) ? (this.left + this.width - mywidth) : 0;  document.getElementById('boxinput').style.left = (this.left - this.leftOffset - this.rightMargin);  document.getElementById('boxinput').style.top = (this.top - this.topOffset - this.bottomMargin);  }catch(e){}  };      this.drawRollOverBox = function (content, type, clicker, align){  align = (align == null) ? "" : align;  if (clicker == null)  mybox = document.getElementById('magicbox');  else  mybox = document.getElementById('magicbox2');    topincr = 0;    if(IE) topincr = document.body.scrollTop;  else topincr = window.pageYOffset;  this.top = this.top - topincr;  mywidth = midWidth;  myheight = midHeight + 54;    theheight = myheight;  this.rightMargin = 0;  this.top = (this.top < 95) ? 95: this.top;  if (clicker == null){  this.rightMargin = ((this.left + this.width) > mywidth) ? (this.left + this.width - mywidth + 17) : 0;  this.bottomMargin = ((this.top + this.height) > theheight) ? (this.top + this.height - theheight ) : 5;  }      txt = "";  txt += '<div id="boxinput" style = "display:block; font-size:11px; background:#FFFFFF;" >';  txt += content;  txt += '</div>';  mybox.innerHTML = txt;  mybox.style.left =  (this.left - this.rightMargin) + "px";      mybox.style.width = this.width+ "px";  mybox.style.border = "1px solid #eee";  mybox.style.borderRight = "2px solid #bbb";  mybox.style.borderBottom = "2px solid #aaa";  mybox.style.top = (align == "") ? (this.top - this.bottomMargin + "px") : (myObject.curtop+67-topincr)+"px";  mybox.style.cursor = "pointer";  mybox.style.background = "#FFFFFF";  mybox.style.display = "block";  if(!autoheight)  mybox.style.height = this.height + "px";  else{  mybox.style.height = mybox.offsetHeight;  autoheight = false;  }      };      this.removeRollOverBox = function (){  this.onBox = false;  this.removeBox(document.getElementById('magicbox'));  };      this.removeBox = function(box){  try{  box.innerHTML = '';  box.style.display = 'none';  }catch(e){}      };      this.removeRollOverClickBox = function (){  this.removeBox(document.getElementById('magicbox2'));  };    }    var myRollOverBox = new RollOverBox();    function displayRollOverBox(obj, height, width, content, type, clicker, alignment){    objec = (clicker == null) ? myRollOverBox : myRollOverClickBox;  objec.setAbsParentPosition(obj);  objec.setDefPosition();  objec.setWidthHeight(height, width);  objec.drawRollOverBox(content, type, clicker, alignment);  this.onBox = true;  }    function displayRollOverClickBox(obj, height, width, content, type){  displayRollOverBox(obj, height, width, content, type, "click");  } function RollOverClickBox(){    RollOverClickBox.prototype.toString = function() {  return this.printDefaultRolloverClickBox();  };    this.printDefaultRolloverClickBox = function(){  txt = "";  txt += ('<div style = "z-index:1100; position:absolute; display:none;" id = "magicbox2" ></div>');  return txt;  };      this.removeRollOverClickBox = function (){  this.removeBox(document.getElementById('magicbox2'));  };  }    var myRollOverClickBox = new RollOverClickBox();  extend(RollOverClickBox, RollOverBox);   function TheUI(){    this.printDefaultUI = function(){  docContent = "";  returnString = "";  returnString += ('<div id = "container" name = "container" class = "container" style = "clear:both; width:'+ (defWidth  ) +'px;  height:auto; background:#555">');    docContent += ('<div style = "clear:both; height:auto; float:left; width:inherit;">');  docContent +=topLinks;  docContent +=subLinks;  docContent += middle.printDefaultMiddle();  docContent += myFilters;  docContent += ('</div>');  returnString +='<iframe id = "midbox" name = "midbox" src="hashsetup.php?prm=" name = "midbox" vspace="1" hspace="1" scrolling="yes" marginwidth="1" marginheight="1" frameborder="0"  style = "height:0px; width:0px; " ></iframe>';  returnString += docContent;  returnString += ('</div>');  returnString += myLarge.printDefaultLargeDisplay();   returnString += myMini.printDefaultMini();   returnString += comment.displayDefaultComment();  returnString += myRollOverClickBox;  returnString += myRollOverBox;  returnString += loadBox;    };    this.openEntry = function(id, postlink){    switch(currentSection){  case "Blog":  myBlogs.openBlog('root', id, 'PUB');  break;  case "Mail":  switch(currentSubsection){  case "Sent_Mail": case "Inbox":  case "All_Mail": case "Trash":  myMail.openMail(id, id);  break;  case "Requests": break;  }    break;  case "Profile":  if(currentSubsection == "Board_Room")  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/boardlink/'+postlink);  break;  }  stoptheload();  myTimer.queuePush('closeMini_minibox');  };    this.resizeContainer = function(){  cont = document.getElementById('container').style;  cont.width = defWidth+'px';  };    this.initView = function(view, currenttab){  process = true;  if(process){  switch(view){  case "user":  tab = (currentLink == "MEMBERS" && currentSection == "Stats") ? currentSubsection+",_"+params.psports[params.spindex]  : currentSubsection+",_"+exceltab;  if(searchtext != ""){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+searchtext);  }  else if(!privatelockerlink){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+tab);  }  else{  cname = unameu.replace(/_/g, ' ');  myHomePage.setContent(setPrivate());  }  break;  case "network":  if(!privatelockerlink){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+currentSubsection+',_'+currentSubsection);  }  else{  cname = unameu.replace(/_/g, ' ');  myHomePage.setContent(setPrivate());  }  break;  case "blog":  tab = currentSubsection+",_"+exceltab+',_'+cpost;  cpost = '';  if(!privatelockerlink){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+tab);  }  else{  cname = unameu.replace(/_/g, ' ');  myHomePage.setContent(setPrivate());  }  break;  case "home":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+currenttab+'/setpagecontent');  break;  case "help":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/help/'+exceltab+'_'+currentSubsection);  break;  default:  if(searchtext != ""){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+searchtext);  }  else  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/process/'+exceltab);  }  }  };    this.setDefaultView = function(view, currenttab){  this.initView(view, currenttab);    };    this.say = function(val){  alert(val);  };    this.removeBoxes = function(){  switch(keylocation){  case "contentTabs":  if(contentTabs.viewOptions && !contentTabs.onOptions)  contentTabs.removeOptions();  break;  case "edittable": case "tabletype":  if(opentables && currenteditor != "" && !currenteditor.editing)  currenteditor.resetNode();  break;  case "boardcomment":  if(myBoard.displayingComment){  myTimer.queuePush("removeboardCommenter_"+myBoard.currentroot);  }  break;  case "tolist":  if(!dropDown.onList){  myTimer.queuePush("removeBox_commentbox");  }  break;  }  };    this.iepageinit = function(){  myTimer.queuePush("pause_20/1");  myTimer.queuePush("initui");  };    this.initializeChild = function(){  moreload = false;  UI.resize();  myTimer.queuePush("showMid");  };    this.minicloser = function(removeglaze){  if(generalProcess.loggedin || mclose){  myMini.cMini('minibox');  generalProcess.loggedin = false;  mclose = false;    }    };    this.initImg = function(){  myUserList.initImgs();  };    this.callProcessor = function(){  midcont = document.getElementById('midboxcontent');  if(params.commandlist != ""){  myTimer.queuePush(params.commandlist);  params.commandlist = "";  }  if(exceltab == "Help"){  helpView = new HelpViewer();  helpView.refreshUI();  }  else{  switch(currentLink){  case "LOCKER":  userView = new UserViewer();  userView.refreshUI();  break;  case "HOME":  if(state == 0){  homeView = new HomeViewer();  homeView.refreshUI();  }  else{  userView = new UserViewer();  userView.refreshUI();  }  break;  case "MEMBERS":  switch(currentSection){  case "Users":  membersView = new MembersViewer();  membersView.refreshUI();  break;  case "Photos":  case "Videos":  mediaView = new MediaViewer();  mediaView.refreshUI();  break;  case "Blogs":  messageView = new MessageViewer();  messageView.refreshUI();  break;  case "Events": case "Stats":  userView = new UserViewer();  userView.refreshUI();  break;  default:  membersView = new MembersViewer();  membersView.refreshUI();    }    break;  }  }  if(setalllinks){  subLinks.changeSublink(currentSection);  setalllinks = false;  }    midcont.style.height = midHeight+"px";  UI.createScroller();  midcont.scrollTop = 0;  newpage = false;  if(picture != "none" && currentLink != "MEMBERS" && exceltab == "Main")  myHomePage.setUserImg();    };    this.setCurrentHash = function(){  alert(expectedHash);  };    this.processChild = function(){  removeglaze = true;  opentables = false;  tableobjs = new Array();  this.callProcessor();  if(recentsignin && !cWiz.visible){  myTimer.queuePush('closeMini_minibox');  recentsignin = false;  }  };    this.setHash = function(){  if(prcommand){  if(hashit && thecurrentUrl != ""){   setLocation(thecurrentUrl);  }  hashit = true;  prcommand = false;  }  };    this.resetValues = function(){  botscrolling = false;  sidescrolling = false;  scrollbar = false;  moveObject = false;  keylocation = "";  };    this.checkResetValue = function(){  if(moveObject){  dropObject();  }  };    this.createScroller = function(){  setScrollerWidth();  };    this.resetParentValues = function(){  movingbrace = false;  botscrolling = false;  sidescrolling = false;  scrollbar = false;    myFilterWindow.resetBrace();  moveObject = false;  };    this.resizeHelper = function(){  stoptheload();  setDefaults();  myLarge.resize();  UI.resizeContainer();  middle.resize();  myHomePage.resize();  subLinks.resize();    };    this.resize = function(){  if(IE)  myTimer.queuePush('resize');  else  UI.resizeHelper();  };    this.resizeTable = function(type){  type = type.replace(/command_/g, '');  switch(type){  case "Teams": case "Players": case "Coaches": case "Matchup_Log":  eventEditor.getTableContent(type);  break;  default:  alert(type);  }  };  }    var UI = new TheUI(); function Expand(){    this.expanding = false;  this.theincr = 8;  this.centralize = true;    this.setCompressIncrStart = function(start_width, start_height, end_width, end_height){  if((start_width - end_width) > (start_height - end_height)) {  incrStart = start_width;  }else{  incrStart = start_height;  }  return incrStart;  };      this.setCompressIncrEnd = function(start_width, start_height, end_width, end_height){  if((start_width - end_width) > (start_height - end_height)) {  incrEnd = end_width;  }else{  incrEnd = end_height;  }  return incrEnd;  };      this.setExpandIncrStart = function(start_width, start_height, end_width, end_height, type){  type = (type != null) ? type : "";  switch(type){  case "menudropdown": case "sideview":  if((start_width - end_width) < (start_height - end_height)) {  incrStart = start_width;  }else  incrStart = start_height;  break;  default:  if((start_width < start_height)&& (end_height != start_height))  incrStart = start_width;  else if ((start_width > start_height)&& (end_width != start_width))  incrStart = start_height;  else   incrStart = null;  break;  }  return incrStart;  };      this.setExpandIncrEnd = function(start_width, start_height, end_width, end_height, type){  type = (type != null) ? type : "";  switch(type){  case "menudropdown": case "sideview":  if((start_width - end_width) < (start_height - end_height)) {  incrEnd = end_width;  }  else{  incrEnd = end_height;  }  break;  default:  if((end_width > end_height)&& (end_width != start_width))   incrEnd =  end_width;  else if ((end_width < end_height)&& (end_height != start_height))  incrEnd =  end_height;  else   incrEnd = null;  break;  }  return incrEnd;  };    this.changeSize = function(size, id, start_width, start_height, end_width, end_height, type, thewindow, incr, rtype){  try{  if(thewindow == "default")  var object = document.getElementById(id).style;   else if (thewindow == "middle")  var object = document.getElementById(id).style;     var val = (incr/2);  if(type == "compress"){  checkwidth = (size > end_width) ;  checkheight = (size > end_height);  startwidth = ((start_width >= size) || (end_height > size));  startheight = ((start_height >= size)|| (end_width > size));  if(startwidth){  if(checkwidth){  myMini.width[id] = size;  object.width = size +"px";  switch (rtype){  case "menudropdown": case "sideview": break;  default:  myMini.left[id] += val ;  object.left = myMini.left[id] +"px";  break;  }  }else{  object.width = end_width +"px";  myMini.width[id] = end_width;  }  }else  object.width = start_width +"px";  if(startheight){  if(checkheight){  switch (rtype){  case "menudropdown": case "sideview": break;  default:  myMini.top[id] += val ;  object.top = myMini.top[id] + "px";  break;  }  object.height = size +"px";  myMini.height[id] = size;  }else  object.height = end_height +"px";  }else{  object.height = start_height +"px";  myMini.height[id] = start_height;  }  }  else{  checkwidth = (size < end_width) ;  checkheight = (size < end_height );  startwidth = ((start_width <= size )|| (end_height < size));  startheight = ((start_height <= size) || (end_width < size));  if(startwidth){  if(checkwidth){  myMini.width[id] = size;  object.width = size +"px";  switch (rtype){  case "menudropdown":break;  case "sideview":  myMini.left[id] -= (val*2) ;  object.left = myMini.left[id] +"px";  break;  default:  myMini.left[id] -= val ;  object.left = myMini.left[id] +"px";  break;  }  }else{  object.width = end_width +"px";  myMini.width[id] = end_width;  }  }else  object.width = start_width +"px";  if(startheight){  if(checkheight){  object.height = size +"px";  myMini.height[id] = size;  switch (rtype){  case "menudropdown": case "sideview": break;  default:  myMini.top[id] -= val ;  object.top = myMini.top[id] + "px";  break;  }  }else{  object.height = end_height +"px";  myMini.height[id] = end_height;  }  }else{  object.height = start_height +"px";  myMini.height[id] = start_height;  }  }  }catch(e){}  };    this.expandImage = function(id, start_width, start_height, end_width, end_height, currentLeft, currentTop, thewindow, incr, type) {    myMini.left[id] = currentLeft;  myMini.top[id] = currentTop;  if(thewindow != "middle")  document.getElementById(id).style.display = "block";  else  document.getElementById(id).style.display = "block";  if ((start_width > end_width)||(start_height > end_height)){  incr = (incr != null)? incr : 20;  param = "compress_"+start_width+"/"+start_height+"/"+end_width+"/"+end_height+"/"+id+'/'+thewindow+'/'+incr+'/'+type;  myTimer.queuePush(param);  }  else{  incr = (incr != null)? incr : 30;  param = "expand_"+start_width+"/"+start_height+"/"+end_width+"/"+end_height+"/"+id+'/'+thewindow+'/'+incr+'/'+type;  if(thewindow == "default")  myTimer.queuePush(param);  else  window.parent.myTimer.queuePush(param);  }  };  }    var expander = new Expand(); function setMidMouseXY(e){  if (IE) {  window.parent.myMouse.X = event.clientX + document.body.scrollLeft;  window.parent.myMouse.Y = event.clientY + document.body.scrollTop+78 - window.parent.getFrameTopincr();  }  else {  window.parent.myMouse.X = e.pageX;  window.parent.myMouse.Y = e.pageY+78- window.parent.getFrameTopincr();  }     } blendcomplete = true;      function Blend(){    this.changeOpac = function (opacity, id , theframe) {    if(theframe != "theframe")  var cobj = document.getElementById(id);  else  var cobj = document.getElementById(id);  if(cobj != null){  var object = cobj.style;  object.opacity = (opacity / 100);  object.MozOpacity = (opacity / 100);  object.KhtmlOpacity = (opacity / 100);  object.filter = "alpha(opacity=" + opacity + ")";  }  };    this.initOpacity = function(opacity){  otxt = '';  opfrac = (opacity/100);  otxt += 'opacity:'+opfrac+'; ';  otxt += '-moz-opacity:'+opfrac+'; ';  otxt += 'filter: alpha(opacity='+opacity+'); ';  otxt += '-khtml-opacity: '+opfrac+'; ';  return otxt;  };    this.getOpac = function (id , theframe){  cobj = 0;  try{  if(theframe != "theframe")  var object = document.getElementById(id).style;   else  var object = document.getElementById(id).style;   if(object.opacity != null && object.opacity != "" ) cobj = object.opacity*100;  else if (object.MozOpacity != null && object.MozOpacity != "") cobj = object.MozOpacity*100;  else if (object.KhtmlOpacity != null && object.KhtmlOpacity != "") cobj = object.KhtmlOpacity*100;  }catch(e){}  return cobj;  };    this.fade = function(id, theframe) {  this.blendImage(id, 100, 0, true, theframe);  };    this.blendImage = function(id, start_opacity, end_opacity, fadein, theframe) {  if(fadein){  myTimer.queuePush(param);  if(theframe == null)  param = "fadefull";  else  param = "fadefull";  myTimer.queuePush(param);  }  else{  if(theframe == null)  param = "fadefull";  else  param = "fadefull";  myTimer.queuePush(param);  }  };  }    var blender = new Blend(); function Handler(){    this.setLinker = function(url, doreset){  expectedHash = expectedHash.replace(/\/\//g, '/default/');  if(expectedHash == ""){return this.initLinker(url, "HOME");}  else{    expectedHash = expectedHash.replace(/%20/g, ' ');  words = expectedHash.substr(2, expectedHash.length-1);  wordArr = words.split('/');  clen = wordArr.length;  cpost = '';  if(clen > 6){cpost = wordArr[6]; }   if(clen > 5){ currentSubsection = wordArr[5]; currentPage = currentSubsection;}   if(clen > 3) {currentSection = (wordArr[3] == "QA") ? "Q_A" : wordArr[3]; }   if(clen > 1){  if(currentLink == "login" || currentLink == "relogin" ) {currentLink = "HOME";}  else {currentLink = wordArr[1];}  }  linker = url + '/prm/'+currentLink+'/sctn/'+currentSection+'/sbsctn/'+currentSubsection+'/'+cpost;    if(doreset != null){  clink = '/prm/'+currentLink+'/sctn/'+currentSection+'/sbsctn/'+currentSubsection+'/'+cpost;  setLocation(clink);  }  setIntroGlaze(currentSubsection);  return linker;  }  };    this.initLinker = function(url, loc){  currentLink = loc;   currentSection = "default";  currentSubsection = "default";  linker = url + "/prm/"+currentLink+"/sctn/"+currentSection+"/sbsctn/"+currentSubsection;  return linker;  };    this.handleHistory = function(val){  url = '/brain.php';  this.complete = false;  theval = "";  if (val == "start"){  expectedHash = window.location.hash;  if (expectedHash == "") {this.initLinker(url, "HOME");}  else {linker = this.setLinker(url, true);}  }  else {  linker = this.setLinker(url, null);  topLinks.init(params.topsubs);  }    firstpage = false;  fadeinme = true;  glazecolor = "#444";  searchtext = "";  words = expectedHash.substr(2, expectedHash.length-1);  wordArr = words.split('/');  clen = wordArr.length;  cpost = '';  if(clen > 6){   cpost = wordArr[6];   storetemppost = true;  }   if(ajaxprocessor){  AJAX.processUrl(linker, "postit", cpost);  }  else  myTimer.queuePush('displayMid');  ajaxprocessor = true;  myTimer.busy = false;  };  }  var myHandler = new Handler();   function Timer (){    this.backgroundEvents = new Array();   this.eventQueue = new Array();   this.taskComplete = false;  this.counter = 0;  this.busy = false;  this.waiting = false;  this.currentCounter = 0;  this.waitTillComplete = new Array();  this.currentInstruction = new Array();  this.nofade = false;  this.countBgCalls = 0;  this.tempborder = "";  this.bottomBorder = "";  this.count = 0;  this.resetWait = false;  this.queuelist = new Array();  this.morewaiting = true;  this.midc = null;  this.topincr = 0;  this.objlocation = -1;    this.init = function(incr){  if(incr == null) incr =  10;  window.setInterval("myTimer.startTimer()", incr);  };    this.queuePush = function(eventName){   if(!this.inqueue(eventName)){  this.eventQueue.push(eventName);  this.queuelist.push(eventName);  }  };    this.queuePop = function(){   temp = "";  temp = this.eventQueue[0];  this.eventQueue.shift();  return temp;  };    this.inqueue = function(eventName){  qlen = this.queuelist.length;  found = false;  for(i =0; i < qlen; i++){  if(this.queuelist[i] == eventName){found = true;}  }  return found;  };    this.flushlist = function(){  this.queuelist = new Array();  };    this.startTimer = function(){  this.counter ++;  if((this.counter % 3) == 0){this.runBackground();}  if((this.counter % 2) == 0){this.processQueue();}  if (this.counter >= 100){this.counter = 0;}  };      this.fadeInBlend = function(end, id, theframe){  blender.changeOpac(this.currentCounter, id, theframe);  if ((this.currentCounter) >= end){  blender.changeOpac(end, id, theframe);  this.resetCurrentCounter();  }  };      this.fadeOutBlend = function(end, id, theframe){  blender.changeOpac(this.currentCounter, id, theframe);  if ((this.currentCounter) <= end){  blender.changeOpac(end, id, theframe);  this.resetCurrentCounter();  }  };    this.resetCurrentCounter = function(){  this.currentCounter = 0;  this.busy = false;  this.waiting = false;  };      this.expand = function(end, id, start_width, start_height, end_width, end_height, thewindow, incr, type){  if(end == null)  {this.resetCurrentCounter();}  else{  if((this.currentCounter) < end ){  expander.changeSize(this.currentCounter, id, start_width, start_height, end_width, end_height, 'expand', thewindow, incr, type);  }  else {  expander.changeSize(end, id, start_width, start_height, end_width, end_height, 'expand', thewindow, incr, type);  this.resetCurrentCounter();  }  }  };    this.compress = function(end, id, start_width, start_height, end_width, end_height, thewindow, incr, type){  if(end == null)  {this.resetCurrentCounter();}  else{  if((this.currentCounter) > end){  expander.changeSize(this.currentCounter, id, start_width, start_height, end_width, end_height, 'compress', thewindow, incr, type);  }  else{  expander.changeSize(end, id, start_width, start_height, end_width, end_height, 'compress', thewindow, incr, type);  this.resetCurrentCounter();  thebox = document.getElementById(id).style;  thebox.border = "0px";  }  }  };    this.processQueue = function(){  if((this.eventQueue.length > 0 && !this.waiting) || (this.waiting)){  this.currentInstruction = new Array();  if(!this.waiting){  this.busy = true;  this.waitTillComplete = new Array();  val = this.queuePop();  this.currentInstruction = (val != null) ? val.split('_') : new Array('');  this.waitTillComplete = this.currentInstruction;  }  else if(this.waiting)   {this.currentInstruction = this.waitTillComplete;}  command = this.currentInstruction[0];  if (this.currentInstruction.length <= 2)  {param = this.currentInstruction[1];}  else{  thelength = this.currentInstruction.length;  param_array = this.currentInstruction.splice(1, (thelength  -1));  param = param_array.join("_");  }  switch(command){  case "history":  if(param == "start")  myHandler.handleHistory(param);  break;  case "removeglaze":  myLarge.removeGlaze();  break;  case "resize":  UI.resizeHelper();  break;  case "fadein":  this.resetWait = true;  instr = param.split('/');  start = instr[0]/1;   end = instr[1]/1;  id = instr[2];   incr = instr[3]/1;  theframe = (instr[4]);  this.currentCounter = (!this.waiting) ? start : (this.currentCounter +incr);  this.waiting = true;  this.fadeInBlend(end, id, theframe);    break;  case "drag":  break;  case "addTab":  instr = param.split('/');  subsct = instr[0];   post = instr[1];  myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/'+subsct);  break;  case "initImg":  UI.initImg();  break;  case "openentry":  instr = param.split('/');  p1 = instr[0];  p2 = (instr.length > 1) ? instr[1] : '';  UI.openEntry(p1, p2);  break;  case "blogcomplete":  stoptheload();  switch(param){  case "save":  case "publish":  case "discard":  myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/View_Posts');  break;  case "blogcomment":  this.queuePush("closeMini_minibox");  stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/openblogcomments/'+myBlogs.uid);  break;  }  break;  case "removeblognode":  instr = param.split('/');  type = instr[0];  id = instr[1]+',_'+instr[2];  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/removeblog/'+id);  break;  case "restoreblognode":  instr = param.split('/');  type = instr[0];  id = instr[1]+',_'+instr[2];  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/restoreblog/'+id);  break;  case "republishblognode":  instr = param.split('/');  type = instr[0];  id = instr[1]+',_'+instr[2];  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/republishblog/'+id);  break;  case "unpublishblognode":  instr = param.split('/');  type = instr[0];  id = instr[1]+',_'+instr[2];  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/unpublishblog/'+id);  break;  case "reportblognode":  instr = param.split('/');  type = instr[0];  id = instr[1]+',_'+instr[2];  switch(type){  case "root":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/reportblogroot/'+id);  break;  case "child":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/reportblogchild/'+id);  break;  }  break;  case "deleteblognode":  instr = param.split('/');  type = instr[0];  id = instr[1]+',_'+instr[2];  switch(type){  case "root":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deleteblogroot/'+id);  break;  case "child":  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/deleteblogchild/'+id);  break;  }  break;  case "blogerror":  switch(param){  case "save":  alert("You must enter content to save a blog");  break;  case "reply":  alert("You must enter content to reply to a blog");  break;  case "publish":  alert("You must enter content to publish a blog");  break;  case "user":  alert("You cannot perform this action");  myTimer.queuePush('callAjax_HOME/default/default');  break;  }  myBlogs.resetCommand();  stoptheload();  break;  case "mailsent":  alert('Mail sent');  switch(myMail.mailtype){  case "compose":  case "mailcontact":  this.queuePush("closeMini_minibox");  break;  default:  stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/openmessage/'+myMail.currentid);  this.queuePush("closeMini_minibox");  }  break;  case "mailererror":  alert('Mail could not be sent to the recipent');  this.queuePush("closeMini_minibox");  break;  case "mailnocontent":  alert("You must type a message before you can send mail");  this.queuePush("closeMini_minibox");  break;  case "fadeout":  /*  if(document.getElementById('midboxcontent') != null){  this.resetWait = true;  instr = param.split('/');  start = instr[0]/1;   end = instr[1]/1;  id = instr[2];   incr = instr[3]/1;  theframe = (instr[4]);  this.currentCounter = (!this.waiting) ? start : (this.currentCounter -incr);  this.waiting = true;  alert('fadeout: '+this.currentCounter+'. content: ');  this.fadeOutBlend(end, id, theframe);  }  */  break;  case "compress":    this.resetWait = true;  instr = param.split('/');  start_width = instr[0]/1;   start_height = instr[1]/1;  end_width = instr[2]/1;   end_height = instr[3]/1;  id = instr[4];  thewindow = instr[5];  incr = instr[6]/1;  type = instr[7];  incrStart = expander.setCompressIncrStart(start_width, start_height, end_width, end_height, type);  incrEnd = expander.setCompressIncrEnd(start_width, start_height, end_width, end_height, type);  if(thewindow == "default")  {thebox = document.getElementById(id).style;}  else if (thewindow == "middle"){  thebox = document.getElementById(id).style;  }  thebox.width = start_width + "px";  thebox.height = start_height + "px";  this.currentCounter = (!this.waiting) ? incrStart : (this.currentCounter - incr);    if(bx.id == "minibox"){  thebox.display = "none";  }else{  this.waiting = true;  this.compress(incrEnd, id, start_width, start_height, end_width, end_height, thewindow, incr,type);  }  break;  case "join": case "multiupload":  case "addFriend": case "videoupload":  case "comment": case "hints": case "addUser":  case "filterwindow": case "partner": case "deleteFile":  case "deleteEvent": case "editroster": case "intro":  case "seasonreq": case "openfilter":  case "userrequest": case "confirmrequest":  case "rosterreq": case "boardwindow":  case "compose": case "reply": case "blogcomment":  case "openalert": case "mailcontact": case "imagewindow":  case "launchuploader": case "showaccounts":  instr = param.split('/');  thewidth = instr[0]/1;   theheight = instr[1]/1;  thedefault = (instr.length > 2) ? "/"+instr[2] : "";  if(instr.length > 3) thedefault += "/"+instr[3];  myLarge.displayLargeDisplay(thewidth,theheight);  myTimer.queuePush("setMini_"+command+thedefault);  break;  case "register":  instr = param.split('/');  thewidth = instr[0]/1;   theheight = instr[1]/1;  thedefault = "/"+instr[2]+"/"+instr[3];  myLarge.displayLargeDisplay(thewidth,theheight);  myTimer.queuePush("setMini_"+command+thedefault);  break;  case "setbotclosed":  bottomScroll.isopen = false;  break;  case "setComment":  instr = param.split('/');  curcommand = instr[0];   rootid = instr[1];  contentid = instr[1];  myBoard.resetComment(curcommand, rootid, contentid);  break;  case "setBoardDisplay":  myBoard.displayingComment = (param == "true");  break;  case "setBoardCommand":  myBoard.command = param;  break;  case "boardon":  myBoard.onObj = param;  break;  case "removeboardCommenter":  myBoard.removeComment(param);  break;  case "resetBoard":  stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/boardlink/'+myBoard.currentselection);  break;  case "refreshBoard":  stoptheload();  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/refreshBoard');  break;  case "initui":  if(!this.waiting)  UI.initializeChild();  break;  case "setflash":  instr = param.split('/');  div_id = instr[0];   src = instr[1];  id = instr[2];   mov = instr[3];  cwidth = instr[4];   cheight = instr[5];  bgcolor = instr[6];  flashSetup.startFlash(div_id, "/UI/flash/"+src, id, "/UI/flash/"+mov, cwidth, cheight, bgcolor);  break;  case "loadmainpicture":  instr = param.split('/');  loadMainPicture(instr[0], instr[1], instr[2], instr[3]);  break;  case "loadpicture":  instr = param.split('/');  loadPicture(instr[0], instr[1], instr[2], instr[3]);  break;  case "setMini":  instr = param.split('/');  switch(instr[0]){  case "registration":  signin = false;  blender.changeOpac(0, "hider" );  myMini.showCloseInfo = uReg.getTermsSelect();  myMini.setContent('minicontent', uReg.regcontent, "topClose");  myTimer.queuePush("fadefull");  uReg.displayingReg = true;  break;  case "defaultFiles":  signin = false;  myFiles.tabs = new Array();  myFiles.tabs.push('General');  myFiles.tabs.push('General Tags');  myFiles.tabs.push('Account Tags');  myMini.currentTopTab  = myMini.previousTopTab = 'General';  myFiles.leftLinks  = new Array("Save", "Save and Continue");  myMini.setContent('minicontent', myFiles.initContent, "topClose");  myFiles.writeTheFiles();  myMini.setContent('mini2content', myFiles.tabs, param, "Category: ", myFiles.leftLinks, false);  myTimer.queuePush("setDisplay");  myTimer.queuePush("fadefull");  break;  case "setFiles":  myMini.currentTopTab  = myMini.previousTopTab = instr[1];  switch(instr[1]){  case "General Labels":  case "General":  myFiles.leftLinks = new Array("Save","Save and Continue");  break;  case "Account Labels":  myFiles.leftLinks = new Array("Save","Save and Finish");  break;  }  myMini.setContent('minicontent', myFiles.initContent, "topClose");  myMini.setContent('mini2content', myFiles.tabs, "defaultFiles", "Category: ", myFiles.leftLinks, false);  myFiles.writeTheFiles();  myTimer.queuePush("setDisplay");  myTimer.queuePush("fadefull");  break;  case "signin":  srelocate = "default";  if(instr[1] != null){myMini.showCloseInfo = uReg.getSigninHeader();}  if(instr[2] != null){srelocate = instr[2];}  thecontent = uReg.printSignin(instr[1], srelocate);  signin = false;  blender.changeOpac(0, "hider" );  myMini.setContent('minicontent', thecontent, "topClose");  this.flushlist();  myTimer.queuePush("fadefull");  signin = true;  break;  case "hints":  thecontent = uReg.printHints();  myMini.initMini(thecontent);  break;  case "videoupload":  thecontent = myUploader.videouploader(instr[1]);  myMini.initMini(thecontent);  break;  case "multiupload":  thecontent = myUploader.multiuploader(instr[1]);  myMini.initMini(thecontent);  break;  case "addUser":  cWiz.setUser(instr[1], "start");  thecontent = cWiz.content;  myMini.initMini(thecontent);  break;  case "join":  cWiz.setJoin(instr[1], "start");  thecontent = cWiz.content;  myMini.initMini(thecontent);  break;  case "addFriend":  cWiz.setFriend("start");  thecontent = cWiz.content;  myMini.initMini(thecontent);  break;  case "intro":  thecontent = flashWindow.setIntro(instr[1]);  myMini.initMini(thecontent);  break;  case "editroster":  thecontent = myRoster.setWinEdit(instr[1]);  myMini.showCloseInfo = uReg.getRosterHeader();  myMini.initMini(thecontent);  break;  case "rosterreq":  thecontent = myRoster.setWinAdd(instr[1]);  myMini.showCloseInfo = uReg.headerText('Add '+instr[1]);  myMini.initMini(thecontent);  break;  case "seasonreq":  thecontent = mySeason.setSeasonReq(instr[1]);  myMini.showCloseInfo = uReg.headerText(instr[1]+' Season');  myMini.initMini(thecontent);  break;  case "openfilter":  thecontent = myFilters.initFilterWindow();  myMini.initMini(thecontent);  break;  case "confirmcompleted":  alert("You have confirmed the request. The User is no part of your network");  stoptheload();  myTimer.queuePush('closeMini_minibox');  cWiz.cindex = 0;  break;  case "confirmrequest":  thecontent = cWiz.setUserControl();  myMini.showCloseInfo = cWiz.setRequestHeader();  myMini.initMini(thecontent);  break;  case "userrequest":  thecontent = cWiz.setUserRequest();  myMini.showCloseInfo = cWiz.setRequestHeader();  myMini.initMini(thecontent);  break;  case "register":  thecontent = cWiz.displayRegistration();  myMini.showCloseInfo = cWiz.setRequestHeader();  myMini.initMini(thecontent);  break;  case "boardwindow":  thecontent = myBoard.setBoardWindow(instr[1]);  myMini.initMini(thecontent);  break;  case "blogcomment":  thecontent = myBlogs.setCommentContent(instr[0]);  myMini.initMini(thecontent);  myBlogs.setSmallTextEditor();  break;  case "openalert":    myMini.showCloseInfo = myAlerts.setWinHeader();  thecontent = myAlerts.initWindow();  myMini.initMini(thecontent);  break;  case "mailcontact":  myMail.setContactInfo();  case "reply":  case "compose":  thecontent = myMail.setComposeContent(instr[0]);  myMini.initMini(thecontent);  myMail.setTextEditor();  break;  case "imagewindow":  thecontent = tempList.initImgWindow();  myMini.initMini(thecontent);  tempList.initImgs();  tempList.initMainImg();  break;  case "launchuploader":  thecontent = myUploader.initUploader(instr[1], instr[2]);  myMini.initMini(thecontent);  break;  case "showaccounts":   thecontent = accountManager.initWin(instr[1]);  myMini.initMini(thecontent);  break;  case "comment":   thecontent = uReg.printComment(instr[1]);  myMini.showCloseInfo = uReg.getCommentHeader();  myMini.initMini(thecontent);  break;  case "deleteEvent":  thecontent = uEvent.eventDeleter();  myMini.initMini(thecontent);  break;  case "deleteFile":  thecontent = uEvent.startDeleter();  myMini.initMini(thecontent);  break;  case "partner":  thecontent = uReg.printComment(instr[1]);  myMini.showCloseInfo = uReg.getPartnerHeader();  myMini.initMini(thecontent);  break;  case "startGlaze":  psval = (instr[1] == null) ? "" : instr[1];  psval2 = (instr[2] == null) ? "" : instr[2];  glazer.init();  glazer.display(psval, psval2);  break;  case "showAccounts2":  case "showAccounts":  thelink = null;  if(state == 0)  {thelink = new Array("Sign in");}  else   {thelink = new Array();}  try{  myMini.currentTopTab  = uReg.currentReg;    }catch(e){myMini.currentTopTab  = myMini.previousTopTab = "Sign in";}      myMini.setContent('mini2content', accountTypes, param, "Account: ", thelink, true);  myMini.previousTopTab = uReg.currentReg;  break;  case "showGlaze":  myMini.currentTopTab  = myMini.previousTopTab = params.curtab;  myMini.setContent('mini2content', params.eventcategory, param, "", new Array('Next'));  break;  case "updateGlaze":  glazer.newPage();  break;  case "accountcategories":  case "eventadd":  if (instr[0] != "showGlaze")  {thelink = new Array("Save and Finish", "Save", "Discard");}  leftlinks = params.eventcategory;  if (leftlinks[leftlinks.length - 1] != "Tags")  {leftlinks.push("Tags");}  myMini.setContent('mini2content', leftlinks, param, "", thelink);  break;  case "setEvent":  thecontent = myEvents.printEventForm();  myMini.setContent('minicontent', thecontent, "topClose");  signin = true;  break;  case "setBioInfo":  case "setCurrentTeamInfo":  case "setAllTeamInfo":  case "setCurrentSeasonInfo":  case "setSchoolInfo":  case "setSchoolAffiliation":  thecontent = accountInfo.printAccountForm();  myMini.setContent('minicontent', thecontent, "topClose");  break;  case "cAccount":  thecontent = accountManager.setSwitchContent();  myMini.setContent('minicontent', thecontent, "topClose");  myTimer.queuePush('setMini_setAContent/mn_switch/mn_delete');  break;  case "filterwindow":  myMini.showMini('minibox2', winWidth, 30);  myTimer.queuePush('setMini_filterwindowcontent/'+param);  break;  case "filterwindowcontent":  myMini.currentTopTab  = params.eventcategories[0];  myMini.setContent('mini2content', params.eventcategories, param, "Filters: ", new Array(), true);  myMini.previousTopTab = myMini.currentTopTab;  retval = params.psports[params.spindex]+",_"+myMini.currentTopTab+',_';  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/getMainFilter/'+retval);    break;  case "setfilterwindow":  myMini.showCloseInfo = uReg.getFilterHeader(instr[1]);  thecontent = myFilterWindow.setMainFilter();  myMini.setContent('minicontent', thecontent, "topClose");  signin = true;  break;  case "AImage":  psv = (instr[1] == null) ? "" : '/'+instr[1];  accountManager.startMini();  myTimer.queuePush('setMini_AImageset'+psv);    break;  case "AImageset":  psv = (instr[1] == null) ? "" : '/'+instr[1];  thecontent = accountManager.setSwitchContent();  if(psv == "")  myMini.showCloseInfo = uReg.getProfileImageHeader();  myMini.setContent('minicontent', thecontent, "topClose");  myTimer.queuePush('setMini_setAImage'+psv);  break;  case "setAImage":  accountManager.setAccounts(accountManager.accountImages(instr[1]));  if(BrowserDetect.browser == "Explorer" && BrowserDetect.version < 7)   {myTimer.queuePush("fadein_"+0+"/"+100+"/hider/"+100+"/");}  else  {myTimer.queuePush("fadefull");}  break;  case "setAContent":  accountManager.setAccounts(accountManager.accountContent(instr[1], instr[2], 'account'));  if(BrowserDetect.browser == "Explorer" && BrowserDetect.version < 7)   {myTimer.queuePush("fadein_"+0+"/"+100+"/hider/"+100+"/");}  else  {myTimer.queuePush("fadefull");}  break;  case "setAAdmin":  thecontent = accountManager.accountAdmin(instr[1]);  myMini.setContent('minicontent', thecontent, "topClose");  myTimer.queuePush("fadefull");  break;  case "setAAcess":  thecontent = accountManager.accountContent(instr[1], instr[2], "access");  myMini.setContent('minicontent', thecontent, "topClose");  myTimer.queuePush("fadefull");  break;  case "setGlazeInfo":  if (currentLink == "HOME"){  switch(glazer.currenttype){  case "Players": myMini.showCloseInfo = uReg.getUploadPlayerHeader(); break;  default: myMini.showCloseInfo = uReg.getUploadHeader(); break;  }  }  thecontent = glazer.initContent();  myMini.setContent('minicontent', thecontent, "topClose");  glazer.setContent();  glazer.switchCurrentImage();  glazer.initSideImgs();  break;  }  break;  case "scroll":  switch(param){  case "left": case "right": case "up": case "down":  if(sidescrolling) {scrollIt(param);}  break;  }  break;  case "closeMini":  cWiz.visible = false;  glazer.moreload = false;  storepost = false;  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/closeMini_'+param);  break;  case "resizetextbox":  currenteditor.resizeColWidth();  stoptheload();  break;  case "resizepagewidth":  plen = param/1;  myHomePage.resizeWidth(plen);  break;  case "setcontenttabs":  stoptheload();  contentTabs.setTopTabs();  break;  case "resizepage":  myHomePage.resizePage();  break;  case "resizefile":  glazer.setHeight(param);  break;  case "initimg":  glazer.initImg(param);  break;  case "enterSite":  alert('Enter Here');  break;  case "terminateMini":  document.getElementById("minibox").style.display = "none";  break;  case "setClickedTab":  if(uReg.currentReg != null) {myMini.setCurrentTab(uReg.currentReg);}  else if(myFiles.currentTab != null);  else {myMini.setCurrentTab('Sign in');}  break;  case "setDisplay":  myFiles.setDisplayPage();  break;  case "setImages": break;  case "showevent":  instr = param.split('/');  switch(instr[0]){  case "new":  myLarge.displayLargeDisplay(instr[1], instr[2]);  break;  }  break;  case "resetMini":  switch(param){  case "all":  myMini.resetContent();  break;  case "minibox2":  myMini.resetMinibox2();  break;  case "minibox3":  myMini.resetMinibox3();  break;  case "minibox":  myMini.resetMinibox();  break;  }  break;  case "remove":  document.getElementById(param).style.display = "none";  break;  case "processMid":  AJAX.processMe();  break;  case "setsidelinks":  break;  case "processSubs":  AJAX.processSubs();  break;  case "MidDirect":  myTimer.queuePush("showMid");  break;  case "setEDiv":  setEDiv();  break;  case "displayMid":  if(!dothefade){   stoptheload();  dothefade = true;  myLarge.removeGlaze();  }  else{  myTimer.queuePush("startMid");  }    break;  case "displayMini":  document.getElementById(param).style.display = "block";  break;  case "fadefull":  if(param == null){  theid = "midboxcontainer";  theframe = "theframe";  }  else{  instr = param.split('/');  theid = instr[0];  theframe = instr[1];  }  blender.changeOpac(100, theid , theframe);  break;  case "startMid":  AJAX.processMid();  break;  case "minicloser":  UI.minicloser();  break;  case "showMid":  UI.processChild();  break;  case "iehandlehistory":  stoptheload();  if(expectedmain != mainurl && mainurl != "" && expectedmain != ""){  stoptheload();  expectedmain = mainurl;  expectedHash = expectedmain;  myHandler.handleHistory();  }  break;  case "expandMini":  alert('HI');  break;  case "setImgWH":  myFiles.setImgWH();  break;  case "setUimgWH":  theval = parseInt(param);  myUserList.setUimgWH(theval);  break;  case "setMidcontent":  setMidContent();  break;  case "openLink":  instr = param.split('/');  thelink = instr[0];   thesection = instr[1];  thesubsection= instr[2];  value = instr[3];  ctxt = instr[4];  openLink(thelink, thesection, thesubsection, value, null, ctxt);  break;  case "setcontent":  this.waiting = true;  setAjaxCont();  break;  case "callAjax":  if(!this.waiting){  instr = param.split('/');  thelink = instr[0];   thesection = instr[1];  thesubsection= instr[2];  value = instr[3];  ctxt = instr[4];  this.waiting = true;  generalProcess.callAjax(thelink, thesection, thesubsection, value, null, ctxt);  }    break;  case "callCommand":  instr = param.split('/');  thelink = instr[0];   thesection = instr[1];  thesubsection= instr[2];  value = instr[3];  generalProcess.processCommand(thelink, thesection, thesubsection, value);  break;  case "uploadstatus":  instr = param.split('/');  bytesize = parseInt(instr[0]);   upsize = parseInt(instr[1]);  startoff = parseInt(instr[2]);  if(upsize <= bytesize + startoff){  myTimer.queuePush("pause_40/1");  totalSize = bytesize + startoff;  thewidth = ((upsize/(bytesize-startoff)))*myUploader.uploadBarSize;  thewidth = Math.floor(thewidth);  thewidth = (thewidth > 219) ? 219 :  thewidth;  myUploader.drawUploadBar('#2b79d9', thewidth);  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/upload_handler');    }else{  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/upload_handler/end');  }  break;  case "filesetup":  instr = param.split('_');  thelength = instr.length;  if(thelength > 3)  {filename = instr.splice(2, (thelength  - 1)).join("_");}  else  {filename = instr[2];}  myFiles.addToFileServerName(param);  myFiles.addToFileList(filename);  break;  case "showuploadstatus":  myUploader.showuploadstatus(param);  break;  case "showlarge":  instr = param.split('/');  thewidth = parseInt(instr[0]);   theheight = parseInt(instr[1]);  myLarge.displayLargeDisplay(thewidth,theheight);  break;  case "processtoplist":  myFilters.processTopList(param);  break;  case "togglefilters":  myFilters.toggleFilters();  break;  case "signin":  instr = param.split('/');  thewidth = parseInt(instr[0]);   theheight = parseInt(instr[1]);  thedefault = (instr.length > 2) ? "/"+instr[2] : "";  thedefault = (instr.length > 3) ? "/"+instr[2]+"/"+instr[3] : "";  myLarge.displayLargeDisplay(thewidth,theheight);  myTimer.queuePush("setMini_signin"+thedefault);  break;  case "submitupload":  instr = param.split('/');  theform = instr[0];   theaction = instr[1];  document.getElementById(theform).action = theaction;  document.getElementById(theform).submit();  break;  case "addDiv":  instr = param.split('/');  thediv = document.getElementById(instr[0]);   thetext = instr[1];  currentText = thediv.innerHTML;  if(currentText == ""){  currentText = "<div style = 'padding-top:1px; float:left; padding-left:40px; width:20px; height:18px;'></div>";  }  currentText += "<div style = 'padding-top:1px;  float:left; padding-left:1px; width:10px; height:18px;'>"+thetext+"</div>";  thediv.innerHTML = currentText;  break;  case "unpauseuscroll":  instr = param.split('/');  incr = (instr[0]/1);   thelimit = (instr[1]/1);  sideScroller.pausecount += incr;  if(sideScroller.pausecount >= thelimit){  sideScroller.pausecount = 0;  sideScroller.upause = false;  }  else{  stoptheload();  this.queuePush('unpauseuscroll_'+incr+'/'+thelimit);  }  break;  case "pause":  instr = param.split('/');  thelimit = parseInt(instr[0]);   incr = parseInt(instr[1]);  this.currentCounter = (!this.waiting) ? 0 : (this.currentCounter + incr);  this.waiting = true;  if(this.currentCounter >= thelimit){  this.waiting = false;  this.currentCounter = 0;  }  break;  case "removeBox":  cobj = document.getElementById(param);  cobj.style.display = "none";  keylocation = "";  break;  case "ondropdown":  cval = (param == "true");  dropDown.setOnList(cval);  stoptheload();  break;  case "setdropdownover":  dropDown.setDropDownOver(param);  break;  case "movedropdown":  dropDown.moveSelection(param);  break;  case "setdropdown":  dropDown.init(dropDown.objname, dropDown.direction, param);  break;  case "search":  objval = document.getElementById('u_search').value;  objval = objval.replace(/\s/g, '_');  stoptheload();  if(objval.match(/[a-zA-Z0-9]/))  myTimer.queuePush('callCommand_'+currentLink+'/'+currentSection+'/'+currentSubsection+'/search_'+currentSubsection+',_'+objval);  keylocation = "";  break;  case "setLoggedin":  generalProcess.loggedin = true;  params.pages = new Array();  contentTabs.pageMapper = new Array();  break;  case "callhistory":  myHandler.handleHistory();  break;  case "resetui":  topLinks.reInit();  reloadsite();  break;  case "expand":    glazecolor = "#000";  this.resetWait = true;  instr = param.split('/');  start_width = parseInt(instr[0]);   start_height = parseInt(instr[1]);  end_width = parseInt(instr[2]);   end_height = parseInt(instr[3]);  id = instr[4];  thewindow = instr[5];  incr = parseInt(instr[6]);  type = instr[7];  incrStart = expander.setExpandIncrStart(start_width, start_height, end_width, end_height, type);  incrEnd = expander.setExpandIncrEnd(start_width, start_height, end_width, end_height, type);  if(bx.id == "minibox"){  myMini.showMini(id, end_width, end_height);  }  else{  if(thewindow == "default"){  bx = document.getElementById(id);  thebox = bx.style;  }  else if (thewindow == "middle"){  bx = document.getElementById(id);  thebox = bx.style;  }  thebox.display = "block";  thebox.width = start_width + "px";  thebox.height = start_height + "px";  if(!this.waiting){  this.currentCounter = incrStart;  this.count = 0;  }  else{  this.currentCounter = (this.currentCounter + incr);  this.count ++;  }  this.waiting = true;  this.expand(incrEnd, id, start_width, start_height, end_width, end_height, thewindow, incr, type);  }  break;  case "getnextuser":  sideScroller.getNextUser();  break;  case "pausescroller":  sideScroller.setPause(param);   break;  case "resetrating":  portalUI.over = false;  portalUI.resetOver(param);  break;  case "setactionstate":  actionObj.setState(param);  break;  case "callcommandlist":  myTimer.queuePush(params.commandlist);  break;  }  }  };    this.addtoBackground = function(bg){  this.backgroundEvents.push(bg);  };    this.removeFromBackground = function(bg){  newBg = new Array();  for(i = 0; i < this.backgroundEvents.length; i++){  if(this.backgroundEvents[i] != bg)  newBg.push(this.backgroundEvents[i]);  }  this.backgroundEvents = new Array();  this.backgroundEvents = newBg;  };    this.runBackground = function(){  if(this.backgroundEvents.length > 0){  for(i = 0; i < this.backgroundEvents.length; i++)  {this.processBg(this.backgroundEvents[i]);}  }  };    this.resetScroller = function(){  this.morewaiting = true;  };    this.processBg = function(command){  switch(command){  case "docscroll":   if(homeUI.scroll_t)sideScroller.scrollText();   if(homeUI.scroll_u)sideScroller.scrollUser();   break;  case "history" :  if(IE ){  cframes = window.frames[0];  mainurl = cframes.getLocation();  if(expectedmain != mainurl && mainurl != "" && expectedmain != ""){  myTimer.queuePush("pause_20/1");  myTimer.queuePush('iehandlehistory');  }  }  else{  chash = window.location.hash.replace(/%20/, ' ');  chash = chash.replace(/\/\//g, '/default/');  if(expectedHash != chash){  stoptheload();  expectedHash = chash;  myHandler.handleHistory();  }  }  break;  case "printFilters":  myFilters.reLoadFilters();  break;  case "upload_handler":  this.countBgCalls ++;  if(this.countBgCalls >= 50){  generalProcess.callAjax(currentLink, currentSection, "upload_handler");  this.countBgCalls = 0;  }  break;  case "tabcontroller":  range = midHeight - myMouse.Y;  csize = 45 + contentTabs.divheight;  if((range >= csize)){  setDefaults();  bottomScroll.bottoggledown();  }    break;  case "gscroller":  if(glazer.moreload){  try{  midc = document.getElementById('glazerselection');  objlocation = midc.scrollHeight;  yincr = getGlazeIncr();  topincr = yincr + glazer.windowheight + 15;  if(topincr >= objlocation){  glazer.initSideImgs();  }  }catch(e){glazer.moreload = false; }  }  break;  case "scroller":  proceed = false;  switch(currentLink){  case "MEDIA":   case "MEMBERS":  proceed = true;  case "HOME":  case "LOCKER":  switch(currentSection){  case "Media": case "Blog": case "Blogs": case "Events": case "Mail": case "Network":  proceed = true;  break;  default:  switch(currentSubsection){  case "Board_Room": case "Watch_List":  case "Eyes":  proceed = true;  break;  }  break;  }  if(proceed){    if(moreload && !this.morewaiting){  midc = document.getElementById('midboxcontent');  if(midc != null){  objheight = midc.offsetHeight;  objlocation = midc.scrollHeight;  yincr = getMidIncr();  topincr = yincr + midHeight + 15;  if(topincr >= objlocation){  myTimer.queuePush('callAjax_'+currentLink+'/'+currentSection+'/callLoad//updateload');  myTimer.morewaiting = true;  }  }    }  }  break;  }  break;  }  };  }    var myTimer = new Timer(); function Comment(){    this.curleft = 0;  this.curtop = 0;  this.boxheight = 164 - 5;  this.boxwidth = 250;  this.thewidth = (((12.5 * 7 )+ 9)/100) * midrl;  this.timewidth = this.thewidth * .09;  this.cellwidth = this.thewidth * .125;  this.obj = null;  this.editing = false;  this.visible = false;  this.img = new Image(); this.img.src = "http://s3.amazonaws.com/ldimages/comment.gif";    this.setAbsParentPosition = function (obj){  if (obj.offsetParent) {  this.curleft = obj.offsetLeft;  this.curtop = obj.offsetTop;  while (obj = obj.offsetParent) {  this.curleft += obj.offsetLeft;  this.curtop += obj.offsetTop;  }  }  };    this.displayDefaultComment = function(){  txt = "";  txt += ('<div id = "commentbox" style = "display:none; overflow:hidden; position:absolute; top:0px; left:0px; z-index:1000; display:none; width:250px; height:164px; ">');  txt += ('</div>');  return txt;  };    this.setEditing = function(val){  this.editing = val;  };    this.displaybox = function (obj, move){  try{  move = (move == null) ? 0 : move;  this.visible = true;  doffset = 0;  if(obj != null)  this.obj = obj;  this.removebox();  thebox = document.getElementById('commentbox').style;  if(this.obj != null)  this.setAbsParentPosition(this.obj);  else   this.setAbsParentPosition(obj);  thebox.display = "block";  lval = ((this.curleft - this.boxwidth / 2)+ (this.cellwidth/2));  lval += move;  thebox.left = (lval > 0 ) ? lval+"px" : "0px";  psval = (this.curtop + doffset - this.boxheight - getMidIncr()) ;  thebox.top = (psval > 0 ) ? psval+"px" : "0px";  }catch(e){theerror = e;}  };    this.setContent = function(content){  thebox = document.getElementById('commentbox');  thebox.innerHTML = content;  };      this.removeBox = function(){  thebox = document.getElementById('commentbox');  thebox.innerHTML = "";  thebox.style.display = "none";  this.visible = false;  };      this.getTopIncr = function (){  if(IE)  topincr = document.body.scrollTop - 30;  else  topincr = window.pageYOffset - 30;      if(topincr > 30)  return topincr;  else  return 0;  };      this.removebox = function(){  thebox = document.getElementById('commentbox');  thebox.style.display = "none";  thebox.innerHTML = "";  };  }    var comment = new Comment(); function OverInfo(){  this.height = 40;    OverInfo.prototype.toString = function() {      return this.printDefaultInfo();  };    this.printDefaultInfo = function(){  txt = "";  txt += ('<div id = "ovinfo" style = "overflow:hidden; position:absolute; top:0px; left:0px; z-index:1000; display:none;  background:#000; color:#fff; font-size:10px; letter-spacing:2px">');  txt += ('</div>');  return txt;  };      }  var overinfo = new OverInfo(); function Folder(){    this.currentFolder ="";    this.createFolder = function(folder){  txt = "";  wrd= folder.replace(/_/g, ' ');  imgfile = params.imgtablist[folder];  txt += '<div style = "float:left; width:140px; height:120px; font-weight:bold; background:#fff;  font-size:10px; color:#0033aa;  cursor:pointer" onclick = "myFolder.performCommand(\''+folder+'\')">';  txt +='<div style = "margin-left:15px; margin-top:10px; width:100px; height:80px; background-image:url(\'http://s3.amazonaws.com/ldimages/'+imgfile+'.jpg\'); background-repeat:no-repeat; clear:both;"></div>';  txt +='<div class = "hoverlinks" style = "margin-left:15px; width:100px; clear:both; padding:2px; text-align:center;">'+wrd+'</div>';  txt += '</div>';  return txt;  };    this.performCommand = function(folder){  this.currentFolder = folder;  switch (currentLink){  case "HOME":  case "LOCKER":  switch(currentSection){  case "Register":  uReg.startRegistration(folder, "default");  break;  default:  switch(folder){  case "Upload_Photo": myUploader.startMultiUpload(); break;  case "Upload_Video": myUploader.startVideoUpload(); break;  case "Compose": myMail.startCompose(); break;  default: myTimer.queuePush('addTab_'+folder); break;  }  break;  }  break;  case "MEMBERS":  switch(currentSection){  case "Videos":  case "Photos":  case "Users":  case "Blogs":  case "Events":  case "Stats":  myTimer.queuePush('addTab_'+folder);  break;  }  break;  }  };  }    var myFolder = new Folder(); function PreviewPage(){    this.entrywidth = 380;  this.peditor = "";  this.border = "1px solid #ccc; ";  this.fsize = "";    this.resize = function(){  setDefaults();  this.entrywidth = defWidth -610;  cobj = document.getElementById('page_view');  if(cobj != null){  cobj.style.width = this.entrywidth+'px';  if(currentLink == "HOME"){  PEditor.entrywidth = this.entrywidth;  PEditor.resize();  }  }  };    this.initURL = function(){  params.group.push("Account_Information");  params.name.push("Account_Information");  params.fname.push("no");  params.inputtextoption.push("");  params.fullattribute.push(account+" URL");  params.inputtype.push("textarea");  params.value[params.value.length -1] = myHomePage.getLockerLink();  };    this.setContent = function(){  setDefaults();  this.initURL();  title = params.group;  tlen = title.length;  ctxt = "";  this.entrywidth = defWidth - 610;  PEditor.init(this.entrywidth, "accountwriter", "", this.entrywidth, 70, currentSubsection);  ctxt += this.printLeft();  ctxt += this.printRight();  if(currentLink == "HOME")  ctxt += this.printEdit();  return ctxt;  };    this.printLeft = function(){  title = params.group;  tlen = title.length;  cont = "";  stxt = "";  stxt +='<div style = "float:left; width:auto;">';  for(i = 0; i < tlen; i++){  cont = this.printContent(i, params.fullattribute, '', 'padding-left:3px; padding-right:10px;', '1px solid #fff', false, false);  if(cont != ""){  stxt += this.printHeader(title[i]);  stxt += '<div style = "clear:both; padding-top:5px;">&nbsp;</div><div style = "clear:both; padding-bottom:20px;">'+cont+'<div style = "clear:both"></div></div>';  }  }  stxt +='</div>';  return stxt;  };    this.printRight = function(){  tlen = params.group.length;  stxt = "";  stxt +='<div id = "page_view" style = "float:left; width:'+this.entrywidth+'px;">';  for(i = 0; i < tlen; i++){  cont = this.printContent(i, params.value, "100%", '', "1px solid "+this.border, true, false);  if(cont != ""){  stxt += this.printHeader('&nbsp;');  stxt += '<div style = "clear:both; padding-top:5px;">&nbsp;</div><div style = "clear:both; padding-bottom:20px;">'+cont+'<div style = "clear:both"></div></div>';  }  }  stxt +='</div>';  return stxt;  };    this.printEdit = function(){  tlen = params.group.length;  stxt = "";  stxt +='<div id = "page_view" style = "float:left; padding-left:5px; width:80px;">';  for(i = 0; i < tlen; i++){  cont = this.printContent(i, params.value, "100%", '', "1px solid #fff", true, true);  if(cont != ""){  stxt += this.printHeader('&nbsp;');  stxt += '<div style = "clear:both; padding-top:5px;">&nbsp;</div><div style = "clear:both; padding-bottom:20px;">'+cont+'<div style = "clear:both"></div></div>';  }  }  stxt +='</div>';  return stxt;  };    this.printHeader = function(name){  txt = "";  wrd = name.replace(/_/g, ' ');  if(wrd == "") wrd = "&nbsp;";  txt += '<div style = "clear:both;  font-size:'+this.fsize+'px; padding-left:5px; font-weight:bold; color:#000">';  txt +=wrd;  txt += '</div>';  return txt;  };    this.printContent = function(i, parray, cwidth, cstyle, borderstyle, showedit, displayedit){  txt = "";  if(displayedit)  curcont = this.printEditSection(i, parray, cwidth, borderstyle, showedit);  else  curcont = this.printSection(i, parray, cwidth, borderstyle, showedit);  if(curcont != ""){  txt +='<div style = "clear:both; margin-top:10px; '+cstyle+'">';  txt +=curcont;  txt +='</div>';  }  return txt;  };    this.printSection = function(i, parray, cwidth, borderstyle, showedit){  xtxt = "";  clen = parray.length;  counter = 0;  for(c = 0; c < clen; c++){  if(params.group[i] == params.name[c]){  wrd = parray[c];  keepunderscore = (params.fullattribute[c] == "LD_Mail" || params.fullattribute[c] == "Email Address" || params.name[c] =="Account_Information");  if(!keepunderscore)  wrd = wrd.replace(/_/g, ' ');  printe = (showedit && params.fname[c] == "yes" && currentLink == "HOME");    xtxt += this.setRow(wrd, params.inputtype[c], borderstyle, cwidth, i, c, printe);    counter ++;  }  }  return xtxt;  };    this.setRow = function (wrd, type, borderstyle, cwidth, i, c, printid){  if(wrd == "") wrd = "&nbsp;";  vtxt = '';  vtxt +='<div style = "float:left; clear:both; font-size:'+this.fsize+';';  if(type == "textarea")  vtxt +='height:120px; overflow: auto; ';  else  vtxt +='height:22px; ';  vtxt +='border:'+borderstyle+'; padding:0px; margin:0px; width:'+cwidth+'; padding-left:2px; border-top:0px; ';  if(counter == 0)   vtxt +='border-top:'+borderstyle+';';  vtxt +='" ><div style = "float:left;" ';  if(printid)   vtxt+='id = "obj_'+i+'_'+c+'" ';  vtxt +='>'+wrd+'</div>';  vtxt += '</div>';  return vtxt;  };    this.printEditSection = function(i, parray, cwidth, borderstyle, showedit){    xtxt = "";  clen = parray.length;  counter = 0;  for(c = 0; c < clen; c++){  if(params.group[i] == params.name[c]){  printe = (showedit && params.fname[c] == "yes" && currentLink == "HOME");  wrd = "";  if(printe)   wrd = '<div style = "float:left; color:#000099; text-decoration:underline; width:100%; cursor:pointer; text-align:right; padding-top:2px; " onclick = "PEditor.performCommand(this, '+i+', '+c+')">edit</div>';    xtxt += this.setRow(wrd, params.inputtype[c], borderstyle, cwidth, i, c, false);  counter ++;  }  }  return xtxt;  };    this.init = function(){  myHomePage.setContent(this.setContent());  setPageCommands(new Array("Download PDF"));  };    }    var previewPage = new PreviewPage();   function EventEditor(){  this.eventname = "";  this.cname = "";  this.level = "";  this.i = "";  this.parent = "";  this.width = midWidth-100;  this.ctype = "";  this.eventlist = "";  this.eventarray = new Array();  this.statlist = "";  this.section = "";  this.defselection = "Lineup";  this.photoval = "";  this.ewidth = 230;  this.opponent = new Array();  this.evparent = new Array();  this.account = "";  this.cdate = "";  this.editable = true;  this.participant = new Array();  this.hasopponent = false;  this.statselection = "";    this.resetEditor = function(){  this.ctype = "";  this.eventlist = "";  this.eventarray = new Array();  this.statlist = "";  this.section = "";  this.eventname = "";  this.cname = "";  this.level = "";  this.i = "";  this.evparent = "";  this.photoval = "";  this.defselection = "Lineup";  this.opponent = new Array();  this.evparent = new Array();  this.account = "";  this.cdate = "";  this.statselection = "";  this.participant = new Array();  };    this.setMntSelector = function(M){  rtxt = "";  for(i = 0; i < 12; i++){  rtxt += '<option value = "'+i+'" ';  if(myDays.monthword[i] == M)  rtxt += 'selected';  rtxt +='>'+myDays.monthword[i]+'</option>';  }  return rtxt;  };    this.setOptionsAmPm = function(slt){  txt = "<option value = 'am' ";  if(slt == "am") txt += "selected ";  txt +=">am</option>";  txt += "<option value = 'pm'";  if(slt == "pm") txt += "selected ";  txt +=">pm</option>";  return txt;  };    this.setInputDate = function(){  edate = document.getElementById('eventdate');  wrdlist = this.cdate.split(', ');   timelist = wrdlist[0];   mntday = wrdlist[1];  timeq = timelist.split(' ');  tarray = timeq[0].split(":");    darray = mntday.split(' ');    Y = wrdlist[2];  H = tarray[0];  m = tarray[1];  M = darray[0];  D = darray[1];  amorpm = timeq[1];    ctxt = '<div style = "float:left;">';  ctxt +='<div style = "float:left;"><input id = "event_H" type = "text" style = "height:15px; font-size:10px; width:20px; " value="'+H+'"/></div>';  ctxt +='<div style = "float:left;"><div style = "height:15px; margin-left:2px;width:3px; text-align:center;">:</div></div>';  ctxt +='<div style = "float:left;"><input id = "event_m" type = "text" style = "height:18px; margin-left:4px; font-size:10px; width:20px; height:15px;" value = "'+m+'"/></div>';  ctxt +='<div style = "float:left;"><select id = "event_ampm" type = "text" style = "height:21px; margin-left:8px; font-size:10px; width:50px; ">'+this.setOptionsAmPm(amorpm)+'</select></div>';  ctxt +='<div style = "float:left;"><select id = "event_Mnt" style = "height:21px; margin-left:8px; font-size:10px; width:70px; ">'+this.setMntSelector(M)+'</select></div>';  ctxt +='<div style = "float:left;"><input id = "event_D" type = "text" style = "height:15px; margin-left:4px; font-size:10px; width:20px; " value = "'+D+'"/></div>';  ctxt +='<div style = "float:left;"><input id = "event_Y" type = "text" style = "height:15px; margin-left:4px; font-size:10px; width:50px; " value = "'+Y+'"/></div>';  ctxt += '</div>';  edate.innerHTML = ctxt;  };    this.submitDate = function(){  H = document.getElementById('event_H').value/1;  m = document.getElementById('event_m').value/1;  M = document.getElementById('event_Mnt').value/1;  D = document.getElementById('event_D').value/1;;  Y = document.getElementById('event_Y').value/1;  evobj = document.getElementById('event_ampm');  amorpm = evobj.options[evobj.selectedIndex].value;      valid = true; errors = "";  if(!(H <= 12 && H > 0)){ valid = false; errors += "Hour "; }  if(!(m < 60)){ valid = false; errors += "Minute "; }  if(!(M < 12)){ valid = false; errors += "Month "; }  if(!(D>0 && D <= myDays.daynum[M])){ valid = false; errors += "Day "; }  if(!(Y > 1900 && Y < 2300)){ valid = false; errors += "Year "; }  if(amorpm == "pm" && H != 12) H = H+12;  if(amorpm == "am" && H == 12) H = 0;  M+=1;    if(!valid) alert("Error interpreting "+errors);  else{  cdate = Y+"-"+M+"-"+D+" "+H+":"+m+":00";   postval = this.eventname+',_'+cdate+',_'+mySeason.currentseason;  myTimer.queuePush("callAjax_"+currentLink+"/"+currentSection+"/changeeventdate/"+postval+'/reseteventdate');  }    };    this.changeDate = function(obj){  switch(obj.innerHTML){  case "edit":   this.setInputDate();  obj.innerHTML = "submit";  break;  case "submit":  this.submitDate();  obj.innerHTML = "edit";  break;  }  };    this.prepareDate = function(){  wrd = this.cdate.split(', ');  hr = wrd[0].split(':');  hour = hr[0]/1;  chour = hour;  if(hour > 12){   hour =  hour - 12;   hr[0] = hour;  }  else if (hour == 0)  hr[0] = 12;  wrd[0] = hr.join(':');  ext = (chour < 12) ? "am" : "pm";  wrd[0] = wrd[0]+' '+ext;  this.cdate = wrd.join(', ');  };    this.setEventInfo = function(cstyle){  if(this.cname == "")  twrd = uEvent.setWrd(this.eventname, true);  else  twrd = this.cname.replace(/_/g, ' ');  cxt = (uEvent.curevent == "") ? "" : " - "+uEvent.curevent;  cxt = cxt.replace(/_/g, ' ');  this.prepareDate();  txt = "";  txt += '<div style = "float:left; clear:both; padding-top:10px; padding-left:10px; padding-bottom:10px; width:600px;">';    txt += '<div style = "float:left; font-weight:bold; clear:both; padding-top:10px;">';  txt +=uEvent.currenttype;  txt +='</div>';  txt += '<div style = "float:left; clear:both; padding-top:18px;">';  txt +='<div style = "float:left;">';  txt +='<div style = "float:left; ">'+twrd+cxt+'</div>';  txt +='</div>';    txt +='<div style = "float:left; margin-left:45px;">';  txt +='<div style = "float:left;margin-left:5px;" id = "eventdate">'+this.cdate+'</div>';  if(this.editable){  txt +='<div style = "float:left;margin-left:5px; text-decoration:underline; cursor:pointer; color:#000099;" onclick = "eventEditor.changeDate(this)">edit</div>';  }  txt +='</div>';  txt +='</div>';  txt +='</div>';  return txt;  };    this.getObjHeight = function(i){  switch(params.inputtype[i]){  case "textarea": cheight = "height:120px; "; break;  default: cheight = "height:22px; ";  }  return cheight;  };    this.setDetailContent = function(){  title = params.fullattribute;  clen = title.length;  content = "";     for(i = 0; i < clen; i++){  cheight = this.getObjHeight(i);    cname = title[i].replace(/_/g, ' ');  content +='<div style = "clear:both; font-size:10px; border:1px solid #fff; border-right:0px; border-top:0px;  ';  if(i == 0)  content +='border-top:1px solid #fff;';   content +=cheight+' padding-top:6px; ">';  content +=cname;  content +='</div>';  }  return content;  };    this.setRightObj = function(objid, cwidth, val, i, cborder, cstyle, command){  cont = "";  cheight = this.getObjHeight(i);  cont +='<div id = "'+objid+'_'+i+'" style = "overflow-y:auto;  float:right; font-size:10px; padding:2px; padding-top:4px; border:1px solid '+cborder+';   width:'+cwidth+'px; '+cstyle;  if(i == 0)  cont +=' border-top:1px solid '+cborder+'; ';  else  cont += ' border-top:0px; ';  cont +=cheight+'" '+command+'>'+val;  cont +='</div>';  return cont;  };    this.setDetailEntry = function(){  title = params.fullattribute;  clen = title.length;  content = "";  for(i = 0; i < clen; i++){  content +='<div style = "clear:both; width:295px;  float:right">';  command = 'onclick = "PEditor.performCommand(this, '+0+', '+i+')"';  if(this.editable){  content +=this.setRightObj('edit_0', 37, "edit", i, "#fff", "color:#000099; padding-left:1px; text-decoration:underline; cursor:pointer; ", command);  }  content +=this.setRightObj('obj_0', this.ewidth, params.value[i], i, "#ddd", '', '');  content +='</div>';  }  return content;  };    this.performAction = function(obj, i){  ccommand = obj.innerHTML;  switch(ccommand){  case "edit":  break;  case "submit":  break;  }  };    this.setEventDetails = function(cstyle){  txt = "";  txt += '<div style = "float:left; clear:both; width:100%; padding-bottom:10px; '+cstyle+'; ">';  txt += '<div style = "float:left; font-weight:bold; clear:both; padding:10px;">Event Details</div>';  txt +='<div style = "clear:both;padding-top:10px; padding-left:10px; width:600px;">';  txt +='<div style = "float:left; width:250px;">'+this.setDetailContent()+'</div>';  txt +='<div style = "float:left; width:295px; ">'+this.setDetailEntry()+'</div>';  txt +='</div>';  txt +='</div>';  return txt;  };    this.setOpponent = function(pic, name, type){  stxt = "";  stxt +='<div style = "float:left;">';  if(this.editable){  stxt +='<div style = "clear:both; text-decoration:underline; color:#aa0000; width:95px; height:25px; text-align:center; cursor:pointer" onclick = "eventEditor.performCommand(\'Add\', \''+type+'\')">Change</div>';  }  stxt +='<div style = "float:left; background:#fff;">';  stxt +='<div style = "width:102px; clear:both; "><img width = "100" src = "'+pic+'" /></div>';  stxt +='<div style = "clear:both; width:101px;  height:20px; padding-top:3px; text-align:center; font-size:10px;">'+name+'</div>';  stxt +='</div>';  stxt +='</div>';  return stxt;  };    this.initParent = function(){  ctxt = "";  ctxt += '<div id = "user_opponent" style = "float:left;">';  if(this.account == account){  if(uEvent.currentuser == ""){  cimg = (this.evparent['img'] == null) ? picture : this.evparent['img'];  img = (cimg == "none") ? 'http://s3.amazonaws.com/ldimages/noimage.gif' :  upldDir+cimg;  cname = (this.evparent['usr'] == null) ? unameu.replace(/_/g, ' ') : this.evparent['usr'];  }  else{  img = 'http://s3.amazonaws.com/ldimages/noimage.gif';  cval = uEvent.currentuser.substr(1, uEvent.currentuser.length-2);  uarray = cval.split('||');  cname = uarray[1].replace(/_/g, ' ');  }  ctxt += this.setOpponent(img, cname, "Parent");    }  else  ctxt +=this.createAdder("Add_"+this.account+"_Opponent", "Opponent");  ctxt +='</div>';  return ctxt;  };    this.initOpponent = function(){  ctxt = "";    ctxt += '<div id = "opp_opponent" style = "float:left;">';  if(this.opponent['img'] == null)  ctxt +=this.createAdder("Add_"+caccount+"_Opponent", "Opponent");  else{  img = (this.opponent['img'] == "none") ? 'http://s3.amazonaws.com/ldimages/noimage.gif' :  upldDir+this.opponent['img'];  ctxt += this.setOpponent(img, this.opponent['usr'], 'Opponent');  }  ctxt +='</div>';  return ctxt;  };    this.setAddOpponent = function(caccount){  xtxt = "";  this.account = caccount;  xtxt += '<div style = "float:left; clear:both; width:600px; padding:10px;">';  xtxt += this.initParent();  xtxt +='<div style = "float:left; margin-left:15px;  height:20px; padding:15px; margin-top:25px; width:50px; font-size:18px; font-weight:bold">VS.</div>';  xtxt +=this.initOpponent();  xtxt +='</div>';  return xtxt;  };    this.resetParent = function(){  cobj = document.getElementById('user_opponent');  if((this.evparent['img'] == null || this.evparent['img'] == "") && this.account != account)  cobj.innerHTML = this.createAdder("Add_"+this.account+"_Opponent", "Opponent");   else{  img = (this.evparent['img'] == "none") ? 'http://s3.amazonaws.com/ldimages/noimage.gif' :  upldDir+this.evparent['img'];    cont = this.setOpponent(img, this.evparent['usr'], 'Parent');  cobj.innerHTML = cont;  }  };    this.resetOpponent = function(){  cobj = document.getElementById('opp_opponent');  if(this.opponent['img'] == null || this.opponent['img'] == "")  cobj.innerHTML = this.createAdder("Add_"+this.account+"_Opponent", "Opponent");   else{  img = (this.opponent['img'] == "none") ? 'http://s3.amazonaws.com/ldimages/noimage.gif' :  upldDir+this.opponent['img'];  cont = this.setOpponent(img, this.opponent['usr'], 'Opponent');  cobj.innerHTML = cont;  }  };    this.setOpponentView = function(cstyle, caccount){  txt = "";  txt += '<div style = "float:left; clear:both; width:100%px; padding:10px; '+cstyle+'; ">';  txt += this.setAddOpponent(caccount);  txt +='</div>';  return txt;  };    this.createAdder = function(command, ptitle){  ctxt = "";  title = command.replace(/_/g, ' ');  if(this.editable){  ctxt +='<div style = "float:left; text-align:center; width:140px; font-size:10px; color:#fff; background-image:url(\'http://s3.amazonaws.com/ldimages/bg8.gif\'); height:20px; padding:3px; padding-top:7px; margin-left:25px; font-weight:bold; cursor:pointer;" onclick = "eventEditor.performCommand(\''+command+'\', \''+ptitle+'\')">'+title+'</div>';  }  return ctxt;  }