User:Inarius/bluecloud.js

// User:Lupin/popups.js

document.write(' ');

simplePopups=false; popupAdminLinks=true; popupStructure='menus'; popupFixRedirs=true; popupFixDabs=true; popupPreviewFirstParOnly=false; popupExtraUserMenu=true; popupUseQueryInterface = false; function siteArticlePath{ return 'wiki'; } function siteBotInterfacePath{ return 'w'; }

// --- /*   Written by Jonathan Snook, http://www.snook.ca/jonathan Add-ons by Robert Nyman, http://www.robertnyman.com function getElementsByClassName(oElm, strTagName, strClassName){ var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName); var arrReturnElements = new Array; strClassName = strClassName.replace(/\-/g, "\\-"); var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); var oElement; for(var i=0; i<arrElements.length; i++){ oElement = arrElements[i]; if(oRegExp.test(oElement.className)){ arrReturnElements.push(oElement); }		}	return (arrReturnElements) } // --- // Array support for the push method in IE 5 if(typeof Array.prototype.push != "function"){ Array.prototype.push = ArrayPush; function ArrayPush(value){ this[this.length] = value; } } // --- /*	How to call the function: To get all a elements in the document with a "info-links" class: getElementsByClassName(document, "a", "info-links"); // ---

// Appends any div.nav_toc_append to #nav_right // Moves any existing #nav_toc to #nav_right function domNavToc {	//var errNode = document.createTextNode( "No Sidebar" ); var navRight = document.getElementById( 'nav_right' );

if( !navRight ) { return 0; }	// Append all .nav_toc classed elements under #nav_toc_append var len; var navTocElements; var bodyContent = document.getElementById('bodyContent'); if(document.getElementsBySelector) { navTocElements = document.getElementsBySelector('#bodyContent div.nav_toc_append'); }	else if(bodyContent && getElementsByClassName) { navTocElements = getElementsByClassName(bodyContent,'*','nav_toc_append'); }	else if(bodyContent && bodyContent.getElementsByTagName){ var elements = bodyContent.getElementsByTagName('div'); len = elements.length; navTocElements = new Array; for(var i = 0; i < len; i++) {			if(elements[i].className == 'nav_toc_append') {				navTocElements[navTocElements.length]=elements[i]; }		}	} else { return 0; }

len = navTocElements.length; for(var i = 0; i < len; i++) {		var navTocAppend = navTocElements[i]; if( navTocAppend ) { //not the right way to do this if(navTocAppend.className == 'nav_toc_append') {				var navTocAppendClone = navTocAppend.cloneNode(true); navRight.appendChild( navTocAppendClone ); if(navTocAppendClone.style.display) {thisNavTocClone.style.display = 'block';} if(navTocAppendClone.visibility) {thisNavTocClone.visibility = 'visible';} navTocAppend.parentNode.removeChild(navTocAppend); }		}	}

// Append errNode if navToc doesn't exist var navToc  = document.getElementById( 'nav_toc' ); if( !navToc ) { //navRight.appendChild( errNode ); return 0; }

var navToc2 = navToc.cloneNode(true); navToc.parentNode.removeChild(navToc); navRight.appendChild( navToc2 );

navToc2.style.display = 'block'; }