<?
	$query = "SELECT * FROM page WHERE name='".$_SESSION['page']."'";
	$mysqldb1->query($query);
	$page = $mysqldb1->fetchArray();
	
	// FIXES Z-INDEX ISSUES
	if ($page['external'] !=  '') { 
		$page['external'] = str_replace('></embed></object>', 'wmode="opaque"></embed></object>', html_entity_decode($page['external']));
	}
	
	$content = str_replace('#VIDEO#', $page['external'], html_entity_decode($page['content']));
	$content = str_replace('../..', 'http://'.$domain, $content);
?>
<div id="page_frame">
<div id="page_header"><? print $page['heading']; ?></div>
<div id="page_content">
<? print $content; ?>
</div>
<div id="page_footer"></div>
</div>