<?php
	global $mainframe;
	$document		=& JFactory::getDocument();
	$db 			=& JFactory::getDBO();
	$id				= JRequest::getVar( 'id', 0, '', 'int' );
	$option			= JRequest::getCmd( 'option' );
	$document->setLink(JURI::root());

	$query ="SELECT `body`, `name` FROM #__ccnewsletter_newsletters WHERE id='".$id."'";
	$db->setQuery( $query );
	$row  = $db->loadObject();
	$subject =$row->name;
	$body =$row->body;
	$newsletterModel =& $this->getModel();
	//echo "Newskletetr".$newsletterModel;

	$body=$newsletterModel->convertImgTags($body);
	// call the backgroiund image convert function of our model and overwrite the background property of tables
	$body=$newsletterModel->convertBackgroundTags($body);
	// call the internal link convert function of our model and overwrite the internal link property of tables
	$body=$newsletterModel->convertInternalLink($body);
?>
	<table align="center" width="100%" cellspacing="2" cellpadding="2" border="0">
	<tr>
		<?php echo $body;?>
	</tr>
	</table>



