function swap() {
	num++;
	if (num==max) {num=0;}
	document.getElementById('slika').src=pics[num];
	
}

function swap_num(num){
	document.getElementById('slika').src=pics[num];
}


function getStyle(el, style) {

   if(!document.getElementById) return;

   

     var value = el.style[toCamelCase(style)];

   

    if(!value)

        if(document.defaultView) {

            value = document.defaultView.

                 getComputedStyle(el, "").getPropertyValue(style);

       
		}
        else if(el.currentStyle)

            //value = el.currentStyle[toCamelCase(style)];
			value = el.offsetHeight;


     return value;

}

function setStyle(objId, style, value) {

    document.getElementById(objId).style[style] = value;

}

function toCamelCase( sInput ) {


    var oStringList = sInput.split('-');


    if(oStringList.length == 1)   
        return oStringList[0];

    var ret = sInput.indexOf("-") == 0 ?

       oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) : oStringList[0];

    for(var i = 1, len = oStringList.length; i < len; i++){

        var s = oStringList[i];

        ret += s.charAt(0).toUpperCase() + s.substring(1)

    }


    return ret;

}

function increaseWidth(addToWidth, whichDiv){

    var theDiv = document.getElementById(whichDiv);

    var currWidth = parseInt(getStyle(theDiv, "width"));

    var newWidth = currWidth + parseInt(addToWidth);

    setStyle(whichDiv, "width", newWidth + "px");

}


function increaseHeight(){
	whichDiv='content';

    var theDiv = document.getElementById(whichDiv);
    var currWidth = parseInt(getStyle(theDiv, "height"));
    var newWidth = currWidth + parseInt('1');	
    var newWidth2 = currWidth + parseInt('0');		
	if (currWidth%2==0)
	    setStyle(whichDiv, "height", newWidth + "px");
	else	
	    setStyle(whichDiv, "height", newWidth2 + "px");	

}



