// JavaScript Document
// Viewtopic show-hide blocks
//
function getCookieExpireDate(noDays){
var today = new Date()
var expr = new Date(today.getTime()+noDays*24*60*60*1000)
return expr.toGMTString()
}

function writeCookie(name, data, noDays){
var cookieStr = name + "=" + data
if (writeCookie.arguments.length > 2){cookieStr += "; expires=" + getCookieExpireDate(noDays)}
if (cpath != "") cookieStr += "; path=" + cpath;
if (cdomain != "") cookieStr += "; domain=" + cdomain;
if (csecure == 1) cookieStr += "; secure";
document.cookie = cookieStr
}
function readCookie(cookieName){
var searchName = cookieName + "="
var cookies = document.cookie
var start = cookies.indexOf(cookieName)
if (start == -1){return ""}
start += searchName.length
var end = cookies.indexOf(";", start)
if (end == -1){end = cookies.length}
return cookies.substring(start, end)
}
function togl(n){
var CStr = readCookie(cn_shl);
var CNum = 0 + CStr;
CNum = (CNum & n) ? CNum & (~n) : CNum | n;
CStr = '' + CNum;
writeCookie(cn_shl, CStr, 365);
}
function bl(nr){
var vs = 'block';
if (document.layers){
 current = (document.layers[nr].display == 'none') ? vs : 'none';
 document.layers[nr].display = current;
}else if (document.all){
 current = (document.all[nr].style.display == 'none') ? vs : 'none';
 document.all[nr].style.display = current;
}else if (document.getElementById){
 current = (document.getElementById(nr).style.display == 'none') ? vs : 'none';
 document.getElementById(nr).style.display = current;
}
}
