var content = document.getElementById('content');

var dlinks = [
{title:'Pro/ENGINEER Wildfire 5.0', url: '/technologie/proengineer/10-duvodu-proc-poridit-proengineer-wildfire-50.aspx'},
{title:'Pro/ENGINEER Wildfire 4.0', url: '/technologie/proengineer/10-duvodu-pro-wildfire-4.aspx'},
{title:'Pro/ENGINEER Wildfire', url: '/technologie/proengineer/10-duvodu-proc-poridit-proengineer-wildfire-50.aspx'},
{title:'Pro/ENGINEER', 	url: '/technologie/creo-elementspro.aspx'},
{title:'Creo Elements/Pro', url: '/technologie/creo-elementspro.aspx'},
{title:'Arbortext IsoDraw', url: '/technologie/arbortext/arbortext-isodraw.aspx'},
{title:'Arbortext', 	url: '/technologie/arbortext.aspx'},
{title:'Windchill', 	url: '/technologie/windchill.aspx'},
{title:'Pro/INTRALINK',    url: '/technologie/prointralink.aspx'},
{title:'Mathcad',  	url: '/technologie/mathcad.aspx'},
{title:'ProductView',  	url: '/technologie/creo-elementsview.aspx'},
{title:'Creo Elements/View ', url: '/technologie/creo-elementsview.aspx'},
{title:'Pro/CZ Package',url: '/technologie/procz-package.aspx'},
{title:'Pro/CONCEPT',	url: '/technologie/proconcept.aspx'},
{title:'CFdesign', 	url: '/technologie/CFdesign.aspx'},
{title:'Pro/TOOLMAKER', url: '/technologie/protoolmaker.aspx'},
{title:'Pro/MECHANICA', url: '/technologie/proengineer/simulace-a-analyza.aspx#analyza'},
{title:'Creo', url: '/technologie/creo.aspx'}
];

function addLinks(html) {
for (l = 0; l < dlinks.length; l++) {
	var url = dlinks[l].url;
	var key = dlinks[l].title;
	var urlreg = new RegExp(url,"i");

	//Don't mark on self page
	if (self.location.href.search(urlreg) != -1)  continue;

	var regex3 = new RegExp("(<[^a][^>]*?>)([^<]*?)(" + key + ")(®|™|(?:<sup>.{1,6}</sup>))?([^>]*)?(<)","ig");
	var regex3rep = '$1$2<a href="' + url + '" class="dlink" title="Více o $3">$3$4</a>$5$6';

	html = html.replace(regex3, regex3rep);
}
return html;
}

if (content != null) {
var html = content.innerHTML;
html = addLinks(html);
//Second round for text where keyword is twice
html = addLinks(html);
content.innerHTML = html;
}

