/* FILE ARCHIVED ON 2:00:24 Jan 14, 2009 AND RETRIEVED FROM THE AN OPENWAYBACK INSTANCE ON 10:30:25 Aug 1, 2024. JAVASCRIPT APPENDED BY OPENWAYBACK, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ if (currentPage.toLowerCase().indexOf("setnewnickname") > -1){ if (document.getElementById("subTdLeft")){ document.getElementById("subTdLeft").innerHTML = ""; } if (document.getElementById("sidebarDiv")){ document.getElementById("sidebarDiv").style.height = "370px"; } } if (currentPage.indexOf("SearchResults") > -1){ document.write(""); } //preload images newImage1 = new Image(); newImage1.src = "https://webarchive.library.unt.edu/eot2008/20090114020024/http://change.gov/page/-/Reside/images/shareYourIdea.gif"; newImage2 = new Image(); newImage2.src = "https://webarchive.library.unt.edu/eot2008/20090114020024/http://change.gov/page/-/Reside/images/shareYourIdeaPost.gif"; newImage3 = new Image(); newImage3.src = "https://webarchive.library.unt.edu/eot2008/20090114020024/http://change.gov/page/-/Reside/images/viewAllIdeas.gif"; newImage4 = new Image(); newImage4.src = "https://webarchive.library.unt.edu/eot2008/20090114020024/http://change.gov/page/-/Reside/images/viewAllIdeasPost.gif"; newImage5 = new Image(); newImage5.src = "https://webarchive.library.unt.edu/eot2008/20090114020024/http://change.gov/page/-/Reside/images/voteUp.gif"; newImage6 = new Image(); newImage6.src = "https://webarchive.library.unt.edu/eot2008/20090114020024/http://change.gov/page/-/Reside/images/voteDown.gif"; document.title = document.title.replace("Citizen's Briefing Book:", "Change.gov: Citizen's Briefing Book:"); if (currentPage.indexOf("lsi=4") > -1 || currentPage.indexOf("lsi=5") > -1 || currentPage.indexOf("lsi=6") > -1 || currentPage.indexOf("ideaProfile.apexp") > -1){ //readjust width of content area, to account for the profile sidebar //document.write(""); //add padding to right side of profile sidebar var ideasProfileSidebar = document.getElementById("ideasProfileSidebar"); if (ideasProfileSidebar){ if (ideasProfileSidebar.style){ ideasProfileSidebar.style.paddingRight = "18px"; } if (currentPage.indexOf("?me") > -1 || currentPage.indexOf("&me") > -1){ var aArray = ideasProfileSidebar.getElementsByTagName("a"); aArray[0].href = aArray[0].href + "&me"; aArray[1].href = aArray[1].href + "&me"; aArray[2].href = aArray[2].href + "&me"; var divArray = ideasProfileSidebar.getElementsByTagName("div"); divArray[2].innerHTML = divArray[2].innerHTML + "
Change Nickname"; } } } var communityName = document.getElementById("thePage:mainLayout:formIdea:pb:pbs:fieldCommunity"); if (communityName){ communityName.parentNode.parentNode.parentNode.parentNode.style.display = "none"; } var prevLink = document.getElementById("thePage:mainLayout:pbIdeaList:incPageLinks:ideaPageLinks:linkPrevPage"); if (prevLink){ if (prevLink.innerHTML){ prevLink.innerHTML = "< PREV"; } } var nextLink = document.getElementById("thePage:mainLayout:pbIdeaList:incPageLinks:ideaPageLinks:linkNextPage"); if (nextLink){ if (nextLink.innerHTML){ nextLink.innerHTML = "NEXT >"; } } var ideaListStdForm = document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm"); var pagination = document.getElementById("thePage:mainLayout:pbIdeaList:incPageLinks"); if (ideaListStdForm && pagination){ if (pagination.innerHTML){ var newSpan = document.createElement("span"); newSpan.innerHTML = pagination.innerHTML; ideaListStdForm.insertBefore(newSpan, ideaListStdForm.firstChild); } } var linkPopular = document.getElementById("linkPopular"); if (linkPopular){ if (linkPopular.href){ linkPopular.href = "/ideas/ideaList.apexp?c=09a800000004fo6&lsi=0"; } } var linkRecent = document.getElementById("linkRecent"); if (linkRecent){ if (linkRecent.href){ linkRecent.href = "/ideas/ideaList.apexp?c=09a800000004fo6&lsi=1"; linkRecent.title = "Recent Ideas"; } } var linkTop = document.getElementById("linkTop"); if (linkTop){ if (linkTop.href){ linkTop.href = "/ideas/ideaList.apexp?c=09a800000004fo6&lsi=2"; linkTop.innerHTML = "Popular Ideas"; linkTop.title = "Popular Ideas"; } } var linkRecentComments = document.getElementById("linkRecentComments"); if (linkRecentComments){ if (linkRecentComments.href){ linkRecentComments.href = "/ideas/ideaList.apexp?c=09a800000004fo6&lsi=3"; } } if (currentPage.indexOf("category=") > -1){ var linkRecent = document.getElementById("linkRecent"); var linkTop = document.getElementById("linkTop"); if (linkRecent){ linkRecent.href = linkRecent.href + "&" + currentPage.substring(currentPage.indexOf("category")); } if (linkTop){ linkTop.href = linkTop.href + "&" + currentPage.substring(currentPage.indexOf("category")); } } var buttonTd = document.getElementById("thePage:mainLayout:formIdea:pb:pbb:bottom"); if (buttonTd){ if (buttonTd.childNodes[1]){ buttonTd.childNodes[1].style.display = "none"; } } if (currentPage.indexOf("category") > 0 || currentPage.indexOf("lsi=1") > 0 || currentPage.indexOf("lsi=2") > 0){ var newDiv = document.createElement("div"); newDiv.className = "subtabs"; if (currentPage.indexOf("/ideas/ideaList.apexp?c=09a800000004fo6&lsi=1") > 0 && currentPage.indexOf("category=") < 0){ newDiv.innerHTML = ""; } else { newDiv.innerHTML = ""; } if (document.cookie.indexOf('sid') >= 0) { newDiv.innerHTML = newDiv.innerHTML + ""; } else { newDiv.innerHTML = newDiv.innerHTML + ""; } document.getElementById("bodyCell").insertBefore(newDiv, document.getElementById("bodyCell").childNodes[0]); } else if (currentPage.indexOf("editIdea.apexp") > 0 && document.cookie.indexOf('sid') >= 0){ var newDiv = document.createElement("div"); newDiv.className = "subtabs"; newDiv.innerHTML = ""; document.getElementById("bodyCell").insertBefore(newDiv, document.getElementById("bodyCell").childNodes[0]); } var subRightTd = document.getElementById("thePage:mainLayout:ideaListSubtabs"); if (subRightTd){ if (subRightTd.parentNode){ subRightTd.parentNode.className = "subRightTd"; } } var detailPageComments = document.getElementById("comments"); if (detailPageComments){ if (detailPageComments.parentNode){ detailPageComments.parentNode.className = "subRightTd"; } } if (currentPage.indexOf("ideaList.apexp") > 0 || currentPage.indexOf("viewIdea.apexp") > 0){ //get all elements in the idea table if (document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm:ideaList")){ var ideaContainer = document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm:ideaList"); var ideaList = ideaContainer.childNodes; } else if (document.getElementById("thePage:mainLayout:pbIdea:cIdeaDetails:ideaDetails:cIdeaUserLabel")) { var ideaListDetail = document.getElementById("thePage:mainLayout:pbIdea:cIdeaDetails:ideaDetails:cIdeaUserLabel").parentNode.childNodes[0]; if (!ideaListDetail.innerHTML){ var ideaListDetail = document.getElementById("thePage:mainLayout:pbIdea:cIdeaDetails:ideaDetails:cIdeaUserLabel").parentNode.childNodes[1]; } } if (ideaList){ for (var i = 0; i < ideaList.length; i++){ if (document.cookie.indexOf('sid') < 0) { var voteUpLink = document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm:ideaList:" + i + ":vote:vote:GuestVoteUpLink"); if (voteUpLink){ voteUpLink.onclick = doNothingVote; } var voteDownLink = voteUpLink.nextSibling; if (voteDownLink){ voteDownLink.onclick = doNothingVote; } } var ideaBody = document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm:ideaList:" + i + ":body").innerHTML; if (ideaBody.length > 800){ ideaBody = ideaBody.substring(0,800) + "…"; document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm:ideaList:" + i + ":body").innerHTML = ideaBody; } var dateTimeStamp = document.getElementById("thePage:mainLayout:pbIdeaList:incIdeaList:ideaListStd:ideaListStdForm:ideaList:" + i + ":createdDate"); if (dateTimeStamp){ dateTimeStamp.style.paddingLeft = "4px"; } } } if (ideaListDetail){ if (document.cookie.indexOf('sid') < 0) { var voteUpLink = document.getElementById("thePage:mainLayout:pbIdea:cIdeaDetails:ideaDetails:voteForm:buttonVote:vote:GuestVoteUpLink"); if (voteUpLink){ voteUpLink.onclick = doNothingVote; } var voteDownLink = voteUpLink.nextSibling; if (voteDownLink){ voteDownLink.onclick = doNothingVote; } } var dateTimeStamp = document.getElementById("thePage:mainLayout:pbIdea:cIdeaDetails:ideaDetails:createdDate"); if (dateTimeStamp){ dateTimeStamp.style.paddingLeft = "4px"; } } } function doNothing(obj,xoffset, yoffset) { //alert('You can not do this until you register!'); //setContent(); var xval = findPosX(obj); //var xval = 300; var yval = findPosY(obj); var popup = document.getElementById("registerPopup1"); if (popup) { popup.style.position = 'absolute'; //if (yval <= 200) { yval = 200;xval = 0;} popup.style.top = (yval + yoffset) + "px"; popup.style.left = (xval + xoffset) + "px"; popup.style.display = 'block'; } return false; } function findPosX(obj) { var curleft = 0; if(obj.offsetParent) while(1) { curleft += obj.offsetLeft; if(!obj.offsetParent) break; obj = obj.offsetParent; } else if(obj.x) curleft += obj.x; return curleft; } function findPosY(obj) { var curtop = 0; if(obj.offsetParent) { while(1) { curtop += obj.offsetTop; if(!obj.offsetParent) break; obj = obj.offsetParent; } } else if(obj.y) { curtop += obj.y; } return curtop; } function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else { if (document.body && document.body.clientHeight) { windowHeight = document.body.clientHeight; } } } return windowHeight; } function setContent() { if (document.getElementById) { var windowHeight = getWindowHeight(); if (windowHeight > 0) { var contentElement = document.getElementById('registerPopup1'); var contentHeight = 600; if (windowHeight - contentHeight > 0) { contentElement.style.position = 'absolute'; contentElement.style.top = ((windowHeight / 2) + document.documentElement.scrollTop - (contentHeight / 2)) + 'px'; contentElement.style.left = '300px'; //contentElement.style.margin = 'auto'; } else { contentElement.style.position = 'static'; } } } } function closeRegisterPopup () { //alert('close!'); //setContent(); document.getElementById('registerPopup1').style.display='none'; } function doNothingVote() { //alert('You can not do this until you register!'); //setContent(); var xval = findPosX(this); //var xval = 300; var yval = findPosY(this); var popup = document.getElementById("registerPopup1"); if (popup) { popup.style.position = 'absolute'; //if (yval <= 200) { yval = 200;xval = 0;} popup.style.top = (yval + 0) + "px"; popup.style.left = (xval + 118) + "px"; popup.style.display = 'block'; } return false; }