<?php
if(!preg_match("/\/home.php/",$_SERVER['HTTP_REFERER'])){
	echo "<script>location.href='" . $CONST_LINK_ROOT . "/home.php#ccover'</script>"; die;
}
if ($ConfirmSign==1) {
	print"<script>window.location.href='$CONST_LINK_ROOT/home.php#cstart'</script>";
	exit;
}

/*$actlist_query=mysql_query("SELECT SUM(active) AS active, SUM(inactive) AS inactive FROM (
(SELECT IFNULL(SUM( IF(expDate>now(),1,0) ),'0') AS active, IFNULL(SUM( IF(expDate< now(),1,0) ),'0') AS inactive FROM market_Post where mem_userid=$WUserID and postDate > concat(year(NOW()),'-01-01') and approve=1) 
UNION 
(SELECT 0 active, COUNT(postID) AS inactive FROM market_Post where mem_userid=$WUserID and postDate > concat(year(NOW()),'-01-01') and approve<>1)
) DATA",$link) or die(mysql_error());
$actlist = mysql_fetch_object($actlist_query);
*/

?>
<script type="text/javascript">  
jQuery(document).ready(function () {
	
	var hash = document.location.hash.replace(/#c/i, '');
	if (hash.match("[\?&]tab=([^&#]*)")) {
	var tab = hash.match("[\?&]tab=([^&#]*)")[1];
	}
	
	//highlight the selected link
	if (tab) {
//	alert (tab+'1');
	jQuery('#tab_' + tab).attr("class", "current");
	jQuery('a[id!=tab_' + tab +']').removeClass('current');
	} else if (hash==''){
	jQuery('#tab_cover').attr("class", "current");
	jQuery('a[id!=tab_cover]').removeClass('current');
	} else {
//	alert (tab+'2');
//	alert (hash+'3');
	jQuery('#tab_' + hash).attr("class", "current");
	jQuery('a[id!=tab_' + hash +']').removeClass('current');
	}
	
});
</script> 
<ul id="submenu">
  <li><a href="#ccover" id="tab_cover" rel="sub_link" onclick="javascript: callpage(this.href);">Cover</a></li>
  <li><a href="#csummary" id="tab_summary" rel="sub_link" onclick="javascript: callpage(this.href);">Summary </a></li>
  <li><a href="#cacc" id="tab_acc" rel="sub_link" onclick="javascript: callpage(this.href);">Account</a></li>
</ul>
