var tx_wtcontentchange_counter = 0; // initialize counter

function tx_wtcontentchange_autochange(uids, time, cid) {
	var interval = time; // set interval (ms)
	//alert("hallo"+cid);
	setInterval("tx_wtcontentchange_xajax('" + uids + "', "+cid+")", interval); // opens function tx_wtcontentchange_xajax in the interval
}

function tx_wtcontentchange_xajax(uids, cid) {
	var uid = uids.split(','); // split uids at ,
	tx_wtcontentchange_counter ++; // increase counter
	//alert("hallo2"+cid);
	if (uid[tx_wtcontentchange_counter] == undefined) tx_wtcontentchange_counter = 0; // if no content, begin at 0
	tx_wtcontentchange_pi1changecontent(uid[tx_wtcontentchange_counter], 'next', 'cob'+cid); // open AJAX function with current uid
}


