// http://www.thefutureoftheweb.com/blog/adddomloadevent
function addDOMLoadEvent(func) {
	if (!window.__load_events) {
		var init = function () {
			// quit if this function has already been called
			if (arguments.callee.done)
				return;
			// flag this function so we don't do the same thing twice
			arguments.callee.done = true;
			// kill the timer
			if (window.__load_timer) {
				clearInterval(window.__load_timer);
				window.__load_timer = null;
			}
			// execute each function in the stack in the order they were added
			for (var i=0;i < window.__load_events.length;i++) {
				window.__load_events[i]();
			}
			window.__load_events = null;
      	};
		// for Mozilla/Opera9
		if (document.addEventListener) {
			document.addEventListener("DOMContentLoaded", init, false);
		}
		// for Internet Explorer
		/*@cc_on @*/
		/*@if (@_win32)
			document.write("<scr"+"ipt id=__ie_onload defer src=//0><\/scr"+"ipt>");
			var script = document.getElementById("__ie_onload");
			script.onreadystatechange = function() {
			if (this.readyState == "complete") {
				init(); // call the onload handler
			}
		};
		/*@end @*/
		// for Safari
		if (/WebKit/i.test(navigator.userAgent)) { // sniff
			window.__load_timer = setInterval(function() {
				if (/loaded|complete/.test(document.readyState)) {
					init(); // call the onload handler
				}
			}, 10);
		}
		// for other browsers
		window.onload = init;
		// create event function stack
		window.__load_events = [];
	}
	// add function to event stack
	window.__load_events.push(func);
}

// Basic common functions involving js constructs and DOM.

function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
		elm.addEventListener(evType, fn, useCapture);
		return true;
	} else if (elm.attachEvent) {
		var r = elm.attachEvent('on' + evType, fn);
		return r;
	} else {
		elm['on' + evType] = fn;
	}
}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if (node == null)
		node = document;
	if (tag == null)
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp('(^|\\s)'+searchClass+'(\\s|$)');
	for (i = 0, j = 0; i < elsLen; i++) {
		if (pattern.test(els[i].className)) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

// http://www.quirksmode.org/dom/getElementsByTagNames.html
function getElementsByTagNames(list,obj) {
	if (!obj)
		var obj = document;
	var tagNames = list.split(',');
	var resultArray = new Array();
	for (var i = 0; i < tagNames.length; i++) {
		var tags = obj.getElementsByTagName(tagNames[i]);
		for (var j = 0; j < tags.length; j++) {
			resultArray.push(tags[j]);
		}
	}
	var testNode = resultArray[0];
	if (!testNode)
		return [];
	if (testNode.sourceIndex) {
		resultArray.sort(function (a,b) {
			return a.sourceIndex - b.sourceIndex;
		});
	} else if (testNode.compareDocumentPosition) {
		resultArray.sort(function (a,b) {
			return 3 - (a.compareDocumentPosition(b) & 6);
		});
	}
	return resultArray;
}

function toggle(obj) {
	var el;
	if (typeof obj == 'string')
		el = document.getElementById(obj);
	else
		el = obj;
	if (!el)
		return;
	if (el.style.display != 'none') {
		el.style.display = 'none';
	} else {
		el.style.display = '';
	}
}

function dualToggle(o1, o2) {
	toggle(o1);
	toggle(o2);
}

function hide(obj) {
	var el;
	if (typeof obj == 'string')
		el = document.getElementById(obj);
	else
		el = obj;
	if (!el)
		return;
	if (el.style.display == '')
		el.style.display = 'none';
}

function show(obj) {
	var el;
	if (typeof obj == 'string')
		el = document.getElementById(obj);
	else
		el = obj;
	if (!el)
		return;
	if (el.style.display == 'none')
		el.style.display = '';
}

function insertAfter(parent, node, referenceNode) {
	parent.insertBefore(node, referenceNode.nextSibling);
}

// Cookies.

function getCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function setCookie( name, value, expires, path, domain, secure ) {
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires ) {
		expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name+'='+escape( value ) +
		( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString()
		( ( path ) ? ';path=' + path : '' ) +
		( ( domain ) ? ';domain=' + domain : '' ) +
		( ( secure ) ? ';secure' : '' );
}

function deleteCookie( name, path, domain ) {
	if ( getCookie( name ) ) document.cookie = name + '=' +
			( ( path ) ? ';path=' + path : '') +
			( ( domain ) ? ';domain=' + domain : '' ) +
			';expires=Thu, 01-Jan-1970 00:00:01 GMT';
}

function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}

// Advanced common functions involving styling or positioning.

function hasClass(ele, cls) {
	return ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
}

function addClass(ele, cls) {
	if (!this.hasClass(ele, cls))
		ele.className += " " + cls;
}

function removeClass(ele, cls) {
	if (hasClass(ele, cls)) {
		var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
		ele.className = ele.className.replace(reg, ' ');
	}
}

function toggleClass(id, srcCls, dstCls) {
	var ele = $(id);
	if (!ele)
		return;
	if (hasClass(ele, srcCls))
		removeClass(ele, srcCls);
	if (!hasClass(ele, dstCls))
		addClass(ele, dstCls);
}

function getElementStyle(elem, IEStyleProp, CSSStyleProp) {
    if (elem.currentStyle) {
        return elem.currentStyle[IEStyleProp];
    } else if (document.defaultView && document.defaultView.getComputedStyle) {
        var compStyle = document.defaultView.getComputedStyle(elem, "");
        return compStyle.getPropertyValue(CSSStyleProp);
    }
    return "";
}

function getScrollXY() {
	var scrOfX = 0, scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	}
	return [ scrOfX, scrOfY ];
}

function getElementTop(container) {
	var offsetY = 0;
	if (container.getBoundingClientRect) {
		var rect = container.getBoundingClientRect();
		offsetY = rect.top;
		var z = getScrollXY();
		var scrolly = z[1];
		offsetY += scrolly;
	} else {
		var parentElem = container;
		while (parentElem &&
		       parentElem != document.body &&
		       parentElem != document.documentElement) {
			offsetY += parentElem.offsetTop;
			parentElem = parentElem.offsetParent;
		}
	}
	return offsetY;
}

// this works for IE6 and 7, unlike findPos() from quirksmode
function getElementPos(container) {
	var offsetY = 0;
	var offsetX = 0;
	if (container.getBoundingClientRect) {
		var rect = container.getBoundingClientRect();
		offsetY = rect.top - 2;
		offsetX = rect.left - 2;
		var z = getScrollXY();
		offsetY += z[1];
		offsetX += z[0];
	} else {
		var parentElem = container;
		while (parentElem &&
		       parentElem != document.body &&
		       parentElem != document.documentElement) {
			offsetY += parentElem.offsetTop;
			offsetX += parentElem.offsetLeft;
			parentElem = parentElem.offsetParent;
		}
	}
	return [offsetX, offsetY];
}

function getWindowWidth() {
	if (window.innerWidth && window.innerWidth != 0)
		return window.innerWidth;
	if (document.documentElement.clientWidth && document.documentElement.clientWidth != 0)
		return document.documentElement.clientWidth;
	if (document.body.clientWidth && document.body.clientWidth != 0)
		return document.body.clientWidth;
	return 0;
}

function getWindowHeight() {
	if (window.innerHeight && window.innerHeight != 0)
		return window.innerHeight;
	if (document.documentElement.clientHeight && document.documentElement.clientHeight != 0)
		return document.documentElement.clientHeight;
	if (document.body.clientHeight && document.body.clientHeight != 0)
		return document.body.clientHeight;
	return 0;
}

function getElementHeight(target) {
	if (target.clientHeight) return target.clientHeight;
	else if (target.innerHeight) return target.innerHeight;
	else if (target.offsetHeight) return target.offsetHeight;
	else return 0;
}

function getElementWidth(target) {
	if (target.clientWidth) return target.clientWidth;
	else if (target.innerWidth) return target.innerWidth;
	else if (target.offsetWidth) return target.offsetWidth;
	else return 0;
}

function disappear(id) {
	var e = $(id);
	if (e) {
		setTimeout(function() { e.style.opacity = 0.9; }, 100);
		setTimeout(function() { e.style.opacity = 0.8; }, 200);
		setTimeout(function() { e.style.opacity = 0.7; }, 300);
		setTimeout(function() { e.style.opacity = 0.6; }, 400);
		setTimeout(function() { e.style.opacity = 0.5; }, 500);
		setTimeout(function() { e.style.opacity = 0.4; }, 600);
		setTimeout(function() { e.style.opacity = 0.3; }, 700);
		setTimeout(function() { e.style.opacity = 0.2; }, 800);
		setTimeout(function() { e.style.opacity = 0.1; }, 900);
		setTimeout(function() { e.style.opacity = 1.0; e.innerHTML = ''; }, 1000);
	}
}

// http://www.htmlcodetutorial.com/forms/index_famsupp_157.html
function submitenter(myfield,e) {
	var keycode;
	if (window.event)
		keycode = window.event.keyCode;
	else if (e)
		keycode = e.which;
	else
		return true;
	if (keycode == 13) {
		myfield.form.submit();
		return false;
	} else {
		return true;
	}
}
function XMLHttpRequestObject(beforeCallback,
                              afterCallback,
                              parseCallback,
                              url,
                              postContent,
                              username,
                              password)
{
	this.beforeCallback = beforeCallback;
	this.afterCallback = afterCallback;
	this.parseCallback = parseCallback;
	this.wait = false;
	this.requestObj = null;
	this.username = username || "";
	this.password = password || "";
	
	try
	{
		this.requestObj = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e)
	{
		try
		{
			this.requestObj = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (ee)
		{
			this.requestObj = null;
		}
	}
	
	if (!this.requestObj && typeof(XMLHttpRequest) != "undefined")
	{
		this.requestObj = new XMLHttpRequest();
	}
	
	if (url)
	{
		this.send(url, postContent);
	}
}

XMLHttpRequestObject.prototype.send = function(url, postContent, forceReset)
{
	if (this.wait && !forceReset)
	{
		return false;
	}
	
	this.wait = true;
	
	if (this.beforeCallback)
	{
		this.beforeCallback();
	}
	
	try
	{
		this.requestObj.open(postContent ? 'POST' : 'GET', url, true, this.username, this.password);
		
		/**
		 * What is happening here?
		 */
		
		var object = this;
		
 		this.requestObj.onreadystatechange = function() {
			return object.handleResponse.apply(object);
		};
		
		if (postContent)
		{
			this.requestObj.setRequestHeader("Content-type",
			                                 "application/x-www-form-urlencoded");
			this.requestObj.setRequestHeader("Content-length",
			                                 postContent.length);
			this.requestObj.setRequestHeader("Connection", "close");
		}
		
		this.requestObj.send(postContent);
	}
	catch (e)
	{
		return false;
	}
	
	return true;
};

XMLHttpRequestObject.prototype.handleResponse = function()
{
	if (this.requestObj.readyState == 4)
	{
		this.wait = false;
		
		if (this.afterCallback)
		{
			this.afterCallback(this.requestObj);
		}
		
		if (this.requestObj.status != 200)
		{
			return;
		}
		
		if (!this.requestObj.responseXML ||
			typeof(this.requestObj.responseXML) == "undefined")
		{
			return;
		}

		if (this.parseCallback)
		{
			this.parseCallback(this.requestObj.responseXML);
		}
	}
};
function ping(url)
{
	var xmlHttp = new XMLHttpRequestObject(null, null, null, url);
}

function cmshop(url, params)
{
	ping(url + '?' + params);
}

function cmview(id, abbrev, categoryId, region, vertical, category, distributor)
{
	var element = document.getElementById(id);
	if (element && hasClass(element, "normal-listing") && self.cmCreateProductviewTag) {
		var cmd = 'cmCreateProductviewTag(\'' + id + '\', \'' + abbrev + '\', \'' + categoryId + '\', \'' + region + '\', \'' + vertical + '\', \'' + category + '\', \'' + distributor + '\')';
		setTimeout(cmd, 0);
	}
}

/* 
 * Modified by Lu Wang to fix IE6/7 Bugs
 */

/*
Class: LazyLoad

LazyLoad makes it easy and painless to lazily load one or more JavaScript
files on demand after a web page has been rendered.

Author:
  Ryan Grove (ryan@wonko.com)

Copyright:
  Copyright (c) 2007 Ryan Grove (ryan@wonko.com). All rights reserved.

License:
  New BSD License (http://www.opensource.org/licenses/bsd-license.html)

URL:
  http://wonko.com/article/527

Version:
  1.0.3 (2007-06-18)
*/
var LazyLoad = function () {

  // -- Group: Private Variables -----------------------------------------------

  /*
  Object: pending
  Pending request object, or null if no request is in progress.
  */
  var pending = null;

  /*
  Array: queue
  Array of queued load requests.
  */
  var queue = [];

  return {
    // -- Group: Public Methods ------------------------------------------------

    /*
    Method: load
    Loads the specified script(s) and runs the specified callback function
    when all scripts have been completely loaded.

    Parameters:
      urls     - URL or array of URLs of scripts to load
      callback - function to call when loading is complete
      obj      - (optional) object to pass to the callback function
      scope    - (optional) if true, *callback* will be executed in the scope
                 of *obj* instead of receiving *obj* as an argument.
    */
    load: function (urls, callback, obj, scope) {
      var request = {urls: urls, callback: callback, obj: obj, scope: scope};

      // If a previous load request is currently in progress, we'll wait our
      // turn.
      if (pending) {
        queue.push(request);
        return;
      }

      pending = request;

      // Cast urls to an Array.
      urls = urls.constructor === Array ? urls : [urls];
      
      // Load the scripts at the specified URLs.
      var script;

      for (var i = 0; i < urls.length; i += 1) {
        script = document.createElement('script');
	script.src = urls[i];
	document.body.appendChild(script);
      }
      
      if (!script) {
        return;
      }

      if ((/msie/i).test(navigator.userAgent) &&
          !(/AppleWebKit\/([^ ]*)/).test(navigator.userAgent) &&
          !(/opera/i).test(navigator.userAgent)) {

        // If this is IE, watch the last script's ready state.
        script.onreadystatechange = function () {
          if (this.readyState === 'loaded' ||
              this.readyState === 'complete') {
            LazyLoad.requestComplete();
          }
        };
      } else {
        // If this is a browser that doesn't suck, append a scriptlet after the
        // last script.
        script = document.createElement('script');
        script.appendChild(document.createTextNode(
            'LazyLoad.requestComplete();'));
        document.body.appendChild(script);
      }
    },

    /*
    Method: loadOnce
    Loads the specified script(s) only if they haven't already been loaded
    and runs the specified callback function when loading is complete. If all
    of the specified scripts have already been loaded, the callback function
    will not be executed unless the *force* parameter is set to true.

    Parameters:
      urls     - URL or array of URLs of scripts to load
      callback - function to call when loading is complete
      obj      - (optional) object to pass to the callback function
      scope    - (optional) if true, *callback* will be executed in the scope
                 of *obj* instead of receiving *obj* as an argument
      force    - (optional) if true, *callback* will always be executed, even if
                 all specified scripts have already been loaded
    */
    loadOnce: function (urls, callback, obj, scope, force) {
      var newUrls = [],
          scripts = document.getElementsByTagName('script');

      urls = urls.constructor === Array ? urls : [urls];

      for (var i = 0; i < urls.length; i += 1) {
        var loaded = false,
            url    = urls[i];

        for (var j = 0; j < scripts.length; j += 1) {
          if (url === scripts[j].src) {
            loaded = true;
            break;
          }
        }

        if (!loaded) {
          newUrls.push(url);
        }
      }

      if (newUrls.length > 0) {
        this.load(newUrls, callback, obj, scope);
      } else if (force) {
        if (obj) {
          if (scope) {
            callback.call(obj);
          } else {
            callback.call(window, obj);
          }
        } else {
          callback.call();
        }
      }
    },

    /*
    Method: requestComplete
    Handles callback execution and cleanup after a request is completed. This
    method should not be called manually.
    */
    requestComplete: function () {
      // Execute the callback.
      if (pending.callback) {
        if (pending.obj) {
          if (pending.scope) {
            pending.callback.call(pending.obj);
          } else {
            pending.callback.call(window, pending.obj);
          }
        } else {
          pending.callback.call();
        }
      }

      pending = null;

      // Execute the next load request on the queue (if any).
      if (queue.length > 0) {
        var request = queue.shift();
        this.load(request.urls, request.callback, request.obj, request.scope);
      }
    }
  };
}();
function OodleTooltipTarget(div, content, additionalTrigger, tooltipOffset, timeout)
{
	if (!OodleTooltipTarget.eventAdded)
	{
		// add static event handler for mousemove
		addEvent(document, "mousemove", OodleTooltipTarget.move, true);
		OodleTooltipTarget.eventAdded = true;
	}
	
	var target = this;
	target.m_tooltip = new OodleTooltip({ "left":0, "top":0 }, content, div);
	target.m_targetDiv = div;	

	this._div = div;

	div.onmouseover = function(evt) 
	{
		var e = evt ? evt : window.event;
		target.showTooltip(e);
	};

	if (additionalTrigger)
	{
		additionalTrigger.onclick = function(evt)
			{
				target.showTooltip();
			}
	}
	
	if (!tooltipOffset)
	{
		// these should never be positive
		tooltipOffset = { 'left' : -50, 'top' : -10 };
	}
	
	this._tooltipOffset = tooltipOffset;
	
	this._timeout = timeout || 500;
	
}

OodleTooltipTarget.prototype.showTooltip = function(evt)
{
	var target = this;
	if (!this.m_tooltip)
	{
		return;
	}

	OodleTooltipTarget.move(evt);
	if (OodleTooltipTarget.curTarget)
	{
		return;
	}

	var pos = getElementPos(this._div);
	var sizey = getElementHeight(this._div);
	var sizex = getElementWidth(this._div);
	var scroll = getScrollXY();
	var windowWidth = getWindowWidth();
	var windowHeight = getWindowHeight();
	var viewPortY = pos[1] - scroll[1];
	var viewPortX = pos[0] - scroll[0];

	var newPos = [];
	if (viewPortY > windowHeight*5/9)
	{
		newPos["bottom"] = getElementHeight(document.body) - pos[1] + this._tooltipOffset.top; 
	}
	else
	{
		newPos["top"] = pos[1] + sizey + this._tooltipOffset.top;
	}
	
	if (viewPortX > windowWidth*5/9)
	{
		newPos["right"] = getElementWidth(document.body) - (pos[0] + sizex - this._tooltipOffset.left);
	}
	else
	{
		newPos["left"] = Math.max(1, pos[0] + this._tooltipOffset.left);
	}

	this.m_tooltip.setPos(newPos);
	this.tid = setTimeout(function() { target._showTooltip(); }, this._timeout);
	OodleTooltipTarget.curTarget = this;
};

OodleTooltipTarget.prototype._showTooltip = function()
{
	this.m_tooltip.show(this._timeout > 1);
};

OodleTooltipTarget.prototype.hideTooltip = function()
{
	this.m_tooltip.hide();
};

OodleTooltipTarget.move = function(e)
{
	if (!OodleTooltipTarget.curTarget)
		return;

	if (!e)
		return;

	var target = OodleTooltipTarget.curTarget;
	
	var pos = getElementPos(target.m_targetDiv);
	var sizey = getElementHeight(target.m_targetDiv);
	var sizex = getElementWidth(target.m_targetDiv);
	var scroll = getScrollXY();

	var x = e.clientX + scroll[0];
	var y = e.clientY + scroll[1];

	if (!(x < (pos[0] + sizex + 10) && x >= pos[0]) ||
	    !(y < (pos[1] + sizey + 10) && y >= pos[1]))
	{
		var pos = getElementPos(target.m_tooltip._container);
		var sizey = getElementHeight(target.m_tooltip._container);
		var sizex = getElementWidth(target.m_tooltip._container);

		if (!(x < (pos[0] + sizex) && x >= pos[0]) ||
		    !(y < (pos[1] + sizey) && y >= pos[1]))
		{	
			OodleTooltipTarget.curTarget = null;
			clearTimeout(target.tid); 
			target.hideTooltip();
		}
	}
};


function OodleTooltip(pos, content, div)
{
	this._container = this.create(null, content);
	this._container.className = "tooltip";
	this._shim = this.createShim();
	
	this._wrapper = document.createElement("div");
	this._wrapper.style.position = "absolute";
	
	this._wrapper.appendChild(this._shim);
	this._wrapper.appendChild(this._container);
	this.hide();

	document.body.appendChild(this._wrapper);
}

OodleTooltip.prototype.create = function(pos, content)
{
	this.m_pos = pos;

	var tooltip = document.createElement("div");
	tooltip.style.left = "0px";
	tooltip.style.top = "0px";
	tooltip.style.position = "relative";
	tooltip.style.zIndex = 2;
	
	if (typeof content == 'string')
	{
		tooltip.innerHTML = content;
	}
	else
	{
		tooltip.appendChild(content);
	}

	return tooltip;	
};

OodleTooltip.prototype.createShim = function()
{
	var shim  = document.createElement("iframe");
        shim.frameBorder = "0";
        shim.scrolling = "no";
	shim.style.border = "0px";
	shim.style.position = "absolute";
        shim.style.overflow = "hidden";
        shim.style.left = 0;
        shim.style.top = 0;
	shim.style.zIndex = 1;

	return shim;
}

OodleTooltip.prototype.setPos = function(pos)
{
	this.m_pos = pos;
};

OodleTooltip.prototype.show = function(animate)
{
	if (this._isShown == true)
	{
		return;
	}

	var tooltip = this._wrapper;
	var shim = this._shim;

	tooltip.style.left = "";
	tooltip.style.top = "";
	tooltip.style.right = "";
	tooltip.style.bottom = "";

	if (this.m_pos['left'])
	{
		tooltip.style.left = this.m_pos['left'] + "px";
	}
	if (this.m_pos['top'])
	{
		tooltip.style.top = this.m_pos['top'] + "px";
	}
	if (this.m_pos['right'])
	{
		tooltip.style.right = this.m_pos['right'] + "px";
	}
	if (this.m_pos['bottom'])
	{
		tooltip.style.bottom = this.m_pos['bottom'] + "px";
	}
	
	tooltip.style.opacity = 0;
	tooltip.style.filter = "alpha(opacity=0)";
	tooltip.style.display = "block";

	var width = getElementWidth(tooltip);
	var height = getElementHeight(tooltip);
	shim.style.width = width + "px";
	shim.style.height = height + "px";

	if (animate)
	{
		setTimeout(function() { tooltip.style.opacity = 0.1; }, 50);
		setTimeout(function() { tooltip.style.opacity = 0.2; }, 100);
		setTimeout(function() { tooltip.style.opacity = 0.3; tooltip.style.filter = "alpha(opacity=25)";}, 150);
		setTimeout(function() { tooltip.style.opacity = 0.4; }, 200);
		setTimeout(function() { tooltip.style.opacity = 0.5; tooltip.style.filter = "alpha(opacity=50)";}, 250);
		setTimeout(function() { tooltip.style.opacity = 0.6; }, 300);
		setTimeout(function() { tooltip.style.opacity = 0.7; }, 350);
		setTimeout(function() { tooltip.style.opacity = 0.8; tooltip.style.filter = "alpha(opacity=75)";}, 400);
		setTimeout(function() { tooltip.style.opacity = 0.9; }, 450);
		setTimeout(function() { tooltip.style.opacity = 1.0; tooltip.style.filter = "alpha(opacity=100)";}, 500);
	}
	else
	{
		tooltip.style.opacity = 1;
		tooltip.style.filter = "alpha(opacity=100)";
	}
	
	this._isShown = true;
};

OodleTooltip.prototype.hide = function()
{
	this._wrapper.style.display = "none";
	this._isShown = false;
};
