var num=0;
for(var i=0;i<document.all.length;i++){
    if(document.all.item(i).name=="mlayer")num++;
}