function toggle(id, visibility) {
    var NNtype, IEtype, WC3type;
    if (!visibility) {
		NNtype = IEtype = WC3type = 'hidden';
		lowerLayer(id);
    }
    else { 	
        NNtype = 'show';
        IEtype = WC3type = 'visible';
        raiseLayer(id);
    }
    if (document.getElementById) {
        eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
    } else {
        if (document.layers) {
            document.layers[id].visibility = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
            }
        }
    }
    return false;
}

function raiseLayer(id) {
	if (document.getElementById) {
        document.getElementById(id).style.zindex++;
    } else {
        if (document.layers) {
            document.layers[id].zindex++;
        } else {
            if (document.all) {
                document.all(id).style.zindex++;
            }
        }
    }
}

function lowerLayer(id) {
	if (document.getElementById) {	
        document.getElementById(id).style.zIndex--;
    } else {
        if (document.layers) {      	
            document.layers[id].zIndex--;
        } else {
            if (document.all) {
                document.all(id).style.zIndex--;
            }
        }
    }
}

function changeFont(id) {

    // change lineheight
    if (document.getElementById) {
        document.getElementById(id).style.fontSize = newsfont+"px";
    } else {
        if (document.layers) {
            document.layers[id].fontSize = newsfont+"px";
        } else {
            if (document.all) {
				eval("document.all." + id + ".style.fontSize = \"" + newsfont + "px \"");
            }
        }
    }
	
    // fix layer scrolling problems now
    updateHeight(); 
    setCookie();
}

function larger() {
    if (newsfont < 25) {
    	newsfont= newsfont +2;
    	changeFont('content');
    }
}

function smaller() {
    if (newsfont > 5) {
	newsfont= newsfont-2;
	changeFont('content');
    }
}

function launch(url, w, h) {      p=open(url,"_KIIROI_Unpublished","width="+w+",height="+h+",toolbar=no,resizable=no,menubar=no,status=no,directories=no,location=no,top=30,left=30");
        if (p.focus) p.focus();

}
