	function showtab_(videoTabsId, videoTabsName) {
		var videoTabsCollection=document.getElementById(videoTabsId);
		videoTabsCollection.className='tab_'+videoTabsName+'_vis';
	}

	var incremented = false;
	var detach_url;
	
	function detach( anchor )
	{
	var pos = PlayerManager.getInstance().position();
	var url = detach_url==null ? anchor.href : detach_url;
	url += "?&position="+pos;
	window.open( url, "detach_video_player", "width=480, height=483, resizable=yes, channelmode=no, directories=no, fullscreen=no, location=no, menubar=no, scrollbars=no, status=no, titlebar=no, toolbar=no" );
	
	PlayerManager.getInstance().pause();
	
	return false;
	}
	
	function toggle_continuous( type, id )
	{
	increment = !increment;
	
	var openHref = $('#detacher').attr('href');
	detach_url = openHref;
	
	if( incremented ) increment_video();
	}
	
	function increment_video()
	{
	if( increment && NEXT_VIDEO !="" )
	{
	window.location.href = next_url;
	}
	incremented = true;
	}
	
	function video_page_ready()
	{
	detach_url = $('#detacher').attr("href");
	
	detach_url += "/"+CLIP_KEY;
	
	$('#detacher').click( function(){
	detach( this );
	return false;
	});
	
	PlayerManager.getInstance().add_listener( PlayerEvent.STOPPED, this, increment_video );
	}	
	
	function copy(inElement) {
	
	  var url_embed = document.cn_share.urlEmbed;
	  var video_embed = document.cn_share.videoEmbed;
	
	  if (inElement.createTextRange) {
	    var range = inElement.createTextRange();
	    if (range)
	      range.execCommand('Copy');
	  } else {
	    var flashcopier = 'flashcopier';
	    if(!document.getElementById(flashcopier)) {
	      var divholder = document.createElement('div');
	      divholder.id = flashcopier;
	      document.body.appendChild(divholder);
	    }
	    document.getElementById(flashcopier).innerHTML = '';
	    var divinfo = '<embed src="/sitewide/flash/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
	    document.getElementById(flashcopier).innerHTML = divinfo;
	  }
	}	
		
