window.onload = startFunction;

function startFunction(){
	galeryPage()    
}
function galeryPage(){
	var years = document.getElementById("years");
	if(years){

		years.style.width = (countElem(years, 'LI') * 67) + "px";
	}
	
}
function countElem ( elem, tagName ){
    var children = elem.childNodes;
    var count=0;
    for(var i = 0;i<=children.length-1;i++){
        (children.item(i) && children.item(i).tagName == tagName) ?  count++ : count=count;
    }
    return count;
}

