
function $(id){
	return document.getElementById(id);
}

function printChilds(x){
    var chidSelect=document.getElementById('subcategory');
    chidSelect.innerHTML = '';
    if(x!=0) {
        for (var i in catalogue) {
            if(catalogue[i].parentID.toString()==x){
                var newOpt = document.createElement('OPTION');
                newOpt.value = catalogue[i].catalogue_categoryID.toString();
                newOpt.innerHTML = catalogue[i].title.toString();
                chidSelect.appendChild(newOpt);
            }
        }
    }
}