//Support function: checks to see if target
//element is an object or embed element
function isObject(targetID){
   var isFound = false;
   var el = document.getElementById(targetID);
   if(el && (el.nodeName === "OBJECT" || el.nodeName === "EMBED")){
      isFound = true;
   }
   return isFound;
}
 
//Support function: creates an empty
//element to replace embedded SWF object
function replaceSwfWithEmptyDiv(targetID){
   var el = document.getElementById(targetID);
   if(el){
      var div = document.createElement("div");
      el.parentNode.insertBefore(div, el);
 
      //Remove the SWF
      swfobject.removeSWF(targetID);
 
      //Give the new DIV the old element's ID
      div.setAttribute("id", targetID);
   }
}
 
function loadSWF(url, targetID){
 
   //Check for existing SWF
   if(isObject(targetID)){
      //replace object/element with a new div
      replaceSwfWithEmptyDiv(targetID);
   }
 
   //Embed SWF
   if (swfobject.hasFlashPlayerVersion("7")) {
      var attributes = { data: url, width:"550", height:"400" };
      var params = {};
      var obj = swfobject.createSWF(attributes, params, targetID);
   }
}
function m1()
{
swfobject.addDomLoadEvent(function() {
                 
swfobject.removeSWF("home-trai11");
});
}
	function setVisible(obj, bool){

// see if it's a document id, if it's not, then it must be an obj reference
	if(typeof obj == "string")
		obj = document.getElementById(obj);

// if user chose false, then lets see if the obj needs to be hidden,
//and if it does, then hide it.
	
	if(bool == false){
		if(obj.style.visibility != 'hidden');
			obj.style.visibility = 'hidden';
		}

// the user chose true, or omitted the second parameter.
//see if the object is visible. If it isn't, the show it.

	else { 
		if(obj.style.visibility != 'visible');
		obj.style.visibility = 'visible';
	}
}


