function loadurl(dest) {
      try {
          xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
          // browser doesn't support ajax. handle however you want
      }
      xmlhttp.onreadystatechange = triggered;
      xmlhttp.open("GET", dest);
      xmlhttp.send(null);
      }
      function triggered() {
      if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
          document.getElementById("output").innerHTML = 'Trenutno na programu:<b>\&nbsp;\&nbsp;'+xmlhttp.responseText+'</b>';
      }
      }
function loadshout(dest1) {
      try {
          xmlhttp1 = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e1) {
          // browser doesn't support ajax. handle however you want
      }
      xmlhttp1.onreadystatechange = triggereds;
      xmlhttp1.open("GET", dest1);
      xmlhttp1.send(null);
      }
      function triggereds() {
      if ((xmlhttp1.readyState == 4) && (xmlhttp1.status == 200)) {
          document.getElementById("shout").innerHTML = xmlhttp1.responseText;
      }
      }

function infoPopup(url, xx, yy) {
    var w = window.open(url,'infoPopup', 
'scrollbars=yes,resizable=yes,directories=no,location=no,width='+xx+',height='+yy+',left=50,top=50');
    w.focus();
	}

    
function imagePopup(imgurl) {
var generator=window.open('','imagePopup','width=700,height=600,scrollbars=yes,resizable=yes');
	generator.document.write('<html><head><title>Popup</title>');
	generator.document.write('<link rel="stylesheet" href="styles/main.css">');
	generator.document.write('</head><body style="background-color:#a4bee2; text-align:center; margin-top:5px">');
	generator.document.write('<img  src="'+imgurl+'"/>');
	generator.document.write('<br /><hr><br /><a style="float:right;margin-right:10px;" href="#" onclick="window.close()"><strong>&raquo; Zatvori</strong></a>');
	generator.document.write('</body></html>');
	generator.document.write('</body></html>');
	generator.document.close(); 
	generator.focus();

    }
function imagePopup1(imgurl) {
var generator=window.open('','imagePopup','width=500,height=530,scrollbars=yes,resizable=yes');
	generator.document.write('<html><head><title>Popup</title>');
	generator.document.write('<link rel="stylesheet" href="styles/main.css">');
	generator.document.write('</head><body style="background-color:#c1e39c; text-align:center; margin-top:5px">');
	generator.document.write('<img src="'+imgurl+'"/>');
	generator.document.write('<br /><hr><br /><a style="float:right;margin-right:10px;" href="#" onclick="window.close()"><strong>&raquo; Zatvori</strong></a>');
	generator.document.write('</body></html>');
	generator.document.write('</body></html>');
	generator.document.close(); 
	generator.focus();

    }
    
var nFontSize  = 12;
var allClasses = 0;

function fontPlus1(){
var allParagraphs = ($('middle').getElementsByClassName('changeFontSize'));
  	if ( nFontSize < 18 ) {
  		nFontSize += 1;
		for (i = 0; i < allParagraphs.length; i++)
	      		(allParagraphs[i]).style.fontSize = nFontSize + 'px';
	
		}
	}
function fontMinus1(){
var allParagraphs = ($('middle').getElementsByClassName('changeFontSize'));
  	if ( nFontSize > 10 ) {
  		nFontSize -= 1;
		for (i = 0; i < allParagraphs.length; i++)
	      		(allParagraphs[i]).style.fontSize = nFontSize + 'px';
	
		}
	}
//----------------------------------------------------------------------------------
function fontPlus(){
var allParagraphs = ($('middle').getElementsByClassName('changeFontSize'));
var nodes2 = $('middle').getElementsBySelector('span');
  	if ( nFontSize < 18 ) {
  		nFontSize += 2;
		for (i = 0; i < nodes2.length; i++){
			if (!(nodes2[i]).hasClassName('date')){
	      		(nodes2[i]).style.fontSize = nFontSize + 'px';
	      }
		}
		for (i = 0; i < allParagraphs.length; i++){
	      		(allParagraphs[i]).style.fontSize = nFontSize + 'px';
	   }
	}
		
}

function fontMinus(){
var allParagraphs = ($('middle').getElementsByClassName('changeFontSize'));
var nodes2 = $('middle').getElementsBySelector('span');
  	if ( nFontSize > 10 ) {
  		nFontSize -= 1;
		for (i = 0; i < nodes2.length; i++){
			if (!(nodes2[i]).hasClassName('date')){
	      		(nodes2[i]).style.fontSize = nFontSize + 'px';
	      }
		}
		for (i = 0; i < allParagraphs.length; i++){
	      		(allParagraphs[i]).style.fontSize = nFontSize + 'px';
	   }
	}
		
}
