/** *************************************
 * 
 * Sub page navigation script   
 *
 * @author:	Patrick Kanne
 * @email:	mephisto@quaint.info
 *
 * @filename:		func.subpagenav.inc.js
 * @version:		200402290504 0.0.1
 * @description:	handles subpage navigation calls.
 					should check if parent is loaded, if not loadparent first, 
					submit current 'page' argument to parent				
 * @parent:			func.interface.inc.js
 ************************************* **/
 
var toppage = 'index.php';
var c_loc;

 /** *************************************
 ** - subPageNav -> openSubPage
 * @access:	public
 * @desc:	 sets the interface of this object (nme) on
 * @param: nme, name of current object
 ************************************** */
function openSubPage(nme)
{
	var c_loc = top.location.href;
	if(!c_loc.match(toppage))
	{
		//alert(location);
		top.location.href = "index.php?page="+nme;
		return;
	}
	else
	{
		if(arguments[1]== 'forum') parent.setSubPage(nme,'forum');
		else parent.setSubPage(nme);
		return;
	}
}
//function

 /** *************************************
  ** - subPageNav -> closeSubPage
 * @access:	public
 * @desc:	clears the interface of this object (nme) on
 * @param: nme, name of current object
 ************************************** */
function closeSubPage(nme)
{	
	var c_loc = top.location.href;
	if(!c_loc.match(toppage))
	{
		//top.location.href = "http://jig/starlabs/azrharn.php?page="+nme;
		//do nothing; nothing has been set.
		return;
	}
	else
	{
		parent.unSetSubPage(nme);
		return;
	}
}
//function
