function includeJS( filename ){
	var head = document.getElementsByTagName('head')[0];
	
	script = document.createElement('script');
	script.src = filename;
	script.type = 'text/javascript';
	
	head.appendChild(script)
}
//includeJS("/js/dump.js");
/* =============================================== */


function SetCookie( name, value, expires ){
	var today = new Date();
	today.setTime( today.getTime() );
	
	if ( expires ){
		expires = expires;
	}else{
		expires = 10000;
	}
	var expires_date = new Date( today.getTime() + (expires) );

	
	var path = '/';
	var domain = window.location.host;
	domain = domain.replace(/www./,"");

	document.cookie = name + "=" +escape( value ) +
	( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
	( ( path ) ? ";path=" + path : "" ) +
	( ( domain ) ? ";domain=" + domain : "" );
}
function GetCookie( name ) {
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) &&( name != document.cookie.substring( 0, name.length ) ) ){
		return null;
	}
	if ( start == -1 ) return null;
	
	var end = document.cookie.indexOf( ";", len );
		if ( end == -1 ) 
		end = document.cookie.length;
		return unescape( document.cookie.substring( len, end ) );
}
function DeleteCookie( name, path, domain ) {
	if ( GetCookie( name ) ) document.cookie = name + "=" +
	( ( path ) ? ";path=" + path : "") +
	( ( domain ) ? ";domain=" + domain : "" ) +
	";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function CheckCookie( name, value, idObj ){
	//DeleteCookie('news', '/', '.new2.moneychannel.ro');
	if ( GetCookie( name ) ){
	}else{
		SetCookie(name, value, (60*60*24*7));
	}
}

function DisplayIfCookie( name, value ){
	$$('div.superWideBox').each(function(link){
		
			if ( GetCookie( name ) ){
				link.className="box superWideBox off";
			}else{
				(link.className=="box superWideBox off")?link.className="box superWideBox on":link.className="box superWideBox off";
				SetCookie(name, value, (60*60*24*7));
			}
				
		}
	);
}
function PuffWideBox(obj){
	new Effect.Puff($(obj), {duration:1});
}

//DeleteCookie('news', '/', '.new2.moneychannel.ro');
//DisplayIfCookie('WideBox', 'WideBox222');