function is_ms() {
	return (navigator.appName == "Microsoft Internet Explorer");
}

function is_mozilla_std() {
	//return 0;
	return ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) > 4));
}

function getframe(doc, framename) {
	//if (is_ms())
            // *sigh* -- if only these guys could follow W3C's DOM
	    // level 1 standard (perhaps in the next version?)
	    return doc.frames[framename];
	//else
	    return doc.frames.namedItem(framename);
}

function get_dom_attrs(nod) {
  var i;

  alert(nod.attributes.length);
  for (i=0; i<nod.attributes.length; i++)
    alert(nod.attributes.item(i).nodeName + ' = ' + nod.attributes.item(i).nodeValue);
}

function altercontent(el, newcontent) {
    //if IE 4+
    if (document.all)
        //dcontent.innerHTML=mycontent[i];
        el.innerHTML=newcontent;
    //else if NS 6 (supports new DOM)
    else if (document.getElementById){
        var rng = document.createRange();
        rng.setStartBefore(el);
        var htmlFrag = rng.createContextualFragment(newcontent);
        while (el.hasChildNodes())
            el.removeChild(el.lastChild);
        el.appendChild(htmlFrag);
    }
}
