// Clickable Posticons v1.1
// (c) 2006 by Patric Peters <me@papet.de>
// 

// ==UserScript==
// @name          Clickable Posticons
// @namespace	  http://www.papet.de
// @description   Macht die Posticons Klickbar

// @version	      1.1 (30.04.2006)
// @include       http://forum.counter-strike.de/bb/newreply.php*
// @include       http://forum.cstrike.de/bb/newreply.php*
// @include       http://82.149.226.131/bb/newreply.php*
// @include       http://forum.mods.de/bb/newreply.php*
// @include       http://forum.counter-strike.de/bb/editreply.php*
// @include       http://forum.cstrike.de/bb/editreply.php*
// @include       http://82.149.226.131/bb/editreply.php*
// @include       http://forum.mods.de/bb/editreply.php*
// @include       http://forum.counter-strike.de/bb/newthread.php*
// @include       http://forum.cstrike.de/bb/newthread.php*
// @include       http://82.149.226.131/bb/newthread.php*
// @include       http://forum.mods.de/bb/newthread.php*
// ==/UserScript==

var tds = document.getElementsByTagName('td');
var sLocation = window.location.search;
if(window.location.href.match(/newthread/i))
{
	var index  = 26;
}
else if(window.location.href.match(/newreply/i))
{
	var index = 24;
}
else if(window.location.href.match(/editreply/i))
{
	var index = 23;
}
while(index < tds.length)
{
	if(tds[index].innerHTML.match(/img\/icons\/([^('|")]*)/i) && index < 69)
	{
		tds[index].innerHTML = '<a style="cursor:pointer;" onClick="addText(\'[img]./img/icons/'+RegExp.$1+'[/img]\',document.forms[1]);">'+tds[index].innerHTML+'</a>';
	}
	index = index +3;
}