var stfShowStatus=0;
var mostAccordionWithSTF="";
function fpv_icueSTF(_1){
document.body.style.cursor="wait";
var _2=SERVICES_BASE+"sendtofriend/sendtofriendwsdl.php";
var pl=new SOAPClientParameters();
pl.add("personID",HC_PERSONID);
pl.add("clipID",videoID);
pl.add("clipName",$("fpv_clipTitleDT").innerHTML);
pl.add("clipThumb","http://www.google.com/images/logo.gif");
var r=SOAPClient.invoke(_2,"icueAssociatePersonClip",pl,true,fpv_icueSTF_callback);
}
function fpv_icueSTF_callback(r){
document.body.style.cursor="auto";
var _6=r.response;
if(_6==404){
alert("Identification not found. Please login.");
}else{
if(_6==201){
alert("Clip added to Resources.");
}else{
alert("Internal error. Please contact technical support.");
}
}
}
function fpv_STF(_7){
if(fpv_ValidateSTF()){
document.body.style.cursor="wait";
_7.disabled=true;
var _8=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelSendingColor").color);
fpv_ShowInlineMessage("fpv_stfMessage","fpv_stfMessageContents",stfMsgSending,_8,true);
var _9=SERVICES_BASE+"sendtofriend/sendtofriendwsdl.php";
var pl=new SOAPClientParameters();
pl.add("siteID",siteID);
pl.add("clipID",videoID);
pl.add("senderName",document.frmSTF.txtSTFName.value);
pl.add("senderEmail",document.frmSTF.txtSTFEmail.value);
pl.add("recipientEmail",document.frmSTF.txtSTFFriendsEmail.value);
pl.add("recipientMessage",document.frmSTF.txtSTFMessage.value);
var r=SOAPClient.invoke(_9,"sendToFriend",pl,true,fpv_STF_callback);
if(document.frmSTF.radRemember){
if(document.frmSTF.radRemember[0].checked){
var _c=document.frmSTF.txtSTFName.value+"|"+document.frmSTF.txtSTFEmail.value;
fpv_createCookie(stfCookieName,_c,365*3);
}else{
if(document.frmSTF.radRemember[1].checked){
var _c="";
fpv_createCookie(stfCookieName,_c,-1);
}
}
}
}
if(stfRoundMsgCorners=="1"){
if(!msgRound_stf){
var _d=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanel").backgroundColor);
var _e=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelBG").backgroundColor);
eval("new Rico.Effect.Round(\"div\", \"fpv_stfMessagePanel\", {color:'"+_d+"', bgColor:'"+_e+"'})");
msgRound_stf=true;
}
}
}
function fpv_STF_callback(r){
var _10="";
var _11="";
if(!r){
_10=stfMsgFailure;
_11=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelFailureColor").color);
}else{
if(r.response=="success"){
eval(EventSTFSubmit);
_10=stfMsgSuccess;
_11=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelSuccessColor").color);
}else{
_10=r.response;
_11=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelFailureColor").color);
}
}
fpv_ShowInlineMessage("fpv_stfMessage","fpv_stfMessageContents",_10,_11,false);
document.frmSTF.btnSTFSubmit.disabled=false;
if(stfRoundMsgCorners=="1"){
if(!msgRound_stf){
var _12=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanel").backgroundColor);
var _13=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelBG").backgroundColor);
eval("new Rico.Effect.Round(\"div\", \"fpv_stfMessagePanel\", {color:'"+_12+"', bgColor:'"+_13+"'})");
msgRound_stf=true;
}
}
document.body.style.cursor="auto";
}
var blnSTFPanelEngaged=false;
var closeButtonSTF="<img border=\"0\" onclick=\"fpv_CloseSTFPanel()\" src=\""+stfAccordionCloseBtnImg+"\" class=\"fpv_closeBtn\" alt=\"Close\" />";
function fpv_CloseSTFPanel(){
if(STFTargetAccordion=="BLOCK"){
return fpv_CloseSTFBlock();
}
if(STFTargetAccordion=="MOST"){
return fpv_CloseSTFPanelMost();
}
if(blnSearchPanelEngaged&&SearchTargetAccordion=="NAV"){
var _14=$("fpv_navPanel").innerHTML;
var _15=$("fpv_searchPanel").innerHTML;
var _16="<div id=\"fpv_navPanel\">"+_14+"</div><div id=\"fpv_searchPanel\">"+_15+"</div>";
}else{
var _16="<div id=\"fpv_navPanel\"><div id=\"fpv_navPanelContent\">"+$("fpv_navPanelContent").innerHTML+"</div></div>";
}
$("fpv_uiRelatedVideoAccordion").innerHTML=_16;
if(blnSearchPanelEngaged&&SearchTargetAccordion=="NAV"){
if(document.all){
var _17=fpv_removepx(fpv_getStyleBySelector("div#fpv_uiPage div.fpv_twoTier div#fpv_stfPanelContent").height);
}else{
var _17=fpv_removepx(fpv_getStyleBySelector("div#fpv_uiPage div.fpv_twoTier div#fpv_navPanelContent, div#fpv_uiPage div.fpv_twoTier div#fpv_panelSearchContent, div#fpv_uiPage div.fpv_twoTier div#fpv_stfPanelContent").height);
}
objAccordNav=new Rico.Accordion($("fpv_uiRelatedVideoAccordion"),{panelHeight:_17,expandedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").color),expandedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").fontWeight,expandedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").backgroundColor),collapsedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").backgroundColor),collapsedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").color),collapsedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").fontWeight,hoverBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").backgroundColor),hoverTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").color)});
objAccordNav.showTabByIndex(1);
}
blnSTFPanelEngaged=false;
if(blnSearchPanelEngaged&&SearchTargetAccordion=="NAV"){
$("fpv_uiRelatedVideoAccordion").className="fpv_accordionStyles fpv_twoTier";
}else{
$("fpv_uiRelatedVideoAccordion").className="fpv_accordionStyles fpv_oneTier";
objAccordNav=null;
}
}
function fpv_CloseSTFPanelMost(){
if(blnSearchPanelEngaged&&SearchTargetAccordion=="MOST"){
var _18=$("fpv_panelSearchContentResults").innerHTML;
$("fpv_videoMostaccordion").innerHTML=mostAccordionWithSearch;
$("fpv_panelSearchContentResults").innerHTML=_18;
}else{
$("fpv_videoMostaccordion").innerHTML=mostAccordionOriginal;
}
objMostWatchedAccord=new Rico.Accordion($("fpv_videoMostaccordion"),{panelHeight:fpv_removepx(fpv_getStyleBySelector(".fpv_accordionControlStyle").height),expandedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").color),expandedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").fontWeight,expandedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").backgroundColor),collapsedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").backgroundColor),collapsedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").color),collapsedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").fontWeight,hoverBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").backgroundColor),hoverTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").color)});
if(blnSearchPanelEngaged&&SearchTargetAccordion=="MOST"&&!SearchTopmostPanel){
objMostWatchedAccord.showTabByIndex(objMostWatchedAccord.accordionTabs.length-1);
}else{
objMostWatchedAccord.showTabByIndex(0);
}
blnSTFPanelEngaged=false;
if(blnSearchPanelEngaged&&SearchTargetAccordion=="MOST"){
mostRecentPanel="Search";
}else{
mostRecentPanel="";
}
}
function fpv_ShowSTFv2(){
if(STFTargetAccordion=="BLOCK"){
return fpv_ShowSTFv2Block();
}
if(STFTargetAccordion=="NAV"&&MoreVideoTabsEnabled&&MoreVideoTabsV2){
return fpv_ShowSTFv2Tabs();
}
if(STFTargetAccordion=="MOST"){
return fpv_ShowSTFv2Most();
}
if(!blnSTFPanelEngaged){
blnSTFPanelEngaged=true;
var _19=$("fpv_navPanelContent").innerHTML;
$("fpv_uiRelatedVideoAccordion").className="fpv_accordionStyles fpv_twoTier";
var _1a="";
if(!blnSearchPanelEngaged||SearchTargetAccordion!="NAV"){
_1a+="<div id=\"fpv_navPanel\">";
_1a+="  <div id=\"fpv_navPanelHeader\"><h3>"+MoreVideoAccordionHeader+"</h3></div>";
_1a+="  <div id=\"fpv_navPanelContent\">"+_19+"</div>";
_1a+="</div>";
}else{
var _1b=$("fpv_navPanel").innerHTML;
var _1c=$("fpv_searchPanel").innerHTML;
_1a="<div id=\"fpv_navPanel\">"+_1b+"</div><div id=\"fpv_searchPanel\">"+_1c+"</div>";
$("fpv_uiRelatedVideoAccordion").className="fpv_accordionStyles fpv_threeTier";
}
_1a+="<div id=\"fpv_stfPanel\">";
_1a+="  <div id=\"fpv_stfPanelHeader\"><h3>"+STFAccordionHeader+"</h3>"+closeButtonSTF+"</div>";
_1a+="  <div id=\"fpv_stfPanelContent\">";
_1a+="    <form id=\"frmSTF\" name=\"frmSTF\" onSubmit=\"fpv_STF(document.frmSTF.btnSTFSubmit); return false;\">";
_1a+="    <div id=\"fpv_stfMessage\" class=\"fpv_stfMessagePanel\"><div id=\"fpv_stfMessageContents\" class=\"fpv_stfMessagePanelContents\"></div></div>\n\n";
_1a+="    <fieldset>\n";
_1a+="      <legend>Send video to friend</legend>\n";
var _1d=fpv_readCookie(stfCookieName);
var _1e="";
var _1f="";
if(_1d){
var _20=_1d.split("|");
_1e=_20[0];
_1f=_20[1];
}
if(arySTFFieldConfig[0][0]=="1"){
_1a+="    <div id=\"fpv_stfName\">\n";
_1a+="    <label for=\"fpv_stfInputYourName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[0][1]+"</label>\n";
_1a+="    <input type=\"text\" name=\"txtSTFName\" value=\""+_1e+"\" class=\"fpv_stfInputYourName\" id=\"fpv_stfInputYourName\"><br />\n";
_1a+="    </div>\n";
}
if(arySTFFieldConfig[1][0]=="1"){
_1a+="    <div id=\"fpv_stfEmail\">\n";
_1a+="    <label for=\"fpv_stfInputYourEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[1][1]+"</label>\n";
_1a+="    <input type=\"text\" name=\"txtSTFEmail\" value=\""+_1f+"\" class=\"fpv_stfInputYourEmail\" id=\"fpv_stfInputYourEmail\"><br />\n";
_1a+="    </div>\n";
}
if(arySTFFieldConfig[2][0]=="1"){
_1a+="    <div id=\"fpv_stfRememberRadios\">\n";
_1a+="    <span class=\"fpv_stfLabel\">"+arySTFFieldConfig[2][1]+"</span><br /><label for=\"fpv_radRememberSTFYes\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFYes\" value=\"1\">"+arySTFFieldConfig[2][2]+"</label>\n";
_1a+="    <label for=\"fpv_radRememberSTFNo\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFNo\" value=\"0\">"+arySTFFieldConfig[2][3]+"</label><br />\n";
_1a+="    </div>\n";
}
if(arySTFFieldConfig[3][0]=="1"){
_1a+="    <div id=\"fpv_stfFriendName\">\n";
_1a+="    <label for=\"fpv_stfInputYourFName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[3][1]+"</label>\n";
_1a+="    <input type=\"text\" name=\"txtSTFFriendsName\" value=\"\" class=\"fpv_stfInputYourFName\" id=\"fpv_stfInputYourFName\"><br />\n";
_1a+="    </div>\n";
}
if(arySTFFieldConfig[4][0]=="1"){
_1a+="    <div id=\"fpv_stfFriendEmail\">\n";
_1a+="    <label for=\"fpv_stfInputYourFEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[4][1]+"</label>\n";
_1a+="    <input type=\"text\" name=\"txtSTFFriendsEmail\" value=\"\" class=\"fpv_stfInputYourFEmail\" id=\"fpv_stfInputYourFEmail\"><br />\n";
_1a+="    </div>\n";
}
if(arySTFFieldConfig[5][0]=="1"){
_1a+="    <div id=\"fpv_stfTextarea\">\n";
_1a+="    <label for=\"fpv_stfInputMessage\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[5][1]+"</label>\n";
_1a+="    <textarea name=\"txtSTFMessage\" class=\"fpv_stfInputMessage\" name=\"txtSTFMessage\" rows=\"3\" cols=\"30\">"+arySTFFieldConfig[5][2]+"</textarea><br />\n";
_1a+="    </div>\n";
}
_1a+="    <span id=\"fpv_stfSubmitBtn\">\n";
_1a+="    <input type=\"button\" name=\"btnSTFSubmit\" id=\"fpv_stfSubmit\" value=\"Send\" class=\"fpv_buttonFormat fpv_stfButtons\" onClick=\"fpv_STF(this)\">\n";
_1a+="    </span>\n";
_1a+="    <span id=\"fpv_stfCancelBtn\">\n";
_1a+="    <input type=\"button\" name=\"btnSTFCancel\" id=\"fpv_stfCancel\" value=\"Cancel\" onClick=\"fpv_CloseSTFPanel()\" class=\"fpv_buttonFormat fpv_stfButtons\">\n";
_1a+="    </span>\n";
_1a+="    </fieldset>\n\n";
_1a+="    </form>";
_1a+="  </div>";
_1a+="</div>";
$("fpv_uiRelatedVideoAccordion").innerHTML=_1a;
if(document.all){
if(blnSearchPanelEngaged&&SearchTargetAccordion=="NAV"){
var _21=fpv_removepx(fpv_getStyleBySelector("div#fpv_uiPage div.fpv_threeTier div#fpv_navPanelContent").height);
}else{
var _21=fpv_removepx(fpv_getStyleBySelector("div#fpv_uiPage div.fpv_twoTier div#fpv_stfPanelContent").height);
}
}else{
if(blnSearchPanelEngaged&&SearchTargetAccordion=="NAV"){
var _21=fpv_removepx(fpv_getStyleBySelector("div#fpv_uiPage div.fpv_threeTier div#fpv_navPanelContent, div#fpv_uiPage div.fpv_threeTier div#fpv_panelSearchContent, div#fpv_uiPage div.fpv_threeTier div#fpv_stfPanelContent").height);
}else{
var _21=fpv_removepx(fpv_getStyleBySelector("div#fpv_uiPage div.fpv_twoTier div#fpv_navPanelContent, div#fpv_uiPage div.fpv_twoTier div#fpv_panelSearchContent, div#fpv_uiPage div.fpv_twoTier div#fpv_stfPanelContent").height);
}
}
objAccordNav=new Rico.Accordion($("fpv_uiRelatedVideoAccordion"),{panelHeight:_21,expandedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").color),expandedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").fontWeight,expandedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").backgroundColor),collapsedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").backgroundColor),collapsedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").color),collapsedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").fontWeight,hoverBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").backgroundColor),hoverTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").color)});
objAccordNav.showTabByIndex(objAccordNav.accordionTabs.length-1);
}
}
function fpv_ShowSTFv2Most(){
if(!blnSTFPanelEngaged){
blnSTFPanelEngaged=true;
mostRecentPanel="STF";
var _22="";
if(!STFTopmostPanel){
_22+=(!blnSearchPanelEngaged||SearchTargetAccordion!="MOST")?mostAccordionOriginal:mostAccordionWithSearch;
}
_22+="<div id=\"fpv_stfPanel\">";
_22+="  <div id=\"fpv_stfPanelHeader\"><h3>"+STFAccordionHeader+"</h3>"+closeButtonSTF+"</div>";
_22+="  <div id=\"fpv_stfPanelContent\">";
_22+="    <form id=\"frmSTF\" name=\"frmSTF\" onSubmit=\"fpv_STF(document.frmSTF.btnSTFSubmit); return false;\">";
_22+="    <div id=\"fpv_stfMessage\" class=\"fpv_stfMessagePanel\"><div id=\"fpv_stfMessageContents\" class=\"fpv_stfMessagePanelContents\"></div></div>";
_22+="    <fieldset>";
_22+="      <legend>Send video to friend</legend>";
var _23=fpv_readCookie(stfCookieName);
var _24="";
var _25="";
if(_23){
var _26=_23.split("|");
_24=_26[0];
_25=_26[1];
}
if(arySTFFieldConfig[0][0]=="1"){
_22+="    <div id=\"fpv_stfName\">\n";
_22+="    <label for=\"fpv_stfInputYourName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[0][1]+"</label>";
_22+="    <input type=\"text\" name=\"txtSTFName\" value=\""+_24+"\" class=\"fpv_stfInputYourName\" id=\"fpv_stfInputYourName\"><br />";
_22+="    </div>\n";
}
if(arySTFFieldConfig[1][0]=="1"){
_22+="    <div id=\"fpv_stfEmail\">\n";
_22+="    <label for=\"fpv_stfInputYourEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[1][1]+"</label>";
_22+="    <input type=\"text\" name=\"txtSTFEmail\" value=\""+_25+"\" class=\"fpv_stfInputYourEmail\" id=\"fpv_stfInputYourEmail\"><br />";
_22+="    </div>\n";
}
if(arySTFFieldConfig[2][0]=="1"){
_22+="    <div id=\"fpv_stfRememberRadios\">\n";
_22+="    <span class=\"fpv_stfLabel\">"+arySTFFieldConfig[2][1]+"</span><br /><label for=\"fpv_radRememberSTFYes\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFYes\" value=\"1\">"+arySTFFieldConfig[2][2]+"</label>";
_22+="    <label for=\"fpv_radRememberSTFNo\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFNo\" value=\"0\">"+arySTFFieldConfig[2][3]+"</label><br />";
_22+="    </div>\n";
}
if(arySTFFieldConfig[3][0]=="1"){
_22+="    <div id=\"fpv_stfFriendName\">\n";
_22+="    <label for=\"fpv_stfInputYourFName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[3][1]+"</label>";
_22+="    <input type=\"text\" name=\"txtSTFFriendsName\" value=\"\" class=\"fpv_stfInputYourFName\" id=\"fpv_stfInputYourFName\"><br />";
_22+="    </div>\n";
}
if(arySTFFieldConfig[4][0]=="1"){
_22+="    <div id=\"fpv_stfFriendEmail\">\n";
_22+="    <label for=\"fpv_stfInputYourFEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[4][1]+"</label>";
_22+="    <input type=\"text\" name=\"txtSTFFriendsEmail\" value=\"\" class=\"fpv_stfInputYourFEmail\" id=\"fpv_stfInputYourFEmail\"><br />";
_22+="    </div>\n";
}
if(arySTFFieldConfig[5][0]=="1"){
_22+="    <div id=\"fpv_stfTextarea\">\n";
_22+="    <label for=\"fpv_stfInputMessage\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[5][1]+"</label>";
_22+="    <textarea name=\"txtSTFMessage\" class=\"fpv_stfInputMessage\" name=\"txtSTFMessage\" rows=\"3\" cols=\"30\">"+arySTFFieldConfig[5][2]+"</textarea><br />";
_22+="    </div>\n";
}
_22+="    <span id=\"fpv_stfSubmitBtn\">\n";
_22+="    <input type=\"button\" name=\"btnSTFSubmit\" id=\"fpv_stfSubmit\" value=\"Send\" class=\"fpv_buttonFormat fpv_stfButtons\" onClick=\"fpv_STF(this)\">\n";
_22+="    </span>\n";
_22+="    <span id=\"fpv_stfCancelBtn\">\n";
_22+="    <input type=\"button\" name=\"btnSTFCancel\" id=\"fpv_stfCancel\" value=\"Cancel\" onClick=\"fpv_CloseSTFPanel()\" class=\"fpv_buttonFormat fpv_stfButtons\">\n";
_22+="    </span>\n";
_22+="    </fieldset>";
_22+="    </form>";
_22+="  </div>";
_22+="</div>";
if(STFTopmostPanel){
_22+=(!blnSearchPanelEngaged||SearchTargetAccordion!="MOST")?mostAccordionOriginal:mostAccordionWithSearch;
}
if(!blnSearchPanelEngaged||SearchTargetAccordion!="MOST"){
$("fpv_videoMostaccordion").innerHTML=_22;
mostAccordionWithSTF=_22;
}else{
var _27=$("fpv_panelSearchContentResults").innerHTML;
$("fpv_videoMostaccordion").innerHTML=_22;
$("fpv_panelSearchContentResults").innerHTML=_27;
if(STFTopmostPanel){
mostAccordionWithSTF=_22.substr(0,_22.length-mostAccordionWithSearch.length)+mostAccordionOriginal;
}else{
mostAccordionWithSTF=mostAccordionOriginal+_22.substr(mostAccordionWithSearch.length);
}
}
objMostWatchedAccord=new Rico.Accordion($("fpv_videoMostaccordion"),{panelHeight:fpv_removepx(fpv_getStyleBySelector(".fpv_accordionControlStyle").height),expandedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").color),expandedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").fontWeight,expandedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleExpanded").backgroundColor),collapsedBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").backgroundColor),collapsedTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").color),collapsedFontWeight:fpv_getStyleBySelector(".fpv_accordionControlStyleCollapsed").fontWeight,hoverBg:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").backgroundColor),hoverTextColor:fpv_rgb2hex(fpv_getStyleBySelector(".fpv_accordionControlStyleHover").color)});
if(STFTopmostPanel){
objMostWatchedAccord.showTabByIndex(0);
}else{
objMostWatchedAccord.showTabByIndex(objMostWatchedAccord.accordionTabs.length-1);
}
}
}
function fpv_ShowSTFv2Tabs(){
if(fpv_tabBoxTabs1.getIdByFriendlyName("STF")==-1){
blnSTFPanelEngaged=true;
var _28="";
_28+="  <div id=\"fpv_stfPanelContent\">";
_28+="    <form id=\"frmSTF\" name=\"frmSTF\" onSubmit=\"fpv_STF(document.frmSTF.btnSTFSubmit); return false;\">";
_28+="    <div id=\"fpv_stfMessage\" class=\"fpv_stfMessagePanel\"><div id=\"fpv_stfMessageContents\" class=\"fpv_stfMessagePanelContents\"></div></div>";
_28+="    <fieldset>";
_28+="      <legend>Send video to friend</legend>";
var _29=fpv_readCookie(stfCookieName);
var _2a="";
var _2b="";
if(_29){
var _2c=_29.split("|");
_2a=_2c[0];
_2b=_2c[1];
}
if(arySTFFieldConfig[0][0]=="1"){
_28+="    <div id=\"fpv_stfName\">\n";
_28+="    <label for=\"fpv_stfInputYourName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[0][1]+"</label>";
_28+="    <input type=\"text\" name=\"txtSTFName\" value=\""+_2a+"\" class=\"fpv_stfInputYourName\" id=\"fpv_stfInputYourName\"><br />";
_28+="    </div>\n";
}
if(arySTFFieldConfig[1][0]=="1"){
_28+="    <div id=\"fpv_stfEmail\">\n";
_28+="    <label for=\"fpv_stfInputYourEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[1][1]+"</label>";
_28+="    <input type=\"text\" name=\"txtSTFEmail\" value=\""+_2b+"\" class=\"fpv_stfInputYourEmail\" id=\"fpv_stfInputYourEmail\"><br />";
_28+="    </div>\n";
}
if(arySTFFieldConfig[2][0]=="1"){
_28+="    <div id=\"fpv_stfRememberRadios\">\n";
_28+="    <span class=\"fpv_stfLabel\">"+arySTFFieldConfig[2][1]+"</span><br /><label for=\"fpv_radRememberSTFYes\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFYes\" value=\"1\">"+arySTFFieldConfig[2][2]+"</label>";
_28+="    <label for=\"fpv_radRememberSTFNo\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFNo\" value=\"0\">"+arySTFFieldConfig[2][3]+"</label><br />";
_28+="    </div>\n";
}
if(arySTFFieldConfig[3][0]=="1"){
_28+="    <div id=\"fpv_stfFriendName\">\n";
_28+="    <label for=\"fpv_stfInputYourFName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[3][1]+"</label>";
_28+="    <input type=\"text\" name=\"txtSTFFriendsName\" value=\"\" class=\"fpv_stfInputYourFName\" id=\"fpv_stfInputYourFName\"><br />";
_28+="    </div>\n";
}
if(arySTFFieldConfig[4][0]=="1"){
_28+="    <div id=\"fpv_stfFriendEmail\">\n";
_28+="    <label for=\"fpv_stfInputYourFEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[4][1]+"</label>";
_28+="    <input type=\"text\" name=\"txtSTFFriendsEmail\" value=\"\" class=\"fpv_stfInputYourFEmail\" id=\"fpv_stfInputYourFEmail\"><br />";
_28+="    </div>\n";
}
if(arySTFFieldConfig[5][0]=="1"){
_28+="    <div id=\"fpv_stfTextarea\">\n";
_28+="    <label for=\"fpv_stfInputMessage\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[5][1]+"</label>";
_28+="    <textarea name=\"txtSTFMessage\" class=\"fpv_stfInputMessage\" name=\"txtSTFMessage\" rows=\"3\" cols=\"30\">"+arySTFFieldConfig[5][2]+"</textarea><br />";
_28+="    </div>\n";
}
_28+="    <span id=\"fpv_stfSubmitBtn\">\n";
_28+="    <input type=\"button\" name=\"btnSTFSubmit\" id=\"fpv_stfSubmit\" value=\"Send\" class=\"fpv_buttonFormat fpv_stfButtons\" onClick=\"fpv_STF(this)\">\n";
_28+="    </span>\n";
_28+="    <span id=\"fpv_stfCancelBtn\">\n";
_28+="    <input type=\"button\" name=\"btnSTFCancel\" id=\"fpv_stfCancel\" value=\"Cancel\" onClick=\"fpv_tabBoxTabs1.Remove(fpv_tabBoxTabs1.getIdByFriendlyName('STF'));\" class=\"fpv_buttonFormat fpv_stfButtons\">\n";
_28+="    </span>\n";
_28+="    </fieldset>";
_28+="    </form>";
_28+="  </div>";
fpv_tabBoxTabs1.Add(STFAccordionHeader,"$('fpv_navPanelVideoContent').innerHTML = this.staticContentHTML; document.getElementsByClassName('fpv_navBreadElements')[0].innerHTML = ''; if ($('fpv_navPanelVideoPaging')) $('fpv_navPanelVideoPaging').parentNode.removeChild($('fpv_navPanelVideoPaging'));","fpv_sendToFriendTab",false,true,_28);
fpv_tabBoxTabs1.setFriendlyNameForLastTab("STF");
fpv_tabBoxTabs1.selectedTab=fpv_tabBoxTabs1.tabsCount-1;
fpv_tabBoxTabs1.Redraw();
}else{
fpv_tabBoxTabs1.selectedTab=fpv_tabBoxTabs1.getIdByFriendlyName("STF");
fpv_tabBoxTabs1.Redraw();
}
}
function fpv_ShowSTFv2Block(){
if(!$("fpv_stfPanelContent")){
blnSTFPanelEngaged=true;
var _2d="";
_2d+="  <div id=\"fpv_stfPanelContent\">";
_2d+="    <form id=\"frmSTF\" name=\"frmSTF\" onSubmit=\"fpv_STF(document.frmSTF.btnSTFSubmit); return false;\">";
_2d+="    <div id=\"fpv_stfMessage\" class=\"fpv_stfMessagePanel\"><div id=\"fpv_stfMessageContents\" class=\"fpv_stfMessagePanelContents\"></div></div>";
_2d+="    <fieldset>";
_2d+="      <legend>Send video to friend</legend>";
var _2e=fpv_readCookie(stfCookieName);
var _2f="";
var _30="";
if(_2e){
var _31=_2e.split("|");
_2f=_31[0];
_30=_31[1];
}
if(arySTFFieldConfig[0][0]=="1"){
_2d+="    <div id=\"fpv_stfName\">\n";
_2d+="    <label for=\"fpv_stfInputYourName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[0][1]+"</label>";
_2d+="    <input type=\"text\" name=\"txtSTFName\" value=\""+_2f+"\" class=\"fpv_stfInputYourName\" id=\"fpv_stfInputYourName\"><br />";
_2d+="    </div>\n";
}
if(arySTFFieldConfig[1][0]=="1"){
_2d+="    <div id=\"fpv_stfEmail\">\n";
_2d+="    <label for=\"fpv_stfInputYourEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[1][1]+"</label>";
_2d+="    <input type=\"text\" name=\"txtSTFEmail\" value=\""+_30+"\" class=\"fpv_stfInputYourEmail\" id=\"fpv_stfInputYourEmail\"><br />";
_2d+="    </div>\n";
}
if(arySTFFieldConfig[2][0]=="1"){
_2d+="    <div id=\"fpv_stfRememberRadios\">\n";
_2d+="    <span class=\"fpv_stfLabel\">"+arySTFFieldConfig[2][1]+"</span><br /><label for=\"fpv_radRememberSTFYes\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFYes\" value=\"1\">"+arySTFFieldConfig[2][2]+"</label>";
_2d+="    <label for=\"fpv_radRememberSTFNo\"><input type=\"radio\" name=\"radRemember\" id=\"fpv_radRememberSTFNo\" value=\"0\">"+arySTFFieldConfig[2][3]+"</label><br />";
_2d+="    </div>\n";
}
if(arySTFFieldConfig[3][0]=="1"){
_2d+="    <div id=\"fpv_stfFriendName\">\n";
_2d+="    <label for=\"fpv_stfInputYourFName\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[3][1]+"</label>";
_2d+="    <input type=\"text\" name=\"txtSTFFriendsName\" value=\"\" class=\"fpv_stfInputYourFName\" id=\"fpv_stfInputYourFName\"><br />";
_2d+="    </div>\n";
}
if(arySTFFieldConfig[4][0]=="1"){
_2d+="    <div id=\"fpv_stfFriendEmail\">\n";
_2d+="    <label for=\"fpv_stfInputYourFEmail\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[4][1]+"</label>";
_2d+="    <input type=\"text\" name=\"txtSTFFriendsEmail\" value=\"\" class=\"fpv_stfInputYourFEmail\" id=\"fpv_stfInputYourFEmail\"><br />";
_2d+="    </div>\n";
}
if(arySTFFieldConfig[5][0]=="1"){
_2d+="    <div id=\"fpv_stfTextarea\">\n";
_2d+="    <label for=\"fpv_stfInputMessage\" class=\"fpv_stfLabel\">"+arySTFFieldConfig[5][1]+"</label>";
_2d+="    <textarea name=\"txtSTFMessage\" class=\"fpv_stfInputMessage\" name=\"txtSTFMessage\" rows=\"3\" cols=\"30\">"+arySTFFieldConfig[5][2]+"</textarea><br />";
_2d+="    </div>\n";
}
_2d+="    <span id=\"fpv_stfSubmitBtn\">\n";
_2d+="    <input type=\"button\" name=\"btnSTFSubmit\" id=\"fpv_stfSubmit\" value=\"Send\" class=\"fpv_buttonFormat fpv_stfButtons\" onClick=\"fpv_STF(this)\">\n";
_2d+="    </span>\n";
_2d+="    <span id=\"fpv_stfCancelBtn\">\n";
_2d+="    <input type=\"button\" name=\"btnSTFCancel\" id=\"fpv_stfCancel\" value=\"Cancel\" onClick=\"fpv_CloseSTFPanel();\" class=\"fpv_buttonFormat fpv_stfButtons\">\n";
_2d+="    </span>\n";
_2d+="    </fieldset>";
_2d+="    </form>";
_2d+="  </div>";
$("fpv_stfBlock").innerHTML+=_2d;
}
$("fpv_stfBlock").style.display="block";
}
function fpv_CloseSTFBlock(){
$("fpv_stfBlock").style.display="none";
}
function fpv_ValidateSTF(){
var _32=true;
var _33="";
if(STFFieldYourNameRequired){
if(fpv_Trim(document.frmSTF.txtSTFName.value)==""){
_33+=STFFieldYourNameMsg+"<br>";
_32=false;
}
}
if(STFFieldYourEmailRequired){
if(fpv_Trim(document.frmSTF.txtSTFEmail.value)==""){
_33+=STFFieldYourEmailMsg+"<br>";
_32=false;
}
}
if(STFFieldFriendNameRequired){
if(fpv_Trim(document.frmSTF.txtSTFFriendsEmail.value)==""){
_33+=STFFieldFriendNameMsg+"<br>";
_32=false;
}
}
if(STFFieldFriendEmailRequired){
if(fpv_Trim(document.frmSTF.txtSTFFriendsEmail.value)==""){
_33+=STFFieldFriendEmailMsg+"<br>";
_32=false;
}
}
if(STFFieldMessageRequired){
if(fpv_Trim(document.frmSTF.txtSTFMessage.value)==""){
_33+=STFFieldMessageMsg+"<br>";
_32=false;
}
}
msgColor=fpv_rgb2hex(fpv_getStyleBySelector(".fpv_stfMessagePanelFailureColor").color);
fpv_ShowInlineMessage("fpv_stfMessage","fpv_stfMessageContents",_33,msgColor,false);
return _32;
}

