new function() {

	function makeList() {
		var i, j, a, l, u = document.getElementsByTagName('ul');
		// loop through all "ul" with class "nw_video_list"
		for (i = 0; u.length > i; i++) {
			if (/\bnw_video_list\b/.test(u[i].className)) {
				l = u[i].getElementsByTagName('li');
				// loop through all "li"
				for (j = 0; l.length > j; j++) {
					a = l[j].getElementsByTagName('a')[0];
					// if it contains a link
					if (a) {
						// attach an online event
						a.onclick = changeObject;
					}
				}
			}
		}
	}

	// change object by first removing it, then
	// adding it againg with modified parameters
	function changeObject(e) {
		e = e || window.event;
		var i, cloned, object, param, params, container;

		// the object containing video must have this id
		object = document.getElementById('nw_video_clip');

		// get param nodes of the object
		params = object.getElementsByTagName('param');

		// clone the object element
		cloned = object.cloneNode(false);
		// set data property to new source
		cloned.data = this.href;

		// clone and append object parameters
		if (params !== null && params.length > 0) {
			for (i = 0; params.length > i; i++) {
				param = params[i].cloneNode(false)
				cloned.appendChild(param);
				if (param.name == 'movie') {
					param.value = this.href;
				}
			}
		}

		// find its node container
		// then remove from container
		container = object.parentNode;
		container.removeChild(object);

		// insert new object element in container
		container.appendChild(cloned);

		// prevent following links
		if (e.preventDefault) {
			e.preventDefault();
		} else {
			e.returnValue = false;
		}
	};

	// window onload may have been overwritten
	// by the onload attribute on the body tag
	// try event registration if available and
	// as a last resort use inline onload event
	if (window.addEventListener) {
		// for MOZ, FF, Opera, Konqueror Safari
		window.addEventListener('load', function (e) { makeList(e); }, false);
	} else if (window.attachEvent) {
		// for IE (and clones)
		window.attachEvent('onload', function (e) { makeList(e); });
	} else {
		// if there are more...
		window.onload = function (e) { makeList(e); };
	}

};
