

function setCookie( n, v, e )
{
	var d = new Date();
	    d.setDate( d.getDate()+e);
	document.cookie= n + "=" + escape( v )+ ( ( e == null ) ? '' : ';expires=' + d.toGMTString()+';path=/;domain=.wige-event.de' );
}

function deleteCookie(n)
{
	document.cookie= n+'=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}

function getCookie( n )
{
	if ( document.cookie.length > 0 )
  	{
  		c = document.cookie.indexOf( n + '=' );
  		if (c != -1 )
    		{
    			c = c + n.length + 1;
    			ce = document.cookie.indexOf( ';' , c );
    			if ( ce == -1 ){ ce = document.cookie.length; }
    			return unescape( document.cookie.substring( c, ce ) );
    		}
  	}
	return false;
}

function inArray( v, a )
{
	for( var i in a ){if( a[i] == v ){return true;}}return false;
}

function showVisual( wepid )
{
	var t = 1;
	var c = getCookie('wepage');
	if ( c != null && c != "" )
	{
		//deleteCookie('wepage');
		var a = c.split(',');
		if( inArray( wepid, a ) )
		{
			
			return false;
		}
		else
		{
			
			c = c+wepid+',';
			setCookie('wepage',c,t);
		}
  	}
	else
  	{
    		setCookie('wepage',wepid+',',t);
    }
    	return true;
}


function showVisualWC( wepid )
{
	var t = 1;
	var c = getCookie('wepage');
	if ( c != null && c != "" )
	{
		//deleteCookie('wepage');
		var a = c.split(',');
		if( inArray( wepid, a ) )
		{
			
			return false;
		}
  	}

    	return true;
}



var ContentScroller = {
			timer:50, 
			interval:null,
			direction:null,
			start:function(d){ this.direction = d; if (!this.interval) { this.interval = setInterval("ContentScroller.action()", this.timer); } },
			stop:function(){ if (this.interval) { clearInterval(this.interval); this.interval = false; } },
			mouseWheel:function(){jQuery('#content-section').bind('mousewheel', function(event, delta) {if(delta > 0){ContentScroller.direction = -10;}else{ ContentScroller.direction = 10;} ContentScroller.action();return false;});},
			action:function(){ jQuery('#content-section').scrollTop( ( jQuery('#content-section').scrollTop() + this.direction ) ); }			
		};
