
function load_java(file) {
var script = document.createElement("script");
setAttribute(script, "type", "text/javascript");
setAttribute(script, "src", file);
var heads = document.getElementsByTagName("head");
for(var i=0;i<heads.length;i++) {
heads[i].appendChild(script);		
}
}

function load_java_inside_body(file) {
var script = document.createElement("script");
setAttribute(script, "type", "text/javascript");
setAttribute(script, "src", file);
var bodys = document.getElementsByTagName("body");
for(var i=0;i<bodys.length;i++) {
bodys[i].appendChild(script);		
}
}

function load_css(file,media) {
var cssNode = document.createElement('link');
cssNode.type = 'text/css';
cssNode.rel = 'stylesheet';
cssNode.href = file;
cssNode.media = media;
var heads = document.getElementsByTagName("head");
for(var i=0;i<heads.length;i++) {
heads[i].appendChild(cssNode);
}
}
function setAttribute(node, attr, value) {
if(value == null || node == null || attr == null) return;
if(attr.toLowerCase() == "style") {
this._setStyleAttribute(node, value);
}else {
node.setAttribute(attr, value);
}
}
function removeAttribute(node, attr) {
node.removeAttribute(attr, false);
}
function getAttribute(node, attr) {
if(node == null || attr == null) return;
if(attr.toLowerCase() == "style") {
return this._getStyleAttribute(node);
}else {
return node.getAttribute(attr);
}
}



