String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

function hideSBA() {
	try {
		document.getElementById("SlidingBottomAds").style.display = "none";
		document.cookie = "hideSBA=true; domain=memurlar.net; path=/; expires=" + new Date(new Date().valueOf() + 20000000).toGMTString() + ";";
		window.detachEvent("onscroll", slideSBA);
	}
	catch(ex) {
		window.status = ex.description;
	}
}

function showSBA() {
	try {
		if(document.getElementById("SlidingBottomAds") != null) {
			var cks = document.cookie.split(";");
			for(var i = 0; i < cks.length; i++)
				if(cks[i].trim() == "hideSBA=true")
					return;
			with(document.getElementById("SlidingBottomAds")) {
				style.display = "";
				style.top = document.body.scrollTop + document.body.clientHeight - clientHeight;
			}
			window.attachEvent("onscroll", slideSBA);
		}
	}
	catch(ex) {
		window.status = ex.description;
	}
}

function slideSBA() {
	try {
		with(document.getElementById("SlidingBottomAds"))
			style.top = document.body.scrollTop + document.body.clientHeight - clientHeight;
	}
	catch(ex) {
		window.status = ex.description;
	}
}