function openInQTPlayer(url)
{

    var classid = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
    var codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=7,3,0,0';
    var pluginspage = 'http://www.apple.com/quicktime/download/';
    var src = 'tv.mov'
   
     if (-1 == url.indexOf("://"))
   {
       var pagePath = window.location.href.split('/');
       pagePath[pagePath.length - 1] = url;
       url = pagePath.join('/');
   }

  var movieContainer = document.createElement('div');
    movieContainer.style.visibility = "hidden";
    movieContainer.innerHTML = '<object width="1" height="1" classid="' + classid +'" codebase="' + codebase + '">' 
                        + '<param name="src" value="' + src + '">'
                        + '<param name="href" value="' + url + '">'
                        + '<param name="autohref" value="true">'
                        + '<param name="target" value="quicktimeplayer">'
                        + '<embed width="1" height="1" type="video/quicktime" pluginspage="' + pluginspage + '"'
                        + ' src="' + src + '" href="' + url + '" autohref="true" target="quicktimeplayer" >'
                        + '</object>';

    movieContainer.style.visibility = "visible";
    document.body.appendChild(movieContainer);

    // set a timeout to remove the movie container shortly
     setTimeout(function() { movieContainer.parentNode.removeChild(movieContainer); }, 10000);
}

function popup( id )
			{
				  var obj = document.getElementById( id );
				  var popup = document.getElementById( 'popup' );
				  if ( popup.style.visibility == 'visible' )
		    {
		   popup.style.visibility = 'hidden';
		 }
		 else
		 {
		   popup.style.left = obj.offsetLeft + "px";
		   popup.style.top = ( obj.offsetTop + 20 ) + "px";
		   popup.style.visibility = 'visible';
		 }
	   }