All pastes #419232 Raw Edit

Stuff

public javascript v1 · immutable
·published 2007-04-01 04:24 UTC
rendered paste body
	window.onload=null;	function _attach(event){		if(window.addEventListener)			window.addEventListener('load', event, false);		else if(window.attachEvent)			window.attachEvent('onload', event);		else			window.onload+=event;	}	function onload(event){		if(event.constructor.toString().indexOf('Array')!=-1)		for(i=0; i<event.len; i++)			_attach(event[i]);		else			_attach(event);	}	function banner(){		var n=Math.floor(Math.random()*8)+1;		var body=document.getElementById("body").style;		body.backgroundImage='url(img/interior_banner'+n+'.jpg)';	}	onload('banner()');