// Dynamically load the external JS file var flag = true; If (FLAG) {loadscript ("JS/index. JS ") ;}; function loadscript (URL) {var script = document. createelement ("script"); script. type = "type/custom cipt"; script. src = URL; document. getelementsbytagname ("head") [0]. appendchild (SCRIPT) ;}; // dynamically load JSIF (FLAG) {var script = document. createelement ("script"); script. type = "text/JavaScript"; script. TEXT = ""; document. getelementsbytagname ("head") [0]. appendchild (SCRIPT) ;}; // dynamically load external CSS styles if (FLAG) {loadcss ("CSS/base.css") ;}; function loadcss (URL) {var link = document. createelement ("Link"); Link. type = "text/CSS"; Link. rel = "stylesheet"; Link. href = URL; document. getelementsbytagname ("head") [0]. appendchild (Link) ;}; // dynamically load the CSS style if (FLAG) {var style = document. createelement ("style"); style. type = "text/CSS"; document. getelementsbytagname ("head") [0]. appendchild (style); var sheet = document. stylesheets [0]; insertrules (sheet, "# gaga1", "Background: # f00", 0) ;}; function insertrules (sheet, selectortxt, csstxt, position) {If (sheet. insertrule) {// judge whether the sheet is not an IE browser. insertrule (selectortxt + "{" + csstxt + "}", position);} else if (sheet. addrule) {// determine whether it is Internet browser sheet. addrule (selectortxt, csstxt, position )}}