// function that are (or may be) used by several scripts
function flashV() {
   var v = 0;
   if (FlashDetect.installed) {
      v = FlashDetect.major + '.' + FlashDetect.minor;
      }
   return v;
   }

function murderChildren(node) {
   if (node.hasChildNodes()) {
      while (node.childNodes.length >= 1) {
         node.removeChild(node.firstChild);
         }
      }
   }
   
function murderChildrenById(xmlid) {
   var myNode = document.getElementById(xmlid);
   murderChildren(myNode);
   }
   
function detectAttachMethod() {
   var method = 'unknown';
   var foo = document.getElementsByTagName('body')[0];
   if (foo.addEventListener) {
      method = 'w3c';
      } else if (foo.attachEvent) {
      method = 'ie';
      }
   return method;
   }
   
function detectEmbedMethod() {
   var method = 'flow';
   var foo = document.createElement('video');
   if (foo.canPlayType) {
      method = 'html5';
      }
   return method;
   }

function addSelectOption(mySelect,myvalue,mystring,isselected) {
   var newSelectOption = document.createElement("option");
   newSelectOption.setAttribute("value",myvalue);
   if (isselected) {
      newSelectOption.setAttribute("selected","selected");
      }
   newSelectText=document.createTextNode(mystring);
   newSelectOption.appendChild(newSelectText);
   mySelect.appendChild(newSelectOption);
   }
   
function detectCanvas() {
   return !!document.createElement('canvas').getContext;
   }
   
// WOM
function womOn(){
	window.onload = womGo;
}

function womGo(){
	for(var i = 0;i < woms.length;i++)
		eval(woms[i]);
}

function womAdd(func){
	woms[woms.length] = func;
}

var woms = new Array();
