// JavaScript Document

  var oldDiv=null;
  var oldDivContents=null;
        function requestVideo(url,vidDiv,w,h) {
		 var oDiv = document.getElementById(vidDiv); 
		  if(oldDiv==null){
		    oldDiv = oDiv;
			oldDivContents = oDiv.innerHTML;
		  } else {
		  
		  
		     while (oldDiv.firstChild) 
         {
             //The list is LIVE so it will re-index each call
             oldDiv.removeChild(oldDiv.firstChild);
          }
		  
		    oldDiv.innerHTML = oldDivContents;
		    oldDiv = oDiv;
			oldDivContents = oDiv.innerHTML;
		  }
          
		  oFrame = document.createElement("iframe");
		  oFrame.src = url;
		  oFrame.id = "myFrame";
		  oFrame.style.width = w + "px";
		  oFrame.style.height = h + "px";
		  oFrame.style.overflow = "hidden";
		  oFrame.style.margin = "0";
		  oFrame.style.padding = "0";
		  oFrame.style.border = "none";
		  oFrame.scrolling = "no";
		  oFrame.frameBorder = "0";
		  while (oDiv.firstChild) 
         {
             //The list is LIVE so it will re-index each call
             oDiv.removeChild(oDiv.firstChild);
          }

		  oDiv.appendChild(oFrame);
		  
		    
		  
        }
