//<![CDATA[
/******************************************************************************
 Analogue Object v1.12.05
 Copyright (c) 2005 Randall Lee Spence <http://www.analogueweb.com>
 This script is licensed under the CC-GNU Lesser General Public License
 <http://creativecommons.org/licenses/LGPL/2.1/>
******************************************************************************/
if (window != top) { top.location.href = location.href; };
if (!window.analogue) { var analogue = new Object(); };
Object.extend = function(destination, source) { for (property in source) { destination[property] = source[property]; }; return destination; };
Object.extend(analogue, {
  version : "1.12.05",
  enabled : function() { if (document.getElementById && document.getElementsByTagName) { return true; }; return false; },
  onbeforeload : function() { if (this.enabled) { for (var component in this) { if (this[component].onbeforeload) { this[component].onbeforeload(); }; }; }; },
  onload : function() { if (this.enabled) { for (var component in this) { if (this[component].onload) { this[component].onload(); }; }; }; },
  onresize : function() { if (this.enabled) { for (var component in this) { if (this[component].onresize) { this[component].onresize(); }; }; }; },
  tweaks : {
    onload : function() { this.links(); this.size(); },
    onresize : function() { this.size(); },
    links : function() { for (var i=0; i<=(document.links.length - 1); i++) { var link = document.links[i]; if (/mailto:/.test(link.href)) continue; if (link.hostname.search(window.location.hostname) == -1 && /http:/.test(link.href)) { link.target = "_blank"; link.title = "Link opens in new window"; }; }; },
    //size : function() { if (!window.attachEvent || window.opera) return; var body = document.getElementById("body"); var de = document.documentElement, db = document.body; var width = (de && de.clientWidth) ? de.clientWidth : (db && db.clientWidth) ? db.clientWidth : 0; var height = (de && de.clientHeight) ? de.clientHeight : (db && db.clientHeight) ? db.clientHeight : 0; width <= 770 ? body.style.width = "700px" : body.style.width = "100%"; height <= 450 ? body.style.height = "450px" : body.style.height = "100%"; },
    abbr : function() { if (!window.attachEvent || window.opera) return; document.documentElement.setAttribute("xmlns:awd", "http://www.w3.org/1999/xhtml"); document.body.innerHTML = document.body.innerHTML.replace(/<abbr/gi, "<awd:abbr").replace(/<\/abbr/gi, "</awd:abbr"); }
  },
  pseudo : {
    onbeforeload : function() { if (document.getElementById("classes")) this.structural("classes"); this.useraction("hover", "LI", "menu"); this.useraction("focus", "INPUT", "searchbox", "text"); },
    structural : function(node) { var element = document.getElementById(node); var children = []; var even = false; switch(element.nodeName) { case "TABLE" : children = element.childNodes; break; case "OL" : case "UL" : children = element.getElementsByTagName("LI"); break; default : for (var i=0; i<element.childNodes.length; i++) { if (element.childNodes[i].nodeType == 1) { children[children.length] = element.childNodes[i]; }; }; }; for (var j=0; j<children.length; j++) { var child = children[j]; if (element.nodeName == "TABLE") { if (child.nodeName == "TBODY") { var rows = child.getElementsByTagName("TR"); for (var k=0; k<rows.length; k++) { rows[k].onmouseover = function() { this.className += " ruled"; return false; }; rows[k].onmouseout = function() { this.className = this.className.replace(/ ruled\b/, ""); return false; }; even ? this.addclass(rows[k], "even") : this.addclass(rows[k], "odd"); even = !even; }; }; } else {if (children.length == 1) { this.addclass(child, "only-child"); break; } else if (j == 0) { this.addclass(child, "first-child"); } else if (j == children.length - 1) { this.addclass(child, "last-child"); }; even ? this.addclass(child, "even") : this.addclass(child, "odd"); even = !even; }; }; },
    target : function() { if (!window.attachEvent || window.opera) return; var showtarget = function(yes) { if (location.hash.length) { var target = document.getElementById(location.hash.substring(1)); if (target) target.className = yes ? target.className + " target" : target.className.replace(/ target\b/, ""); }; }; document.body.attachEvent("onclick", function() { showtarget(false); window.setTimeout(function() { showtarget(true); }, 0); }); document.body.click(); },
    useraction : function(action, tag, parent, attribute) { if (!window.attachEvent || window.opera) return; var elements = (parent == null) ? document.getElementsByTagName(tag) : document.getElementById(parent).getElementsByTagName(tag); for (var i=0; i<elements.length; i++) {  if (attribute == null || elements[i].type.toLowerCase() == attribute) { var re = new RegExp(" " + action + "\\b"); re.compile(re.source); var start = function() { this.className += " " + action; }; var stop = function() { this.className = this.className.replace(re, ""); }; switch(action) { case "hover" : elements[i].onmouseover = start; elements[i].onmouseout = stop; break; case "focus" : elements[i].onfocus = start; elements[i].onblur = stop; break; case "active" : elements[i].onmousedown = start; elements[i].onmouseup = stop; break; }; }; }; },
    addclass : function(element, classname) { this.remove(element, classname); element.className += ((element.className == "") ? "" : " ") + classname; },
    remove : function(element, classname) { var newclass = ""; var arguments = element.className.split(" "); for (var i=0; i<arguments.length; i++) { if (arguments[i] != classname) { if (i > 0) newclass += " "; newclass += arguments[i]; }; }; element.className = newclass; }
  },
  guestware : {
    onload : function() { this.links(); },
    links : function() { for (var i=0; i<=(document.links.length-1); i++) { link = document.links[i]; if (link.className == "screenshot" || link.className == "report") { document.links[i].onclick = function(){ var size = this.getAttribute("rel").split("|"); var title = this.getAttribute("title"); var popup = window.open(null, null, "width=" + size[0] + ",height=" + size[1] + ",scrollbars=no"); popup.document.open(); popup.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>' + title + '</title></head><body style="margin: 0;" onblur="self.close()"><img src="' + this.href + '" width="' + size[0] + '" height="' + size[1] + '" alt="' + title + '"></body></html>'); popup.document.close(); popup.focus(); return false; }; }; if (link.className == "popup") { this.opacity(document.getElementById("pms-list")); link.onmouseover = analogue.guestware.show; link.onmouseout = analogue.guestware.delay; link.title = ""; }; }; },
    show : function(e) { target = document.getElementById("pms-list"); target.className += " show"; target.style.left = analogue.guestware.offset(this, "left") + "px"; target.style.top = (analogue.guestware.offset(this, "top") + 15) + "px"; if (typeof delayhide != "undefined") clearTimeout(delayhide); },
    delay : function() { delayhide = setTimeout("analogue.guestware.hide()", 2000); },
    hide : function() { document.getElementById("pms-list").className = ""; },
    opacity : function(element) { element.style.filter = "alpha(opacity:90)"; element.style.KHTMLOpacity = "0.90"; element.style.MozOpacity = "0.90"; element.style.opacity = "0.90"; },
    offset : function(element, type) { var offset = (type == "left") ? element.offsetLeft : element.offsetTop; var parent = element.offsetParent; while (parent != null){ offset = (type == "left") ? offset + parent.offsetLeft : offset + parent.offsetTop; parent = parent.offsetParent; }; return offset; }
  }
});
window.onload  = function() { analogue.onload(); };
window.onresize = function() { analogue.onresize(); };
//]]>