/************************************************************************************************************
	(C) BlogClout.com, June 2007
	
	This is a special script from blogclout.com/blog by sherief.net
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact.
	
	Thank you!
	
	Sherief Mursyidi
	sherief.net
	
************************************************************************************************************/
var noffDiv = document.getElementById("noff");

var agt=navigator.userAgent.toLowerCase();
var is_firefox = (agt.indexOf("firefox") != -1);
is_firefox = 0; /* disable FF recognition to show ads everywhere */

function doAds(){
	if (!is_firefox && getCookie('noff') != "1"){
		noffDiv.style.display = "block";
		start = noffDiv.offsetHeight;
		noffDiv.style.top = 0 - start;
		scrollAds(0,1);
	}	
}

var adstimer;
var start = 0;
function scrollAds(start,inc){
  if(parseInt(noffDiv.style.top) < start){
		noffDiv.style.top = parseInt(noffDiv.style.top)+inc;
		adstimer = window.setTimeout ("scrollAds("+start+","+inc+");", 10);}
	else{
		clearTimeout(adstimer);}
}

function adsClose(){
  /* this ad not to be shown for the next 7 days */
	scrollAds(start,-1);
	createCookie('noff',1,'7');
}

function createCookie(name,value,days){
	if (days){
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function getCookie(name){
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++){
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);}
	return null;
}

function eraseCookie(name){
	createCookie(name,"",-1);
}

doAds();
