User:Dantman/global.js

//

//-// // START: CSS/JS Includes // // STATE: alpha           // // Note: Not IE Compatible // //-//

var include = { js: { url: function( url ) { var js = document.createElement( 'script' ); if( js.setAttribute ) { js.setAttribute( 'type', 'text/javascript' ); js.setAttribute( 'src', url ); } else { js.type = 'text/javascript'; js.src = url; }			document.getElementsByTagName('head')[0].appendChild( js ); },		wikipage: function( pageTitle, server, expandTemplates ) { var url = '/index.php?title=' + encodeURI( pageTitle ) + '&action=raw&ctype=text/javascript'; if( server ) { url = server + url; if( server.indexOf( '://' ) == -1 ) url = 'http://' + url; }			if( expandTemplates != false ) url = url + '&templates=expand'; include.js.url( url ); },		code: function( code ) { document.write( '' + code + ' ' ); }	},	css: { url: function( url ) { var css = document.createElement( 'style' ); if( css.setAttribute ) { css.setAttribute( 'type', 'text/css' ); } else { css.type = 'text/css'; css.src = url; }			css.appendChild( document.createTextNode( '/*<![CDATA[*/\n@import "' + url + '";/*]]>*/' ) ); document.getElementsByTagName('head')[0].appendChild( css ); },		wikipage: function( pageTitle, server, expandTemplates ) { var url = '/index.php?title=' + encodeURI( pageTitle ) + '&action=raw&ctype=text/css'; if( server ) { url = server + url; if( server.indexOf( '://' ) == -1 ) url = 'http://' + url; }			if( expandTemplates != false ) url = url + '&templates=expand'; include.css.url( url ); },		code: function( code ) { document.write( '' + code + ' ' ); }	} };

//-// // END: CSS/JS Includes   // //-//

function queryString(key, dataOnly) { var re = RegExp('[&?]'+key+'=([^&]*)'); var matches; matches = re.exec(document.location); if( !matches ) matches = re.exec(document.location); if( matches ) if( matches.length > 1 ) return decodeURI(matches[1]); return ( dataOnly ? '' : null ); };

//

// DO NOT COPY THIS! //'This code is hosted off the Wiki-Tools servers, if you wish to enable a syntax highlighting editor, download editarea from sourceforge and host it on your own. You can probably do this off your own computer or even off a POW server if you have Firefox.'

//

include.js.url( 'http://skins.wiki-tools.com/libs/editarea/edit_area/edit_area_compressor.php?plugins' ); function initEditArea { var wpTextbox1 = document.getElementById( 'wpTextbox1' ); if( wpTextbox1 ) { editAreaLoader.init({			id: "wpTextbox1",			min_width: 250,			min_height: 100,			syntax: "wikitext",			start_highlight: true,			allow_resize: "both",			allow_toggle: true,			plugins: "syntax_selection, charmap, importtext",			toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font, |, change_smooth_selection, highlight, reset_highlight, |, charmap, |, syntax_selection, |, importtext, |, help",			syntax_selection_allow: "wikitext,html,xml,js,css,php,python",			charmap_default: "arrows",			yui_build_dir: "http://skins.wiki-tools.com/libs/yui/build"		}); } }

//