function processHTMLElements() {


	if(!document.getElementsByTagName) return;
	l=document.getElementsByTagName("a");
	for(i=0;i<l.length;i++){


		// ----------------------------------
		// ------------- title on a elements
		// ----------------------------------
		
		// ---------------------- notification on title attribute for target window
		if(l[i].className.indexOf("notifyWinTitle")!=-1 || l[i].className.indexOf("nuovafinestra")!=-1){ 
			var infoText = ' (otvara se u novom prozoru)';
			l[i].title = l[i].title + infoText;
		}

		// ---------------------- notification in content for target window
		if(l[i].className.indexOf("notifyWinContent")!=-1){ 
			var infoText = document.createTextNode(' (otvara se u novom prozoru)');
		
			var parent = l[i].parentNode;
			if (l[i].nextSibling) {
				parent.insertBefore(infoText,l[i].nextSibling);
			} else {
				parent.appendChild(infoText);
			}
		}

		// ----------------------------------
		// ------------- target on a elements
		// ----------------------------------

		// ---------------------- blank window
		if(l[i].className.indexOf("blankWin")!=-1 || l[i].className.indexOf("nuovafinestra")!=-1){ 
		  
			l[i].onclick = function() {
				window.open(this.href,'_blank'); return(false)
			}
			
			l[i].onkeypress = function(e) {
				var key;
				if(window.event)
					key = window.event.keyCode;     //IE
				else
					key = e.which;     //Firefox
				
				if(key && key == 13)	{
					window.open(this.href,'_blank'); return false;
				}
			}
		}


		// ---------------------- popup window
		if(l[i].className.indexOf("popupWin")!=-1){ 
		  
			l[i].onclick = function() {
				window.open(this.href,'popup','width=300,height=400,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,directories=no,location=no,status=yes'); return false
			}
			
			l[i].onkeypress = function(e) {
				var key;
				if(window.event)
					key = window.event.keyCode;     //IE
				else
					key = e.which;     //Firefox
				
				if(key && key == 13)	{
					window.open(this.href,'popup','width=300,height=400,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,directories=no,location=no,status=yes'); return false;
				}
			}
		}

		// ---------------------- experts window
		if(l[i].className.indexOf("expertsWin")!=-1){ 
  
			l[i].onclick = function() {
				var currentUrl = this.href
				var newUrlEnd = currentUrl.indexOf('backTo')
				var newUrl = currentUrl.substring(0, newUrlEnd-1)

				window.open(newUrl,'qa','toolbar=0,status=1,scrollbars=1,resizable=1,width=400,height=300'); return(false)
			}
	
			l[i].onkeypress = function(e){ 
				var currentUrl = this.href
				var newUrlEnd = currentUrl.indexOf('backTo')
				var newUrl = currentUrl.substring(0, newUrlEnd-1)

				var key;
				if(window.event)
					key = window.event.keyCode;     //IE
				else
				key = e.which;     //Firefox
				if(key && key == 13) {
					window.open(newUrl,'qa','toolbar=0,status=1,scrollbars=1,resizable=1,width=400,height=300'); return false
				}
			}
		}
	} // end of for loop


	// ----------------------------------
	// ------------- harcoded links
	// ----------------------------------  

	printLink = document.getElementById('printPageLink')

	if(printLink) {
		printLink.onclick = function() {
			window.open(this.href,'','width=800,height=600,scrollbars=yes,resizable=yes,menubar=yes'); return false;
		}
		printLink.onkeypress = function(e) {
				var key;
				if(window.event)
					key = window.event.keyCode;     //IE
				else
					key = e.which;     //Firefox
				
				if(key && key == 13)	{
					window.open(this.href,'','width=800,height=600,scrollbars=yes,resizable=yes,menubar=yes'); return false;
				}
		}
	}


	sendLink = document.getElementById('sendPageLink')
	if(sendLink) {
		sendLink.onclick = function() {
			window.open(this.href,'','width=500,height=400,scrollbars=yes,resizable=yes'); return false;
		}
		sendLink.onkeypress = function(e) {
				var key;
				if(window.event)
					key = window.event.keyCode;     //IE
				else
					key = e.which;     //Firefox
			
				if(key && key == 13)	{
					window.open(this.href,'','width=500,height=400,scrollbars=yes,resizable=yes'); return false;
				}
		}
	}

 	
 	
	// ----------------------------------
	// ------------- title on img elements
	// ----------------------------------  
	var getParentEl = function (el,tagname) {
		if (el.tagName && el.tagName==tagname) return el;
		if (el.parentNode) return getParentEl(el.parentNode,tagname);
		return null;
	}
	
	l=document.getElementsByTagName("img");
	for(i=0;i<l.length;i++){
	  if(l[i].className.indexOf("notifyWinTitle")!=-1 || l[i].className.indexOf("nuovafinestra")!=-1){ 
		var infoText = ' (otvara se u novom prozoru)';
		l[i].title = l[i].title + infoText;
	  }
	  var el = getParentEl(l[i],"a");
	  if (el && (el.className.indexOf("notifyWinTitle")!=-1 || el.className.indexOf("nuovafinestra")!=-1)) l[i].title = el.title;
	} // end of for loop

	/*
	l=document.getElementsByTagName("a");
	for(i=0;i<l.length;i++){
	  if ((l[i].className.indexOf("notifyWinTitle")!=-1 || l[i].className.indexOf("nuovafinestra")!=-1) && l[i].firstChild && l[i].firstChild.tagName && l[i].firstChild.tagName=="IMG"){ 
		l[i].firstChild.title = l[i].title;
	  }
	} // end of for loop
	*/

} //end of function declaration


