function appendEvent(target, type, listener)
{
	if( !target['arrayEvent' + type] ){
		target['on' + type] = function(e){
			if(e){
				target.objEvent = e;
			}
			for( var i = 0; i < this['arrayEvent' + type].length; i++ ){
				this['arrayEvent' + type][i](this);
			}
		};
		target['arrayEvent' + type] = new Array();
	}
	target['arrayEvent' + type].push( listener );
}

appendEvent( window, 'load', scrollToAnchor );

