User:BorisTM/MolBioForm.js

// function build_search_form { obj=document.getElementById("p-search"); obj.firstChild.nextSibling.firstChild.innerHTML="Wiki search"; obj=obj.parentNode; obj=document.getElementById("p-tb"); new_DIV=document.createElement("DIV"); new_DIV.className="portlet"; new_DIV.setAttribute("id","molbio-search"); obj.parentNode.insertBefore(new_DIV,obj);

new_H5=document.createElement("H5"); new_DIV.appendChild(new_H5); new_LABEL=document.createElement("LABEL"); new_Text=document.createTextNode("mol-bio search"); new_LABEL.appendChild(new_Text); new_H5.appendChild(new_LABEL);

new_Elem=document.createElement("DIV"); new_DIV.appendChild(new_Elem); new_Elem.className="pBody";

new_FORM=document.createElement("FORM"); new_Elem.appendChild(new_FORM); new_FORM.setAttribute("id","searchabbrev"); new_FORM.setAttribute("action","http://www.molbiology.com/molbio.php"); new_FORM.setAttribute("method","post");

new_Elem=document.createElement("CENTER"); new_FORM.appendChild(new_Elem); new_INPUT=document.createElement("INPUT"); new_Elem.appendChild(new_INPUT);

new_INPUT.setAttribute("name","abbrev"); new_INPUT.setAttribute("type","text"); new_INPUT.setAttribute("size","14"); new_INPUT.setAttribute("maxlength","100"); new_INPUT.style.marginTop="5px"; new_BR=document.createElement("BR"); new_FORM.appendChild(new_BR); new_SELECT=document.createElement("SELECT"); new_FORM.appendChild(new_SELECT); new_SELECT.setAttribute("name","categ"); new_SELECT.style.align="center"; new_SELECT.style.margin="2px";

i_L=opt_value.length; for (i=0; i<i_L; i++) { new_OPTION=document.createElement("OPTION"); new_SELECT.appendChild(new_OPTION); new_OPTION.value=opt_value[i]; new_Text=document.createTextNode(opt_text[i]); new_OPTION.appendChild(new_Text); }

new_BR=document.createElement("BR"); new_FORM.appendChild(new_BR); new_Elem=document.createElement("CENTER"); new_FORM.appendChild(new_Elem); new_INPUT=document.createElement("INPUT"); new_Elem.appendChild(new_INPUT); new_INPUT.className="searchButton"; new_INPUT.setAttribute("type","submit"); new_INPUT.setAttribute("value","Go get it!");

}

//