Pman.Include.js
[Pman.Core] / Pman.Include.js
1 /**
2  * include a script -- normaly used for testing..
3  *
4  *
5  */
6
7
8 Pman.Include = function(sp) {
9     
10     Pman.Include.script(sp, true)
11     
12      
13 )
14
15 Pman.Include.cached = function(sp) {
16     Pman.Include.script(sp, false)
17      
18 )
19
20 Pman.Include.script = function(sp,cached) {
21     var head = document.getElementsByTagName("head")[0];
22  
23     
24     var script = document.createElement("script");
25     script.setAttribute("src",  rootURL + sp    +
26               ( cached ? '' :     '?ts=' + Math.random() )
27             );
28     script.setAttribute("type", "text/javascript");
29     //script.setAttribute("id", trans.scriptId);
30     head.appendChild(script);
31      
32 )