
function rowSep2(colspan) {
	d.write('<tr><td colspan="'+colspan+'" class="main_seperator2"><img src="'+URL_IMG+'space.gif" width="1" height="1" border="0" alt="" title=""></td></tr>');
}
function rowEmpty(colspan) {
	d.write('<tr><td colspan="'+colspan+'" class="s1">&nbsp;</td></tr>');
}

function postHeader(post_id,is_even,poster_name,poster_url,is_guest) {
	class_name = (is_even == '1') ? 'contentbox2c' : 'contentbox2d';

	d.write('<tr>');
	d.write('<td><img src="'+URL_IMG+'space.gif" width="1" height="1" border="0" alt="" title=""></td>');
	d.write('<td class="'+class_name+'" width="145" valign="top">');
	d.write('<a name="'+post_id+'"></a>');
	d.write('<a href="'+poster_url+'"><b>'+poster_name+'</b></a><br />');
	d.write('<span class="s2">');
	if(is_guest == '1') {
		d.write('Guest<br />');
	}

}

function postPart1(is_even,is_new,post_date,post_edit_url,post_remove_onclick,post_quote_url) {
	class_name = (is_even == '1') ? 'contentbox2c' : 'contentbox2d';
	post_icon_url = (is_new == '1') ? 'img/icon_post_new.gif' : 'img/icon_post.gif';
	post_icon_url = ''+URL_CURR_SKIN+post_icon_url+'';

	d.write('<br /></span></td>');
	d.write('<td class="'+class_name+'" colspan="4" valign="top">');
	d.write('<table border="0" cellpadding="0" cellspacing="2" width="100%">');
	d.write('<tr><td class="s2">');
	d.write('<img src="'+post_icon_url+'" width="12" height="9" border="0" alt="" title="" />');
	d.write('Posted on '+post_date+'</td>');

	d.write('<td class="s2" align="right">');
	if(post_edit_url != '') {
		d.write('<a href="'+post_edit_url+'"><img src="'+URL_CURR_SKIN+'img/icon_edit.gif" height="15" width="15" border="0" alt="Edit" title="Edit this Message!" /></a>');
	}
	if(post_remove_onclick != '') {
		d.write(' <a href="javascript:void(0)" onclick="'+post_remove_onclick+'"><img src="'+URL_CURR_SKIN+'img/icon_delete.gif" height="15" width="15" border="0" alt="Remove" title="Remove this Message!" /></a>');
	}
	d.write(' <a href="'+post_quote_url+'"><img src="'+URL_CURR_SKIN+'img/icon_quote.gif" height="15" width="15" border="0" alt="Quote" title="Quote this Message!" /></a>');
	d.write('</td>');
	d.write('</tr>');
	rowSep2(2);
	rowEmpty(2);
	d.write('<tr><td colspan="2" class="s1">');
}

function postPart2(post_updated_on,post_updated_by,post_updated_by_url) {
	if(post_updated_on != '') {
		d.write('<br /><br />');
          	d.write('<small>---- Edited by <a href="'+post_updated_by_url+'">'+post_updated_by+'</a> on '+post_updated_on+' ----</small>');
	}
	d.write('</td></tr>');
	rowEmpty(2);
	rowSep2(2);
        d.write('<tr><td class="s2" colspan="2">');
}

function postFooter(is_even,poster_url,poster_pm_url,poster_msn,poster_msn_url,poster_www_url,poster_activity,poster_country,poster_lastseen,poster_qp,poster_qp_url) {
	class_name = (is_even == '1') ? 'contentbox2e' : 'contentbox2f';

	d.write('</td></tr></table>');
	d.write('</td><td class="contentbox2_right"><img src="'+URL_IMG+'space.gif" width="1" height="1" border="0" alt="" title=""></td></tr>');

	d.write('<tr><td><img src="'+URL_IMG+'space.gif" width="1" height="1" border="0" alt="" title=""></td>');
	d.write('<td class="'+class_name+'">');
	d.writeln('<a href="#top"><img src="'+URL_CURR_SKIN+'img/icon_moveup.gif" width="15" height="15" border="0" alt="" title="Go back to the Top!" /></a>');
        d.writeln('<a href="'+poster_url+'"><img src="'+URL_CURR_SKIN+'img/icon_profile.gif" width="15" height="15" border="0" alt="" title="View Profile" /></a>');
        d.writeln('<a href="'+poster_pm_url+'"><img src="'+URL_CURR_SKIN+'img/icon_pm2.gif" width="15" height="15" border="0" alt="" title="Send PM" /></a>');
        if(poster_msn_url != '') {
		d.writeln('<a href="'+poster_msn_url+'"><img src="'+URL_CURR_SKIN+'img/icon_msn.gif" width="15" height="15" border="0" alt="" title="MSN: '+poster_msn+'" /></a>');
	}
	if(poster_www_url != '') {
          	d.writeln('<a href="'+poster_www_url+'"><img src="'+URL_CURR_SKIN+'img/icon_home.gif" width="15" height="15" border="0" alt="" title="Homepage" /></a>');
	}
	d.write('</td>');
	d.write('<td class="'+class_name+'"><span class="s2">Activity: '+poster_activity+'</span></td>');
	d.write('<td class="'+class_name+'"><span class="s2">Country: '+poster_country+'</span></td>');
       	d.write('<td class="'+class_name+'"><span class="s2">Last Seen: '+poster_lastseen+'</span></td>');
	d.write('<td class="'+class_name+'"><span class="s2">');
	if(poster_qp_url != '') {
	        d.write('<a href="'+poster_qp_url+'" class="clean">QuestPoints: '+poster_qp+'</a>');
	} else {
        	d.write('&nbsp;');
        }
        d.write('</span></td>');
        d.write('<td class="contentbox2_right"><img src="'+URL_IMG+'space.gif" width="1" height="1" border="0" alt="" title=""></td></tr>');
}
function posterTitle(title,url) {
	d.write('<a class="clean" href="'+url+'">'+title+'</a><br />');
}

function posterAvatar(poster_url,avatar_url,avatar_width,avatar_height) {
	d.write('<br /><div align="center"><a href="'+poster_url+'"><img src="'+avatar_url+'" class="forum_avatar" width="'+avatar_width+'" height="'+avatar_height+'" border="1" alt="" title="" /></a></div><br />');
}
