
function init() {
 if (DetectFlashVer(8,0,0)) {
  document.getElementById('base').className='flashenabled';
 } else {
  document.write('<style type="text/css">.flashfallback {display:block !important;}</style>');
 }
}

function runflash(movie, w, h, alternative) {

 if (DetectFlashVer(8,0,0)) {
  AC_FL_RunContent(
   'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
   'width', w,
   'height', h,
   'src', movie.replace(/\.swf/,''),
   'quality', 'high',
   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
   'align', 'middle',
   'play', 'true',
   'loop', 'true',
   'scale', 'showall',
   'wmode', 'transparent',
   'devicefont', 'false',
   'id', '',
   'bgcolor', '#f6fbfe',
   'name', '',
   'menu', 'false',
   'allowFullScreen', 'false',
   'allowScriptAccess','sameDomain',
   'movie', movie.replace(/\.swf/,''),
   'salign', ''
  );
 } else {
  if (alternative) {
   document.write('<img src="'+alternative+'" alt="" width="'+w+'" height="'+h+'" style="display:block;" />');
  }
 }

}


function getPos(obj, stopclass) {
 if (!stopclass) stopclass='#';
 var coord={x:obj.offsetLeft, y:obj.offsetTop};
 while (obj = obj.offsetParent) {
  if (obj.className == stopclass || obj.id == stopclass) return coord;
  coord.x += obj.offsetLeft;
  coord.y += obj.offsetTop;
 }
 return coord;
}
function killEvent(e) {
 if (! e) e = window.event;
 e.returnValue=false;
 e.cancelBubble=true;
 if (e.stopPropagation) e.stopPropagation();
 if (e.preventDefault) e.preventDefault();
 return false;
}
