function loadDevice(group, net, path, featured, feed){
   var container=document.getElementById("wealltvContainer");
   var currentFeed= (feed && feed!="") ? "&feed="+feed : "";
   var newDevice="";
   newDevice += "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' name='wealltv' width='710' height='510' align='middle' id='wealltv'>";
   newDevice += "<param name='allowScriptAccess' value='always' />";
   newDevice += "<param name='allowFullScreen' value='true' />";
   newDevice += "<param name='movie' value='http://www.weall.tv/device/wealltv.swf' />";
   newDevice += "<param name='quality' value='high' />";
   newDevice += "<param name='wmode' value='transparent' />";
   newDevice += "<param name='FlashVars' value='defaultGroup="+group+currentFeed+"&net="+net+"&path="+path+"' />";
   newDevice += "<embed src='http://www.weall.tv/device/wealltv.swf' width='710' height='510' align='middle' wmode='transparent' quality='high' name='wealltv' allowscriptaccess='always' allowfullscreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='defaultGroup="+group+currentFeed+"&net="+net+"&path="+path+"' />";
   newDevice += "</object>";	
   container.innerHTML=newDevice;

   //changeGroup("feature1", group, path);
   //changeGroup("feature2", group, path);
   //changeGroup("feature3", group, path); 
   for(var i=0; i<featured.length; i++){
	
   	createList("featCont"+(i+1), "feature"+(i+1), group, path, "titleCont"+(i+1),featured[i][0], featured[i][1]);
   }
}

function changeGroup(flashId, group, path){
  /*var isIE = navigator.appName.indexOf("Microsoft") != -1;
  var obj = (isIE) ? window[flashId] : document[flashId][1];

   if(obj){
      try{
         obj.setGroup(group, path);
         
      }catch(e){
      }
   }*/
   
}
function changeTitle(id, newTitle){
	var tempField=document.getElementById(id);
        if(tempField) tempField.innerHTML=newTitle;
}
function createList(containerId, id, group, path, title, titleName, orderBy){
	var container=document.getElementById(containerId);
	var swf="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='257' height='338' id='"+id+"' name='"+id+"'align='middle'><param name='FlashVars' value='defaultGroup="+group+"&path="+path+"&distribution=V&textPosition=R&skin=axn_featured&titleId="+title+"&titleName="+titleName+"&orderBy="+orderBy+"'/><param name='wmode' value='transparent' /><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='false' /><param name='movie' value='http://www.weall.tv/device/widgets/swf/band.swf' /><param name='quality' value='high' /><param name='bgcolor' value='#ffffff' /><embed wmode='transparent' id='"+id+"' name='"+id+"' src='http://www.weall.tv/device/widgets/swf/band.swf' quality='high' bgcolor='#ffffff' width='257' height='338' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' flashvars='defaultGroup="+group+"&path="+path+"&distribution=V&textPosition=R&skin=axn_featured&titleId="+title+"&titleName="+titleName+"&orderBy="+orderBy+"' pluginspage='http://www.adobe.com/go/getflashplayer' /></object>";
	container.innerHTML=swf;
}


