var head = document.getElementsByTagName('head').item(0); for(var cnt=0;cnt