<?php
require_once "../../maincore.php";
require_once "infusion_db.php";

if(!FUSION_V6) { 
	if (!checkrights("SP3".($sp_install_number=='' ? '0' : $sp_install_number)) || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../../index.php"); }
	require_once THEMES."templates/admin_header.php";
	include LOCALE.LOCALESET."admin/infusions.php";
}
else {
	if (!checkrights("IP")) fallback("../../index.php");
	require_once BASEDIR."subheader.php";
	require_once ADMIN."navigation.php";
}

require_once "sp_functions.php";

// Check if locale file is available matching the current site locale setting.
if (file_exists($sp_install_folder."locale/".$settings['locale'].".php")) {
	// Load the locale file matching the current site locale setting.
	include $sp_install_folder."locale/".$settings['locale'].".php";
} else {
	// Load the infusion's default locale file.
	include $sp_install_folder."locale/English.php";
}

// save new settings
if(IsSet($_GET['step']) && $_GET['step']=='delete_preset' && IsSet($_GET['showid']) && IsNum($_GET['showid'])) {
	$tmp = dbarray(dbquery("SELECT * FROM `".$sendeplan_db['table_showdata']."` WHERE `ID` = '".stripinput($_GET['showid'])."'"));
	if($tmp) {
		$result = dbquery("DELETE FROM `".$sendeplan_db['table_showdata']."` WHERE `ID` = '".stripinput($_GET['showid'])."' LIMIT 1");
		@unlink($sp_install_folder."images/shows/".$tmp['image']); 
		redirect(FUSION_SELF.$aidlink."&step=define_presets&success=deleted");
		exit;
	}
}
if(IsSet($_POST['save_new'])) {
	if($_POST['showtitle']!="" && $_POST['fcolor']!="" && $_POST['owner']!="") {
		$newtitle = stripinput($_POST['showtitle']);
		$newfcolor = stripinput($_POST['fcolor']);
		$newbackground = stripinput($_POST['background']);
		$newowner = stripinput($_POST['owner']);
		$pic = $_FILES['showpic'];
		$bildinfos = getimagesize($pic['tmp_name']);
		if($bildinfos[2]>=1 || $bildinfos[2]<=3) {
			copy($pic['tmp_name'], $sp_install_folder."images/shows/".$pic['name']);
			$result = dbquery("INSERT INTO `".$sendeplan_db['table_showdata']."` (`owner`, `title`, `image`, `font-color`, `textbg`)
			VALUES ('$newowner', '$newtitle', '".$pic['name']."', '$newfcolor', '$newbackground')");
			redirect(FUSION_SELF.$aidlink."&step=edit_preset&id=newest");
			exit;
		}
		else { $uploaderror = true; }
	}
	else { $uploaderror = true; }
}

opentable($splocale['show_presets'].($sp_channelname!="" ? " &raquo; ".htmlentities($sp_channelname) : ''));
include $sp_install_folder."admin_headermenu.php";

// Load scheduler settings
$sp_setting = @dbarray(dbquery("SELECT * FROM `".$sendeplan_db['table_settings']."` WHERE `profile` = 'default'"));

// get usergroups
$result = @dbquery("SELECT * FROM `".DB_USER_GROUPS."` ORDER BY `group_name`");
$rows = @dbrows($result);
$group_name = array();
$group_id = array();
	if ($rows != 0) {
	while ($groups = dbarray($result)) {
		$group_name[] = $groups['group_name'];
		$group_id[] = $groups['group_id'];			
	}
}

?>
<script type='text/javascript'>
function RemoveItem(content) {
	return confirm("Sind Sie sicher, dass Sie die Vorlage '" + content + "' löschen möchten?");
}
function showColors() {
  	spanid = "Colors";
  	val = document.getElementById(spanid).style.display;
  	if (val == "none") {
    	document.getElementById(spanid).style.display = "block";
  	}
  	else {
    	document.getElementById(spanid).style.display = "none";
  	}
}
function setColor(color) {
	document.showpreset.fcolor.value = color;
	document.getElementById("Colors").style.display = "none";
}
</script>

<table align='center' cellspacing='0' cellpadding='20' border='0' style='width: auto;'>
	<tr>
		<td align='center'><a href='<?php echo FUSION_SELF.$aidlink; ?>&amp;step=define_presets'>Grafische Radioshow-Vorlagen verwalten</a></td>
		<td align='center'><a href='<?php echo FUSION_SELF.$aidlink; ?>&amp;step=dj_shows'>Vordefinierte Sendungen des Teams verwalten</a></td>
	</tr>
</table>	

<?php
// read current half transparent grafics from folder, store them in array
$i=0;
$pfad=$sp_install_folder."images/bg_trans/";
$verz=opendir($pfad);
while ($file=readdir($verz)) {
    if (filetype($pfad.$file)!="dir" && substr($file,-3)=="png") {        				
        $bild[$i] = $file;
		$i++;
	}
}
closedir($verz);
asort($bild);

// Step: Edit stored DJ-Shows
if(IsSet($_GET['step']) && $_GET['step'] == "dj_shows") {
	if(IsSet($_POST['show_id']) && IsNum($_POST['show_id'])) { $show_id = stripinput($_POST['show_id']); }
	echo "<h3 align='center'>Shows der DJs/Moderatoren bearbeiten</h3>\n";
	// save changes
	if(IsSet($_POST['save_djshow']) && $show_id!="") {
		unset($error);
		if(!IsSet($_POST['newid']) || !IsNum($_POST['newid'])) { $error['image'] = true; }
		if(!IsSet($_POST['title']) || $_POST['title']=="" || strlen($_POST['title'])>30) { $error['title'] = true; }
		if(!IsSet($_POST['description']) || $_POST['description']=="") { $error['description'] = true; }
		if(!IsSet($_POST['is_nsv']) || $_POST['is_nsv']=="") { $error['nsv'] = true; }
		if(!IsSet($_POST['studiobox']) || $_POST['studiobox']=="") { $error['studiobox'] = true; }
		if(!IsSet($error)) {
			$result = @dbquery("UPDATE `".$sendeplan_db['table_shows']."` SET `title` = '".stripinput($_POST['title'])."', `description` = '".stripinput($_POST['description'])."', `showid` = '".stripinput($_POST['newid'])."', `is_nsv` = '".stripinput($_POST['is_nsv'])."', `studiobox` = '".stripinput($_POST['studiobox'])."' WHERE `ID` = '".$show_id."' LIMIT 1");
		}
	}
	echo "<br /><div align='center'><form method='post' name='djshow' action='".FUSION_SELF.$aidlink."&amp;step=dj_shows'>".getShowDropDown()."<input type='submit' class='button' value='ausw&auml;hlen' name='edit_djshow' /></form>\n";
	
	if(IsSet($show_id)) {
		echo "<hr />\n<div align='center'>\n";
		if(IsSet($error)) { echo "<div class='admin-message'><strong>".$splocale['error'].":</strong> ".$splocale['marked_not_filled']."</div>\n"; }
		$show = dbarray(dbquery("SELECT * FROM `".$sendeplan_db['table_shows']."` WHERE `ID` = '".$show_id."'"));
		if(!$show) { redirect(FUSION_SELF.$aidlink); exit; }
		$result2 = dbquery("SELECT * FROM `".$sendeplan_db['table_showdata']."` WHERE `ID` = '".$show['showid']."'");
							$rows = dbrows($result2);
							if ($rows != 0) {
							$showdata = dbarray($result2);
							echo "
							<div align='center'>Vorschau:
							<div style='padding: 10px; width: ".($sp_setting['showbox_width']-20)."px; height: ".($sp_setting['showbox_height']-20)."px; background-image: url(".$sp_install_folder."images/shows/".$showdata['image']."); background-repeat: no-repeat; background-position: center; background-color: transparent; color: ".$showdata['font-color'].";' align='center'>
							<div style='margin: 0px; padding: 5px; padding-top: 3px;".($showdata['textbg']!="" && file_exists($sp_install_folder."images/bg_trans/".$showdata['textbg']) ? "background-image: url(".$sp_install_folder."images/bg_trans/".$showdata['textbg'].");" : "")." border: 0px none; height: ".($sp_setting['showbox_height']-30)."px; overflow: hidden;'><div style='width: auto; font-family: ".$sp_setting['font_showtitle']."; font-size: ".$sp_setting['fontsize_showtitle']."px; font-weight: ".($sp_setting['bold_showtitle']==true ? "bold" : "normal").";' align='".$sp_setting['align_showtitle']."'><table width='100%' border='0' align='left' cellpadding='2' cellspacing='0' style='font-family: ".$sp_setting['font_showtitle']."; font-size: ".$sp_setting['fontsize_showtitle']."px; color: ".$showdata['font-color']."';><tr><td><strong>XX:00".($sp_setting['view_endtime']=="1" ? "-XX:00" : "")."</td>".($sp_setting['use_nsv']==true && $show['is_nsv']==true ? "<td width='1'><img src='".$sp_install_folder."images/camera_on.png' width='25' height='25' border='0' alt='Cam on!' title='Sendung wird per Video &uuml;bertragen' /></td>" : "").($sp_setting['use_nsv']==true && $show['is_nsv']==false ? "<td width='1'><img src='".$sp_install_folder."images/camera_off.png' width='25' height='25' border='0' alt='Cam off!' title='Sendung wird NICHT per Video &uuml;bertragen' /></td>" : "")."</tr></table>".$show['title']."</div>
							<div style='font-family: ".$sp_setting['font_showdescription']."; font-size: ".$sp_setting['fontsize_showdescription']."px;color: ".$showdata['font-color']."; font-weight: ".($sp_setting['bold_showdescription']==true ? "bold" : "normal").";' align='".$sp_setting['align_showdescription']."'>".nl2br($show['description'])."</div>
							</div>
							</div>
							<br />
							</div>
							<br />
							";
							}
		
		echo "<form method='post' action='' name='showpreset'>\n";
		echo "<table class='tbl-border' cellspacing='1' cellpadding='0' border='0' align='center'>";
		echo "<tr><td class='tbl1'>Titel der Show:</td><td class='tbl1'><input name='title' type='text' class='textbox' value='".$show['title']."' size='25'".(IsSet($error['title']) ? "style='background-color: #fbb; color: #000; border; 1px solid #f00;'" : "")." /></td></tr>\n";
		echo "<tr><td class='tbl2'>Beschreibung:</td><td class='tbl2'><textarea name='description' class='textbox' size='25' style='width: ".($sp_setting['showbox_width']-20)."px; height: ".($sp_setting['showbox_height']-70)."px;".(IsSet($error['description']) ? " background-color: #fbb; color: #000; border; 1px solid #f00;" : "")."'>".$show['description']."</textarea></td></tr>\n";
		echo "<tr>
					<td class='tbl1'>Video-&Uuml;bertragung?</td>
					<td class='tbl1' align='left' style='".(IsSet($error['nsv']) ? " background-color: #fbb; color: #000; border; 1px solid #f00;" : "")."'>
						".($sp_setting['use_nsv']==true ? "<input name='is_nsv' class='textbox' value='1' type='radio'".($show['is_nsv']==true ? " checked" : "").">".$splocale['yes']."&nbsp;&nbsp;&nbsp;&nbsp;<input name='is_nsv' class='textbox' value='0' type='radio'".($show['is_nsv']==false ? " checked" : "").">".$splocale['no'] : "<em>- Dieses Feature ist nicht aktiv-</em><input type='hidden' name='is_nsv' value='0' />")."
					</td>
				</tr>
				<tr>
					<td class='tbl2'>Studiobox-Einstellung</td>
					<td class='tbl2'align='left'>
						".($sp_setting['use_studiobox']==true ? "
						<select name='studiobox' class='textbox' style='".(IsSet($error['studiobox']) ? " background-color: #fbb; color: #000; border; 1px solid #f00;" : "")."'>
							<option value=''".($show['studiobox']=='' ? " selected" : "").">- bitte ausw&auml;hlen:</option>
							<option value='0'".($show['studiobox']=='0' ? " selected" : "").">Keine Gr&uuml;&szlig;e/W&uuml;nsche</option>
							<option value='1'".($show['studiobox']=='1' ? " selected" : "").">Nur Gr&uuml;&szlig;e/ keine W&uuml;nsche</option>
							<option value='2'".($show['studiobox']=='2' ? " selected" : "").">Keine Gr&uuml;&szlig;e/ nur W&uuml;nsche</option>
							<option value='3'".($show['studiobox']=='3' ? " selected" : "").">Gr&uuml;&szlig;e &amp; W&uuml;nsche</option>
						</select>" : "<em>- Dieses Feature ist nicht aktiv-</em><input type='hidden' name='studiobox' value='".$show['studiobox']."' />")."
					</td>
				</tr>\n";	
		echo "<tr><td class='tbl1'>Show-Vorlage verwenden:</td><td class='tbl1'>";
		$result3 = dbquery("SELECT * FROM `".$sendeplan_db['table_showdata']."` ORDER BY `title` ASC");
		$rows = dbrows($result3);
		if ($rows != 0) {
			echo "
			<select name='newid' size='1' class='textbox'".(IsSet($error['image']) ? "style='background-color: #fbb; color: #000; border; 1px solid #f00;'" : "").">";
			while ($showdata2 = dbarray($result3)) {
				echo "
				<option value='".$showdata2['ID']."'".($showdata2['ID']==$show['showid'] ? " selected" : "").">".$showdata2['title']."</option>";
			}
			echo "
			</select>";
		}
		else { echo "&nbsp;"; }
		echo "</td></tr>\n";
		echo "</table>\n";
		echo "<br /><div align='center'><input type='hidden' name='show_id' value='".$show_id."' /><input type='submit' class='button' name='save_djshow' value='&Auml;nderungen speichern' /></div>\n";
		echo "</form>\n";
		echo "</div>";
	}	
}

// Step: Create new Show-Preset
elseif(IsSet($_GET['step']) && $_GET['step'] == "create_preset") {
?>
<hr />
<h3 align='center'>Neue Vorlage erstellen</h3>
<?php
if(IsSet($uploaderror)) {
	echo "<div class='admin-message' align='center'>Es ist ein Fehler aufgetreten. Hast du alle Pflichtfelder ausgef&uuml;llt und ein g&uuml;ltiges Bildformat gew&auml;hlt?</div>";
}
?>
<div align='center' style='padding: 10px;'>[<a href='<?php echo FUSION_SELF.$aidlink;?>&amp;step=define_presets'>zur&uuml;ck</a>]</div>
<form method='post' action='<?php echo FUSION_SELF.$aidlink;?>&amp;step=create_preset' name='showpreset' enctype="multipart/form-data">
	<table class='tbl-border' align='center' cellspacing='1' cellpadding='0' style='width: auto;'>
		<tr><td class='tbl1'>Bezeichnung (z.B. Genre) dieser Vorlage*:</td><td class='tbl1' width='350'><input name='showtitle' type='text' class='textbox' value='' size="25" maxlength="25" /></td></tr>
		<tr><td class='tbl2'>Showgrafik*:</td><td class='tbl2'><input type='file' name='showpic' class='textbox' /></td></tr>
		<tr><td class='tbl1'>Verf&uuml;gbar f&uuml;r*:</td><td class='tbl1'>
			<select name='owner' class='textbox' size='1'>
			<option value='0'>Niemand (au&szlig;er Autostream)</option>
			<option value='all'>alle DJ/Moderatoren</option>
			<?php
			$result2 = dbquery("SELECT * FROM `".$db_prefix."users` WHERE `user_groups` REGEXP('^\\\.".$sp_setting['dj_group']."$|\\\.".$sp_setting['dj_group']."\\\.|\\\.".$sp_setting['dj_group']."$') ORDER BY `user_name` ASC");
				$rows = dbrows($result2);
				if ($rows != 0) {
					while($djdata = dbarray($result2)) {
						echo "<option value='".$djdata['user_id']."'>".$djdata['user_name']."</option>						
						";
					}
				}
			?></select>
		</td></tr>
		<tr><td class='tbl2'>Halbtransp. Hintergrund der Schrift:<br /><small>(Erh&ouml;ht die Lesbarkeit bei kontrastreichen Hintergr&uuml;nden)</small></td><td class='tbl2'>
			<select name='background' class='textbox'>
				<option value="">-keine-</option>
				<?php
					for($i=0;$i<(count($bild));$i++) {
						echo "<option value='".$bild[$i]."'>".$bild[$i]."</option>\n";
					}
				?>
			</select>
		</td></tr>
		<tr><td class='tbl1'>Schriftfarbe*:</td><td class='tbl1'>
			<table border='0' cellspacing='0' cellpadding='0' align='left'>
				<tr>
					<td valign='middle'><input name='fcolor' type='text' class='textbox' value='' size='6' maxlength='25' /></td>
					<td valign='middle'><img style="cursor:pointer;" onClick="javascript:showColors();" alt="Farbw&auml;hler" src="<?php echo INFUSIONS;?>sendeplan/images/color.gif" border="0" height="19" /></td>
				</tr>
			</table>
			<span id='Colors' style='height: auto; width: 100%; background-color: transparent; border: 0px solid #FFFFFF; display:none; overflow: auto; vertical-align: middle;'>
			<table class="tbl" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 0);" onclick="setColor('#000000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 51);" onclick="setColor('#000033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 102);" onclick="setColor('#000066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 153);" onclick="setColor('#000099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 204);" onclick="setColor('#0000cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 255);" onclick="setColor('#0000ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 0);" onclick="setColor('#330000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 51);" onclick="setColor('#330033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 102);" onclick="setColor('#330066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 153);" onclick="setColor('#330099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 204);" onclick="setColor('#3300cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 255);" onclick="setColor('#3300ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 0);" onclick="setColor('#660000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 51);" onclick="setColor('#660033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 102);" onclick="setColor('#660066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 153);" onclick="setColor('#660099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 204);" onclick="setColor('#6600cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 255);" onclick="setColor('#6600ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 0);" onclick="setColor('#990000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 51);" onclick="setColor('#990033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 102);" onclick="setColor('#990066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 153);" onclick="setColor('#990099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 204);" onclick="setColor('#9900cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 255);" onclick="setColor('#9900ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 0);" onclick="setColor('#cc0000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 51);" onclick="setColor('#cc0033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 102);" onclick="setColor('#cc0066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 153);" onclick="setColor('#cc0099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 204);" onclick="setColor('#cc00cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 255);" onclick="setColor('#cc00ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 0);" onclick="setColor('#ff0000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 51);" onclick="setColor('#ff0033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 102);" onclick="setColor('#ff0066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 153);" onclick="setColor('#ff0099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 204);" onclick="setColor('#ff00cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 255);" onclick="setColor('#ff00ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 0);" onclick="setColor('#003300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 51);" onclick="setColor('#003333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 102);" onclick="setColor('#003366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 153);" onclick="setColor('#003399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 204);" onclick="setColor('#0033cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 255);" onclick="setColor('#0033ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 0);" onclick="setColor('#333300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 51);" onclick="setColor('#333333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 102);" onclick="setColor('#333366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 153);" onclick="setColor('#333399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 204);" onclick="setColor('#3333cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 255);" onclick="setColor('#3333ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 0);" onclick="setColor('#663300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 51);" onclick="setColor('#663333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 102);" onclick="setColor('#663366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 153);" onclick="setColor('#663399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 204);" onclick="setColor('#6633cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 255);" onclick="setColor('#6633ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 0);" onclick="setColor('#993300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 51);" onclick="setColor('#993333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 102);" onclick="setColor('#993366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 153);" onclick="setColor('#993399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 204);" onclick="setColor('#9933cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 255);" onclick="setColor('#9933ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 0);" onclick="setColor('#cc3300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 51);" onclick="setColor('#cc3333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 102);" onclick="setColor('#cc3366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 153);" onclick="setColor('#cc3399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 204);" onclick="setColor('#cc33cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 255);" onclick="setColor('#cc33ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 0);" onclick="setColor('#ff3300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 51);" onclick="setColor('#ff3333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 102);" onclick="setColor('#ff3366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 153);" onclick="setColor('#ff3399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 204);" onclick="setColor('#ff33cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 255);" onclick="setColor('#ff33ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 0);" onclick="setColor('#006600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 51);" onclick="setColor('#006633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 102);" onclick="setColor('#006666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 153);" onclick="setColor('#006699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 204);" onclick="setColor('#0066cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 255);" onclick="setColor('#0066ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 0);" onclick="setColor('#336600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 51);" onclick="setColor('#336633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 102);" onclick="setColor('#336666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 153);" onclick="setColor('#336699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 204);" onclick="setColor('#3366cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 255);" onclick="setColor('#3366ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 0);" onclick="setColor('#666600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 51);" onclick="setColor('#666633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 102);" onclick="setColor('#666666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 153);" onclick="setColor('#666699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 204);" onclick="setColor('#6666cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 255);" onclick="setColor('#6666ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 0);" onclick="setColor('#996600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 51);" onclick="setColor('#996633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 102);" onclick="setColor('#996666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 153);" onclick="setColor('#996699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 204);" onclick="setColor('#9966cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 255);" onclick="setColor('#9966ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 0);" onclick="setColor('#cc6600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 51);" onclick="setColor('#cc6633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 102);" onclick="setColor('#cc6666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 153);" onclick="setColor('#cc6699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 204);" onclick="setColor('#cc66cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 255);" onclick="setColor('#cc66ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 0);" onclick="setColor('#ff6600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 51);" onclick="setColor('#ff6633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 102);" onclick="setColor('#ff6666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 153);" onclick="setColor('#ff6699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 204);" onclick="setColor('#ff66cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 255);" onclick="setColor('#ff66ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 0);" onclick="setColor('#009900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 51);" onclick="setColor('#009933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 102);" onclick="setColor('#009966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 153);" onclick="setColor('#009999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 204);" onclick="setColor('#0099cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 255);" onclick="setColor('#0099ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 0);" onclick="setColor('#339900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 51);" onclick="setColor('#339933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 102);" onclick="setColor('#339966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 153);" onclick="setColor('#339999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 204);" onclick="setColor('#3399cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 255);" onclick="setColor('#3399ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 0);" onclick="setColor('#669900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 51);" onclick="setColor('#669933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 102);" onclick="setColor('#669966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 153);" onclick="setColor('#669999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 204);" onclick="setColor('#6699cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 255);" onclick="setColor('#6699ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 0);" onclick="setColor('#999900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 51);" onclick="setColor('#999933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 102);" onclick="setColor('#999966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 153);" onclick="setColor('#999999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 204);" onclick="setColor('#9999cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 255);" onclick="setColor('#9999ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 0);" onclick="setColor('#cc9900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 51);" onclick="setColor('#cc9933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 102);" onclick="setColor('#cc9966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 153);" onclick="setColor('#cc9999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 204);" onclick="setColor('#cc99cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 255);" onclick="setColor('#cc99ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 0);" onclick="setColor('#ff9900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 51);" onclick="setColor('#ff9933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 102);" onclick="setColor('#ff9966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 153);" onclick="setColor('#ff9999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 204);" onclick="setColor('#ff99cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 255);" onclick="setColor('#ff99ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 0);" onclick="setColor('#00cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 51);" onclick="setColor('#00cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 102);" onclick="setColor('#00cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 153);" onclick="setColor('#00cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 204);" onclick="setColor('#00cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 255);" onclick="setColor('#00ccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 0);" onclick="setColor('#33cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 51);" onclick="setColor('#33cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 102);" onclick="setColor('#33cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 153);" onclick="setColor('#33cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 204);" onclick="setColor('#33cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 255);" onclick="setColor('#33ccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 0);" onclick="setColor('#66cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 51);" onclick="setColor('#66cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 102);" onclick="setColor('#66cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 153);" onclick="setColor('#66cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 204);" onclick="setColor('#66cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 255);" onclick="setColor('#66ccff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 0);" onclick="setColor('#99cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 51);" onclick="setColor('#99cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 102);" onclick="setColor('#99cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 153);" onclick="setColor('#99cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 204);" onclick="setColor('#99cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 255);" onclick="setColor('#99ccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 0);" onclick="setColor('#cccc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 51);" onclick="setColor('#cccc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 102);" onclick="setColor('#cccc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 153);" onclick="setColor('#cccc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 204);" onclick="setColor('#cccccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 255);" onclick="setColor('#ccccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 0);" onclick="setColor('#ffcc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 51);" onclick="setColor('#ffcc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 102);" onclick="setColor('#ffcc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 153);" onclick="setColor('#ffcc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 204);" onclick="setColor('#ffcccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 255);" onclick="setColor('#ffccff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 0);" onclick="setColor('#00ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 51);" onclick="setColor('#00ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 102);" onclick="setColor('#00ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 153);" onclick="setColor('#00ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 204);" onclick="setColor('#00ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 255);" onclick="setColor('#00ffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 0);" onclick="setColor('#33ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 51);" onclick="setColor('#33ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 102);" onclick="setColor('#33ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 153);" onclick="setColor('#33ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 204);" onclick="setColor('#33ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 255);" onclick="setColor('#33ffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 0);" onclick="setColor('#66ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 51);" onclick="setColor('#66ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 102);" onclick="setColor('#66ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 153);" onclick="setColor('#66ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 204);" onclick="setColor('#66ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 255);" onclick="setColor('#66ffff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 0);" onclick="setColor('#99ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 51);" onclick="setColor('#99ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 102);" onclick="setColor('#99ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 153);" onclick="setColor('#99ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 204);" onclick="setColor('#99ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 255);" onclick="setColor('#99ffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 0);" onclick="setColor('#ccff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 51);" onclick="setColor('#ccff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 102);" onclick="setColor('#ccff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 153);" onclick="setColor('#ccff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 204);" onclick="setColor('#ccffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 255);" onclick="setColor('#ccffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 0);" onclick="setColor('#ffff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 51);" onclick="setColor('#ffff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 102);" onclick="setColor('#ffff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 153);" onclick="setColor('#ffff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 204);" onclick="setColor('#ffffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 255);" onclick="setColor('#ffffff');return false;"></td>
</tr>
</table>

		</span>
		</td></tr>
	</table>
<br />
<div align='center'><input type='submit' class='button' name='save_new' value='Vorlage speichern' /></div>
<br /><br />
<div align='center'><small>* Pflichtfelder</small></div>
</form>
<?php
}

elseif(IsSet($_GET['step']) && $_GET['step'] == "define_presets") {
?>
<h3 align='center'>Radioshow-Vorlagen verwalten</h3>
<br />
<div align='center' style='padding: 5px;'>[<a href='<?php echo $aidlink; ?>&amp;step=create_preset' title='Neue Vorlage anlegen'>Neue Vorlage erstellen</a>]</div>
<table cellpadding='0' cellspacing='0' border='0' align='center'>
	<tr>
		<td align='center'>
			<?php
				if(IsSet($_GET['success']) && $_GET['success'] == 'deleted') {
					echo "<div class='admin-message'>Vorlage wurde erfolgreich gel&ouml;scht.</div>\n";
				}
				
				// get radioshows
				$result = dbquery("SELECT * FROM `".$sendeplan_db['table_showdata']."` ORDER BY `title` ASC");
				$rows = dbrows($result);
				if ($rows != 0) {
					$i=0;
					echo "<div>";
					while ($showdata = dbarray($result)) {
						$i++;
						echo "
						<div style='float: left; padding: 5px;'>
						<div style='padding: 10px; width: ".($sp_setting['showbox_width']-20)."px; height: ".($sp_setting['showbox_height']-20)."px; background-image: url(".$sp_install_folder."images/shows/".$showdata['image']."); background-repeat: no-repeat; background-position: center; background-color: transparent; text-align: left; color: ".$showdata['font-color'].";'>
							<div style='margin: 0px; padding: 5px;".($showdata['textbg']!="" && file_exists($sp_install_folder."images/bg_trans/".$showdata['textbg']) ? "background-image: url(".$sp_install_folder."images/bg_trans/".$showdata['textbg'].");" : "")." border: 0px none; height: ".($sp_setting['showbox_height']-30)."px; overflow: hidden;'><span style='font-size: 14px;'><strong>22<sup>oo</sup>-23<sup>oo</sup></strong></span>&nbsp;&nbsp;&nbsp;<a href='$aidlink&amp;step=edit_preset&amp;id=".$showdata['ID']."' title='Bearbeiten'><img src='".$sp_install_folder."images/tool.png' width='16' height='16' alt='Bearbeiten' border='0' /></a>&nbsp;&nbsp;<a href='$aidlink&amp;step=delete_preset&amp;showid=".$showdata['ID']."' title='L&ouml;schen' onclick='return RemoveItem(\"".$showdata['title']."\");'><img src='".$sp_install_folder."images/delete.png' width='16' height='16' alt='L&ouml;schen' border='0' /></a>
							<div align='center' style='font-size: 16px; padding: 0px;'><strong>".$showdata['title']."</strong></div>
							<br /><em>Hier folgt die Beschreibung zur Show...</em><br />
							Verf&uuml;gbar f&uuml;r: <strong>";
							if($showdata['owner']=="all") { echo "gesamtes Team"; }
							elseif($showdata['owner']=="0") { echo "nur Admin/Sendeplan-Verwalter"; }
							else {
								$owner = dbarray(dbquery("SELECT * FROM `".$db_prefix."users` WHERE `user_id` = '".$showdata['owner']."' LIMIT 1"));
								if($owner) { echo $owner['user_name']; }
								else { echo "Niemand!"; }
							}
							echo "</strong>							
							</div>
						</div>
						</div>
						";
						if(IsNum($i/2)) { echo "\n</div><div>\n"; }
					}
					echo "</div>";
				}
			?>
		</td>
	</tr>
</table>

<?php
}

elseif(IsSet($_GET['step']) && $_GET['step'] == "edit_preset" && IsSet($_GET['id']) && ($_GET['id']=="newest" || IsNum($_GET['id']))) {
	// save changes
	if(IsSet($_POST['editsave']) && $_POST['fcolor']!="" && $_POST['owner']!="") {
		$id = stripinput($_GET['id']);
		$result = dbquery("UPDATE `".$sendeplan_db['table_showdata']."` SET `title` = '".stripinput($_POST['showtitle'])."', `owner` = '".stripinput($_POST['owner'])."', `textbg` = '".stripinput($_POST['background'])."', `font-color` = '".stripinput($_POST['fcolor'])."' WHERE `ID` = '".$id."' LIMIT 1");
		redirect(FUSION_SELF.$aidlink."&step=edit_preset&id=$id");
		exit;
	}
	
	// get radioshow
	if($_GET['id']=='newest') { $orderby = "ORDER BY `ID` DESC LIMIT 1"; }
	else { $orderby = "WHERE `ID` = ".stripinput($_GET['id']); }
	$showdata = dbarray(dbquery("SELECT * FROM `".$sendeplan_db['table_showdata']."` $orderby"));
	if (!$showdata) { redirect(FUSION_SELF.$aidlink); exit; }
	else {
		?>
		<h3 align='center'>Radioshow-Vorlage bearbeiten</h3>
		<br />
		<div align='center' style='padding: 5px;'>[<a href='<?php echo FUSION_SELF.$aidlink; ?>&amp;step=define_presets' title='&Uuml;bersicht'>zur&uuml;ck zur &Uuml;bersicht</a>]</div>
		<table cellpadding='0' cellspacing='10' border='0' align='center'>
			<tr>
				<td align='center' valign='top'>
					<?php
						echo "
						<div align='center'><hr />[<a href='$aidlink&amp;step=delete_preset&amp;showid=".$showdata['ID']."' title='L&ouml;schen' onclick='return RemoveItem(\"".$showdata['title']."\");'>Vorlage l&ouml;schen</a>]
						<div style='padding: 10px; width: ".($sp_setting['showbox_width']-20)."px; height: ".($sp_setting['showbox_height']-20)."px; background-image: url(".$sp_install_folder."images/shows/".$showdata['image']."); background-repeat: no-repeat; background-position: center; background-color: transparent; text-align: left; color: ".$showdata['font-color'].";'>
							<div style='margin: 0px; padding: 5px;".($showdata['textbg']!="" && file_exists($sp_install_folder."images/bg_trans/".$showdata['textbg']) ? "background-image: url(".$sp_install_folder."images/bg_trans/".$showdata['textbg'].");" : "")." border: 0px none; height: ".($sp_setting['showbox_height']-30)."px; overflow: hidden;'><span style='font-size: 14px;'><strong>22<sup>oo</sup>-23<sup>oo</sup></strong></span>
							<div align='center' style='font-size: 16px; padding: 0px;'><strong>".$showdata['title']."</strong></div>
							<br /><em>Hier folgt die Beschreibung zur Show...</em><br />
							Verf&uuml;gbar f&uuml;r: <strong>";
							if($showdata['owner']=="all") { echo "gesamtes Team"; }
							elseif($showdata['owner']=="0") { echo "Niemand (au&szlig;er Autostream)"; }
							else {
								$owner = dbarray(dbquery("SELECT * FROM `".$db_prefix."users` WHERE `user_id` = '".$showdata['owner']."' LIMIT 1"));
								if($owner) { echo $owner['user_name']; }
								else { echo "Niemand!"; }
							}
							echo "</strong>							
							</div>
						</div>
						</div>
						";
					echo "</div>";
					?>
				</td></tr>
				<tr><td align='center'>
				
				<form method='post' action='<?php echo FUSION_SELF.$aidlink;?>&amp;step=edit_preset&amp;id=<?php echo $showdata['ID'];?>' name='showpreset' enctype="multipart/form-data">
	<table class='tbl-border' align='center' cellspacing='1' cellpadding='0' style='width: auto;'>
		<tr><td class='tbl1'>Bezeichnung (z.B. Genre) dieser Vorlage*:</td><td class='tbl1' width='250'><input name='showtitle' type='text' class='textbox' value='<?php echo $showdata['title'];?>' size="25" maxlength="25" /></td></tr>
		<tr><td class='tbl2'>Verf&uuml;gbar f&uuml;r*:</td><td class='tbl2'>
			<select name='owner' class='textbox' size='1'>
			<option value='0'>Niemand (au&szlig;er Autostream)</option>
			<option value='all'<?php echo ($showdata['owner']=='all' ? " selected" : "");?>>alle DJ/Moderatoren</option>
			<?php
			$result2 = dbquery("SELECT * FROM `".$db_prefix."users` WHERE `user_groups` REGEXP('^\\\.".$sp_setting['dj_group']."$|\\\.".$sp_setting['dj_group']."\\\.|\\\.".$sp_setting['dj_group']."$') ORDER BY `user_name` ASC");
				$rows = dbrows($result2);
				if ($rows != 0) {
					while($djdata = dbarray($result2)) {
						echo "<option value='".$djdata['user_id']."'".($djdata['user_id']==$showdata['owner'] ? " selected" : "").">".$djdata['user_name']."</option>						
						";
					}
				}
			?></select>
		</td></tr>
		<tr><td class='tbl1'>Halbtransp. Hintergrund der Schrift:<br /><small>(Erh&ouml;ht die Lesbarkeit bei kontrastreichen Hintergr&uuml;nden)</small></td><td class='tbl1'>
			<select name='background' class='textbox'>
				<option value="">-keine-</option>
				<?php
					for($i=0;$i<(count($bild));$i++) {
						echo "<option value='".$bild[$i]."'".($showdata['textbg']==$bild[$i] ? " selected" : "").">".$bild[$i]."</option>\n";
					}
				?>
			</select>
		</td></tr>
		<tr><td class='tbl2'>Schriftfarbe*:</td><td class='tbl2'>
			<table border='0' cellspacing='0' cellpadding='0' align='left'>
				<tr>
					<td valign='middle'><input name='fcolor' type='text' class='textbox' value='<?php echo $showdata['font-color'];?>' size='7' maxlength='25' /></td>
					<td valign='middle'><img style="cursor:pointer;" onClick="javascript:showColors();" alt="Farbw&auml;hler" src="<?php echo INFUSIONS;?>sendeplan/images/color.gif" border="0" height="19"></td>
				</tr>
			</table>
			<span id='Colors' style='height: auto; width: 100%; background-color: transparent; border: 0px solid #FFF; display:none; overflow: auto; vertical-align: middle;'>
			<table class="tbl" border="0" cellpadding="0" cellspacing="0"><tbody>
<tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 0);" onclick="setColor('#000000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 51);" onclick="setColor('#000033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 102);" onclick="setColor('#000066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 153);" onclick="setColor('#000099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 204);" onclick="setColor('#0000cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 0, 255);" onclick="setColor('#0000ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 0);" onclick="setColor('#330000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 51);" onclick="setColor('#330033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 102);" onclick="setColor('#330066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 153);" onclick="setColor('#330099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 204);" onclick="setColor('#3300cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 0, 255);" onclick="setColor('#3300ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 0);" onclick="setColor('#660000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 51);" onclick="setColor('#660033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 102);" onclick="setColor('#660066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 153);" onclick="setColor('#660099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 204);" onclick="setColor('#6600cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 0, 255);" onclick="setColor('#6600ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 0);" onclick="setColor('#990000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 51);" onclick="setColor('#990033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 102);" onclick="setColor('#990066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 153);" onclick="setColor('#990099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 204);" onclick="setColor('#9900cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 0, 255);" onclick="setColor('#9900ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 0);" onclick="setColor('#cc0000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 51);" onclick="setColor('#cc0033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 102);" onclick="setColor('#cc0066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 153);" onclick="setColor('#cc0099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 204);" onclick="setColor('#cc00cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 0, 255);" onclick="setColor('#cc00ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 0);" onclick="setColor('#ff0000');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 51);" onclick="setColor('#ff0033');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 102);" onclick="setColor('#ff0066');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 153);" onclick="setColor('#ff0099');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 204);" onclick="setColor('#ff00cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 0, 255);" onclick="setColor('#ff00ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 0);" onclick="setColor('#003300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 51);" onclick="setColor('#003333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 102);" onclick="setColor('#003366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 153);" onclick="setColor('#003399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 204);" onclick="setColor('#0033cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 51, 255);" onclick="setColor('#0033ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 0);" onclick="setColor('#333300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 51);" onclick="setColor('#333333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 102);" onclick="setColor('#333366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 153);" onclick="setColor('#333399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 204);" onclick="setColor('#3333cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 51, 255);" onclick="setColor('#3333ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 0);" onclick="setColor('#663300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 51);" onclick="setColor('#663333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 102);" onclick="setColor('#663366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 153);" onclick="setColor('#663399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 204);" onclick="setColor('#6633cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 51, 255);" onclick="setColor('#6633ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 0);" onclick="setColor('#993300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 51);" onclick="setColor('#993333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 102);" onclick="setColor('#993366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 153);" onclick="setColor('#993399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 204);" onclick="setColor('#9933cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 51, 255);" onclick="setColor('#9933ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 0);" onclick="setColor('#cc3300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 51);" onclick="setColor('#cc3333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 102);" onclick="setColor('#cc3366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 153);" onclick="setColor('#cc3399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 204);" onclick="setColor('#cc33cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 51, 255);" onclick="setColor('#cc33ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 0);" onclick="setColor('#ff3300');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 51);" onclick="setColor('#ff3333');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 102);" onclick="setColor('#ff3366');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 153);" onclick="setColor('#ff3399');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 204);" onclick="setColor('#ff33cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 51, 255);" onclick="setColor('#ff33ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 0);" onclick="setColor('#006600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 51);" onclick="setColor('#006633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 102);" onclick="setColor('#006666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 153);" onclick="setColor('#006699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 204);" onclick="setColor('#0066cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 102, 255);" onclick="setColor('#0066ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 0);" onclick="setColor('#336600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 51);" onclick="setColor('#336633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 102);" onclick="setColor('#336666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 153);" onclick="setColor('#336699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 204);" onclick="setColor('#3366cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 102, 255);" onclick="setColor('#3366ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 0);" onclick="setColor('#666600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 51);" onclick="setColor('#666633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 102);" onclick="setColor('#666666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 153);" onclick="setColor('#666699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 204);" onclick="setColor('#6666cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 102, 255);" onclick="setColor('#6666ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 0);" onclick="setColor('#996600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 51);" onclick="setColor('#996633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 102);" onclick="setColor('#996666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 153);" onclick="setColor('#996699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 204);" onclick="setColor('#9966cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 102, 255);" onclick="setColor('#9966ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 0);" onclick="setColor('#cc6600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 51);" onclick="setColor('#cc6633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 102);" onclick="setColor('#cc6666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 153);" onclick="setColor('#cc6699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 204);" onclick="setColor('#cc66cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 102, 255);" onclick="setColor('#cc66ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 0);" onclick="setColor('#ff6600');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 51);" onclick="setColor('#ff6633');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 102);" onclick="setColor('#ff6666');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 153);" onclick="setColor('#ff6699');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 204);" onclick="setColor('#ff66cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 102, 255);" onclick="setColor('#ff66ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 0);" onclick="setColor('#009900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 51);" onclick="setColor('#009933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 102);" onclick="setColor('#009966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 153);" onclick="setColor('#009999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 204);" onclick="setColor('#0099cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 153, 255);" onclick="setColor('#0099ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 0);" onclick="setColor('#339900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 51);" onclick="setColor('#339933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 102);" onclick="setColor('#339966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 153);" onclick="setColor('#339999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 204);" onclick="setColor('#3399cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 153, 255);" onclick="setColor('#3399ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 0);" onclick="setColor('#669900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 51);" onclick="setColor('#669933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 102);" onclick="setColor('#669966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 153);" onclick="setColor('#669999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 204);" onclick="setColor('#6699cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 153, 255);" onclick="setColor('#6699ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 0);" onclick="setColor('#999900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 51);" onclick="setColor('#999933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 102);" onclick="setColor('#999966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 153);" onclick="setColor('#999999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 204);" onclick="setColor('#9999cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 153, 255);" onclick="setColor('#9999ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 0);" onclick="setColor('#cc9900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 51);" onclick="setColor('#cc9933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 102);" onclick="setColor('#cc9966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 153);" onclick="setColor('#cc9999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 204);" onclick="setColor('#cc99cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 153, 255);" onclick="setColor('#cc99ff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 0);" onclick="setColor('#ff9900');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 51);" onclick="setColor('#ff9933');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 102);" onclick="setColor('#ff9966');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 153);" onclick="setColor('#ff9999');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 204);" onclick="setColor('#ff99cc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 153, 255);" onclick="setColor('#ff99ff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 0);" onclick="setColor('#00cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 51);" onclick="setColor('#00cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 102);" onclick="setColor('#00cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 153);" onclick="setColor('#00cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 204);" onclick="setColor('#00cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 204, 255);" onclick="setColor('#00ccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 0);" onclick="setColor('#33cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 51);" onclick="setColor('#33cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 102);" onclick="setColor('#33cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 153);" onclick="setColor('#33cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 204);" onclick="setColor('#33cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 204, 255);" onclick="setColor('#33ccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 0);" onclick="setColor('#66cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 51);" onclick="setColor('#66cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 102);" onclick="setColor('#66cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 153);" onclick="setColor('#66cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 204);" onclick="setColor('#66cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 204, 255);" onclick="setColor('#66ccff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 0);" onclick="setColor('#99cc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 51);" onclick="setColor('#99cc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 102);" onclick="setColor('#99cc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 153);" onclick="setColor('#99cc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 204);" onclick="setColor('#99cccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 204, 255);" onclick="setColor('#99ccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 0);" onclick="setColor('#cccc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 51);" onclick="setColor('#cccc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 102);" onclick="setColor('#cccc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 153);" onclick="setColor('#cccc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 204);" onclick="setColor('#cccccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 204, 255);" onclick="setColor('#ccccff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 0);" onclick="setColor('#ffcc00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 51);" onclick="setColor('#ffcc33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 102);" onclick="setColor('#ffcc66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 153);" onclick="setColor('#ffcc99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 204);" onclick="setColor('#ffcccc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 204, 255);" onclick="setColor('#ffccff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 0);" onclick="setColor('#00ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 51);" onclick="setColor('#00ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 102);" onclick="setColor('#00ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 153);" onclick="setColor('#00ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 204);" onclick="setColor('#00ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(0, 255, 255);" onclick="setColor('#00ffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 0);" onclick="setColor('#33ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 51);" onclick="setColor('#33ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 102);" onclick="setColor('#33ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 153);" onclick="setColor('#33ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 204);" onclick="setColor('#33ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(51, 255, 255);" onclick="setColor('#33ffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 0);" onclick="setColor('#66ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 51);" onclick="setColor('#66ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 102);" onclick="setColor('#66ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 153);" onclick="setColor('#66ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 204);" onclick="setColor('#66ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(102, 255, 255);" onclick="setColor('#66ffff');return false;"></td>
</tr><tr>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 0);" onclick="setColor('#99ff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 51);" onclick="setColor('#99ff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 102);" onclick="setColor('#99ff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 153);" onclick="setColor('#99ff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 204);" onclick="setColor('#99ffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(153, 255, 255);" onclick="setColor('#99ffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 0);" onclick="setColor('#ccff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 51);" onclick="setColor('#ccff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 102);" onclick="setColor('#ccff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 153);" onclick="setColor('#ccff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 204);" onclick="setColor('#ccffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(204, 255, 255);" onclick="setColor('#ccffff');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 0);" onclick="setColor('#ffff00');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 51);" onclick="setColor('#ffff33');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 102);" onclick="setColor('#ffff66');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 153);" onclick="setColor('#ffff99');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 204);" onclick="setColor('#ffffcc');return false;"></td>
<td style="width: 10px; height: 10px; cursor: crosshair; background-color: rgb(255, 255, 255);" onclick="setColor('#ffffff');return false;"></td>
</tr>
</tbody></table>

		</span>
		</td></tr>
	</table>
<br />
<div align='center'><input type='submit' class='button' name='editsave' value='&Auml;nderungen speichern' /></div>
<br /><br />
<div align='center'><small>* Pflichtfelder</small></div>
</form>
				
				</td>
			</tr>
		</table>

		<?php
	}
}
closetable();

if(!FUSION_V6) { require_once THEMES."templates/footer.php"; }
else { require_once BASEDIR."footer.php"; }
?>
