

var g_httpCgiUrl = "/stellent/idcplg?IdcService=SS_GET_PAGE&";

/////////////////////////////////////////////////////////////////////////////
// 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 : isTrue
// Comments :
/////////////////////////////////////////////////////////////////////////////
function isTrue( boolStr )
{
	if( boolStr.length > 0 )
	{
		var boolChar = boolStr.substring(0,1).toUpperCase();
		if( ( boolChar == '1' ) || ( boolChar == 'T' ) )
		{
			return true;
		}
	}

	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 "";
	}
}

/////////////////////////////////////////////////////////////////////////////
// Function : link
// Comments :
/////////////////////////////////////////////////////////////////////////////
function link(dDocName,ssTargetNodeId)
{
	if ((dDocName.search("http://") != -1) || (dDocName.search("https://") != -1))
		window.open(dDocName);
	else
	{
		var newUrl = "";
		newUrl += g_httpCgiUrl;
		newUrl += "ssDocName=" + dDocName;

		var currentUrl = "" + window.location;

		// Continue propagation of the "SSContributor" parameter
		if( SSContributor )
		{
			var paramName = "SSContributor=";
			var pos = currentUrl.indexOf( paramName );
			if( pos != -1 )
			{
				var subStr = currentUrl.substring( pos+paramName.length, pos+paramName.length+1 );
				if( isTrue( subStr ) )
				{
					newUrl += "&" + paramName + "true";
				}
			}
		}

		// Continue propagation of the "previewId" parameter
		var previewId = "previewId=";
		var posStart = currentUrl.indexOf( previewId );
		if( posStart != -1 )
		{
			var posEnd = currentUrl.indexOf("&", posStart);
			var value = "";
			if (posEnd == -1)
			{
				value = currentUrl.substring(posStart+previewId.length, currentUrl.length);
			}
			else
			{
				value = currentUrl.substring(posStart+previewId.length, posEnd);
			}
			newUrl += "&" + previewId + value;
		}

		// We now always add the node that the link is on as part of the URl also.
		if( g_ssSourceNodeId != _U && g_ssSourceNodeId != null )
			newUrl += "&ssSourceNodeId=" + g_ssSourceNodeId;

		// If we have a specific target nodeId then add that to the URL also
		if( ssTargetNodeId != _U && ssTargetNodeId != null )
			newUrl += "&ssTargetNodeId=" + ssTargetNodeId;

		// If the language is in the url, add it to the new url.
		var lang = "lang=";
		var posStart = currentUrl.indexOf( lang );
		if( posStart != -1 )
		{
			var posEnd = currentUrl.indexOf("&", posStart);
			var value = "";
			if (posEnd == -1)
			{
				value = currentUrl.substring(posStart+lang.length, currentUrl.length);
			}
			else
			{
				value = currentUrl.substring(posStart+lang.length, posEnd);
			}
			newUrl += "&" + lang + value;
		}

		// Navigate to the new url
		window.location = newUrl;
	}
}


/////////////////////////////////////////////////////////////////////////////
// Function : nodelink
// Comments :
/////////////////////////////////////////////////////////////////////////////
function nodelink(nodeId)
{
	var newUrl = "";
	newUrl += g_httpCgiUrl;
	newUrl += "nodeId=" + nodeId;

	var currentUrl = "" + window.location;

	// Continue propagation of the "SSContributor" parameter
	if( SSContributor )
	{
		var paramName = "SSContributor=";
		var pos = currentUrl.indexOf( paramName );
		if( pos != -1 )
		{
			var subStr = currentUrl.substring( pos+paramName.length, pos+paramName.length+1 );
			if( isTrue( subStr ) )
			{
				newUrl += "&" + paramName + "true";
			}
		}
	}

	// Continue propagation of the "previewId" parameter
	var previewId = "previewId=";
	var posStart = currentUrl.indexOf( previewId );
	if( posStart != -1 )
	{
		var posEnd = currentUrl.indexOf("&", posStart);
		var value = "";
		if (posEnd == -1)
		{
			value = currentUrl.substring(posStart+previewId.length, currentUrl.length);
		}
		else
		{
			value = currentUrl.substring(posStart+previewId.length, posEnd);
		}
		newUrl += "&" + previewId + value;
	}

	// We now always add the node that the link is on as part of the URl also.
	if( g_ssSourceNodeId != _U && g_ssSourceNodeId != null )
		newUrl += "&ssSourceNodeId=" + g_ssSourceNodeId;


	// If the language is in the url, add it to the new url.
	var lang = "lang=";
	var posStart = currentUrl.indexOf( lang );
	if( posStart != -1 )
	{
		var posEnd = currentUrl.indexOf("&", posStart);
		var value = "";
		if (posEnd == -1)
		{
			value = currentUrl.substring(posStart+lang.length, currentUrl.length);
		}
		else
		{
			value = currentUrl.substring(posStart+lang.length, posEnd);
		}
		newUrl += "&" + lang + value;
	}


	// Navigate to the new url
	window.location = newUrl;
}

//open link in new browser window
function linkNewWindow(nieuwelink){
	window.open(nieuwelink,"new","");
}
/////////////////////////////////////////////////////////////////////////////
var g_navNode_Root = new NavNode('322','Home',ssUrlPrefix + 'index.htm',null,'ArabicTitle==\u0627\u0644\u0635\u0641\u062d\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629','ChineseTitle==\u5bb6\u5ead','DutchTitle==Home','FrenchTitle==Accueil','GermanTitle==Land','ItalianTitle==Domestico','JapaneseTitle==\u5bb6','KoreanTitle==\ud648','PolishTitle==Strona g\u0142\xf3wna','RussianTitle==\u0414\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430','SpanishTitle==Inicio','arabicTitle==\u0627\u0644\u0635\u0641\u062d\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629','dutchTitle==Home','koreanTitle==\ud648','polishTitle==Strona g\u0142\xf3wna','russianTitle==\u0414\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430');
g_navNode_0=g_navNode_Root.addNode('364','Corporate/News',ssUrlPrefix + 'Corporate/index.htm','ArabicTitle==\u062d\u0648\u0644 \u0627\u0644\u0634\u0631\u0643\u0629','ChineseTitle==\u516c\u53f8','DutchTitle==Bedrijfsleven','FrenchTitle==Entreprises','GermanTitle==Firma','ItalianTitle==Azienda','JapaneseTitle==\u4f1a\u793e','KoreanTitle==\uae30\uc5c5','PolishTitle==Firmowe','RussianTitle==\u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439','SectionQuery==\x28dDocType \x3cmatches\x3e \\x27Content\\x27\x29 AND \x28xMarketSegment \x3cmatches\x3e \\x27\\x27\x29 AND \x28xProduct \x3cmatches\x3e \\x27\\x27\x29 AND \x28NOT dExtension \x3cmatches\x3e \\x27xml\\x27\x29','SpanishTitle==Corporativo','arabicTitle==\u062d\u0648\u0644 \u0627\u0644\u0634\u0631\u0643\u0629','dutchTitle==Bedrijfsleven','koreanTitle==\uae30\uc5c5','polishTitle==Firmowe','russianTitle==\u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439');
g_navNode_0_0=g_navNode_0.addNode('367','News',ssUrlPrefix + 'Corporate/News/index.htm','ArabicTitle==\u0627\u0644\u0623\u062e\u0628\u0627\u0631','ChineseTitle==\u65b0\u95fb','DutchTitle==Nieuws','FrenchTitle==Informations','GermanTitle==Neuheiten','ItalianTitle==News','JapaneseTitle==\u30cb\u30e5\u30fc\u30b9','KoreanTitle==\ub274\uc2a4','PolishTitle==Wiadomo\u015bci','RussianTitle==\u041d\u043e\u0432\u043e\u0441\u0442\u0438','SectionQuery==dDocType \x3csubstring\x3e \x60Content\x60   \x3cAND\x3e   \\x0a\x28dSecurityGroup \x3csubstring\x3e \x60Privileged\x60  \x3cOR\x3e \\x0adSecurityGroup \x3csubstring\x3e \x60Public\x60  \x29 \x3cAND\x3e   \\x0axGenre \x3csubstring\x3e \x60News\x60 \x3cAND\x3e\\x0a\x28xSubGenre \x3csubstring\x3e \x60Article\x60 \x3cOR\x3e\\x0axSubGenre \x3csubstring\x3e \x60PressRelease\x60\x29','SpanishTitle==Noticias','arabicTitle==\u0627\u0644\u0623\u062e\u0628\u0627\u0631','dutchTitle==Nieuws','koreanTitle==\ub274\uc2a4','polishTitle==Wiadomo\u015bci','russianTitle==\u041d\u043e\u0432\u043e\u0441\u0442\u0438');
g_navNode_1=g_navNode_Root.addNode('365','Market Segment',ssUrlPrefix + 'MarketSegment/index.htm','ArabicTitle==\u0634\u0631\u064a\u062d\u0629 \u0627\u0644\u0633\u0648\u0642','ChineseTitle==\u5e02\u573a\u5206\u7c7b','DutchTitle==Marktsegment','FrenchTitle==Segment de march\xe9','GermanTitle==Marktsegment','ItalianTitle==Segmento di mercato','JapaneseTitle==\u5e02\u5834\u30bb\u30b0\u30e1\u30f3\u30c8','KoreanTitle==\uc2dc\uc7a5 \ubd84\uc57c','PolishTitle==Segment rynku','RussianTitle==\u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u0440\u044b\u043d\u043a\u0430','SectionQuery==\x28dDocType \x3cmatches\x3e \x60Content\x60\x29  \x3cAND\x3e \x28xMarketSegment \x3ccontains\x3e \x60MS\x2a\x60\x29','SpanishTitle==Segmento de mercado','arabicTitle==\u0634\u0631\u064a\u062d\u0629 \u0627\u0644\u0633\u0648\u0642','dutchTitle==Marktsegment','koreanTitle==\uc2dc\uc7a5 \ubd84\uc57c','polishTitle==Segment rynku','russianTitle==\u0421\u0435\u0433\u043c\u0435\u043d\u0442 \u0440\u044b\u043d\u043a\u0430');
g_navNode_2=g_navNode_Root.addNode('366','Product',ssUrlPrefix + 'Product/index.htm','ArabicTitle==\u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a','ChineseTitle==\u4ea7\u54c1','DutchTitle==Product','FrenchTitle==Produit ','GermanTitle==Produkt','ItalianTitle==Prodotto','JapaneseTitle==\u88fd\u54c1','KoreanTitle==\uc81c\ud488','PolishTitle==Produkt','RussianTitle==\u041f\u0440\u043e\u0434\u0443\u043a\u0442','SectionQuery==\x28dDocType \x3cmatches\x3e \\x27Content\\x27\x29 AND NOT \x28xProduct \x3cmatches\x3e \\x27\\x27\x29','SpanishTitle==Producto ','arabicTitle==\u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a','dutchTitle==Product','koreanTitle==\uc81c\ud488','polishTitle==Produkt','russianTitle==\u041f\u0440\u043e\u0434\u0443\u043a\u0442');
g_navNode_3=g_navNode_Root.addNode('368','Events',ssUrlPrefix + 'Events/index.htm','ArabicTitle==\u0627\u0644\u0623\u062d\u062f\u0627\u062b','ChineseTitle==\u4e8b\u4ef6','DutchTitle==Gebeurtenissen','FrenchTitle==\xc9v\xe9nements','GermanTitle==Veranstaltungen','ItalianTitle==Eventi','JapaneseTitle==\u30a4\u30d9\u30f3\u30c8','KoreanTitle==\uc774\ubca4\ud2b8','PolishTitle==Wydarzenia','RussianTitle==\u0421\u043e\u0431\u044b\u0442\u0438\u044f','SpanishTitle==Eventos','arabicTitle==Gebeurtenissen','dutchTitle==\u0627\u0644\u0623\u062d\u062f\u0627\u062b','koreanTitle==\uc774\ubca4\ud2b8','polishTitle==Wydarzenia','russianTitle==\u0421\u043e\u0431\u044b\u0442\u0438\u044f');
