All pastes #439651 Raw Edit

Unnamed

public javascript v1 · immutable
·published 2007-04-14 12:55 UTC
rendered paste body
var News = Class.create();News = {	Slider: function(caller, shortText, slideText) {		// Rahmen ein- bzw. ausblenden			shortText = $(shortText);					if ($(slideText).style.display != 'none') {			shortText.style.border = '1px solid #000';			shortText.style.background = '#000';		} else {			shortText.style.border = '1px solid #555';			shortText.style.background = '#434343';		}				// Effect Slide Toggle		new Effect.toggle(slideText, 'appear', {duration: 2});	}}var Imprint = Class.create();Imprint = {		timeOut: 0,		open: function(TTL) {		// Info-Dialog anzeigen		Dialog.info('<img src="img/imprint.gif" />', 		 		    {width: 400, height: 254, showProgress: true,					 showEffect: Effect.Appear, hideEffect: Effect.Fade,					 });				// Timeout auf TTL (time to live) setzen (= TTL * 1000 ms)		timeOut = TTL;				// Nach 1000 ms Callback-Funktion "Imprint.checkTimeout" aufrufen		setTimeout("Imprint.checkTimeout()", 1000);	},		checkTimeout: function() {				// Alle 1000 ms wird durch Aufruf der Funktion die timeOut-Variable um		// 1 dekrementiert.		--timeOut;				// Wenn die Zeit (timeOut) noch nicht abgelaufen ist (timeOut > 0),		// wird die Funktion nach 1000 ms erneut aufgerufen.		if (timeOut > 0) {			setTimeout("Imprint.checkTimeout()", 1000);				// Ansonsten wird der Dialog geschlossen.		} else {			Dialog.closeInfo();		}	}}