function include(file){

var script = document.createElement('script');

// create attribute "type"

var type = document.createAttribute('type');

type.nodeValue = 'text/javascript';

script.setAttributeNode(type);

// create attribute "src"

var source = document.createAttribute('src');

source.nodeValue = file;

script.setAttributeNode(source);

// append it in the head

var head = document.getElementsByTagName('head')[0];

head.appendChild(script);

}

