function SI_forceRedraw() {
	// Corrects a margin-bottom sum bug in Mozilla
	var d = document;
	if (d.body && d.body.style) {
		d.body.style.height = "1px";
		d.body.style.height = "auto";
		}
}
function isUndefined(v) {
    var undef;
    return v===undef;
}
function getElem(elem) {
    if (document.getElementById) {
        if (typeof elem == "string") {
            elem = document.getElementById(elem);
            if (elem===null) throw 'cannot get element: element does not exist';
        } else if (typeof elem != "object") {
            throw 'cannot get element: invalid datatype';
        }
    } else throw 'cannot get element: unsupported DOM';
    return elem;
}
function getElementsByClass(className, tagName, parentNode) {
    parentNode = !isUndefined(parentNode)? getElem(parentNode) : document;
    if (isUndefined(tagName)) tagName = '*';
    return filter(parentNode.getElementsByTagName(tagName),
        function(elem) { return hasClass(elem, className) });
}
function W3CDOM_Event(currentTarget) {
    this.currentTarget  = currentTarget;
    this.preventDefault = function() { window.event.returnValue = false }
    return this;
}
function map(list, func) {
    var result = [];
    func = func || function(v) {return v};
    for (var i=0; i < list.length; i++) result.push(func(list[i], i, list));
    return result;
}
function filter(list, func) {
    var result = [];
    func = func || function(v) {return v};
    map(list, function(v) { if (func(v)) result.push(v) } );
    return result;
}

function listen(event, elem, func) {
    elem = getElem(elem);
    if (elem.addEventListener)  // W3C DOM
        elem.addEventListener(event,func,false);
    else if (elem.attachEvent)  // IE DOM
        elem.attachEvent('on'+event, function(){ func(new W3CDOM_Event(elem)) } );
        // for IE we use a wrapper function that passes in a simplified faux Event object.
    else throw 'cannot add event listener';
}
function mlisten(event, elem_list, func) {
    map(elem_list, function(elem) { listen(event, elem, func) } );
}
if (document.getElementById && document.getElementsByTagName('html')[0]) {
	document.getElementsByTagName('html')[0].className += (document.getElementsByTagName('html')[0].className=='')?'js':' js';
}

function hide(){
   	if (!document.getElementById) {
     		return null;
	}
	it=document.getElementById("s0");
	it.style.display = "none";

	
}
function toggle(){
   	if (!document.getElementById) {
     		return null;
	}
   	it=document.getElementById("s0");
   	it_img=document.getElementById("m0");
   	if(it.style.display == "block"){
    		it.style.display = "none";
    		it_img.style.background = "url(/img/arrows2.gif) no-repeat 0px 0px";
    		SI_forceRedraw();
    		return false;
   	}else{
    		it.style.display = "block";
		it_img.style.background = "url(/img/arrows2.gif) no-repeat 0px -15px";
		return false;
    	}
return false;
}
function end(){
	if (document.getElementById && document.getElementsByTagName('html')[0]) {
			document.getElementsByTagName('html')[0].className='';
	}
}
listen('load', window, function() {
		listen('click', 'm0', toggle);
		hide();
		end();
});


