/* 
	(c) 2004-2006, Genso IT
	$Revision: 1.3 $
	$Id: slide.js,v 1.3 2006/01/17 11:58:51 mgendrey Exp $
*/
function changeSlide(slideId,pid) {
	var now = new Date();
	var url = 'http://mike.genso.de/cgi-bin/w3mediajockey.pl?P='+pid+'&T='+now.getTime();

	changeImg(slideId,url);
}

function changeImg(imgId,url) {
	var imgObj;
	eval("imgObj = document.images."+imgId);

	imgObj.src = url;
}

//
// @colOn  text-color; defaut is white (#fff) if none (null) is specified
//
function setBackgroundImg(id,imgURL,colOn,position) {
	var elem = document.getElementById(id);
//alert("smilieOn("+id+")");
	if(position == null) {
		elem.style.backgroundPosition='top center';
	} else if(position == '') {
		// no positioning
	} else {
		elem.style.backgroundPosition=position;
	}

	elem.style.backgroundRepeat='no-repeat';
	elem.style.backgroundImage='url('+imgURL+')';

	if(colOn == null) {
		elem.style.color='#fff';
	} else if(colOn == '') {
		// no color change
	} else {
		elem.style.color=colOn;
	}
}

//
// @colOff  text-color; defaut is black (#000) if none (null) is specified
//
function unsetBackgroundImg(id,colOff) {
	var elem = document.getElementById(id);
	elem.style.backgroundImage='';
	if(colOff == null) {
		elem.style.color='#000';
	} else if(colOff == '') {
		// no color change
	} else {
		elem.style.color=colOff;
	}
}

