function trim(str) {
	// skip leading and trailing whitespace
	// and return everything in between
	str = str.replace(/^\s*/,"");
	str = str.replace(/\s*$/,"");
	return str;
}

function hide(el) {
	document.getElementById(el).style.display = 'none';
	writeSessionCookie('skva','hide');
}

function writeSessionCookie (cookieName, cookieValue) {
	if (testSessionCookie()) {
		document.cookie = escape(cookieName) + "=" + escape(cookieValue) + "; path=/";
		return true;
	}
	else return false;
}

function getCookieValue (cookieName) {
	var exp = new RegExp (escape(cookieName) + "=([^;]+)");
	if (exp.test (document.cookie + ";")) {
		exp.exec (document.cookie + ";");
		return unescape(RegExp.$1);
	}
	else return false;
}

function testSessionCookie () {
	document.cookie ="testSessionCookie=Enabled";
	if (getCookieValue ("testSessionCookie")=="Enabled")
		return true 
	else
		return false;
}

