function fpv_ShowVideo(_1){
fullPlaylistClipIdArray = fullPlaylistClipIds.split(",");
elementIndexVal = fullPlaylistClipIdArray.indexOf(_1,0);
if(elementIndexVal!=-1){
fullPlaylistClipIdArray.splice(elementIndexVal,1);
}
finalPlayList = fullPlaylistClipIdArray.join(",");
finalPlayList = _1+","+finalPlayList;
so.addVariable("clipPlaylist", finalPlayList );
so.write("videoplayer");
if($("objectTag")){
objectTagvalue = $("objectTag").value;
updatedtagValue=objectTagvalue.replace($("loadedClipId").value,_1);
updatedtagValue=updatedtagValue.replace($("loadedClipId").value,_1);
if( typeof document.getElementById("objectTag") != "undefined"){
ObjectTaghtml='<input id="objectTag" name="objectTag" type="text" style="width:300px;" value=\''+updatedtagValue+'\'/>';
document.getElementById("objectTagDiv").innerHTML = ObjectTaghtml;
}
$("loadedClipId").value=_1;
}
/*if(embeddedPlayerManager.getPlayer().isPlayingAd==true||(typeof embeddedPlayerManager.getPlayer().isPlayingAd!="boolean"&&embeddedPlayerManager.getPlayer().isPlayingAd())){
alert(adPlayingMessage);
return;
}*/
if(!ShowVideoReloadPage){
nextVideoPlaylistDriven=false;
fpv_ShowVideoDyn(_1);
location.href="#videoid="+_1;
}else{
window.location.href="http://"+document.domain+"/player/?id="+_1;
}
}

function updateShareIcons(url,title,desc){ 
   var addthisparams = 'url='+url+'&title='+escape(title)+'&description='+escape(desc)+'&username=ankur79';
   var sharehtml = '<div class="addthis_toolbox addthis_default_style" style="padding-top:10px;padding-bottom:15px;">'; 
   sharehtml = sharehtml + 'SHARE:';
   sharehtml = sharehtml + '<div><a style="float:left;margin-right:3px;text-decoration:none;" class="addthis_button_email" target="_blank" href ="http://api.addthis.com/oexchange/0.8/forward/email/offer?'+addthisparams+'"><img style="border:none;" src="http://widgets.nbcuni.com/addthis/icons/email21.png"/></a></div> ';
   sharehtml = sharehtml + '<div><a style="float:left;margin-right:3px;text-decoration:none;" class="addthis_button_twitter" target="_blank" href ="http://api.addthis.com/oexchange/0.8/forward/twitter/offer?'+addthisparams+'"><img style="border:none;" src="http://widgets.nbcuni.com/addthis/icons/twitter21.png"/></a></div> ';
   sharehtml = sharehtml + '<div><a style="float:left;margin-right:3px;text-decoration:none;" class="addthis_button_facebook" target="_blank" href ="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?'+addthisparams+'"><img style="border:none;" src="http://widgets.nbcuni.com/addthis/icons/facebook21.png"/></a></div>'; 
   sharehtml = sharehtml + '<div><a style="float:left;margin-right:3px;text-decoration:none;" class="addthis_button_myspace" target="_blank" href ="http://api.addthis.com/oexchange/0.8/forward/myspace/offer?'+addthisparams+'"><img style="border:none;" src="http://widgets.nbcuni.com/addthis/icons/myspace21.png"/></a></div> ';
   sharehtml = sharehtml + '<div><a style="float:left;margin-right:3px;text-decoration:none;" class="addthis_button_digg" target="_blank" href ="http://api.addthis.com/oexchange/0.8/forward/digg/offer?'+addthisparams+'"><img style="border:none;" src="http://widgets.nbcuni.com/addthis/icons/digg21.png"/></a></div> ';
   sharehtml = sharehtml + '<div><a style="float:left;margin-right:3px;text-decoration:none;" class="addthis_button_expanded" target="_blank" href ="http://api.addthis.com/oexchange/0.8/offer?'+addthisparams+'"><img  src="http://widgets.nbcuni.com/addthis/icons/more21.png" style="margin-right:4px;border:none;"/>More...</a></div>'; 
   sharehtml = sharehtml + '</div>';
   $('addThisDiv').innerHTML = sharehtml;
}


function fpv_ShowVideoDyn(_2){
var _3=FPV_SERVICES_BASE+"more_video/getmorevideowsdl.php";
var pl=new SOAPClientParameters();
pl.add("clip_id",_2);
pl.add("infoPanelThumb_w",infoPanelThumb_w);
pl.add("infoPanelThumb_h",infoPanelThumb_h);
pl.add("defaultFolder",defaultFolder);
pl.add("nusoap_gateway",FPV_SERVICES_BASE+"more_video/nusoap_gateway.php");
var r=SOAPClient.invoke(_3,"getFolderByClip",pl,true,fpv_ShowVideoDyn_callback);
videoID=_2;
}
function fpv_DisplayAssociatedData(){
}
function fpv_ShowVideoDyn_callback(r){
videoID=(r.metadata).id;
if(!r){
alert("ERROR: Cannot get video data...");
}else{
var _7=r.folder_id;
var _8=r.network_id;
var _9=r.metadata;
var _a=_9.name;
var _b=_9.subtitle;
var _c=_9.long_description?_9.long_description:_9.description;
var _d=_9.schedule;
var _e=_9.thumb_large;
var _f="";
var _10=_9.buy_url;
var _11=_9.buy_url_text;
var _12=_9.related_url;
var _13=_9.related_url_text;
var _14=_9.copyright;
var _15=_9.config_file;
var _16=_9.mezz_result_path;
var _17=_9.show_comments;
var _18=_9.is_widgetable;
var _19=_9.mature_content;
var _1a=_9.editorial_tags;
updateShareIcons("http://"+document.domain+"/player/?id="+videoID,_a,_c);
if(_15!=fpv_currentConfigFile){
window.location.href="http://"+document.domain+"/player/?id="+videoID;
return;
}
//embeddedPlayerManager.getPlayer().pause();
folderID=_7;
document.title=PageTitleFormat.replace("%t",_a);
if(!nextVideoPlaylistDriven){
if(MatureContentEnabled&&_19&&!fpv_matureCheckCookie()){
//embeddedPlayerManager.getPlayer().pause();
//embeddedPlayerManager.getPlayer().rewind();
fpv_matureCheckShow(videoID);
}else{
//embeddedPlayerManager.getPlayer().playVideo(videoID);
}
nextVideoPlaylistDriven=true;
}
if($("fpv_clipTitleDT")){
$("fpv_clipTitleDT").innerHTML="";
$("fpv_clipTitleDT").style.display="none";
}
if($("fpv_clipSubTitleDD")){
$("fpv_clipSubTitleDD").innerHTML="";
$("fpv_clipSubTitleDD").style.display="none";
}
if($("fpv_clipDescDD")){
$("fpv_clipDescDD").innerHTML="";
$("fpv_clipDescDD").style.display="none";
}
if($("fpv_clipAirtimeDD")){
$("fpv_clipAirtimeDD").innerHTML="";
$("fpv_clipAirtimeDD").style.display="none";
}
if($("fpv_clipRelatedURLDD")){
$("fpv_clipRelatedURLDD").innerHTML="";
$("fpv_clipRelatedURLDD").style.display="none";
}
if($("fpv_btnBUY")){
$("fpv_btnBUY").value="";
$("fpv_btnBUY").onclick=function(){
return;
};
$("fpv_btnBUY").style.display="none";
}
if($("fpv_btnWidget")){
$("fpv_btnWidget").onclick=function(){
return;
};
$("fpv_btnWidget").style.display="none";
}
if($("fpv_clipEditorialTagsDD")){
$("fpv_clipEditorialTagsDD").innerHTML="";
$("fpv_clipEditorialTagsDD").style.display="none";
}
if($("fpv_clipTitleDT")&&_a){
$("fpv_clipTitleDT").innerHTML=_a;
$("fpv_clipTitleDT").style.display="block";
}
if($("fpv_clipSubTitleDD")&&_b){
$("fpv_clipSubTitleDD").innerHTML=_b;
$("fpv_clipSubTitleDD").style.display="block";
}
if($("fpv_clipDescDD")&&_c){
$("fpv_clipDescDD").innerHTML=_c;
$("fpv_clipDescDD").style.display="block";
}
if($("fpv_clipAirtimeDD")&&_d){
$("fpv_clipAirtimeDD").innerHTML=_d;
$("fpv_clipAirtimeDD").style.display="block";
}
if($("fpv_clipRelatedURLDD")&&_12){
$("fpv_clipRelatedURLDD").innerHTML="<a href=\""+_12+"\" target=\"_blank\"><span>"+(_13?_13:_12)+"</span></a>";
$("fpv_clipRelatedURLDD").style.display="block";
}
if($("fpv_txtURL")){
var _1b=$("fpv_txtURL").value;
var _1c=_1b.replace(/id=(\d{1,9})/,"id="+videoID);
$("fpv_txtURL").value=_1c;
}
if($("fpv_btnBUY")&&_11){
$("fpv_btnBUY").value=_11;
$("fpv_btnBUY").onclick=function(){
fpv_targetBlank(_10);
};
$("fpv_btnBUY").style.display="block";
}
if($("fpv_btnWidget")&&_18){
$("fpv_btnWidget").onclick=function(){
eval(WidgetFunction);
};
$("fpv_btnWidget").style.display="";
}
if($("fpv_clipEditorialTagsDD")&&_1a){
var _1d=_1a.split(",");
for(var q=0;q<_1d.length;q++){
$("fpv_clipEditorialTagsDD").innerHTML+="<a href=\"javascript:searchByEditorialTag('"+_1d[q]+"');\">"+_1d[q]+"</a>";
if(q+1<_1d.length){
$("fpv_clipEditorialTagsDD").innerHTML+=", ";
}
}
$("fpv_clipEditorialTagsDD").style.display="block";
}
if($("fpv_thisClipThumb")){
$("fpv_thisClipThumb").src=_16+((_16.indexOf("image.php")==-1)?"":("&default="+IMAGE_PREFIX+_e));
}
if(!MultipleNavEnabled&&(!MoreVideoTabsEnabled||!MoreVideoTabsV2)){
if(NavPaginateEnabled=="1"){
fpv_ServiceGetPaginatedFoldersClipsByClipid(folderID);
}else{
fpv_ServiceGetFoldersClips(folderID);
}
}
fpv_ServiceGetRating(videoID);
blnHasRated=false;
fpv_CheckHasRated();
if(document.frmComments&&document.frmComments.hdnDynamicPostID){
document.frmComments.hdnDynamicPostID.value=0;
}
if($("fpv_commentMessage")){
fpv_ClearInlineMessage("fpv_commentMessage","fpv_strCommentMessageContents");
}
if($("fpv_stfMessage")){
fpv_ClearInlineMessage("fpv_stfMessage","fpv_stfMessageContents");
}
commentsNumPages=0;
if(_17){
setCommentsAllowed(true);
var _1f="<div id=\"fpv_commentsProgress\" class=\"commentProgressBarArea\"><img src=\""+commentProgressBarImg+"\" class=\"commentProgressBarImg\"></div>";
$("fpv_uiComments").innerHTML=_1f;
fpv_LoadComments();
}else{
setCommentsAllowed(false);
$("fpv_uiComments").innerHTML=CommentNotAllowedMessage;
}
if(objAccordNav){
objAccordNav.showTabByIndex(0);
}
if(MultipleNavEnabled){
for(var i=0;i<MultipleNavIDs.length;i++){
if(r.folder_path.indexOf("/"+MultipleNavIDs[i])!=-1){
objMostWatchedAccord.showTabByIndex(i);
fpv_ServiceGetPaginatedFoldersClipsByClipid(folderID,"_suffix"+(i+1));
}
}
}
if(MoreVideoTabsEnabled&&MoreVideoTabsV2){
for(var i=0;i<NavTabIDs.length;i++){
if(r.folder_path.indexOf("/"+NavTabIDs[i])!=-1){
fpv_tabBoxTabs1.TabClick(i,true);
fpv_ServiceGetPaginatedFoldersClipsByClipid(folderID);
}
}
}
if(PlaylistEnabled){
fpv_ServiceGetPlaylist(videoID);
}
}
var ri=embeddedPlayerManager.getPlayer();
ri.pause();
}

