<!--  // hiding from old browsers

var isNN4 = (document.layers) ? true : false;
var isIE4 = (document.all) ? true : false;
var isIE7 = (window.XMLHttpRequest && window.ActiveXObject) ? true : false;
var isDOM = (document.getElementById) ? true : false;
var isOpera = ( window.opera ) ? true : false;

function _w(str) { return document.write(str); }

// --- Category: getting layer object ---
// convert object name string or object reference
// into a valid object reference
function _o(obj) {
if (isDOM) { if (typeof(obj) == "string") { return document.getElementById(obj); } else { return obj; }
} else if (isIE4) { if (typeof(obj) == "string") { return document.all(obj); } else { return obj; }
} else if (isNN4) { if (typeof(obj) == "string") { return document.layers[obj]; } else { return obj; }
} return null; }

// deprecated, replaced by _o(obj)
function _getObj(obj) { return _o(obj); }

function _rm(obj) { var o = _o(obj); if (o != null) { o.parentNode.removeChild(o); return true; } else return false; }

// --- Category: positioning ---
// position an object at a specific pixel coordinate
// e.g. _move(obj, x + 'px', y + 'px'); 
function _moveTo(obj, x, y) {
	var o = _o(obj);
	if (o.moveTo) {
		o.moveTo(x,y);
	} else if (typeof(o.style.left) != "undefined") {
	    // set to absolute before moving
	    o.style.position = "absolute";
	    // move the object
		o.style.left = x;
		o.style.top = y;
	}
}

// move an object by x and/or y pixels
function _moveBy(obj, deltaX, deltaY) {
	var o = _o(obj);
	if (o.moveBy) {
		o.moveBy(deltaX, deltaY);
	} else if (typeof(o.style.left) != "undefined") {
		o.style.position = "absolute";
		o.style.left = parseInt(o.style.left) + deltaX;
		o.style.top = parseInt(o.style.top) + deltaY;
	}
}

// retrieve the x coordinate of a positionable object
function _left(obj) {
	var o = _o(obj);
	var left = (isNN4) ? parseInt(o.left) : parseInt(o.style.left);
	return left;
}

function _getObjLeft(obj) { return _left(obj); }

// retrieve the y coordinate of a positionable object
function _top(obj) {
	var o = _o(obj);
	var top = (isNN4) ? parseInt(o.top) : parseInt(o.style.top);
	return top;
}

function _getObjTop(obj) { return _top(obj); }

// IE4+, NN6+
function _offX(obj) {
	var x = obj.offsetLeft;
	var parent =obj.offsetParent;
	while (parent != null)	{
		x += parent.offsetLeft;
		parent = parent.offsetParent;
	}
	return x;	
}

function _getOffsetX(obj) { return _offX(obj); }

// IE4+, NN6+
function _offY(obj) {
	var y = obj.offsetTop;
	var parent =obj.offsetParent;
	while (parent != null)	{
		y += parent.offsetTop;
		parent = parent.offsetParent;
	}
	return y;	
}

function _getOffsetY(obj) { return _offY(obj); }

// set the z-order of an object
function _zindex(obj, zOrder) {
	var o = _o(obj);
	if (isNN4) {
	    o.zIndex = zOrder;
    } else if (isIE4 || isDOM) {
        o.style.zIndex = zOrder;
    }
}

function _setZIndex(obj, zOrder) { return _zindex(obj, zOrder); }

// --- Category: background ---
// set the background color of an object
function _setBGColor(obj, color) {
	var o = _o(obj);
	if (o.bgColor) {
		o.bgColor = color;
	} else if (typeof(o.style.backgroundColor) != "undefined") {
		o.style.backgroundColor = color;
	}
}

// --- Category: visibility ---
// set the visibility of an object to visible
function _show(obj) {
	var o = _o(obj); if(!o) return;
	if (isNN4) {
	    o.visibility = "visible";
	} else if (isIE4 || isDOM) {
	    o.style.display = "block";
	    o.style.visibility = "visible";
	}
}

// show with filters
function _showF(obj) {
	var theObj = _o(obj); if(!theObj) return;
	if (isIE4) {
		if ( theObj.filters && theObj.filters.length > 0 ) {
			for(var i=0; i < theObj.filters.length; i++)
				theObj.filters[i].apply();
			}
		theObj.style.display = "block";
		theObj.style.visibility = "visible";
		if ( theObj.filters && theObj.filters.length > 0 ) {
			for(var i=0; i < theObj.filters.length; i++)
				theObj.filters[i].play();
			}
	} else if (isDOM) {
		theObj.style.display = "block";
		theObj.style.visibility = "visible";
	} else if (isNN4) {
		theObj.visibility = "visible";
	}
}

// set the visibility of an object to hidden
function _hide(obj) {
	var o = _o(obj); if(!o) return;
	if (isNN4) {
	    o.visibility = "hidden";
	} else if (isIE4 || isDOM) {
	    o.style.visibility = "hidden";
	}
}

// set the display of an object to none
function _none(obj) {
	var o = _o(obj); if(!o) return;
	if (isIE4 || isDOM) {
	    o.style.display = "none";
	}
}

function _disappear(obj) { return _none(obj); }

function _isVisible(obj) {
	var o = _o(obj);
	if (isNN4 && o.visibility == "visible") {
	    return true;
	} else if ((isIE4 || isDOM) && o.style.visibility == "visible") {
	    return true;
	}
	return false;
}

var _shadowOptions = { 
	isShadow: 0, // IE5.5+
	color: '#000000',
	offsetX: 0, // IE5.5+
	offsetY: -1, // IE5.5+
	offsetX2: 1, // IE4+, NN4+ 
	offsetY2: 1, // IE4+, NN4+ 
	radius: 2, // IE5.5+
	opacity: 1 // IE5.5+
};

function _shadow(obj, so) {
	//if ( !window.createPopup ) return; 
	if ( isOpera ) return;
	var o = _o(obj);
	if (o != null) {
	if (so == null ) so = _shadowOptions;
	_rm(o.id + '-T'); _rm(o.id + '-S');
	var oriObj = o.cloneNode(true); 
	oriObj.id = o.id + '-T'; oriObj.style.position = 'absolute'; _show(oriObj);
	var newObj = o.cloneNode(true);
	newObj.id = o.id + '-S'; newObj.style.position = 'absolute'; _show(newObj);
	if (o.style.zIndex && o.style.zIndex>0) {oriObj.style.zIndex=o.style.zIndex;newObj.style.zIndex = oriObj.style.zIndex-1;}
	else {oriObj.style.zIndex=1;newObj.style.zIndex=0;}
	newObj.style.color = so['color'];
	newObj.style.width = oriObj.style.width = o.offsetWidth;
	newObj.style.height = oriObj.style.height = o.offsetHeight;
	if ( window.createPopup ) { // IE5.5+
		oriObj.style.left = _offX(o); newObj.style.left = _offX(o)+so['offsetX']-1;
		oriObj.style.top = _offY(o); newObj.style.top = _offY(o)+so['offsetY']-1;
		newObj.style.filter = "progid:DXImageTransform.Microsoft.Blur(makeshadow="+so['isShadow']+",pixelradius="+so['radius']+",shadowopacity="+so['opacity']+")";
	}
	else { // IE4+, NN4+ 
		oriObj.style.left = _offX(o); newObj.style.left = _offX(o)+so['offsetX2'];
		oriObj.style.top = _offY(o); newObj.style.top = _offY(o)+so['offsetY2'];
	}
	_hide(o);
	document.body.appendChild(newObj);
	document.body.appendChild(oriObj); }
}

function _shadowT(obj, str) { var o = _o(obj); o.innerHTML = str; _shadow(o); }

// IE5.5+ fix png alpha bug in IE
// Usage: <img id="imageID" src="image.png"><script>_png('imageID', 'blank.gif');</script>
function _png(obj, emptyIcon, sizingMethod) {
	if ( window.createPopup && !isIE7 ) { // IE5.5+ but < IE7+
		if ( !emptyIcon ) emptyIcon = '_blank.gif';
		if ( !sizingMethod ) sizingMethod = 'image';
		var o = _o(obj);
		o.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + o.src + "', '" + sizingMethod + "')";
		o.src = emptyIcon; }
}

// Alpha Effect
// Usage: <div id="af">Hi</div><script>_alpha('af', 0.5);</script>
function _alpha(obj, v) {
	var o = _o(obj);
	o.style.width = o.offsetWidth;
	o.style.filter = "alpha(opacity:"+Math.round(v*100)+")";
	o.style.opacity = v; //o.style.MozOpacity = v;
}

function _load_js(url)
{
	var e = document.createElement("script");
	e.src = url;
	e.type="text/javascript";
	document.getElementsByTagName("head")[0].appendChild(e); 
}

/**
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function _setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function _getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function _deleteCookie(name, path, domain)
{
    if (_getCookie(name))
    {
        document.cookie = name + "=" + 
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}

// end hiding -->