// centered window pop

var win = null;
function CenteredWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}


function loadSWF(url){
  swfobject.embedSWF(url, "flashcontent", "227", "182", "8");

}

//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("8")) {
   
      var attributes = { data: url, width:"227", height:"182" };
      var params = {};
      var obj = swfobject.createSWF(attributes, params, targetID);
   
   }
   
}


function loadSmSWF(url){
  swfobject.embedSWF(url, "flashcontent", "227", "182", "8");

}
//Support function: checks to see if target
//element is an object or embed element



function loadSmSWF(url, targetID){

   //Check for existing SWF
   if(isObject(targetID)){
   
      //replace object/element with a new div
      replaceSwfWithEmptyDiv(targetID);
      
   }
     
   //Embed SWF
   if (swfobject.hasFlashPlayerVersion("8")) {
   
      var attributes = { data: url, width:"227", height:"182" };
      var params = {};
      var obj = swfobject.createSWF(attributes, params, targetID);
   
   }
   
}