#line 1 "STDIN"
#line 1 "STDIN"

#include <stdio.h>
#include <stdlib.h>
#define BUNDLENAME "testbundle"

typedef struct _MYNAMEDATA_ {
	char* name;
	char* dispname;	
	int   height;
	int   width;
	int   top;
	int   left;
} MYNAMEDATA;

static MYNAMEDATA datatable[] ={
/* name,  disp,      height, width, top, left } */
{ "name1", "light",  20,100,  100, 100 },
{ "name2", "window", 20,100,  200, 200 },
{ "name3", "shutter",20,100,   50, 200 },
{ NULL, NULL,        100,30,  200, 200 },
} ;

#line 22 "STDIN"
#line 23 "STDIN"

static int disp_test_VGA()
{
	int i;
	char *name = NULL;
	char *dispname = NULL;

#line 29 "STDIN"
printf( "Content-type:text/html\n" );
#line 30 "STDIN"
printf( "Cache-Control: no-cache\n" );
#line 31 "STDIN"
printf( "Pragma: no-cache\n" );
#line 32 "STDIN"
#line 33 "STDIN"
printf( "%s", "\r\n" );
#line 33 "STDIN"
#line 34 "STDIN"
printf( "%s", "\r\n" );
#line 34 "STDIN"
printf( "<html>\n" );
#line 35 "STDIN"
printf( "<head>\n" );
#line 36 "STDIN"
printf( "<style type=\"text/css\"><!--\n" );
#line 37 "STDIN"
printf( ".backimage {\n" );
#line 38 "STDIN"
printf( "position:absolute;\n" );
#line 39 "STDIN"
printf( "}\n" );
#line 40 "STDIN"
printf( "#backimage {\n" );
#line 41 "STDIN"
printf( "z-index:1;\n" );
#line 42 "STDIN"
printf( "}\n" );
#line 43 "STDIN"
#line 44 "STDIN"
#line 45 "STDIN"

for(i = 0; datatable[i].name != NULL ; i++ ){ 
	name=datatable[i].name;

#line 48 "STDIN"
printf( "/* " );
#line 49 "STDIN"
printf( "%s", name );
printf( " " );
#line 49 "STDIN"
printf( "%s", datatable[i].dispname );
printf( " */\n" );
#line 49 "STDIN"
printf( "." );
#line 50 "STDIN"
printf( "%s", name );
printf( "_possize {\n" );
#line 50 "STDIN"
printf( "position:absolute;\n" );
#line 51 "STDIN"
printf( "width: " );
#line 52 "STDIN"
printf( "%d", datatable[i].width );
printf( "px;\n" );
#line 52 "STDIN"
printf( "height:" );
#line 53 "STDIN"
printf( "%d", datatable[i].height );
printf( "px;\n" );
#line 53 "STDIN"
printf( "top:   " );
#line 54 "STDIN"
printf( "%d", datatable[i].top );
printf( "px;\n" );
#line 54 "STDIN"
printf( "left:  " );
#line 55 "STDIN"
printf( "%d", datatable[i].left );
printf( "px;\n" );
#line 55 "STDIN"
printf( "position:absolute;\n" );
#line 56 "STDIN"
printf( "z-index:10;\n" );
#line 57 "STDIN"
printf( "}\n" );
#line 58 "STDIN"
printf( "#" );
#line 59 "STDIN"
printf( "%s", name );
printf( "_img_on {\n" );
#line 59 "STDIN"
printf( "visibility:hidden;\n" );
#line 60 "STDIN"
printf( "} \n" );
#line 61 "STDIN"
printf( "#" );
#line 62 "STDIN"
printf( "%s", name );
printf( "_img_off {\n" );
#line 62 "STDIN"
printf( "visibility:visible;\n" );
#line 63 "STDIN"
printf( "} \n" );
#line 64 "STDIN"
printf( "#" );
#line 65 "STDIN"
printf( "%s", name );
printf( "_on_text {\n" );
#line 65 "STDIN"
printf( "visibility:hidden;\n" );
#line 66 "STDIN"
printf( "} \n" );
#line 67 "STDIN"
printf( "#" );
#line 68 "STDIN"
printf( "%s", name );
printf( "_off_text {\n" );
#line 68 "STDIN"
printf( "visibility:visible;\n" );
#line 69 "STDIN"
printf( "} \n" );
#line 70 "STDIN"
#line 71 "STDIN"
#line 72 "STDIN"

}

#line 74 "STDIN"
#line 75 "STDIN"
printf( "</style>\n" );
#line 76 "STDIN"
#line 77 "STDIN"
printf( "<script type=\"text/javascript\">\n" );
#line 78 "STDIN"
printf( "<!--\n" );
#line 79 "STDIN"
#line 80 "STDIN"

for(i = 0; datatable[i].name != NULL ; i++ ){ 
	name=datatable[i].name;

#line 83 "STDIN"
printf( "/* " );
#line 84 "STDIN"
printf( "%s", name );
printf( "  */\n" );
#line 84 "STDIN"
printf( "function " );
#line 85 "STDIN"
printf( "%s", name );
printf( "_on_click(){\n" );
#line 85 "STDIN"
printf( "	alert( \"" );
#line 86 "STDIN"
printf( "%s", name );
printf( " on clicked\" );\n" );
#line 86 "STDIN"
printf( "	var " );
#line 87 "STDIN"
printf( "%s", name );
printf( "_img_on  = document.getElementById(\"" );
#line 87 "STDIN"
printf( "%s", name );
printf( "_img_on\");\n" );
#line 87 "STDIN"
printf( "	var " );
#line 88 "STDIN"
printf( "%s", name );
printf( "_img_off = document.getElementById(\"" );
#line 88 "STDIN"
printf( "%s", name );
printf( "_img_off\");\n" );
#line 88 "STDIN"
printf( "	var " );
#line 89 "STDIN"
printf( "%s", name );
printf( "_on_text = document.getElementById(\"" );
#line 89 "STDIN"
printf( "%s", name );
printf( "_on_text\");\n" );
#line 89 "STDIN"
printf( "	var " );
#line 90 "STDIN"
printf( "%s", name );
printf( "_off_text= document.getElementById(\"" );
#line 90 "STDIN"
printf( "%s", name );
printf( "_off_text\");\n" );
#line 90 "STDIN"
#line 91 "STDIN"
printf( "	" );
#line 92 "STDIN"
printf( "%s", name );
printf( "_img_on.style.visibility = \"hidden\";\n" );
#line 92 "STDIN"
printf( "	" );
#line 93 "STDIN"
printf( "%s", name );
printf( "_img_off.style.visibility = \"visible\"; \n" );
#line 93 "STDIN"
printf( "	" );
#line 94 "STDIN"
printf( "%s", name );
printf( "_on_text.style.visibility = \"hidden\";\n" );
#line 94 "STDIN"
printf( "	" );
#line 95 "STDIN"
printf( "%s", name );
printf( "_off_text.style.visibility = \"visible\"; \n" );
#line 95 "STDIN"
printf( "}\n" );
#line 96 "STDIN"
printf( "function " );
#line 97 "STDIN"
printf( "%s", name );
printf( "_off_click(){\n" );
#line 97 "STDIN"
printf( "	alert( \"" );
#line 98 "STDIN"
printf( "%s", name );
printf( " off clicked\" );\n" );
#line 98 "STDIN"
printf( "	var " );
#line 99 "STDIN"
printf( "%s", name );
printf( "_img_on  = document.getElementById(\"" );
#line 99 "STDIN"
printf( "%s", name );
printf( "_img_on\");\n" );
#line 99 "STDIN"
printf( "	var " );
#line 100 "STDIN"
printf( "%s", name );
printf( "_img_off = document.getElementById(\"" );
#line 100 "STDIN"
printf( "%s", name );
printf( "_img_off\");\n" );
#line 100 "STDIN"
printf( "	var " );
#line 101 "STDIN"
printf( "%s", name );
printf( "_on_text = document.getElementById(\"" );
#line 101 "STDIN"
printf( "%s", name );
printf( "_on_text\");\n" );
#line 101 "STDIN"
printf( "	var " );
#line 102 "STDIN"
printf( "%s", name );
printf( "_off_text= document.getElementById(\"" );
#line 102 "STDIN"
printf( "%s", name );
printf( "_off_text\");\n" );
#line 102 "STDIN"
#line 103 "STDIN"
printf( "	" );
#line 104 "STDIN"
printf( "%s", name );
printf( "_img_on.style.visibility = \"visible\";\n" );
#line 104 "STDIN"
printf( "	" );
#line 105 "STDIN"
printf( "%s", name );
printf( "_img_off.style.visibility = \"hidden\"; \n" );
#line 105 "STDIN"
printf( "	" );
#line 106 "STDIN"
printf( "%s", name );
printf( "_on_text.style.visibility = \"visible\";\n" );
#line 106 "STDIN"
printf( "	" );
#line 107 "STDIN"
printf( "%s", name );
printf( "_off_text.style.visibility = \"hidden\"; \n" );
#line 107 "STDIN"
printf( "}\n" );
#line 108 "STDIN"
#line 109 "STDIN"

}

#line 111 "STDIN"
#line 112 "STDIN"
printf( "//-->\n" );
#line 113 "STDIN"
printf( "</script>\n" );
#line 114 "STDIN"
#line 115 "STDIN"
printf( "</head>\n" );
#line 116 "STDIN"
printf( "<body>\n" );
#line 117 "STDIN"
#line 118 "STDIN"
#line 119 "STDIN"

for(i = 0; datatable[i].name != NULL ; i++ ){ 
	name=datatable[i].name;
	dispname=datatable[i].dispname;

#line 123 "STDIN"
printf( "<img id=\"" );
#line 124 "STDIN"
printf( "%s", name );
printf( "_img_on\"  class=\"" );
#line 124 "STDIN"
printf( "%s", name );
printf( "_possize\" src=\"on_button.png\" />\n" );
#line 124 "STDIN"
printf( "<img id=\"" );
#line 125 "STDIN"
printf( "%s", name );
printf( "_img_off\" class=\"" );
#line 125 "STDIN"
printf( "%s", name );
printf( "_possize\" src=\"off_button.png\" />\n" );
#line 125 "STDIN"
printf( "<a href=\"#\" id=\"" );
#line 126 "STDIN"
printf( "%s", name );
printf( "_on_text\"  class=\"" );
#line 126 "STDIN"
printf( "%s", name );
printf( "_possize\" \n" );
#line 126 "STDIN"
printf( "	onclick=\"" );
#line 127 "STDIN"
printf( "%s", name );
printf( "_on_click()\"  >\n" );
#line 127 "STDIN"
printf( "	" );
#line 128 "STDIN"
printf( "%s", dispname );
printf( ":OFF </a>\n" );
#line 128 "STDIN"
printf( "<a href=\"#\" id=\"" );
#line 129 "STDIN"
printf( "%s", name );
printf( "_off_text\" class=\"" );
#line 129 "STDIN"
printf( "%s", name );
printf( "_possize\" \n" );
#line 129 "STDIN"
printf( "	onclick=\"" );
#line 130 "STDIN"
printf( "%s", name );
printf( "_off_click()\" >\n" );
#line 130 "STDIN"
printf( "	" );
#line 131 "STDIN"
printf( "%s", dispname );
printf( ":ON </a>\n" );
#line 131 "STDIN"
#line 132 "STDIN"

}

#line 134 "STDIN"
#line 135 "STDIN"
printf( "<img id=\"backimage\"    class=\"backimage\"  src=\"background.png\" />\n" );
#line 136 "STDIN"
#line 137 "STDIN"
printf( "</body>\n" );
#line 138 "STDIN"
printf( "</html>\n" );
#line 139 "STDIN"
#line 140 "STDIN"

}

#line 142 "STDIN"
#line 143 "STDIN"
#line 144 "STDIN"
#line 145 "STDIN"
 
/* CGI main function */
int main(int argc, char** argv ){

	disp_test_VGA();

	return 0;
}

#line 153 "STDIN"
