<?xml version="1.0" encoding="UTF-8"?>
<Module>
	<ModulePrefs title="Wall">
	</ModulePrefs>
	<Content type="html">
		<![CDATA[
			<!-- Initialize all of our entirely unofficial "Orkutizing" stylesheets and javascript -->
			<!-- These files should be used as reference only and not included in production code (please) -->
			<link href="http://graargh.returnstrue.com/ui/orkut.css" type="text/css" rel="stylesheet">
			<link href="http://graargh.returnstrue.com/ui/createButton.css" type="text/css" rel="stylesheet">
			<link href="http://graargh.returnstrue.com/ui/createWall.css" type="text/css" rel="stylesheet">
			<script src="http://graargh.returnstrue.com/ui/createButton.js"></script>
			<script src="http://graargh.returnstrue.com/ui/createWall.js"></script>
			
			<!-- The div for our wall -->
			<div id="post">
				<form method="post" accept-charset="utf-8">
					<textarea name="post" class="post" onclick="focusPost(this.id)" onblur="blurPost(this.id)" id="postArea">add a post&hellip;</textarea>
					<div id="insertButton"></div>
				</form>
			</div>
			<div id="wall_content"></div>
			
			<!-- Our actual demo logic -->
			<script type="text/javascript">
				// This is an intermediary function which verifies whether or not there is actual content to post
				// and passes the content to be appended to the wall
				// a real function also needs to handle storage of the data (in whatever way is deemed appropriate)
				// refreshing the page without storage will reset the wall to the default state (no added entries)
				function handlePost() {
					var data = document.getElementById("postArea").value;
					
					// Check for blank posts and posts with the "hinted" string and ignore them
					var regex = /^[\\s]*$/;
					if (!regex.test(data) && data != "add a post…") {
						appendPost("post_list", data);
					}
				}
				
				// Setup our fake test data
				var fakeData = new Array('post3', 'post2', 'post1');
				
				// Call the wall initialization
				createWall("wall_content", fakeData);
				
				// This creates the 'post' button and inserts it into the post container
				createButton('post', null, 'handlePost();', 'insertButton');
			</script>
		]]>
	</Content>
</Module>
