function onClickFlashSmall(el, vidnum, vidcateg) {
  var xvid = 820, yvid = 462;
  return showFlash(el, vidnum, vidcateg, xvid, yvid)
}

function onClickFlash(el, vidnum, vidcateg) {
  var xvid = 1280, yvid = 720;
  return showFlash(el, vidnum, vidcateg, xvid, yvid);
}

function showFlash(el, vidnum, vidcateg, xvid, yvid) {
  var yplayercontrol = 18, xplaylist  = 200;
  width = xvid+xplaylist;
  height = yplayercontrol+yvid;

  var flashvideo =
  {
    outlineType: 'drop-shadow',
    dimmingOpacity : 0.5,
    easing : 'linearTween',    
    wrapperClassName: 'borderless-html',
    align: 'center',
    expandDuration: 200,
    preserveContent: false,
    transitions: ['expand', 'crossfade'],
    objectType: 'swf',
    allowSizeReduction: false,
    width: width,
    height: yvid,
    objectWidth: width,
    objectHeight: yvid,
    maincontentText: 'You need to upgrade your flash player',
    swfOptions: {version: '9',
      flashvars: {
        htmlK: vidnum,
        htmlCateg: vidcateg
      }, params: {
        menu: 'false',
        wmode: 'transparent',
        allowFullScreen: 'true',
        allowScriptAccess :'sameDomain',
        quality: 'high'
      }
    }
  }
  return  hs.htmlExpand(el, flashvideo );
}


/*
 * Setup ur a href like -
 *   <a href="http://www.youtube.com/watch?v=8kTroT-spxk" onclick="return onClickYouTube(this)" class="highslide"><img src="/images/buttons/youtube.png"></a>
 */
function onClickYouTube(el, cat, num) {
  el.target='_blank';
  return true; //stopped working for reason not understood so direct linking
  //720p: var xvid = 1280, yvid = 720, yplayercontrol = 25, xplaylist  = 0;
  //var xvid = 640, yvid = 360, yplayercontrol = 25, xplaylist  = 0;
  var xvid = 853, yvid = 480, yplayercontrol = 25, xplaylist  = 0;

  width = xvid+xplaylist;
  height = yplayercontrol+yvid;

  var flashvideo =
  {
    outlineType: 'drop-shadow',
    wrapperClassName: 'borderless-html',
    expandDuration: 200,
    preserveContent: false,
    transitions: ['expand', 'crossfade'],
    objectType: 'swf',
    allowSizeReduction: false,
    width: width,
    height: height,
    objectWidth: width,
    objectHeight: height,
    maincontentText: 'You need to upgrade your flash player',
    swfOptions: {version: '9',
      flashvars: {
        v: 'XDJOisd3CHg',
        rel: 0,
        fs:  1,
        hl:  'en_US',
        autoplay: 0
      }, params: {
        menu: 'false',
        wmode: 'transparent',
        allowFullScreen: 'true',
        allowScriptAccess :'always',
        quality: 'high'
      }
    }
  };
  return  hs.htmlExpand(el, flashvideo );
}


