/////////////////////////////////////////////////////////////////////////////
// Function : NavNode (constructor)
// Comments :
/////////////////////////////////////////////////////////////////////////////
function NavNode(id, label, href, parent)
{
	this.m_parent = null;
	this.m_level = 0;

	if (parent)
	{
		this.m_parent = parent;
		this.m_level = parent.m_level+1;
	}

	this.m_id = id;

	// assume that m_label will most often be used directly as HTML
	this.m_rawlabel = label;

	label = label.replace(/&/g, '&amp;');
	label = label.replace(/</g, '&lt;');
	label = label.replace(/>/g, '&gt;');
	label = label.replace(/"/g, '&quot;');

	this.m_label = label;

	this.m_href = href;
	this.m_subNodes = new Array();

	var argValues = NavNode.arguments;
	var argCount = NavNode.arguments.length;

	for (i = 4 ; i < argCount ; i++)
	{
		var attrName = argValues[i].split("==")[0];
		var attrValue = argValues[i].split("==")[1];

		eval("this.cp_" + attrName + " = '" + attrValue + "';");
	}

	NavNode.prototype.addNode = addNode;
	NavNode.prototype.isSelected = isSelected;
}

/////////////////////////////////////////////////////////////////////////////
// Function : addNode
// Comments :
/////////////////////////////////////////////////////////////////////////////
function addNode(id, label, href)
{
	var newIndex = this.m_subNodes.length;
	var newNode = new NavNode(id, label, href, this);

	var argValues = addNode.arguments;
	var argCount = addNode.arguments.length;

	for (i = 3 ; i < argCount ; i++)
	{
		var attrName = argValues[i].split("==")[0];
		var attrValue = argValues[i].split("==")[1];

		eval("newNode.cp_" + attrName + " = '" + attrValue + "';");
	}

	this.m_subNodes[newIndex] = newNode;
	return newNode;
}

/////////////////////////////////////////////////////////////////////////////
// Function : isSelected
// Comments :
/////////////////////////////////////////////////////////////////////////////
function isSelected()
{
    var pos = window.location.href.lastIndexOf("/");
    var docname = window.location.href.substring(pos+1, window.location.href.length);

    pos = this.m_href.lastIndexOf("/");
    var myname = this.m_href.substring(pos+1, this.m_href.length);

    if (docname == myname)
		return true;
	else
		return false;
}

/////////////////////////////////////////////////////////////////////////////
// Function : customSectionPropertyExists
// Comments :
/////////////////////////////////////////////////////////////////////////////
function customSectionPropertyExists(csp)
{
	return (typeof csp != _U && csp != null);
}

/////////////////////////////////////////////////////////////////////////////
// Function : getCustomSectionProperty
// Comments :
/////////////////////////////////////////////////////////////////////////////
function getCustomSectionProperty(csp)
{
	if (customSectionPropertyExists(csp))
	{
		return csp;
	}
	else
	{
		return "";
	}
}

/////////////////////////////////////////////////////////////////////////////

var g_navNode_Root = new NavNode('969','School of Medicine and Dentistry',ssUrlPrefix + 'index.htm',null,'cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspFeatureImgQuery==dSecurityGroup \x3cmatches\x3e \x60Public\x60  \x3cAND\x3e  xContentType \x3cmatches\x3e \x60WebGraphics\x60  \x3cAND\x3e  xSubject \x3csubstring\x3e \x60medicine_hp\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60','cspNavImage==JCUDEV_013130','cspNavImgURL==index.htm','secondaryUrlVariableField==region1');
g_navNode_0=g_navNode_Root.addNode('971','Current Students',ssUrlPrefix + 'current/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==xAudience \x3csubstring\x3e \x60Students_current\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60','cspSortSpec==xJCU_Heading asc dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_1=g_navNode_Root.addNode('977','News \x26 Events',ssUrlPrefix + 'news/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==xJCUContentCategory \x3csubstring\x3e \x60Media/Marketing/Dates/Events\x60  \x3cAND\x3e  \x3cNOT\x3e \x28xJCUContentGrouping \x3cmatches\x3e \x60Marketing\x60\x29  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60','cspSortSpec==xComments asc ','secondaryUrlVariableField==region1');
g_navNode_2=g_navNode_Root.addNode('972','Our People',ssUrlPrefix + 'staff/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==dDocType \x3csubstring\x3e \x60Staff_profiles\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60','cspSortSpec==xComments asc dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_3=g_navNode_Root.addNode('1846','Our Research',ssUrlPrefix + 'research/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==xAudience \x3csubstring\x3e \x60Students_research\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60  \x3cAND\x3e  \x3cNOT\x3e \x28xJCU_Topic \x3csubstring\x3e \x60Anatomy\x60\x29','cspSortSpec==dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_3_0=g_navNode_3.addNode('1851','Research Groups \x26 Programs',ssUrlPrefix + 'research/research_groups/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../../index.htm','cspQueryText==xWebsites \x3ccontains\x3e \x60medicine\x60 \x3cAND\x3e xJCU_Topic \x3csubstring\x3e \x60Research\x60\\x0a','cspSortSpec==dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_3_0_0=g_navNode_3_0.addNode('1909','Anatomy',ssUrlPrefix + 'research/research_groups/anatomy/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../../../index.htm','cspQueryText==xJCUContentCategory \x3csubstring\x3e \x60Academic\x60  \x3cAND\x3e  xJCUContentGrouping \x3csubstring\x3e \x60Research\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60  \x3cAND\x3e  xJCU_Topic \x3csubstring\x3e \x60Anatomy\x60','cspSortSpec==xJCU_Heading asc dDocTitle asc','cspSubField==\x3c\x24xDescription\x24\x3e','secondaryUrlVariableField==region1');
g_navNode_3_0_1=g_navNode_3_0.addNode('1853','Rural Health Research Unit',ssUrlPrefix + 'research/research_groups/rural_health/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../../../index.htm','cspQueryText==xJCUContentCategory \x3csubstring\x3e \x60Academic\x60 \x3cAND\x3e xJCUContentGrouping \\x0a\x3csubstring\x3e \x60Research\x60 \x3cAND\x3e xSubject \x3csubstring\x3e \x60rural health\x60 \x3cAND\x3e \\x0axWebsites \x3ccontains\x3e \x60medicine\x60\\x0a','cspSortSpec==xJCU_Heading asc dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_3_0_2=g_navNode_3_0.addNode('1852','Vascular Biology Unit',ssUrlPrefix + 'research/research_groups/vascular/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../../../index.htm','cspQueryText==xJCUContentCategory \x3csubstring\x3e \x60Academic\x60 \x3cAND\x3e xJCUContentGrouping \\x0a\x3csubstring\x3e \x60Research\x60 \x3cAND\x3e xSubject \x3csubstring\x3e \x60VBU\x60 \x3cAND\x3e xWebsites \\x0a\x3ccontains\x3e \x60medicine\x60\\x0a','cspSortSpec==xComments asc','secondaryUrlVariableField==region1');
g_navNode_3_1=g_navNode_3.addNode('1850','Research Performance',ssUrlPrefix + 'research/performance/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../../index.htm','cspQueryText==xWebsites \x3ccontains\x3e \x60medicine\x60  \x3cAND\x3e  xJCU_Topic \x3csubstring\x3e \x60Performance\x60','cspSortSpec==dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_3_2=g_navNode_3.addNode('2132','Visiting Scholars',ssUrlPrefix + 'research/visiting/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../../index.htm','cspQueryText==dDocType \x3csubstring\x3e \x60Staff_profiles\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60  \x3cAND\x3e  xJCU_Topic \x3csubstring\x3e \x60Research\x60','cspResultCount==40','cspSortSpec==dDocTitle asc');
g_navNode_4=g_navNode_Root.addNode('973','Our Teaching Sites',ssUrlPrefix + 'sites/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==dDocType \x3csubstring\x3e \x60Information_about\x60  \x3cAND\x3e  \x28xSubject \x3csubstring\x3e \x60clinical school\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60\x29','cspSortSpec==xJCU_Heading asc dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_5=g_navNode_Root.addNode('974','Our Programs',ssUrlPrefix + 'programs/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==dDocType \x3csubstring\x3e \x60Degrees_programs\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60','cspSortSpec==xJCUSequence asc dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_6=g_navNode_Root.addNode('970','Prospective Students',ssUrlPrefix + 'prospective/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspDisplayField==\x3c\x24xJCU_Heading\x24\x3e','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==xAudience \x3csubstring\x3e \x60Students_prospective\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60','cspSortSpec==xJCU_Heading desc dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_7=g_navNode_Root.addNode('975','The Disciplines',ssUrlPrefix + 'disciplines/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../index.htm','cspQueryText==\x3cNOT\x3e \x28xSubject \x3csubstring\x3e \x60GPRM\x60\x29  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60  \x3cAND\x3e  xJCU_Topic \x3csubstring\x3e \x60Discipline\x60','cspSortSpec==dDocTitle asc','secondaryUrlVariableField==region1');
g_navNode_7_0=g_navNode_7.addNode('1127','General Practice \x26 Rural Medicine',ssUrlPrefix + 'disciplines/gprm/index.htm','cspBannerImage==JCUDEV_013134','cspBannerURL==http\x3a//www.jcu.edu.au/fmhms/','cspNavImage==JCUDEV_013130','cspNavImgURL==../../index.htm','cspQueryText==xSubject \x3csubstring\x3e \x60GPRM\x60  \x3cAND\x3e  xWebsites \x3ccontains\x3e \x60medicine\x60  \x3cAND\x3e  xJCU_Topic \x3csubstring\x3e \x60Discipline\x60','cspSortSpec==dDocTitle asc','secondaryUrlVariableField==region1');
