layerinfo "type" = "theme";
layerinfo "name" = "Jack/Sam Convergence";
layerinfo source_viewable = 1;


set text_post_comment = "What was that?";
set text_read_comments = "1 was confused by me // # were confused by me";
set text_post_comment_friends = "Comment";
set text_read_comments_friends = "1 // # ";
set show_entry_userpic = true;


function Page::print_custom_head() {
  """
	<style type="text/css" media="screen">
		.entries { font-size: 11px; }
	</style>
  """;
}


function print_stylesheet() {
  """
	/* current colors: dark: 4a6f92   light: bdd9d5   border: 153355  */
	body {
		background-image:url(http://pics.livejournal.com/bowserbabe/pic/000044hp);
		background-repeat:no-repeat;
		background-attachment:scroll;
		background-position:top;
		font-family: Verdana, sans-serif;
		background-color: #ffffff;
		margin: 15px;
		margin-top: 265px;
	}

	img {
		border:0;
	}

	.pagealign {
		text-align: center;
	}

	.bodytable {
		width: 50%;
	}
	
	.border4 {
		border: 0px;
	}

	.border3 {
		border: 0px;
	}

	.border2 {
		border: 0px;
	}
	
	a {
		color: #4a6f92;
		text-decoration:none;
	}
		
	a:hover {
		text-decoration:underline;
	}
		
	#bodycontent {
		background-color: #000000;
		border: 0px;
		padding: 0px;
	}
		
	#headerinfo {
		background-color: #4a6f92;
		color: #000000;
		text-align: right;
		font-size: 10px;
		padding: 2px;
		margin-top: 0px;
	}

	#header {
		color: #000000;
	}

	#header p {
		font-weight: bold;
	}

	#userpic {
		float: right;
	}

	.userpic2 {
		float: right;
		text-align: right;
		margin-top: 0px;
		margin-right: 0px;
	}
	
	#nav {
		white-space: nowrap;
		margin-bottom: 10px;
		margin-left: 5px;
		font-size: 11px;
	}
	
	#nav A {
		border: 0px;
		padding-left: 10px;
		padding-right: 10px;
		padding-top: 2px;
		padding-bottom: 2px;
		height: 20px;
		color: #000000;
		background-color: #4a6f92;
	}
	
	#nav A:Hover {
	}
	
	#content {
		background-color: #ffffff;
		border: 0px;
		padding: 4px;
	}
	
	.columncontent { 
		background-color: #4a6f92; 
		border: 0px;
		padding: 4px; 
		font-size: 11px;
		color: #000000;
	}
	
	.columnitem {
		background-color: #bdd9d5;
		padding: 3px;
		margin-top: 5px;
		color: #000000;
		border: 0px;
		overflow: visible;
	}

	.indent {
		margin-left: 12px;
		text-indent: -9px;
	}

	.entries {
		color: #000000;
	}

	.entrycontent {
		width: 50%;
	}
	
	.entrydivider {
		border: 0px;
		margin-top: 10px;
	}

	.minicomment {
		background-color: #bdd9d5;
		padding: 4px;
		color: #000000;
		border: 0px;
		font-size: 11px;
	}
	
	.minicommentholder {
		border: 0px;
	}

	.entryinfo {
		background-color: #bdd9d5;
		font-size: 11px;
		padding: 4px;
	}

	.postedby {
		background-color: #ff0000;
		padding: 6px;
		font-size: 11px;
	}

	.entrylinks {
		border: 0px;
		background-color: #4a6f92;
		padding-top: 4px;
		padding-bottom: 4px;
		margin-top: 1px;
		margin-bottom: 4px;
		font-size: 11px;
	}

	.entrylinks A {
		text-decoration: none;
		padding-top: 2px;
		padding-left: 4px;
		padding-right: 16px;
		padding-bottom: 4px;
		white-space: nowrap;
		color: #000000;
		border: 0px;
	}
	
	.entrylinks A:Hover {
	}

	.messageholder {
		border: 0px;
		margin-bottom: 5px;
		margin-top: 0px;
	}

	.systemmessage {
		background-color: #ff0000;
		color: #000000;
		border: 1px solid #ff0000;
		font-size: 11px;
	}
	
	.systemtext { 
		font-weight: normal;
		padding-left: 10px;
		padding-right: 10px;
	}

	.systemmessage A {
		text-decoration: none;
		padding-left: 10px;
		padding-right: 10px;
		color: #000000;
		padding-top: 4px;
		padding-bottom: 4px;
	}
	
	.systemmessage A:Hover {
		text-decoration: underline;
	}

	.systemmessage input, .systemmessage textarea, .systemmessage select {
		background-color: #bdd9d5;
		color: #000000;
	}

	.systemmessage TD {
		padding: 4px;
		font-size: 11px;
		color: #000000;
	}

	.entry {
		margin-bottom: 10px;
	}

	.entrytext {
		margin-top: 5px;
		overflow-x: hidden;
		text-overflow: clip;
		padding: 2px;
	}

	.entrytext p {
		color: #000000;
		font-size: 11px;
	}

	.subject {
		font-weight: bold;
		color: #000000;
		font-size: 12px;
	}
	
	.meta {
		font-size: 11px;
		padding: 4px;
	}

	#sidecolumn TD {
		color: #000000;
	}

	#sidecolumn A {
		text-decoration: none;
		color: #000000;
		width: 175px;
	}

	#sidecolumn A:Hover {
		text-decoration:underline;
	}

	.backtop {
		text-align: right;
	}

	.backtop A {
		color: #000000;
		font-size: 11px;
		text-decoration: none;
		padding-bottom: 1px;
	}

	#cal A {
		text-decoration: none; 
		color: #000000;
	}

	#cal A:hover {
		text-decoration: underline;
	}

	.calactitem {
		font-size: 11px;
		background-color: #bdd9d5;
		border: 0px;
	}

	.friendcolor {
		width: 10px;
		height: 10px;
		border: 0px;
	}

	.multiform {
		font-weight: bold;
	}

	.ip {
		color: #ff0000;
	}

	.friendname {
		padding: 4px;
		text-decoration: none;
		border: 0px;
	}

	.bigday {
		font-size: 11px;
		color: #000000;
		float: left;
		font-weight: bold;
	}

	.notablemessage {
		padding: 0px;
	}

	.border2 {
		border: 6px solid #153355;
	}

	.systemmessage {
		background-color: #4a6f92;
		color: #ffffff;
		border: 6px solid #153355;
		font-size: 11px;
	}

	.columnitem {
		font-size:11px;
	}

	.columnitem a:hover {
		text-decoration:underline;
	}

	.listindent {
		margin-left:20px;
	}

	.icontableheader {
		background-color: #4a6f92;
	}

	.icontableentry {
		background-color: #bdd9d5;
	}

	.ljtaglist {
		font-size: 11px;
	}

""";
}


function Page::print ()  {

	var string title = $this->title();

	"""
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
	<title>$title</title>
	<link rel="stylesheet" href="$.stylesheet_url" type="text/css"/>
	""";
	
	$this->print_head();
	
	"""
	<meta name="robots" content="noindex" />
	</head>
	<body>
	<a name="top"></a>
<div align=center>
<table cellspacing="0" cellpadding="0" border="0" width="100%px">
	<tr>
<td>
	<div class="border3">
		<div class="border2">
			<div id="bodycontent" align=left width="100%">
	""";
	
	$this->lay_print_userpic();
	$this->lay_print_username();
	$this->lay_print_header();

	"""
<div id="content" align=left>
	<table cellspacing="10" cellpadding="0" border="0">
	<tr>
	<td valign="top" width="100%">
	""";

	$this->lay_print_subnav();
	$this->print_body();
	$this->lay_print_subnav();

	"""
	</td>
	<td valign="top" class="sidetd">
	<div id="sidecolumn" width="140px">
	""";
	
	$this->lay_print_sidebar();

	"""
	</div>
	</td>
	</tr>
	</table>
	</div>
	</div>
	</div>
	</div>
		</td>
		</tr>
	</table>
<div>
	</body>
	</html>
	""";
}

function Page::print_entry (Entry e)  {

	print """<a name="item""" + $e.itemid + """\"></a>""";
	var string time = $e.time->time_format();
	var string date = $e.time->date_format();
	var string security;
	if ($e.security != "") {
		$security =  """<img src="$e.security_icon.url" align="right" """+
		"""width="$e.security_icon.width" height="$e.security_icon.height" """+
		"""alt="[$e.security]" />""";
	}

	var UserLite name;
	var string pname;

	var bool show_name = ($.view == "friends" or $e.poster.username != $.journal.username or $.view == "entry") ? true : false;
	var bool show_pic = (defined $e.userpic and ($.view == "friends" or $*show_entry_userpic or $e.poster.username != $e.journal.username or $.view == "entry")) ? true : false;

	"""	
									<div class="entry">
	<div class="entrydivider"></div>
	""";
	if($show_pic and $.view != "reply") {
		"""
			<div class="userpic2">
				<a href="$*SITEROOT/allpics.bml?user=$e.poster.username"><img src="$e.userpic.url" width="$e.userpic.width" height="$e.userpic.height" alt="$e.poster.name [userpic]" title="$e.poster.name [userpic]" border="0" /></a>
			</div>
		""";
	}

	if($show_name) {
		$this->lay_make_username($e);
	}
	"""
<div class="entryinfo">$security $date $time</div>
<div class="entrylinks">
	""";

	$e.comments->print();

	foreach var string key (["edit_entry","mem_add","tell_friend"]) {
		var Link link = $e->get_link($key);
		if ($link) {
			"""<a href=\"$link.url\">$link.caption</a>""";
		}
	}
	"""<a href="$e.permalink_url">$*text_permalink</a>
</div>
<div class="entrydivider"></div>
<div class="entrytext">
<div class="subject">$e.subject
<br><br></div>
<div class="entry">"""; $e->print_text(); """</div>
	""";
	$e->print_metadata();
	"""
</div>
	</div>
<div class="entrydivider"></div>
<br /><br /><br />
									
	""";
}


function EntryPage::print_comment(Comment c) {
	
	var string datetime;
	$datetime = $c.time->date_format()+", " + $c.time->time_format();
	
	
	var string parent;
	var string thread;
	if($c.parent_url != "") {
		$parent = """<a href="$c.parent_url">$*text_comment_parent</a>""";
	}
	if($c.thread_url != "") {
		$thread = """<a href="$c.thread_url">$*text_comment_thread</a>""";
	}
	
	var string subjecticon;
	if (defined $c.subject_icon) {
		$subjecticon = """<img src="$c.subject_icon.url" width="$c.subject_icon.width" height="$c.subject_icon.height" alt="" />""";
	}

	var string ip;
	if ($c.metadata{"poster_ip"}) { 
		$ip = """ &nbsp;  """ + $c.metadata{"poster_ip"}; 
	}

	var string poster = defined $c.poster ? $c.poster->as_string() : "<b>(Anonymous)</b>";

	var string pic;
	if (defined $c.userpic and $*comment_userpic_style != "off") {
		$pic = """<div class="userpic2"><img src="$c.userpic.url" width="$c.userpic.width" height="$c.userpic.height" alt="" /></div>""";
	}

	var string indent = ($c.depth - 1) * 25 + "px";

	"""
                <div id='$c.dom_id'>
		<a name='$c.anchor'></a>
		$pic
		<div class="entry" style="margin-left: $indent;">
			<div class="entryinfo">$poster  <span class="ip">$ip</span> $subjecticon $datetime</div>
			<div class="entrydivider"></div>

	""";
	
	if ($.multiform_on) {
		"""<div class="entryinfo"><label for="ljcomsel_$c.talkid">$*text_multiform_check</label> """; 
		$c->print_multiform_check();
		"""</div>
		""";
	}

    var string replyurl;
    if ($c.frozen) {
        $replyurl = """<a href="javascript://">$*text_comment_frozen</a>""";
    } else {
        $replyurl = """<a href="$c.reply_url">$*text_comment_reply</a>""";
    }
    
	"""
			<div class="entrylinks">
				$replyurl
    """;

    # some links for doing stuff to this comment
    foreach var string k ($c.link_keyseq) {
        var Link link = $c->get_link($k);
        if ($link) {
            """<a href=\"$link.url\">$link.caption</a>""";
        }
    }
    
    """
                <a href="$c.permalink_url">$*text_permalink</a>$parent$thread
			</div>
			<div class="entrytext">
				<div class="subject">$c.subject</div>
				<p>$c.text</p>
			</div>
	""";


	if ((size $c.replies) > 0 and $c.replies[0].full == false) {
            """<div style="margin-top: 5px; margin-bottom: 5px; clear: both;">\n""";
            $this->print_comments($c.replies);
            "</div>\n";
        }

	"""
		</div>
		<div class="backtop"><a href="#top">back to top</a></div>
                </div>
	""";

    if ((size $c.replies) > 0 and $c.replies[0].full == true) {
        $this->print_comments($c.replies);
    }

}


function CommentInfo::print_postlink() {
    var Page p = get_page();
    "<a href=\"$.post_url\">"+($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment)+"</a>";
}


function CommentInfo::print_readlink {
    var Page p = get_page();
    "<a href=\"$.read_url\">"+
        get_plural_phrase($.count, $p.view == "friends" ? 
                          "text_read_comments_friends" : "text_read_comments")+
    "</a>";
}


function Page::lay_print_sidebar ()  {
	var string links = """
	<div class="columnitem"><div class="indent"> - <a href="http://bowserbabe.livejournal.com/198304.html">Personal / Social Networking</a><div></div>
	""";

	print_box("Links", $links);

	$this->print_linklist();
	$this->lay_print_calendar();
	$this->lay_print_freetext();
}