function fillSelect(json){
while(document.getElementById("parentId").options.length!=1){
document.getElementById("parentId").options.remove(1);
}
var obj = JSON.parse(json);
$.each(obj.data,function(n,value){
var selectObj=document.getElementById("parentId");
selectObj.options[selectObj.length] = new Option(value.title, value.id);
});
}