/* this is a template - a chunk of javascript that can create dynamic elements on other pages. templates must follow certain standards: * must contain a function with the name of the template, this will be used to create the template objects. * must contain a prototype 'init' function for the name of the template, this will be run when the page loads. * must accept a data object of the form: '{{template:"name of template", guid:"generatedGuid", othervars:''}} beyond these standards, anything goes. There is also a complement css template: css:HypeMachine that can be used for custom styles to be included. */ function HypeMachine(data) { this.data = data; this.id = data.guid; } HypeMachine.prototype.init = function() { $(this.id).innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="500" height="220"><param name="movie" value="http://hype.non-standard.net/xspf_player.swf?playlist_url=http://hype.non-standard.net/playlist/popular/now/xml/1/list.xspf&autoplay=true&skipto=0"><param name="quality" value="high"><embed src="http://hype.non-standard.net/xspf_player.swf?playlist_url=http://hype.non-standard.net/playlist/popular/now/xml/1/list.xspf&autoplay=true&skipto=0" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="220"></embed></object>'; };