parent redirect

I’ve created the Contract.htm file including the following code in order to define a tabbar:

<link rel="STYLESHEET" type="text/css" href="dhtmlxSuite/dhtmlxTabbar/codebase/dhtmlxtabbar.css">
<script  src="dhtmlxSuite/dhtmlxTabbar/codebase/dhtmlxcommon.js"></script>
<script  src="dhtmlxSuite/dhtmlxTabbar/codebase/dhtmlxtabbar.js"></script>
<div id="a_tabbar" style="width: auto; height: 470px;"/>
	<script>
		tabbarHome = new dhtmlXTabBar('a_tabbar', 'top');
		tabbarHome.setSkin('default');
		tabbarHome.setImagePath('dhtmlxSuite/dhtmlxTabbar/codebase/imgs/');
		tabbarHome.addTab('a1', '&nbsp;&nbsp;Contract&nbsp;&nbsp;', '*');
		tabbarHome.enableTabCloseButton(true);
		tabbarHome.setHrefMode('iframes-on-demand');
		tabbarHome.setContentHref('a1', '<? echo $url; ?>Contract.php');
		tabbarHome.setTabActive('a1');
	</script>
</div>

In the Contract.php file I need to create some code that allow me to redirect to a specific page in case a condition occur. For example:

if ($ContractID == 1) { echo "OK"; } else { header("location: AvailableContract.htm"); }

My problem is that I need the redirect result should be visible in the parent window, in substitution of the Contract.htm page.

can anybody help me??? :imp:

SOLVED!!!

I’ve created the following script:

<?
if ($ContractID == 1) {
    $redirect = "";
} else {
    $redirect = "onload=\"javscript:self.parent.location.href = 'AvailableContract.htm';\"";
}
?>
<html>
<head></head>
<body <? echo $redirect; ?>></body>
</html>