/* generated javascript */
var skin = 'standard';
var stylepath = '/skins';

/* MediaWiki:Common.js */
// JS INCLUDE

function include_script(script_filename) {

  document.write('<' + 'script');
  document.write(' language="javascript"');
  document.write(' type="text/javascript"');
  document.write(' src="' + script_filename + '">');
  document.write('</' + 'script' + '>');

}

include_script("/swfobject.js");


function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE");
   var version = parseFloat(arVersion[1]);
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i];
         var imgName = img.src.toUpperCase();
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : "";
            var imgClass = (img.className) ? "class='" + img.className + "' " : "";
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
            var imgStyle = "display:inline-block;" + img.style.cssText;
            if (img.align == "left") imgStyle = "float:left;" + imgStyle;
            if (img.align == "right") imgStyle = "float:right;" + imgStyle;
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"; 
            img.outerHTML = strNewHTML;
            i = i-1;
         }
      }
   }    
}

if (window.attachEvent && !window.addEventListener) {
   addOnloadHook(correctPNG);
}

/* Any JavaScript here will be loaded for all users on every page load. */


function $(id)
{
  return document.getElementById(id);
}

function setupEvent (el, ev, fn, flag)
{
  el.addEventListener(ev,fn,flag);
}

function removeEvent (el, ev, fn, flag)
{
  el.removeEventListener(ev,fn,flag);
}

function cancelEvent(e)
{
  e.preventDefault();
  e.stopPropagation();
}

function setupEditClicks()
{
  if(wgUserName) setupEvent
  (
    document,
    'click',
    editClicksMouse,
    false
  );
}

function editClicksMouse(e)
{
 if (e.shiftKey) 
 {
   e.preventDefault();
   e.stopPropagation();

   var t=e.target;
   while (t.tagName!='A')
   {
     if (t.parentNode) t = t.parentNode;
     else break;
   }

   if (t.tagName=='A')
   {
     var cls=t.getAttribute('class');
     if 
     (
       !cls 
       || cls.indexOf('external')==-1
     )
     {
       var title = t.getAttribute('title').replace(/ /,'_');
       var theUrl = wgServer
         + wgScriptPath
         + wgArticlePath.replace(/\$1/,title)
         + '?action=edit'
         + '&backlink='
         + wgPageName.replace(/ /,'_');
       window.location.href=(theUrl);
       return false;
     }
   }
 }
}

addOnloadHook(setupEditClicks);


document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Zocky/SearchBox.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Zocky/LinkComplete.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

linkCompleteOnTab=true;
linkCompleteNamespace="0|102|100";
linkCompleteTriggers=
[
  /\[\[([^\[\]\|\n]*?)\s*$/,
  /;\s*([^;\|\n]*?)\s*$/,
  /=\s*([^=\|\n]*?)\s*$/,
  /\s([^\|\s]*?)\s*$/
]