2 <head><title>Alpha Channel Test</title>
3 <script type="text/javascript"><!--
4 var backgroundcolor = new Array();
5 backgroundcolor[0] = '#ffffff';
6 backgroundcolor[1] = '#cccccc';
7 backgroundcolor[2] = '#888888';
8 backgroundcolor[3] = '#444444';
9 backgroundcolor[4] = '#000000';
10 backgroundcolor[5] = '#aa8888';
11 backgroundcolor[6] = '#88aa88';
12 backgroundcolor[7] = '#8888aa';
13 function changebg(color) {
14 document.bgColor = backgroundcolor[color];
18 <body bgcolor="#8888aa">
21 <script type="text/javascript"><!--
22 for (var n = 0; n < backgroundcolor.length; n++) {
24 ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'
30 function find_pngs($dir)
35 $current_dir = array_pop($stack);
37 if ($dh = opendir($current_dir)) {
38 while (($file = readdir($dh)) !== false) {
39 if ($file !== '.' AND $file !== '..') {
40 $current_file = "{$current_dir}/{$file}";
41 if (is_file($current_file)) {
42 if (!(strcmp(substr($file, -4), ".png"))) {
44 print "<hr /><h4>\n{$current_dir}</h4>\n";
47 print "<img src=\"{$current_dir}/" . urlencode($file) . "\" alt=\"{$file}\" />\n";
49 } elseif (is_dir($current_file)) {
50 $stack[] = $current_file;
62 <script type="text/javascript"><!--
63 for (var n = 0; n < backgroundcolor.length; n++) {
65 ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'