
var replacementTagID;

var flashvars = {};
	flashvars.xmlFile = flashvarsXmlFile;
	flashvars.imagePath = "./images/";

var params = {};
	params.menu = "false";
	params.scale = "noscale";
	params.wmode = "transparent";
	params.allowscriptaccess = "always";

var attributes = {};
	attributes.id = replacementTagID;

function LoadSWF() {
	swfobject.embedSWF("oconomowoc.swf", replacementTagID, "258", "260", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
}


function isObject(targetID){
   var isFound = false;
   var el = document.getElementById(targetID);
   if(el && (el.nodeName === "OBJECT" || el.nodeName === "EMBED")){
     isFound = true;
   }
   return isFound;
}

function replaceSwfWithEmptyDiv(targetID){
   var el = document.getElementById(targetID);
   if(el){
      var div = document.createElement("div");
      el.parentNode.insertBefore(div, el);
      swfobject.removeSWF(targetID);
      div.setAttribute("id", targetID);
   }
}

function loadSWF(targetID){
   if(isObject(targetID))
      replaceSwfWithEmptyDiv(targetID);

	if (swfobject.hasFlashPlayerVersion("7"))
      LoadSWF();
}


		
function ChangeSource(newXmlFile) {
	flashvars.xmlFile = newXmlFile;
	loadSWF(replacementTagID);
}		
        

