00001 var myState1 = 0; 00002 var myLayer = null; 00003 00004 function doSomething() 00005 { 00006 myState++; 00007 } 00008 00009 function init() 00010 { 00011 myLayer = workspace.addNewLayer('Point'); 00012 workspace.refresh(); 00013 } 00014 00015 // call to init() on file level, see SUJavaScript 00016 init();