function goToTermsPrivacyHelpFromXML(strName){var strQueryString;if(strName==1){strQueryString='http://'+strServerNameDyn+strPortDyn+strServerPathDyn+'/br/Help/TermsAndConditionsPage.aspx?Content=Help'}elseif(strName==2){strQueryString='http://'+strServerNameDyn+strPortDyn+strServerPathDyn+'/br/Help/TermsAndConditionsPage.aspx?Content=Terms'}elseif(strName==3){strQueryString='http://'+strServerNameDyn+strPortDyn+strServerPathDyn+'/br/Help/TermsAndConditionsPage.aspx?Content=Privacy'}submitPageFE(strQueryString);}function setComboAssetType(strValue){var objAssetType=getObj("cbAssetTypeList")if(typeof(objAssetType)=='object'){for(var i=0;i<objAssetType.length;i++){if(objAssetType.options[i].value==strValue){objAssetType.selectedIndex=i;}}}}function TitleGoToIntermediate(strLink,ApplicationName){strDefaultLink=ApplicationName+'/br/CommonPages/IntermediateCookieHandlingPage.aspx?hidURL='+escape(strLink);submitPageFE(strDefaultLink);return false;}function winclose(){window.close();return false;}function validatePopupContact(){var txtNameType=getObj("txtName",1);var txtNumberType=getObj("txtNumber",1);if(isBlank(txtNameType,'Name'))return false;if(isBlank(txtNumberType,'Number'))return false;}function goPopUpPage(pageNum,strpopuppage){if(pageNum==2){popUpPage='../Preferences/TechDetail.aspx'popupWin(popUpPage,'455','330','no');}if(pageNum==1){strQueryString='../Help/TermsAndConditionsPage.aspx?Content=Help';submitPageFE(strQueryString);return false;}if(pageNum==3){popUpPage=strpopuppagewindow.open(popUpPage,'','scrollbars=yes,width=500,height=250,status=yes,menubar=yes,toolbar=yes,location=yes');}if(pageNum==4){strQueryString='../Help/TermsAndConditionsPage.aspx?Content=Help';submitPageFE(strQueryString);return false;}}function setSaveClicked(){window.document.forms[0].hidSave.value="1";}function setValForTeleStream(){if(window.document.forms[0].chkTelestream.checked=='false'){window.document.forms[0].chkTelestream.value="false"}else{window.document.forms[0].chkTelestream.value="true"}window.document.forms[0].submit();}function SetDeliveryOption(strDelivery){window.document.forms[0].hidDeliveryType.value=strDelivery;window.document.forms[0].submit();}function goToOrderHistoryPage(strServer,strPort){var sLink="";var strQueryString="";strQueryString='/br/ShoppingCart/OrderHistory.aspx';sLink='Http://'+strServer+strPort+strQueryStringwindow.location.href=sLinkreturn false;}function goPreferencePage(sidemode,strServer,strPort,strUserType){var strQueryString='';var iUserType=parseInt(strUserType);if(sidemode=="1"){strQueryString='/br/preferences/MyAccount.aspx?sidemode='+sidemode;}else if(sidemode=="2"){switch(iUserType){case 6:strQueryString='/br/preferences/UserProfile.aspx?userType='+iUserType+'&sidemode='+sidemode;break;case 1:strQueryString='/br/preferences/UserProfile.aspx?userType='+iUserType+'&sidemode='+sidemode;break;case 2:strQueryString='/br/preferences/UserProfile.aspx?userType='+iUserType+'&sidemode='+sidemode;break;case 3:strQueryString='/br/preferences/UserProfile.aspx?userType='+iUserType+'&sidemode='+sidemode;break;case 7:case 11:strQueryString='/br/preferences/UserProfile.aspx?userType='+iUserType+'&sidemode='+sidemode;break;case 9:strQueryString='/br/preferences/UserProfile.aspx?userType='+iUserType+'&sidemode='+sidemode;break;case 4:case 8:case 10:strQueryString='/br/preferences/UserProfileCompany.aspx?sidemode='+sidemode;break;}}else if(sidemode=="3"){strQueryString='/br/preferences/ContentPreferences.aspx?sidemode='+sidemode;}else if(sidemode=="4"){strQueryString='/br/preferences/OrderHistory.aspx?sidemode='+sidemode;}else if(sidemode=="5"){strQueryString='/br/preferences/VideoDeliveryOption.aspx?sidemode='+sidemode+'&option='+'delivery';}else if(sidemode=="6"){strQueryString='/br/preferences/StreamingMediaOptions.aspx?sidemode='+sidemode;}else if(sidemode=="10"){strQueryString='/br/Clippings/myclippings.aspx';}if(sidemode=="2"){var sLink='Https://'+strServer+strQueryString}else{var sLinksLink='Http://'+strServer+strPort+strQueryString}window.location.href=sLinkreturn false;}function setFolderOption(){var cmbFolderListType=getObj("cboFolderList","2")if(cmbFolderListType=='[object]'){for(i=0;i<cmbFolderListType.options.length;i++){if(cmbFolderListType.options[i].text==window.document.forms[0].hidOldFolderName.value){cmbFolderListType.options[i].selected=true;}else{cmbFolderListType.options[i].selected=false;}}}}function SwitchStateCart(iUserType,iTopSpace,iAdjust,iJavascriptAdValue){var objStateDiv;var explorer=false;var netscape=false;var mac=false;var iUSid=1;var browser=navigator.userAgent;var cmbCountryType=getObj("cmbCountry","2")iUSid=cmbCountryType[1].value;strMoveDiv=iJavascriptAdValue+iTopSpace+iAdjust;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;if(cmbCountryType.value==iUSid){showElement(getElement('spanSelState'));showElement(getElement('spanStateLabel'));hideElement(getElement('spanTxtState'));}else{var strMoveDiv;objStateDiv=getElement('spanTxtState');showElement(getElement('spanTxtState'));hideElement(getElement('spanStateLabel'));hideElement(getElement('spanSelState'));if(mac&& netscape){if(iUserType==1){objStateDiv.style.top="600px";}else if(iUserType==2){objStateDiv.style.top="610px";}else if(iUserType==11){objStateDiv.style.top="540px";}else{objStateDiv.style.top="540px";}}elseif(mac&& explorer){if(iUserType==1){objStateDiv.style.top="580px";}else if(iUserType==2){objStateDiv.style.top="590px";}else if(iUserType==11){objStateDiv.style.top="520px";}else{objStateDiv.style.top="520px";}}elseif(netscape){if(iUserType=1){objStateDiv.style.top=strMoveDiv;}else if(iUserType=2){objStateDiv.style.top=strMoveDiv;}else if(iUserType=11){objStateDiv.style.top=strMoveDiv;}else{objStateDiv.style.top=strMoveDiv;}}}return false;}function SwitchUsers(iType){var objStateDiv;var explorer=false;var netscape=false;var mac=false;var browser=navigator.userAgent;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var obj11=document.getElementById("spanOtherUsers");var obj12=document.getElementById("spanTVFormat");if(iType==1||iType==2){if(explorer){obj11.style.display='';obj12.style.display='';}if(netscape){showElement(getElement('spanOtherUsers'));showElement(getElement('spanTVFormat'));}}else{if(explorer){obj11.style.display='none';obj12.style.display='none';}if(netscape){hideElement(getElement('spanOtherUsers'));hideElement(getElement('spanTVFormat'));}}document.forms[0].hidUserType.value=iType;document.forms[0].submit();}function validateLoginMain(mode,normal){var txtLoginEmailType=getObj("txtLoginEmail","1");var txtLoginPasswordType=getObj("txtLoginPassword","1");if(isBlank(txtLoginEmailType,'Email Address','Email Address is required.\nPlease enter an Email Address.')){txtLoginEmailType.focus();return false;}if(!isEmail(txtLoginEmailType,'Email Address'))return false;if(mode==1){if(isBlank(txtLoginPasswordType,'Password')){txtLoginPasswordType.focus();return false;}if(txtLoginPasswordType.value.length<4){alert('Please enter password more than 3 characters');txtLoginPasswordType.focus();return false;}}window.document.forms[0].LoginClick.value=mode;if(normal!='0'){window.document.forms[0].submit();return false;}return true;}function SendToClipping(){window.close();}function SetHiddenValue(){window.document.forms[0].hidSave.value="S";}function resize(){window.resizeTo('600','306')}function DecreaseFolderCount(){if(parseInt(window.document.forms[0].hidEmpty.value)>0){if(confirm("There are stories and/or media assets content in this folder. Do you still want to delete it?")){window.document.forms[0].hidDelete.value=1;window.document.forms[0].action="MyClippings.aspx"return true;}elsereturn false;}else{if(confirm("Are you sure,you want to delete the Clipping Folder?")){window.document.forms[0].hidDelete.value=1;window.document.forms[0].action="MyClippings.aspx"return true;}elsereturn false;}}var totalcheckboxcount,checkboxcount,selectedClippingId=0;function selectedindexchanged(obj){selectedClippingId=obj.selectedIndex;}function SetAction(Id,varType,operationType){if((operationType=='2')||(operationType=='3')){window.document.forms[0].hidRemoveMoveSelected.value="S";}if(Id==0){alert('This functionality is only available to registered users.\nTo register click the "Register" link.\nIf you have already registered, then please login.')return false;}else{if(mstrUserStatus==4){if(operationType==1){alert('Your registration is still in progress.\nYou will receive a notification when your registration is approved after which you will be allowed to order media.')return false;}}if(iUserType==8||iUserType==4){if(operationType==1){alert("We're sorry, but this feature is only available to registered media journalists.\nYou are currently on a demonstration account and do not have rights to order any media assets.\nPlease send an email to mediarelations@thenewsmarket.com if you do need to order assets. Thank you.");return false;}}GetCheckedCount();if(checkboxcount==0){switch(operationType){case 1:alert("To add Stories to the Cart, please check at least one Story.");break;case 2:alert("To remove Stories, please check at least one Story.");break;case 3:alert("To move Stories, please check at least one Story.");break;}return false;}else{if(operationType==3){if(selectedClippingId==0){alert("Please select a clipping folder to move the story into.");return false;}}return true;}}}function SetAssetAction(Id,varType,operationType){if((operationType==2)||(operationType==3)){window.document.forms[0].hidRemoveMoveSelected.value="A";}if(Id==0){alert('This functionality is only available to registered users.\nTo register click the "Register" link.\nIf you have already registered, then please login.')return false;}else{if(mstrUserStatus==4){if(operationType==1){alert('Your registration is still in progress.\nYou will receive a notification when your registration is approved after which you will be allowed to order media.')return false;}}if(iUserType==8||iUserType==4){if(operationType==1){alert("We're sorry, but this feature is only available to registered media journalists.\nYou are currently on a demonstration account and do not have rights to order any media assets.\nPlease send an email to mediarelations@thenewsmarket.com if you do need to order assets. Thank you.");return false;}}GetCheckedCount();if(checkboxcount==0){switch(operationType){case 1:alert("To add Media Assets to the Cart, please check at least one Media Asset.");break;case 2:alert("To remove Media Assets, please check at least one Media Asset.");break;case 3:alert("To move Media Assets, please check at least one Media Asset.");break;}return false;}else{if(operationType==3){if(selectedClippingId==0){alert("Please select a clipping folder to move the media assets into.");return false;}}return true;}}}function GetCheckedCount(){totalcheckboxcount=0;checkboxcount=0;for(i=0;i<window.document.forms[0].elements.length;i++){if(window.document.forms[0].elements[i].type=="checkbox"){totalcheckboxcount=totalcheckboxcount+1;if(window.document.forms[0].elements[i].checked==true)checkboxcount=checkboxcount+1;}}}function ValidateClearAll(){UnCheckAll();return false;}function UnCheckAll(){for(i=0;i<window.document.forms[0].elements.length;i++){if(window.document.forms[0].elements[i].type=="checkbox"){window.document.forms[0].elements[i].checked=false;}}return false;}function ValidateCheckAll(){CheckAll();return false;}function CheckAll(){for(i=0;i<window.document.forms[0].elements.length;i++){if(window.document.forms[0].elements[i].type=="checkbox"){window.document.forms[0].elements[i].checked=true;}}return false;}function Test(strPage){if(strPage=='1'){window.document.forms[0].action="MyClippings.aspx?pId=1";window.document.forms[0].hidPageNum.value="1";return true;}else{window.document.forms[0].action="MyClippings.aspx?pId=2";window.document.forms[0].hidPageNum.value="1";return true;}}function ValidateFolderName(mstrActionMode){var regexp="/'/g";var strFolderName;var txtCreateFolderNameType;var txtNewFolderNameType;var hidSaveClickedType=getObj("hidSaveClicked","1")if(mstrActionMode=='1'){txtCreateFolderNameType=getObj("txtCreateFolderName","1")if(isBlank(txtCreateFolderNameType,"Folder Name")){return false;}}else{txtNewFolderNameType=getObj("txtNewFolderName","1")if(isBlank(txtNewFolderNameType,"Folder Name")){return false;}}if(mstrActionMode=='1'){strFolderName=txtCreateFolderNameType.value;strFolderName=strFolderName.replace(/'/g,"''");window.document.forms[0].hidFolderName.value=strFolderName;}else{foldername=txtNewFolderNameType.value;foldername=foldername.replace(/'/g,"''")window.document.forms[0].hidFolderName.value=foldername;}}function setTextBoxFocus(mstrActionMode){if(mstrActionMode=='1'){var txtCreateFolderNameType=getObj("txtCreateFolderName","1")txtCreateFolderNameType.focus();window.resizeTo(604,326);}else{var txtNewFolderNameType=getObj("txtNewFolderName","1")txtNewFolderNameType.focus();}}function RefreshOpenerPage(mstrItemId,mstrItemType,mstrCurrentPage,miAddedFolderId){if((mstrItemId!='')&&(mstrItemType!='')){window.opener.winReload();}else{if(mstrCurrentPage!=''){window.opener.document.forms[0].action=mstrCurrentPage+".aspx?Id="+document.forms[0].hidAddedFolderId.value;window.opener.document.forms[0].submit();}}window.close();}function FolderChanged(){var cboFolderListType=getObj("cboFolderList","2")window.document.forms[0].hidClippingId.value=cboFolderListType.options[cboFolderListType.selectedIndex].value;window.document.forms[0].hidFolderName.value=cboFolderListType.options[cboFolderListType.selectedIndex].text;window.document.forms[0].hidOldFolderName.value=cboFolderListType.options[cboFolderListType.selectedIndex].text;window.document.forms[0].action="MyClippings.aspx"window.document.forms[0].submit();}function FirstOpenPopUp(iCurrentClippingFolderCount,iMaxClippingFolderCount,strCurrentPageName){if(iCurrentClippingFolderCount>=iMaxClippingFolderCount){alert("A Clipping Folder cannot be created.\nYou have reached the maximum limit of the Clipping Folders you can have.");return false;}else{var str="CreateFolder.aspx?ActionMode=1&ClippingId=0&CurrentPage="+strCurrentPageNamepopupWin(str,'604','326','yes','yes');return true;}return false;}function OpenPopUp(ActionType,iCurrentClippingFolderCount,iMaxClippingFolderCount,strCurrentPageName){var cboFolderListType=getObj("cboFolderList","2");switch(ActionType){case 1:if(iCurrentClippingFolderCount>=iMaxClippingFolderCount){alert("A Clipping Folder cannot be created.\nYou have reached the maximum limit of the Clipping Folders you can have.");return false;}else{var str="CreateFolder.aspx?ActionMode=1&ClippingId=0&CurrentPage="+strCurrentPageNamepopupWin(str,'604','326','yes','yes');break;}case 2:var strSelectedClipping=cboFolderListType.options[cboFolderListType.selectedIndex].value;var str1="CreateFolder.aspx?ActionMode=2&ClippingId="+strSelectedClipping+"&CurrentPage="+strCurrentPageNamepop=popupWin(str1,'604','326','yes','yes');break;}return false;}function OpenPopUp1(ActionType,iCurrentClippingFolderCount,iMaxClippingFolderCount,strCurrentPageName,strItemId,strItemType){var cboFolderListType=getObj("cboFolderList","2");switch(ActionType){case 1:if(iCurrentClippingFolderCount>=iMaxClippingFolderCount){alert("A Clipping Folder cannot be created.\nYou have reached the maximum limit of the Clipping Folders you can have.");return false;}else{var str="CreateFolder.aspx?ActionMode=1&ClippingId=0&CurrentPage="+strCurrentPageName+"&ItemId="+strItemId+"&ItemType="+strItemTypepopupWin(str,'604','326','yes','yes');break;}case 2:var strSelectedClipping=cboFolderListType.options[cboFolderListType.selectedIndex].value;var str1="CreateFolder.aspx?ActionMode=2&ClippingId="+strSelectedClipping+"&CurrentPage="+strCurrentPageName+"&ItemId="+strItemId+"&ItemType="+strItemTypepop=popupWin(str1,'604','326','yes','yes');break;}return false;}function LoginGoClick(){window.document.forms[0].hidFormType.value='1';return false;}function resetFormType(){window.document.forms[0].hidFormType.value='';return false;}function PasswordHelp(ApplicationPath){var sLink=ApplicationPath+'/br/Login/PasswordHelp.aspx?isPopup=1';popupWin(sLink,'444','365','no');}function validateLogin(ServerPath,ApplicationPath,PageName){var objTxtLogin,objTxtLogin,objRememberMe;objTxtLogin=getObj("txtUserName");objTxtPwd=getObj("txtPassword");objRememberMe=getObj("chkRemeberMe");if(isBlank(objTxtLogin,"Email Address","Email Address is required.\nPlease enter an Email Address.")){objTxtLogin.focus();return false;}if(!isEmail(objTxtLogin,"Email Address"))return false;if(isBlank(objTxtPwd,"Password")){objTxtPwd.focus();return false;}if(objTxtPwd.value.length<4){alert("Please enter password more than 3 characters.");objTxtPwd.focus();return false;}sLink='Https://'+ServerPath+PageName;var isQuestPresent=sLink.indexOf("hidTargetSessionRequired=TRUE");var firstPartUrl='';var middlePartUrl='';if(isQuestPresent!=-1){sLink=sLink.replace("hidTargetSessionRequired=TRUE","hidTargetSessionRequired=FALSE")}if(navigator.userAgent.indexOf('Netscape')>0){document.forms[0].hidForNetscape.value="1";document.forms[0].hidTxtUserName.value=objTxtLogin.value;document.forms[0].hidPassord.value=objTxtPwd.value;}submitPageFE(sLink);return true;}function getObj(txtName,mode){var elm,a,b,c;for(a=0;a<document.forms.length;a++){form=document.forms[a];for(b=0;b<form.elements.length;b++){elm=form.elements[b];if(mode=='1'){if(elm.name.indexOf(txtName)>0){return elm;}}else{if(elm.id.indexOf(txtName)>0){return elm;}}}}}function validateRegister(){objFirstName=getObj("txtFirstName",1);objLastName=getObj("txtLastName",1);objEmail=getObj("txtEmail",1);objrdo1=getObj("rdo1",2);objrdo2=getObj("rdo2",2);objrdo11=getObj("rdo11",2);objrdo12=getObj("rdo12",2);objrdo7=getObj("rdo7",2);if(isBlank(objFirstName,'First Name'))return false;if(!isAlpha(objFirstName,'First Name','1'))return false;if(isBlank(objLastName,'Last Name'))return false;if(!isAlpha(objLastName,'Last Name','1'))return false;if(isBlank(objEmail,'Email Address','Email Address is required.\nPlease enter an Email Address.'))return false;if(!isEmail(objEmail,'Email Address'))return false;if(typeof(objrdo1)=='object'){if(objrdo1.checked){window.document.forms[0].hidCurrentPageKeys.value='1~0~0~ADD';}}else if(typeof(objrdo2)=='object'){if(objrdo2.checked){window.document.forms[0].hidCurrentPageKeys.value='2~0~0~ADD';}}else if(typeof(objrdo11)=='object'){if(objrdo11.checked){window.document.forms[0].hidCurrentPageKeys.value='11~0~0~ADD';}}else if(typeof(objrdo7)=='object'){if(objrdo7.checked){window.document.forms[0].hidCurrentPageKeys.value='7~0~0~ADD';}}else if(typeof(objrdo12)=='object'){if(objrdo12.checked){window.document.forms[0].hidCurrentPageKeys.value='4~0~0~ADD';}}return true;}function SubmitSSLPage(strUserName,strUserPassword,strLogin,strApplicationPath){var strURLValue=document.forms[0].hidCurrentURL.value;if(strLogin=='1'){}document.forms[0].action=strURLValue;document.forms[0].submit();}function SwitchPosition(){var cmbPositionType=getObj("cmbPosition","2")var txtOtherPositionType=getObj("txtOtherPosition","1")if(cmbPositionType.value=='0'){txtOtherPositionType.disabled=false;}else{txtOtherPositionType.value='';txtOtherPositionType.disabled=true;}return false;}function showElementMac(e){e.style.display='block';}function hideElementMac(e){e.style.display='none';}function SwitchState(){var mac=false;var browser=navigator.userAgent;var explorer=false;var netscape=false;var iUSid=1;var cmbCountryType=getObj("cmbCountry","2")iUSid=cmbCountryType[1].value;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var objtxtState=getObj("txtState","2");var objSelState=getObj("cmbSelState","2");var objSelCountry=getObj("cmbCountry","2");if(netscape){objtxtState.style.width="159px";objSelState.style.width="159px";objSelCountry.style.width="159px";}var e1=document.getElementById("div1");var e=document.getElementById("div2");if(cmbCountryType.value==-1||cmbCountryType.value==iUSid){if(mac&& explorer){hideElementMac(e1);showElementMac(e);}else{e1.style.display='none';e.style.display='';}}else{if(mac&& explorer){hideElementMac(e);showElementMac(e1);}else{e.style.display='none';e1.style.display='';}}}function SwitchStateRegistration(){var mac=false;var browser=navigator.userAgent;var explorer=false;var netscape=false;var iUSid=1;var cmbCountryType=getObj("cmbCountry","2")iUSid=cmbCountryType[1].value;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var objtxtState=getObj("txtState","2");var objSelState=getObj("cmbSelState","2");var objSelCountry=getObj("cmbCountry","2");if(netscape){objtxtState.style.width="159px";objSelState.style.width="127px";objSelCountry.style.width="127px";}var e1=document.getElementById("div1");var e=document.getElementById("div2");if(cmbCountryType.value==-1||cmbCountryType.value==iUSid){if(mac&& explorer){hideElementMac(e1);showElementMac(e);}else{e1.style.display='none';e.style.display='block';}}else{if(mac&& explorer){hideElementMac(e);showElementMac(e1);}else{e.style.display='none';e1.style.display='block';}}hideElementMac(e1);}function CheckTab(event,mode){var txtFirstNameType=getObj("txtFirstName","1")var txtOtherOrgnizationNameType=getObj("txtOtherOrgnizationName","1")var txtYourdepartmentType=getObj("txtYourdepartment","1")var cmbCountryType=getObj("cmbCountry","2")var cmbSelStateType=getObj("cmbSelState","2")var txtPostalCodeType=getObj("txtPostalCode","1")var txtStateType=getObj("txtState","1")var cmbMediaTypeType=getObj("cmbMediaType","2")if(NS4)code=event.which;elsecode=event.keyCode;if(code==9){if(mode==1){txtFirstNameType.focus();return false;}else if(mode==2){txtOtherOrgnizationNameType.focus();return false;}else if(mode==4){return false;}else if(mode==5){txtYourdepartmentType.focus();return false;}else if(mode==6){iCountry=cmbCountry[cmbCountry.selectedIndex].valueif(iCountry==iUSid){if(cmbSelStateType.selectedIndex==0){cmbSelStateType.focus();return false;}else{txtPostalCodeType.focus();return false;}}else{txtStateType.focus();return false;}}else if(mode==7){txtPostalCodeType.focus();return false;}else if(mode==8){cmbMediaTypeType.focus();return false;}}else{return true;}}function validateForm(strMode,iUserType){var iUSid=1;var txtEmailType=getObj("txtEmail","1")var txtPasswordType=getObj("txtPassword","1")var txtVerifyPasswordType=getObj("txtVerifyPassword","1")var txtFirstNameType=getObj("txtFirstName","1")var txtLastNameType=getObj("txtLastName","1")var cmbPositionType=getObj("cmbPosition","2")var txtOtherPositionType1=getObj("txtOtherPosition1","1")var txtOtherPositionType=getObj("txtOtherPosition","1")var txtTelephoneType=getObj("txtTelephone","1")var txtTelephoneType1=getObj("txtTelephone1","1")var txtFaxType=getObj("txtFax","1")var txtAddress1Type=getObj("txtAddress1","1")var txtAddress2Type=getObj("txtAddress2","1")var txtAddress3Type=getObj("txtAddress3","1")var cmbCountryType=getObj("cmbCountry","2")var cmbSelStateType=getObj("cmbSelState","2")var txtStateType=getObj("txtState","1")var txtCityType=getObj("txtCity","1")var txtPostalCodeType=getObj("txtPostalCode","1")var txtOtherOrgnizationNameType=getObj("txtOtherOrgnizationName","1")var cmbMediaTypeType=getObj("cmbMediaType","2")var cmbTVFormatType=getObj("cmbTVFormat","2")var txtYourdepartmentType=getObj("txtYourdepartment","1")var txtUrlWebAddressType=getObj("txtUrlWebAddress","1")var cmbHearAboutUsType=getObj("cmbHearAboutUs","2")var txtHearAboutUsType=getObj("txtHearAboutUs","1")var txtRemarksType=getObj("txtRemarks","1")iUSid=cmbCountryType[1].value;if(strMode=='ADD'){if(!isEmail(txtEmailType,'Email Address'))return false;if(isBlank(txtPasswordType,'Password'))return false;if(txtPasswordType.value.length<4){alert('Please enter password more than 3 characters');txtPasswordType.focus();return false;}if(isBlank(txtVerifyPasswordType,'Verify Password'))return false;if(trimtxt(txtVerifyPasswordType)==''){alert("Please verify your password.");txtVerifyPasswordType.focus();return false;}if(txtPasswordType.value!==txtVerifyPasswordType.value){alert('Verify Password and Password should be same');txtPasswordType.focus();return false;}}if(isBlank(txtFirstNameType,'First Name'))return false;if(!isAlpha(txtFirstNameType,'First Name','1'))return false;if(isQuotes(txtFirstNameType,'First Name','1'))return false;if(isBlank(txtLastNameType,'Last Name'))return false;if(!isAlpha(txtLastNameType,'Last Name','1'))return false;if(isQuotes(txtLastNameType,'Last Name','1'))return false;if(typeof cmbPositionType=='object'){if(cmbPositionType.selectedIndex==0){alert('Please Select Position');cmbPositionType.focus();return false;}else{if(cmbPositionType.selectedIndex==1){if(isBlank(txtOtherPositionType,'Other Position'))return false;if(isQuotes(txtOtherPositionType,'Other Position','1'))return false;}}}else{if(isBlank(txtOtherPositionType1,'Position'))return false;}if(typeof(txtTelephoneType)=='object'){if(isBlank(txtTelephoneType,'Telephone number'))return false;if(!isTelePhone(txtTelephoneType,'Telephone number'))return false;}else{if(isBlank(txtTelephoneType1,'Telephone number'))return false;if(!isTelePhone(txtTelephoneType1,'Telephone number'))return false;}if(trimtxt(txtAddress1Type)==''){alert("Address is required. \nPlease enter an Address.");txtAddress1Type.focus();return false;}if(isQuotes(txtAddress1Type,'Address',1))return false;if(isQuotes(txtAddress2Type,'Address',1))return false;if(cmbCountryType.selectedIndex==0){alert('Please Select Country');cmbCountryType.focus();return false;}iCountry=cmbCountryType[cmbCountryType.selectedIndex].valueif(iCountry==iUSid){if(cmbSelStateType.selectedIndex==0){alert('Please Select State');cmbSelStateType.focus();return false;}}else{}if(isQuotes(txtStateType,'State',1))return false;if(trimtxt(txtStateType.value)!=''){if(!isAlpha(txtStateType,'State'))return false;}if(isBlank(txtCityType,'City'))return false;if(isQuotes(txtCityType,'City',1))return false;if(trimtxt(txtPostalCodeType)!=''){if(isQuotes(txtPostalCodeType,'Postal Code',1))return false;else if(!isName(txtPostalCodeType,'PostalCode',0,10,0))return false;}if(trimtxt(txtOtherOrgnizationNameType)==''){alert("Please enter an Organization Name.");txtOtherOrgnizationNameType.focus();return false;}if(isQuotes(txtOtherOrgnizationNameType,'Organization Name','1'))return false;if((iUserType==1)||(iUserType==2)){if(cmbMediaTypeType.selectedIndex==0){alert('Please Select Media Type');cmbMediaTypeType.focus();return false;}var MediaType=cmbMediaTypeType[cmbMediaTypeType.selectedIndex].text;if(MediaType.toUpperCase()=='TV'){if(typeof(cmbTVFormatType)=='object'){if(cmbTVFormatType.selectedIndex==0){alert('Please Select Video Standard');cmbTVFormatType.focus();return false;}}}}if(isQuotes(txtUrlWebAddressType,'Web Address',1))return false;if(typeof(cmbHearAboutUsType)=='object'){if(cmbHearAboutUsType[cmbHearAboutUsType.selectedIndex].value==7)if(isBlank(txtHearAboutUsType,'How did you find out about us?'))return false;if(isQuotes(txtHearAboutUsType,'How did you find out about us?',1))return false;if(!checkLength(txtHearAboutUsType,60,'How did you find out about us?'))return false;}if(isBlank(txtRemarksType,'','Your contribution information is required.\n Please enter contribution information.'))return false;if(iUserType!=6){if(isQuotes(txtRemarksType,'Remarks',1))return false;if(!checkLength(txtRemarksType,500,'Remarks'))return false;}}function save_search_check(iUserType){var iUSid=1;var txtEmailType=getObj("txtEmail","1")var txtCurrentPasswordType=getObj("txtCurrentPassword","1")var txtPasswordType=getObj("txtPassword","1")var txtVerifyPasswordType=getObj("txtVerifyPassword","1")var txtFirstNameType=getObj("txtFirstName","1")var txtLastNameType=getObj("txtLastName","1")var cmbPositionType=getObj("cmbPosition","2")var txtOtherPositionType=getObj("txtOtherPosition","1")var txtTelephoneType=getObj("txtTelephone","1")var txtFaxType=getObj("txtFax","1")var txtAddress1Type=getObj("txtAddress1","1")var txtAddress2Type=getObj("txtAddress2","1")var txtAddress3Type=getObj("txtAddress3","1")var cmbCountryType=getObj("cmbCountry","2")var cmbSelStateType=getObj("cmbSelState","2")var txtStateType=getObj("txtState","1")var txtCityType=getObj("txtCity","1")var txtPostalCodeType=getObj("txtPostalCode","1")var txtOtherOrgnizationNameType=getObj("txtOtherOrgnizationName","1")var cmbMediaTypeType=getObj("cmbMediaType","2")var cmbTVFormatType=getObj("cmbTVFormat","2")var txtYourdepartmentType=getObj("txtYourdepartment","1")var txtUrlWebAddressType=getObj("txtUrlWebAddress","1")var cmbHearAboutUsType=getObj("cmbHearAboutUs","2")var txtHearAboutUsType=getObj("txtHearAboutUs","1")var txtRemarksType=getObj("txtRemarks","1")if(isBlank(txtEmailType,"Email Id"))return false;if(!isEmail(txtEmailType,"Email Id"))return false;if(isBlank(txtAddress1Type,'Address'))return false;if(isQuotes(txtAddress1Type,'Address',1))return false;if(txtCurrentPasswordType.value.length>0){if(txtCurrentPasswordType.value.length<4){alert("Please enter password more than 3 characters");txtCurrentPasswordType.focus();return false;}if(isBlank(txtPasswordType,'New Password'))return false;if(txtPasswordType.value.length<4){alert("Please enter new password with more than 3 characters");txtPasswordType.focus();return false;}if(isBlank(txtVerifyPasswordType,'Verify Password'))return false;if(txtPasswordType.value!=txtVerifyPasswordType.value){alert('Verify Password and Password should be same');txtVerifyPasswordType.focus();return false;}}if(txtVerifyPasswordType.value.length>0){if(isBlank(txtCurrentPasswordType,'Current Password'))return false;if(isBlank(txtPasswordType,'New Password'))return false;}if(iUserType!=6){var selValue=cmbPositionType.options[cmbPositionType.selectedIndex].value;if(selValue=="0"){if(isBlank(txtOtherPositionType,"Position"))return false;if(!isAlpha(txtOtherPositionType,"Position"))return false;}else if(selValue=="--Select--"){alert("Position is required.Please select a postion.");return false;}}else{if(isBlank(txtOtherPositionType,'Title'))return false;if(isQuotes(txtOtherPositionType,'Title',1))return false;if(!isAlpha(txtOtherPositionType,'Title'))return false;}if(isBlank(txtTelephoneType,'Telephone number'))return false;if(!isTelePhone(txtTelephoneType,'Telephone number'))return false;if(isQuotes(txtFaxType,'Fax Number',1))return false;if(isQuotes(txtAddress2Type,'Address',1))return false;if(isQuotes(txtAddress3Type,'Address',1))return false;if(txtPostalCodeType.value.length>0){if(isQuotes(txtPostalCodeType,'Postal Code',1))return false;else if(!isName(txtPostalCodeType,'PostalCode',0,10,0))return false;}if(isQuotes(txtCityType,'City',1))return false;if(typeof txtStateType=='object'){if(txtStateType.visible)if(!isAlpha(txtStateType,"State/Province"))return false;}if(cmbCountryType[cmbCountryType.selectedIndex].value==200){if(cmbSelStateType.selectedIndex==0){alert("Please select a State/Province")cmbSelStateType.selectedIndex=0;return false;}}if(cmbCountryType.selectedIndex==0){alert("Please select a Country")return false;}return true;}function EnableLstTVFormat(){var MediaType=getObj("cmbMediaType","2")var TvFormat=getObj("cmbTVFormat","2")if(MediaType[MediaType.selectedIndex].text.toUpperCase()=='TV'){showElement(getElement('spanTVFormat'));}else{TvFormat[0].selected=true;hideElement(getElement('spanTVFormat'));}return false;}function ValidateUserForCart(AssetCount,storyAssetId,Id,iUserType,mstrUserStatus,PreApproved,IsTNMCartAllowed,CallingPage,FromWhere,ApplicationName,StoryAssetGUID,strServername){var strSearchFilterText='';var strSearchFilters='';if(document.getElementById('hidDyComps_ClientID')!=null){var objhidDyComps_IDs=document.getElementById('hidDyComps_ClientID').value;if(objhidDyComps_IDs!=''){var arrobjhidDyComps_IDs=objhidDyComps_IDs.split("~");var i;for(i=0;i<arrobjhidDyComps_IDs.length;i++){var tmpSelect=document.getElementById(arrobjhidDyComps_IDs[i]);if(typeof(tmpSelect)=='object'){if(tmpSelect.selectedIndex>0){strSearchFilterText=tmpSelect.options[tmpSelect.selectedIndex].value;}}}}document.getElementById('hidDyComps_Selected_Values_Name').value=GetAttributeValueName(strSearchFilterText);}if(IsTNMCartAllowed.toUpperCase()=='TRUE'){IsTNMCartAllowed='1';}else{IsTNMCartAllowed='0';}var objFrm=window.document.forms[0];if(FromWhere=='remove'){if(objFrm.hidRemovedAssetIDs.value.length>0){objFrm.hidRemovedAssetIDs.value=objFrm.hidRemovedAssetIDs.value+','+storyAssetId;}else{objFrm.hidRemovedAssetIDs.value=storyAssetId;}objFrm.hidRemoveClicked.value="REMOVE";setPageNumberForRemoveCart();}if(Id=='0'){if(IsTNMCartAllowed=='0'){var strLink;if(CallingPage=='Story')strDefaultLink="https://"+strServername+"/"+ApplicationName+'/br/Sample/SampleWrapperPage.aspx?hidIsCart=Y&hidStoryGUID='+StoryAssetGUID;elsestrDefaultLink="https://"+strServername+"/"+ApplicationName+'/br/Sample/SampleWrapperPage.aspx?hidIsCart=Y&hidAssetGUID='+StoryAssetGUID;submitPageFE(strDefaultLink);return false;}else{if(CallingPage=='Story'){if(AssetCount=='0'){alert('There are no media assets associated with this story.');return false;}}}}else{if(mstrUserStatus=='4'&& PreApproved=='0'){alert('Your registration is still in progress.\nYou will receive a notification when your registration is approved after which you will be allowed to order media.')return false;}if(iUserType=='8'||iUserType=='4'){alert("We're sorry, but this feature is only available to registered media journalists.\nYou are currently on a demonstration account and do not have rights to order any media assets.\nPlease send an email to mediarelations@thenewsmarket.com if you do need to order assets. Thank you.");return false;}if(CallingPage=='Story'){if(AssetCount==0){alert('There are no media assets associated with this story.');return false;}}}return true;}function AddToClipping(Type,ItemId,UserId,ApplicationPath,StoryAssetGUID,strLink,strServername){strLink=escape(strLink+"&Clip=Y");if(UserId=='0'){if(Type=='1'){strDefaultLink="https://"+strServername+"/"+ApplicationPath+'/br/Sample/SampleWrapperPage.aspx?hidURL='+strLink;}else{strDefaultLink="https://"+strServername+"/"+ApplicationPath+'/br/Sample/SampleWrapperPage.aspx?hidURL='+strLink;}submitPageFE(strDefaultLink);return false;}else{popupWin(ApplicationPath+'/br/Clippings/SelectClippingFolder.aspx?type='+Type+'&Id='+ItemId,'600','310','yes');return false;}}function TitleRedirect(strLink,Id,UserId,maxAssetsStoriesSearchValue,AccessRestriction,ApplicationName,CallingPage){var isExceed;if(UserId=='0'&& AccessRestriction=='True'){if(CallingPage=='Story')isExceed=DoCookieStuff('stories_visited',maxAssetsStoriesSearchValue,ApplicationName);else{isExceed=DoCookieStuff('media_visited',maxAssetsStoriesSearchValue,ApplicationName);}if(isExceed==1){strDefaultLink=ApplicationName+'/br/Sample/SampleWrapperPage.aspx?hidURL='+strLink;submitPageFE(strDefaultLink);}else{submitPageFE(strLink);}}else{submitPageFE(strLink);}return false;}function GoToIntermediate(strLink,Id,UserId,maxAssetsStoriesSearchValue,AccessRestriction,ApplicationName,CallingPage){strDefaultLink=ApplicationName+'/br/CommonPages/IntermediateCookieHandlingPage.aspx?hidURL='+escape(strLink);submitPageFE(strDefaultLink);return false;}function AssetPopup(imgPath,type,AssetId,StoryId,sCurrentPage,iUserId,isBackEndUser,isN,ApplicationPath,IsPreviewEnabled,strLink,strServerName){isBackEndUser=false;var BackEndUser=0;if(iUserId!=0||BackEndUser==1||IsPreviewEnabled==1||type!=1){if(iUserId!=0)IsPreviewEnabled=0;var file=imgPath;var firstparam='';if(file!='undefined'){if(type==3||type==4){if(BackEndUser=='1'){firstparam=file;}else{firstparam=ApplicationPath+"/br/CommonPages/Intermediate.aspx?objBackTo:hidFromModule=FRONTEND&hdnPopup=yes&File="+file+"&AssetId="+AssetId+"&StoryId="+StoryId+"&Caller="+sCurrentPage+'&Type='+type+'&NonLoggedPreview='+IsPreviewEnabled;}if(type==3){if(!isBackEndUser){popup=window.open(firstparam,'','width=340,height=437,resizable=yes,scrollbars=no,menubar=yes','yes');popup.window.moveTo(342,164);}else{window.open(firstparam,'','width=340,height=440,resizable=yes','yes')}}else{if(!isBackEndUser){if(isN){if(imgPath!='')location.href=firstparamelsepopupWin(firstparam,'FULL','FULL','yes');}else{pop=window.open(firstparam,'','resizable=yes,width='+screen.availWidth+',height='+screen.availHeight+',scrollbars=yes,menubar=yes','yes')pop.window.moveTo(0,0);}}else{window.open(firstparam,'','width=800,height=600','')}}}else{var ext=file.substring(file.lastIndexOf(".")+1);if(BackEndUser=='1'){firstparam=ApplicationPath+"/br/CommonPages/MediaPreview.aspx?objBackTo:hidFromModule=FRONTEND&isBackEndUser=1&AssetId="+AssetId+"~"+type+"&Id="+file+","+ext+",270,290";}else{var secondparam="MediaPreview.aspx?Id="+file+","+ext+",270,290";firstparam=ApplicationPath+"/br/CommonPages/Intermediate.aspx?objBackTo:hidFromModule=FRONTEND&isBackEndUser=0&hdnPopup=yes&Type="+type+"&File="+secondparam+"&AssetId="+AssetId+"&StoryId="+StoryId+"&Caller="+sCurrentPage+'&NonLoggedPreview='+IsPreviewEnabled;}if(!isBackEndUser){popupWin(firstparam,'340','440','no','yes');}else{window.open(firstparam,'','width=340,height=440','yes')}}}}else{strLink=escape(strLink+"&Preview=Y");strLink="https://"+strServerName+"/"+ApplicationPath+"/br/Sample/SampleWrapperPage.aspx?hidURL="+strLink;submitPageFE(strLink);return false;}}function windowResizeForPreviewImage(){var windowHeight;var windowWidth;var hMargin=55;var vMargin=227;var vScreenMargin=20;var currentWindowHeight=440;var currentWindowWidth=340;if(typeof(window.document.forms[0].imgPreview)=='undefined'){windowHeight=35+vMargin;windowWidth=295+hMargin;}else{windowHeight=window.document.forms[0].imgPreview.height+vMargin;windowWidth=window.document.forms[0].imgPreview.width+hMargin;}if(windowHeight>=screen.height)windowHeight=screen.height-vScreenMargin;if(windowWidth>=screen.width)windowWidth=screen.width;if(windowWidth<currentWindowWidth)windowWidth=currentWindowWidth;window.resizeTo(windowWidth,windowHeight);window.moveTo(screenLeft(windowWidth),screenTop(windowHeight));window.resizeTo(windowWidth,windowHeight);}function screenLeft(width){return(screen.width-width)/2;}function screenTop(height){return((screen.height-height)/2)-10;}function fSave(){var objFrm=window.document.forms[0];objFrm.hidSaveClicked.value='1';return true;}function fYes(){var objFrm=window.document.forms[0];objFrm.hidYesClick.value='yes';return true;}function fClose(miDispError,strMRserverPath,strAssetId,strAssetType,IdValue,fromwhere,iUserid){var objFrm=window.document.forms[0];//-->preference is null
if(iUserid!=0){if(miDispError==5){if(objFrm.hidSaveClicked.value==''){var iPreview;var strAssetIdType=strAssetId+'~'+strAssetType;iPreview=9;var firstparam=strMRserverPath+'/br/CommonPages/MediaPreview.aspx?NonLoggedPreview=0&AssetId='+strAssetIdType+'&id='+IdValue+',,270,290'+'&preference='+iPreview+'&FromClose=1';pop=window.open(firstparam,'preview','width=340,height=440');pop.window.moveTo(342,164);}else{return true;}}else{if(fromwhere=="Yes"){window.close();}else{return true;}}}else{window.close();}}function goRegistration(){if(!window.opener.closed){window.opener.document.forms[0].action="../../br/Login/LoginPreRegistration.aspx";window.opener.document.forms[0].submit();window.close();}else{window.open(strMRserverPath+'../../br/Login/LoginPreRegistration.aspx','','');window.close();}}function ValidateEmail(){var objFrm=window.document.forms[0];var objUserEmailId=getObj("txtUserEmailId",1);objFrm.hidSubmitAction.value="true";strTextString=trimtxt(objUserEmailId.value);if(strTextString==""){alert('Email is required.\nPlease enter an Email-address');return false;}if(!isEmail(objUserEmailId,"Email address"))return false;}function goToSite(){window.opener.document.forms[0].action="../../br/Login/LoginPreRegistration.aspx";window.opener.document.forms[0].submit();window.close();}function StartTimer(){setTimeout("window.close()",5000);}function TransferToSamplePage(type,strhttphost,strservername,strPortNumber,strMRserverPath,strURL,strCart,strStoryGUID,strAssetGUID){strURL=escape(strURL);var strLink;if(type==1){if(strhttphost=strservername){strLink="http://"+strhttphost+strPortNumber+strMRserverPath+"/br/Sample/SampleSearchResultPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}else{strLink="http://"+strhttphost+strMRserverPath+"/br/Sample/SampleSearchResultPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}}if(type==2){if(strhttphost=strservername){strLink="http://"+strhttphost+strPortNumber+strMRserverPath+"/br/Sample/SampleNonLoggedUserClipDefaultPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}else{strLink="http://"+strhttphost+strMRserverPath+"/br/Sample/SampleNonLoggedUserClipDefaultPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}}if(type==3){if(strhttphost=strservername){strLink="http://"+strhttphost+strPortNumber+strMRserverPath+"/br/Sample/SampleAssetDetailPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}else{strLink="http://"+strhttphost+strMRserverPath+"/br/Sample/SampleAssetDetailPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}}if(type==4){if(strhttphost=strservername){strLink="http://"+strhttphost+strPortNumber+strMRserverPath+"/br/Sample/SampleStoryDetailPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}else{strLink="http://"+strhttphost+strMRserverPath+"/br/Sample/SampleStoryDetailPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}}if(type==5){if(strhttphost=strservername){strLink="http://"+strhttphost+strPortNumber+strMRserverPath+"/br/Sample/SampleNonLoggedCartControlPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}else{strLink="http://"+strhttphost+strMRserverPath+"/br/Sample/SampleNonLoggedCartControlPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}}if(type==6){if(strhttphost=strservername){strLink="http://"+strhttphost+strPortNumber+strMRserverPath+"/br/Sample/SampleDefaultPreviewPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}else{strLink="http://"+strhttphost+strMRserverPath+"/br/Sample/SampleDefaultPreviewPage.aspx?hidURL="+strURL+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;}}submitPageFE(strLink);return false;}function LoginFromSample(mode,strServername,strUrl,strCart,strStoryGUID,strAssetGUID){strUrl=escape(strUrl);var sLink="https://"+strServername+"/br/Sample/SampleWrapperPage.aspx?hidSamplemode="+mode+"&hidURL="+strUrl+"&hidIsCart="+strCart+"&hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID;submitPageFE(sLink);return false;}function submitSamplePage(strLink){var strStoryGUID,strAssetGUID,strIsCart,strURL;strStoryGUID=document.forms[0].hidStoryGUID.value;strAssetGUID=document.forms[0].hidAssetGUID.value;strIsCart=document.forms[0].hidIsCart.value;strURL=document.forms[0].hidURL.value;strLink=strLink+"?hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID+"&hidIsCart="+strIsCart+"&hidURL="+escape(strURL);submitPageFE(strLink);return false;}function SubmitPageBackTo(pagename,params,serverName,server,port,isHttps){if(typeof document.forms[0].hidRemovedAssetIDs=='object'){document.forms[0].hidRemovedAssetIDs.value=0;}if(typeof document.forms[0].hidRemoveClicked=='object'){document.forms[0].hidRemoveClicked.value='';}if(typeof document.forms[0].hidPageNum=='object'){document.forms[0].hidPageNum.value='1';}var sLink='';var strlocation=window.location.href;strlocation=strlocation.toUpperCase();var ipPattern='HTTPS:';var ipArray=strlocation.match(ipPattern);if(ipArray=='HTTPS')sLink="https://"+server;else{if(serverName==server){sLink="http://"+serverName+port;}else{sLink="http://"+serverName;}}var isSamplePage=-1if(params!=''){isSamplePage=params.indexOf("hidURL");}if(isSamplePage!=-1){params=escape(params);}if(typeof window.document.forms[0].hidIsDownloadListAsset=='object'){window.document.forms[0].hidIsDownloadListAsset.value="";}if(typeof window.document.forms[0].hidIsDownloadPath=='object'){window.document.forms[0].hidIsDownloadPath.value="";}window.document.forms[0].action=sLink+pagename+'?Link=1'+'&'+params;window.document.forms[0].hidReturnTo.value='1';window.document.forms[0].submit();return true;}function setTabAssetDetail(iSelectedIndex,iTabIndex){var objForm=eval(document.forms[0]);objForm.hidSelectedTab.value=iSelectedIndex;objForm.hidTabIndex.value=iTabIndex;if(typeof objForm.hidAddCart=='object'){objForm.hidAddCart.value='0';}if(typeof objForm.hidIsDownloadListAsset=='object'){objForm.hidIsDownloadListAsset.value="0";}if(typeof objForm.hidIsDownloadPath=='object'){objForm.hidIsDownloadPath.value=""}objForm.submit();}function DefaultPreviewAssetDetail(strLink,strHost,strServerPath){strLink=escape(strLink+"&Preview=Y");var sLink="https://"+strHost+strServerPath+"/br/Sample/SampleWrapperPage.aspx?hidURL="+strLink;submitPageFE(sLink);return false;}function openDocAssetDetail(path){window.open(path,'','resizable=yes,width='+screen.availWidth+',height='+screen.availHeight+',scrollbars=yes,menubar=yes','yes');}function openDocStillAssetDetail(path){window.open(path,'','resizable=yes,width='+screen.availWidth+',height='+screen.availHeight+',scrollbars=yes,menubar=yes','yes');return false;}function AddToClippingsAssetDetail(strAssetId,strUserId,strServerAbsolute,strServer,strAssetGUID,strLink){var AssetId=strAssetId;strLink=escape(strLink+"&Clip=Y");if(strUserId=='0'){var strType;var sLink="https://"+strServerAbsolute+strServer+"/br/Sample/SampleWrapperPage.aspx?hidURL="+strLink+"&type=2&Id="+strAssetId;submitPageFE(sLink);return false;}popupWin(strServer+'/br/Clippings/SelectClippingFolder.aspx?type=2&Id='+strAssetId,'600','310','yes');return false;}function AddToCartAssetDetail_1(strAssetId,strUserID,strServerAbsolutePath,strServer,IsTNMCartAllowed,strUserStatus,iUserType,strAssetGUID,strDownloadPath){if(strDownloadPath!=""){document.forms[0].hidIsDownloadListAsset.value="1";document.forms[0].hidIsDownloadPath.value=strDownloadPathdocument.forms[0].submit();return false;}else{alert("The downloaded asset file is temporarily unavailable.");return false;}}function AddToCartAssetDetail(strAssetId,strUserID,strServerAbsolutePath,strServer,IsTNMCartAllowed,strUserStatus,iUserType,strAssetGUID){var strLink;if(strUserID=='0'){if(IsTNMCartAllowed==0){strLink="https://"+strServerAbsolutePath+strServer+"/br/Sample/SampleWrapperPage.aspx?hidIsCart=Y&hidAssetGUID="+strAssetGUID;submitPageFE(strLink);return false;}else{}}else{if(IsTNMCartAllowed!=1){if(strUserStatus==4){alert('Your registration is still in progress.\nYou will receive a notification when your registration is approved after which you will be allowed to order media.')return false;}}if(iUserType==8||iUserType==4){alert("We're sorry, but this feature is only available to registered media journalists.\nYou are currently on a demonstration account and do not have rights to order any media assets.\nPlease send an email to mediarelations@thenewsmarket.com if you do need to order assets. Thank you.");return false;}}window.document.forms[0].hidAddCart.value='1';}function MoveRestrictionImage(){var netscape=false;var explorer=false;var mac=false;var browser=navigator.userAgent;var os=navigator.platform;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var aLyrs=document.getElementsByTagName("DIV")if(typeof aLyrs=='object'){for(var i=0;i<aLyrs.length;i++){if(aLyrs[i].id.toUpperCase()=='IMGRESTRICTIONDIV'){aLyrs[i].style.top="151px";if(mac&& netscape)aLyrs[i].style.left="0px";else if(explorer)aLyrs[i].style.left="3px";}}}}function MoveRestrictionImageAssetListing(){var netscape=false;var explorer=false;var mac=false;var browser=navigator.userAgent;var os=navigator.platform;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var aLyrs=document.getElementsByTagName("DIV")if(typeof aLyrs=='object'){for(var i=0;i<aLyrs.length;i++){if(aLyrs[i].id.toUpperCase()=='IMGRESTRICTIONDIV'||aLyrs[i].id.toUpperCase()=='TITLEDESCDIV'){aLyrs[i].style.top="-17px"if(mac&& netscape)aLyrs[i].style.left="-2px"}}}}function LoadClipAssetDetail(strAssetId,serverpath,strAssetGUID){var ItemId;ItemId=strAssetIdpopupWin(serverpath+'/br/Clippings/SelectClippingFolder.aspx?type=2&Id='+ItemId,'600','310','yes');return false;}function LoadPreviewAssetDetail(strAssetId,strAssetTypeId,strStoryId,strUserId,strFilePath,isN,serverpath,strAssetGUID){var type=strAssetTypeId;var AssetId=strAssetId;var StoryId=strStoryId;var sCurrentPage='SamplePage';var iUserId=strUserId;var IsPreviewEnabled=0;var file=strFilePath;var firstparam;var imgPath;if(file!='undefined'){if(type==3||type==4){firstparam=serverpath+"/br/CommonPages/Intermediate.aspx?hidFromModule=FRONTEND&hdnPopup=yes&File="+file+"&AssetId="+AssetId+"&StoryId="+StoryId+"&Caller="+sCurrentPage+'&Type='+type+'&NonLoggedPreview='+IsPreviewEnabled;if(type==3){popup=window.open(firstparam,'','width=340,height=440,resizable=yes,scrollbars=yes,menubar=yes','yes');popup.window.moveTo(342,164);}else{if(isN='true'){popupWin(firstparam,'FULL','FULL','yes');}else{pop=window.open(firstparam,'','resizable=yes,width='+screen.availWidth+',height='+screen.availHeight+',scrollbars=yes,menubar=yes','yes')pop.window.moveTo(0,0);}}}else{var ext=file.substring(file.lastIndexOf(".")+1);var secondparam=serverpath+"/br/CommonPages/Intermediate.aspx?Id="+file+","+ext+",270,290";firstparam=serverpath+"/br/CommonPages/Intermediate.aspx?hidFromModule=FRONTEND&isBackEndUser=0&hdnPopup=yes&Type="+type+"&File="+secondparam+"&AssetId="+AssetId+"&StoryId=="+strStoryId+"&Caller="+sCurrentPage+'&NonLoggedPreview='+IsPreviewEnabled;popupWin(firstparam,'340','440','no');}}}function AddToCartStoryDetail(strStoryId,strUserId,strUserType,strUserStatus,strAssetCount,isTNMCartAllowed,strServerAbsolute,strServer,strStoryGUID){if(typeof document.forms[0].hidPageNum=='object'){document.forms[0].hidPageNum.value='1';}var storyid=strStoryId;var usertype;var strLink;if(strUserId=='0')usertype='1';elseusertype='2';if(usertype=='2'){if(strUserStatus==4){alert('Your registration is still in progress.\nYou will receive a notification when your registration is approved after which you will be allowed to order media.')return false;}if(strUserType==8||strUserType==4){alert("We're sorry, but this feature is only available to registered media journalists.\nYou are currently on a demonstration account and do not have rights to order any media assets.\nPlease send an email to mediarelations@thenewsmarket.com if you do need to order assets. Thank you.");return false;}if(strAssetCount==0){alert('There are no media assets associated with this story.');return false;}window.document.forms[0].hidAddToCartStory.value="1"}else{if(strAssetCount==0){alert('There are no media assets associated with this story.');return false;}if(isTNMCartAllowed==0){strLink="https://"+strServerAbsolute+strServer+"/br/Sample/SampleWrapperPage.aspx?hidIsCart=Y&hidStoryGUID="+strStoryGUID;submitPageFE(strLink);return false;}else{window.document.forms[0].hidAddToCartStory.value="1"}}window.document.forms[0].hidIsDownloadListAsset.value="0";window.document.forms[0].hidIsDownloadPath.value=""}function AddToClippingsStoryDetail(strStoryId,strUserId,strServerAbsolutePath,strServerPath,strStoryGUID,strLink){var storyid=strStoryId;strLink=escape(strLink+"&Clip=Y");if(strUserId==0){var sLink="https://"+strServerAbsolutePath+strServerPath+"/br/Sample/SampleWrapperPage.aspx?hidURL="+strLink;submitPageFE(sLink);return false;}popupWin(strServerPath+'/br/Clippings/SelectClippingFolder.aspx?type=1&Id='+storyid,'600','310','yes');return false;}function LoadClipStoryDetail(strStoryId,strServer,strStoryGUID){var ItemId;ItemId=strStoryIdpopupWin(strServer+'/br/Clippings/SelectClippingFolder.aspx?type=1&Id='+ItemId,'600','310','yes');return false;}function openpopupMediaDelivery(){var strQueryString;strQueryString='http://'+strServerNameDyn+strPortDyn+strServerPathDyn+'/br/Help/TermsAndConditionsPage.aspx?Content=Help'submitPageFE(strQueryString);}function fSaveContinue(strMode,iUserID,strUSId){if(strMode!='STREAMING'){var objtxtCCEmailAddress=getObj("txtEmailCCAddress");if(typeof(objtxtCCEmailAddress)=='object'){var strEmails=objtxtCCEmailAddress.valueif(strEmails!=''){var arrayEmails=strEmails.split(";")for(i=0;i<arrayEmails.length;i++){var strTemp=trimtxt(arrayEmails[i]);var strTemp1=strTemp.toString();if(strTemp1!=''){if(!isEmail(strTemp1,"CC email address"))return false;}}}}}if(iUserID==0){if(!validateFormVerifyDel('ADD',1)){return false;}}if(strMode=='PULL'){var objSPInst=getObj("taInstructions");if(typeof objSPInst=='object'){if(objSPInst.value.length>=201){alert('Special Instructions can\'t be more than 200 characters.');return false;}}}elseif(strMode=='PUSH'){var objtxtFTPAddress=getObj("txtFTPAddress");var objtxtStationCallLetters=getObj("txtStationCallLetters");var objchkTelestream=getObj("chkTelestream");var objtxtUserName=getObj("txtUserNamePush");var objtxtPassword=getObj("txtPasswordPush");objDelivery=getObj("TnmPushDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked==true){if(isBlank(objtxtFTPAddress,'FTP Server IP'))return false;if(isBlank(objtxtUserName,'User Name'))return false;if(isBlank(objtxtPassword,'Password'))return false;}objDelivery=getObj("TnmTelestreamDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked==true){if(isBlank(objtxtFTPAddress,'Telestream ClipMail IP'))return false;}objDelivery=getObj("TnmPathFireDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked==true){if(typeof objtxtStationCallLetters=='object'){strTextString=trimtxt(objtxtStationCallLetters.value)iValLength=strTextString.lengthif(iValLength==0){alert('Please check your information on this field, it is necessary for this delivery method.')setFocus(objtxtStationCallLetters);return false;}}if(objtxtStationCallLetters.value.length>10){alert('Station Call Letter cannot be greated than 10');return false;}}var objSPInst=getObj("taInstructions");if(typeof objSPInst=='object'){if(objSPInst.value.length>=201){alert('Special Instructions can\'t be more than 200 characters.');return false;}}}elseif(strMode=='APTN'){var objSPInst=getObj("taInstructions");if(typeof objSPInst=='object'){if(objSPInst.value.length>=201){alert('Special Instructions can\'t be more than 200 characters.');return false;}}}elseif(strMode=='TAPE'){var iUSId=strUSId;var objtxtAddress1=getObj("txtAddress1Tape");var objtxtAddress2=getObj("txtAddress2Tape");var objtxtAddress3=getObj("txtAddress3Tape");var objcboCountry=getObj("cboCountryTape");var objcboState=getObj("cboStateTape");var objtxtState=getObj("txtStateTape");var objtxtCity=getObj("txtCityTape");var objtxtZip=getObj("txtZipTape")var objtxtTelephone=getObj("txtTelephoneTape");var objSPInst=getObj("txtInstruction");if(isBlank(objtxtAddress1,'Address'))return false;if(isQuotes(objtxtAddress1,'Address',1))return false;if(objtxtAddress2.value.length>0){if(isQuotes(objtxtAddress2,'Address',1))return false;}if(objtxtAddress3.value.length>0){if(isQuotes(objtxtAddress3,'Address',1))return false;}if(objcboCountry.selectedIndex==0){alert('Please Select Country');return false;}iCountry=objcboCountry[objcboCountry.selectedIndex].value;if(iCountry==iUSId){if(objcboState.selectedIndex==0){alert('Please Select State');return false;}}else{if(objtxtState.value.length>0){if(isQuotes(objtxtState,'State',1))return false;}}if(objtxtCity.value.length>0){if(isQuotes(objtxtCity,'City',1))return false;}if(objtxtZip.value.length>0){if(isQuotes(objtxtZip,'Postal Code',1))return false;elseif(!isName(objtxtZip,'PostalCode',0,10,0))return false;}if(isBlank(objtxtTelephone,'Telephone number'))return false;if(!isTelePhone(objtxtTelephone,'Telephone number'))return false;if(objSPInst.value.length>=201){alert('Special Instructions can\'t be more than 200 characters.');return false;}}elseif(strMode=='DVD'){var iUSId=strUSId;var objtxtAddress1=getObj("txtAddress1DVD");var objtxtAddress2=getObj("txtAddress2DVD");var objtxtAddress3=getObj("txtAddress3DVD");var objcboCountry=getObj("cboCountryDVD");var objcboState=getObj("cboStateDVD");var objtxtState=getObj("txtStateDVD");var objtxtCity=getObj("txtCityDVD");var objtxtZip=getObj("txtZipDVD")var objtxtTelephone=getObj("txtTelephoneDVD");var objSPInst=getObj("txtInstruction");if(isBlank(objtxtAddress1,'Address'))return false;if(isQuotes(objtxtAddress1,'Address',1))return false;if(objtxtAddress2.value.length>0){if(isQuotes(objtxtAddress2,'Address',1))return false;}if(objtxtAddress3.value.length>0){if(isQuotes(objtxtAddress3,'Address',1))return false;}if(objcboCountry.selectedIndex==0){alert('Please Select Country');return false;}iCountry=objcboCountry[objcboCountry.selectedIndex].value;if(iCountry==iUSId){if(objcboState.selectedIndex==0){alert('Please Select State');return false;}}else{if(objtxtState.value.length>0){if(isQuotes(objtxtState,'State',1))return false;}}if(objtxtCity.value.length>0){if(isQuotes(objtxtCity,'City',1))return false;}if(objtxtZip.value.length>0){if(isQuotes(objtxtZip,'Postal Code',1))return false;elseif(!isName(objtxtZip,'PostalCode',0,10,0))return false;}if(isBlank(objtxtTelephone,'Telephone number'))return false;if(!isTelePhone(objtxtTelephone,'Telephone number'))return false;if(objSPInst.value.length>=201){alert('Special Instructions can\'t be more than 200 characters.');return false;}}elseif(typeof document.forms[0].hidDeliverySet=='object'){document.forms[0].hidDeliverySet.value=strMode;}var hidDelPref;if(document.getElementById("hidDeliveryFormat")){var cboVDOption,rdoWindowVideoFormat;hidDelPref=document.getElementById("hidDeliveryFormat");if(strMode=='STREAMING'){rdoWindowVideoFormat=getObj("rdoWindowVideoFormat",2);if(rdoWindowVideoFormat){if(rdoWindowVideoFormat.checked==true){hidDelPref.value="1";}else{hidDelPref.value="2";}}}else{cboVDOption=getObj("cboVDOption",2);if(cboVDOption){hidDelPref.value=cboVDOption.value;}else{hidDelPref.value="";}}}}function SwitchStateMailingAddress(strUserId,strUSId){var objStateDiv;var explorer=false;var netscape=false;var mac=false;var browser=navigator.userAgent;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var iUSid=strUSId;var objCboCountry=getObj("cboCountry");if(typeof objCboCountry=='object'){if(objCboCountry.value==iUSid){var e=window.document.getElementById("spanSelStateTape");var e1=window.document.getElementById("spanTxtStateTape");var e2=window.document.getElementById("spanStateLabelTape");e.style.display='block';e1.style.display='none';e2.style.visibility='visible';}else{var e=window.document.getElementById("spanSelStateTape");var e1=window.document.getElementById("spanTxtStateTape");var e2=window.document.getElementById("spanStateLabelTape");e.style.display='none';e1.style.display='block';e2.style.visibility='hidden';}}return false;}function SwitchStateMailingAddressDVD(strUserId,strUSId){var objStateDiv;var explorer=false;var netscape=false;var mac=false;var browser=navigator.userAgent;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var iUSid=strUSId;var objCboCountry=getObj("cboCountry");if(typeof objCboCountry=='object'){if(objCboCountry.value==iUSid){var e=window.document.getElementById("spanSelStateDVD");var e1=window.document.getElementById("spanTxtStateDVD");var e2=window.document.getElementById("spanStateLabelDVD");e.style.display='block';e1.style.display='none';e2.style.visibility='visible';}else{var e=window.document.getElementById("spanSelStateDVD");var e1=window.document.getElementById("spanTxtStateDVD");var e2=window.document.getElementById("spanStateLabelDVD");e.style.display='none';e1.style.display='block';e2.style.visibility='hidden';}}return false;}function TelestreamChange(){if(typeof document.forms[0].hidTeleStreamChecked=='object'){var objChkTelestream=getObj("chkTelestream")if(typeof objChkTelestream=='object'){if(objChkTelestream.checked){document.forms[0].hidTeleStreamChecked.value='1'document.forms[0].hidTeleStreamChanged.value='1'}else{document.forms[0].hidTeleStreamChecked.value='0'document.forms[0].hidTeleStreamChanged.value='1'}}}document.forms[0].submit();}function catchKeyPress(code,sender){if(code=='13'){document.forms[0].hidEnterPress.value='1'document.forms[0].LoginClick.value='1'validateLoginMain(1,'1');return false;}}function DeliveryChanged(iSessionId,strHost,strServer,strPort){var objDelivery;var objChecked;if(iSessionId==0){objDelivery=getObj("TnmTelestreamDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=2&hidDeliveryChanged=0&hidSubDeliveryType=1';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}objDelivery=getObj("TnmPathFireDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=2&hidDeliveryChanged=0&hidSubDeliveryType=2';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}objDelivery=getObj("TnmPullDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=1&hidDeliveryChanged=0'document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}objDelivery=getObj("TnmPushDeliveryRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=2&hidDeliveryChanged=0';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}objDelivery=getObj("TnmGlobalVideoRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=4&hidDeliveryChanged=0';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}objDelivery=getObj("TNMTapeRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=3&hidDeliveryChanged=0'document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}objDelivery=getObj("TNMDVDRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='VerifyDeliveryInfo.aspx?hidStep2Page=6&hidDeliveryChanged=0'document.forms[0].hidDeliveryChanged.value='1'document.forms[0].submit();return false;}}else{objDelivery=getObj("TnmTelestreamDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked){document.forms[0].action='https://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=2&hidDeliveryChanged=0&hidSubDeliveryType=1';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TnmTelestreamDeliveryRadio'document.forms[0].submit();return false;}objDelivery=getObj("TnmPathFireDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked){document.forms[0].action='https://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=2&hidDeliveryChanged=0&hidSubDeliveryType=2';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TnmPathFireDeliveryRadio'document.forms[0].submit();return false;}objDelivery=getObj("TnmPullDeliveryRadio");objChecked=DeliveryChecked(objDelivery)if(objChecked){document.forms[0].action='http://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=1&hidDeliveryChanged=0'document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TnmPullDeliveryRadio'document.forms[0].submit();return false;}objDelivery=getObj("TnmPushDeliveryRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='https://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=2&hidDeliveryChanged=0';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TnmPushDeliveryRadio'document.forms[0].submit();return false;}objDelivery=getObj("TnmGlobalVideoRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='http://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=4&hidDeliveryChanged=0';document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TnmGlobalVideoRadio'document.forms[0].submit();return false;}objDelivery=getObj("TNMTapeRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='http://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=3&hidDeliveryChanged=0'document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TNMTapeRadio'document.forms[0].submit();return false;}objDelivery=getObj("TNMDVDRadio");objChecked=DeliveryChecked(objDelivery);if(objChecked){document.forms[0].action='http://'+strHost+strPort+strServer+'/br/ShoppingCart/VerifyDeliveryInfo.aspx?hidStep2Page=6&hidDeliveryChanged=0'document.forms[0].hidDeliveryChanged.value='1'document.forms[0].hidRadioId.value='TNMDVDRadio'document.forms[0].submit();return false;}}}function DeliveryChecked(objDel){if(typeof objDel=='object'){if(objDel.checked){return true;}else{return false;}}else{return false;}}function validateFormVerifyDel(strMode,iUserType){var iUSid;var txtEmailType=getObj("txtEmail","1")var txtPasswordType=getObj("txtPassword","1")var txtVerifyPasswordType=getObj("txtVerifyPassword","1")var txtFirstNameType=getObj("txtFirstName","1")var txtLastNameType=getObj("txtLastName","1")var cmbPositionType=getObj("cmbPosition","2")var txtOtherPositionType=getObj("txtOtherPosition","1")var txtTelephoneType=getObj("txtTelephone","1")var txtFaxType=getObj("txtFax","1")var txtAddress1Type=getObj("txtAddress1","1")var txtAddress2Type=getObj("txtAddress2","1")var txtAddress3Type=getObj("txtAddress3","1")var cmbCountryType=getObj("cmbCountry","2")var cmbSelStateType=getObj("cmbSelState","2")var txtStateType=getObj("txtState","1")var txtCityType=getObj("txtCity","1")var txtPostalCodeType=getObj("txtPostalCode","1")var txtOtherOrgnizationNameType=getObj("txtOtherOrgnizationName","1")var cmbMediaTypeType=getObj("cmbMediaType","2")var cmbTVFormatType=getObj("cmbTVFormat","2")var txtYourdepartmentType=getObj("txtYourdepartment","1")var txtUrlWebAddressType=getObj("txtUrlWebAddress","1")var cmbHearAboutUsType=getObj("cmbHearAboutUs","2")var txtHearAboutUsType=getObj("txtHearAboutUs","1")var txtRemarksType=getObj("txtRemarks","1")var rdoRegEditorial=getObj("rdoEditTm")var rdoIndProducer=getObj("rdoIndPr");var rdoMarket=getObj("rdoMarket")var rdoOthers=getObj("rdoOthers");var rdoClient=getObj("rdoClient");if(typeof rdoRegEditorial=='object'){if(rdoRegEditorial.checked){iUserType=1;}}if(typeof rdoIndProducer=='object'){if(rdoIndProducer.checked){iUserType=2;}}if(typeof rdoMarket=='object'){if(rdoMarket.checked){iUserType=11;}}if(typeof rdoOthers=='object'){if(rdoOthers.checked){iUserType=7;}}if(typeof rdoClient=='object'){if(rdoClient.checked){iUserType=4;}}iUSid=cmbCountryType[1].value;if(strMode=='ADD'){if(!isEmail(txtEmailType,'Email Address'))return false;if(isBlank(txtPasswordType,'Password'))return false;if(txtPasswordType.value.length<4){alert('Please enter password more than 3 characters');txtPasswordType.focus();return false;}if(isBlank(txtVerifyPasswordType,'Verify Password'))return false;if(trimtxt(txtVerifyPasswordType)==''){alert("Please verify your password.");txtVerifyPasswordType.focus();return false;}if(txtPasswordType.value!==txtVerifyPasswordType.value){alert('Verify Password and Password should be same');txtPasswordType.focus();return false;}}if(isBlank(txtFirstNameType,'First Name'))return false;if(!isAlpha(txtFirstNameType,'First Name'))return false;if(isQuotes(txtFirstNameType,'First Name','1'))return false;if(isBlank(txtLastNameType,'Last Name'))return false;if(!isAlpha(txtLastNameType,'Last Name'))return false;if(isQuotes(txtLastNameType,'Last Name','1'))return false;if(typeof cmbPositionType=='object'){if(cmbPositionType.selectedIndex==0){alert('Please Select Position');cmbPositionType.focus();return false;}else{if(cmbPositionType.selectedIndex==1){if(isBlank(txtOtherPositionType,'Other Position'))return false;if(isQuotes(txtOtherPositionType,'Other Position','1'))return false;}}}if(isBlank(txtTelephoneType,'Telephone number'))return false;if(!isTelePhone(txtTelephoneType,'Telephone number'))return false;if(trimtxt(txtFaxType.value)!=''){if(isQuotes(txtFaxType,'Fax Number',1))return false;if(!isTelePhone(txtFaxType,'Fax'))return false;}if(trimtxt(txtAddress1Type)==''){alert("Address is required. \nPlease enter an Address.");txtAddress1Type.focus();return false;}if(isQuotes(txtAddress1Type,'Address',1))return false;if(isQuotes(txtAddress2Type,'Address',1))return false;if(isQuotes(txtAddress3Type,'Address',1))return false;if(cmbCountryType.selectedIndex==0){alert('Please Select Country');cmbCountryType.focus();return false;}iCountry=cmbCountryType[cmbCountryType.selectedIndex].valueif(iCountry==iUSid){if(cmbSelStateType.selectedIndex==0){alert('Please Select State');cmbSelStateType.focus();return false;}}else{if(isQuotes(txtStateType,'State',1))return false;if(trimtxt(txtStateType.value)!=''){if(!isAlpha(txtStateType,'State'))return false;}}if(isQuotes(txtCityType,'City',1))return false;if(trimtxt(txtPostalCodeType)!=''){if(isQuotes(txtPostalCodeType,'Postal Code',1))return false;else if(!isName(txtPostalCodeType,'PostalCode',0,10,0))return false;}if(trimtxt(txtOtherOrgnizationNameType)==''){alert("Please enter an Organization Name.");txtOtherOrgnizationNameType.focus();return false;}if(isQuotes(txtOtherOrgnizationNameType,'Organization Name','1'))return false;if((iUserType==1)||(iUserType==2)){if(cmbMediaTypeType.selectedIndex==0){alert('Please Select Media Type');cmbMediaTypeType.focus();return false;}var MediaType=cmbMediaTypeType[cmbMediaTypeType.selectedIndex].text;if(MediaType.toUpperCase()=='TV'){if(cmbTVFormatType.selectedIndex==0){alert('Please Select Video Standard');cmbTVFormatType.focus();return false;}}}if((iUserType==1)||(iUserType==2)||(iUserType==6)){if(trimtxt(txtYourdepartmentType)!=''){if(!isAlpha(txtYourdepartmentType,'Your department'))return false;if(isQuotes(txtYourdepartmentType,'Your department','1'))return false;}}if(isQuotes(txtUrlWebAddressType,'Web Address',1))return false;if(iUserType!=6){if(isQuotes(txtRemarksType,'Remarks',1))return false;if(!checkLength(txtRemarksType,500,'Remarks'))return false;}return true}function SwitchUsersDeliveryInfo(iType){var objStateDiv;var explorer=false;var netscape=false;var mac=false;var browser=navigator.userAgent;if(browser.indexOf('Mac')>0)mac=true;if(browser.indexOf('MSIE')>0)explorer=true;elsenetscape=true;var obj11=document.getElementById("spanOtherUsers");var obj12=document.getElementById("spanTVFormat");if(iType==1||iType==2){if(explorer){obj11.style.display='';obj12.style.display='';}if(netscape){showElement(getElement('spanOtherUsers'));showElement(getElement('spanTVFormat'));}}else{if(explorer){obj11.style.display='none';obj12.style.display='none';}if(netscape){hideElement(getElement('spanOtherUsers'));hideElement(getElement('spanTVFormat'));}}document.forms[0].hidUserType.value=iType;document.forms[0].submit();}function LogOutComplete(txtServerName){sLink="http://"+txtServerName+"/br/Login/LogoutPage.aspx";submitPageFE(sLink);return false;}function GoToOrderDetail(strLink){window.document.forms[0].hidPageNum.value="1";submitPageFE(strLink);}function TestConnection(){var objtxtFTPAddress=getObj("txtFTPAddress");var objchkTelestream=getObj("chkTelestream");var objtxtUserName=getObj("txtUserNamePush");var objtxtPassword=getObj("txtPasswordPush");if(isBlank(objtxtFTPAddress,'FTP Server IP'))return false;if(isBlank(objtxtUserName,'User Name'))return false;if(isBlank(objtxtPassword,'Password'))return false;fptaddress=trimtxt(objtxtFTPAddress)if(fptaddress.charAt(3)==":")fptaddress=fptaddress.substring(6);popUpPage='TestConnection.aspx?strCallingPage=Shopping Cart&strHostName='+fptaddress+'&strUsername='+escape(objtxtUserName.value)+'&strPassword='+escape(objtxtPassword.value);popupWin(popUpPage,'445','250','yes','FTP Test Connection');return false;}function MyAccountTestConnection(){var objtxtFTPAddress=getObj("txtFTPAddress",1);var objchkTelestream=getObj("chkTelestream",2);var objtxtUserName=getObj("txtUserName",1);var objtxtPassword=getObj("txtserverPasswrod",1);if(isBlank(objtxtFTPAddress,'FTP Server IP'))return false;if(isBlank(objtxtUserName,'User Name'))return false;if(isBlank(objtxtPassword,'Password'))return false;fptaddress=trimtxt(objtxtFTPAddress)if(fptaddress.charAt(3)==":")fptaddress=fptaddress.substring(6);popUpPage='../ShoppingCart/TestConnection.aspx?strCallingPage=Shopping Cart&strHostName='+fptaddress+'&strUsername='+escape(objtxtUserName.value)+'&strPassword='+escape(objtxtPassword.value);popupWin(popUpPage,'400','300','yes','FTP Test Connection');return false;}function validationmyccount(){var objtxtFTPAddress=getObj("txtFTPAddress",1);var objtxttechtelephone=getObj("txttechtelephone",1);var objchkTelestream=getObj("chkTelestream",2);var objtxtUserName=getObj("txtUserName",1);var objtxtPassword=getObj("txtserverPasswrod",1);var objtxtverifyPassword=getObj("txtverifyPassword",1)window.document.forms[0].hidSave.value="1";if(isBlank(objtxtFTPAddress,'FTP Server IP'))return false;if(trimtxt(objtxttechtelephone.value)!=''){if(!isTelePhone(objtxttechtelephone,'Telephone'))return false;}if(window.document.forms[0].chkTelestream.checked==false){if(isBlank(objtxtUserName,'User Name'))return false;if(isBlank(objtxtPassword,'Server Password'))return false;if(isBlank(objtxtverifyPassword,'Verify Password'))return false;if((trimtxt(objtxtPassword.value)!='')||(trimtxt(objtxtverifyPassword.value)!='')){if(isBlank(objtxtUserName,'User Name'))return false;if(isBlank(objtxtPassword,'Server Password'))return false;if(isBlank(objtxtverifyPassword,'Verify Password'))return false;if(objtxtPassword.value!=objtxtverifyPassword.value){alert("The passwords you typed do not match.");objtxtverifyPassword.focus();return false;}}}return true;}function repeatOrderClicked(){var somethingIsChecked=false;window.document.forms[0].hidCheckedRequests.value="";var ctr=0;for(var i=0;i<window.document.forms[0].elements.length;i++){if(window.document.forms[0].elements[i].type=="checkbox"){if(window.document.forms[0].elements[i].checked==true){ctr++;somethingIsChecked=true;window.document.forms[0].hidCheckedRequests.value=window.document.forms[0].elements[i].id+","+window.document.forms[0].hidCheckedRequests.value;}}}if(somethingIsChecked==false){alert("Please select an order.");return false;}return true;}var objFrmName='window.document.forms[0]';var objFrm=eval(objFrmName);var iBackTo=0;function SubmitSearch(boolButtonClick,strComboId){var objHealthAreaControl;var objBusinessControl;var objProductsControl;objHealthAreaControl=eval(objFrmName+'.'+strSearchControl+'_'+'lstHealthArea')objBusinessControl=eval(objFrmName+'.'+strSearchControl+'_'+'lstBusiness')objProductsControl=eval(objFrmName+'.'+strSearchControl+'_'+'lstProducts')if(boolButtonClick==false){if(strComboId=='1'){if(typeof objHealthAreaControl=='object'){if(objHealthAreaControl.options[objHealthAreaControl.selectedIndex].value!=-1){objFrm.hidFilter.value=objHealthAreaControl.options[objHealthAreaControl.selectedIndex].value;if(typeof objBusinessControl=='object'){objBusinessControl.selectedIndex=0;}if(typeof objProductsControl=='object'){objProductsControl.selectedIndex=0;}}else{return false;}}}else if(strComboId=='2'){if(typeof objBusinessControl=='object'){if(objBusinessControl.options[objBusinessControl.selectedIndex].value!=-1){objFrm.hidFilter.value=objBusinessControl.options[objBusinessControl.selectedIndex].valueif(typeof objProductsControl=='object'){objProductsControl.selectedIndex=0;}if(typeof objHealthAreaControl=='object'){objHealthAreaControl.selectedIndex=0;}}else{return false;}}}else{if(typeof objProductsControl=='object'){if(objProductsControl.options[objProductsControl.selectedIndex].value!=-1){objFrm.hidFilter.value=objProductsControl.options[objProductsControl.selectedIndex].valueif(typeof objHealthAreaControl=='object'){objHealthAreaControl.selectedIndex=0;}if(typeof objBusinessControl=='object'){objBusinessControl.selectedIndex=0;}}else{return false;}}}objFrm.hidComboId.value=strComboId}else{objFrm.hidFilter.value='0'objFrm.hidComboId.value='0'if(typeof objHealthAreaControl=='object'){objHealthAreaControl.selectedIndex=0}if(typeof objBusinessControl=='object'){objBusinessControl.selectedIndex=0}if(typeof objProductsControl=='object'){objProductsControl.selectedIndex=0}}objFrm.method="post"if(strSubmit!=''){if(strSubmit=='MultimediaPressPacks.aspx'){objFrm.hidSelectedLink.value='5';}objFrm.action=strSubmit}objFrm.hidFromSearch.value='1'objFrm.hidSearchBackTo.value='1'if(typeof objFrm.hidPageNum=='object'){objFrm.hidPageNum.value='1';}objFrm.submit()}function setPageNumberForRemoveCart(){var objFrm=document.forms[0];strHidPageNumber=objFrm.hidPageNum.value;strHidPageSize=objFrm.hidRecordsPerPage.value;strTotalRecordCount=objFrm.hidTotalRecordCount.value;if(strHidPageNumber!=""){strHidPageNumber=parseInt(strHidPageNumber,10)}if(strHidPageSize!=""){strHidPageSize=parseInt(strHidPageSize,10)}if(strTotalRecordCount!=""){strTotalRecordCount=parseInt(strTotalRecordCount,10)}if(strHidPageNumber!=""&& strHidPageSize!=""&& strTotalRecordCount!=""){intNumber=Math.ceil((strTotalRecordCount-1)/strHidPageSize)}if(intNumber<strHidPageNumber){objFrm.hidPageNum.value=intNumber}return true;}function focusOnLOginPage(mode){if(mode=='2'){objFirstName=getObj("txtFirstName",1);if(typeof(objFirstName)=='object'){objFirstName.focus();}}else{objTxtLogin=getObj("txtUserName");if(typeof(objTxtLogin)=='object'){objTxtLogin.focus();}}}function setTabSample(obj){if(!document.getElementById){return};for(i=1;i<5;i++){if(obj==1){objDiv1=document.getElementById("leftBody");objDiv1.style.visibility='visible';objDiv2=document.getElementById("MiddleBody");objDiv2.style.visibility='hidden';objDiv3=document.getElementById("LastBody");objDiv3.style.visibility='hidden';}else if(obj==2){objDiv1=document.getElementById("leftBody");objDiv1.style.visibility='hidden';objDiv2=document.getElementById("MiddleBody");objDiv2.style.visibility='visible';objDiv3=document.getElementById("LastBody");objDiv3.style.visibility='hidden';if((navigator.appName=="Netscape")&&(navigator.appVersion.indexOf("Macintosh")>0))objDiv2.style.top="-167px";else if((navigator.appName=="Microsoft Internet Explorer")&&(navigator.appVersion.indexOf("Macintosh")>0))objDiv2.style.top="-150px";elseobjDiv2.style.top="-150px";}else if(obj==3){objDiv1=document.getElementById("leftBody");objDiv1.style.visibility='hidden';objDiv2=document.getElementById("MiddleBody");objDiv2.style.visibility='hidden';objDiv3=document.getElementById("LastBody");objDiv3.style.visibility='visible';if((navigator.appName=="Netscape")&&(navigator.appVersion.indexOf("Macintosh")>0))objDiv3.style.top="-334px";else if((navigator.appName=="Microsoft Internet Explorer")&&(navigator.appVersion.indexOf("Macintosh")>0)){objDiv3.style.top="-202px";}elseobjDiv3.style.top="-300px";}if(i==obj){document.getElementById("tabBorder"+i).style.backgroundColor="#ffffff";if(i<4)document.getElementById(i).style.fontWeight="bold";}else{document.getElementById("tabBorder"+i).style.backgroundColor="#999999";if(i<4)document.getElementById(i).style.fontWeight="normal";}}}function setTabSubmit(iCount){var strStoryGUID,strAssetGUID,strIsCart,strURL;strStoryGUID=document.forms[0].hidStoryGUID.value;strAssetGUID=document.forms[0].hidAssetGUID.value;strIsCart=document.forms[0].hidIsCart.value;strURL=document.forms[0].hidURL.value;strLink="SampleSearchResultPage.aspx"+"?hidStoryGUID="+strStoryGUID+"&hidAssetGUID="+strAssetGUID+"&hidIsCart="+strIsCart+"&hidURL="+escape(strURL);if(iCount==1){window.document.forms[0].action=strLink+'&SelTab=1'window.document.forms[0].method="Post"window.document.forms[0].submit()}else{window.document.forms[0].action=strLink+'&SelTab=2'window.document.forms[0].method="Post"window.document.forms[0].submit()}}function ResetButton(){window.document.forms[0].reset();return false;}function saveClickedPrefTape(iUSStateId){var txtAddress1=getObj("txtAddress1","1");var txtAddress2=getObj("txtAddress2","1");var txtAddress3=getObj("txtAddress3","1");var txtZip=getObj("txtZip","1");var txtCity=getObj("txtCity","1");var txtPhone=getObj("txtTelephone","1");var cboCountry=getObj("cmbCountry","1");var cboState=getObj("cmbSelState","1");var txtState=getObj("txtState","1");if(isBlank(txtAddress1,'Address'))return false;if(isQuotes(txtAddress1,'Address',1))return false;if(txtAddress2.value.length>0){if(isQuotes(txtAddress2,'Address2',1))return false;}if(txtAddress3.value.length>0){if(isQuotes(txtAddress3,'Address3',1))return false;}if(txtZip.value.length>0){if(isQuotes(txtZip,'Postal Code',1))return false;else if(!isName(txtZip,'PostalCode',0,10,0))return false;}if(txtCity.value.length>0){if(isQuotes(txtCity,'City',1))return false;}if(isBlank(txtPhone,'Telephone number'))return false;if(!isTelePhone(txtPhone,'Telephone number'))return false;if(cboCountry[cboCountry.selectedIndex].value==iUSStateId){if(cboState.selectedIndex==0){alert("Please select a State/Province")cboState.selectedIndex=0;return false;}}else{if(txtState.value.length>0){if(isQuotes(txtState,'State',1))return false;}}if(cboCountry.selectedIndex==0){alert("Please select a Country");return false;}}function PasswordHelpXML(){var sLink='../Login/PasswordHelp.aspx?isPopup=1';popupWin(sLink,'440','360','no');}function catchKeyPressLogin(code,sender,ServerPath,ApplicationPath,PageName,iRegister){if(code=='13'){if(iRegister==1){return validateRegister();}else{return validateLogin(ServerPath,ApplicationPath,PageName);}}}function catchKeyPressLoginNS(event,ServerPath,ApplicationPath,PageName,iRegister){var code;code=event.which;if(code=='13'){if(iRegister==1){return validateRegister();}else{if(typeof document.forms[0].hidEnterPress=='object'){document.forms[0].hidEnterPress.value='1';}return validateLogin(ServerPath,ApplicationPath,PageName);}}}function MoveToStep(strStep){if(typeof document.forms[0].hidNavigate=='object'){document.forms[0].hidNavigate.value=strStep;}document.forms[0].submit();return false;}function SaveMyAccount(strServer,strPort){var txtNewPassword=getObj("txtNewPassword","1");var txtCurrPassword=getObj("txtCurrentPassword","1");var txtVerPassword=getObj("txtVerifyPassword","1");var ObjrdoBrodcast=getObj("rdoBrodcast",2)var ObjrdoStreaming=getObj("rdoStreaming",2)if(ObjrdoBrodcast){if(ObjrdoBrodcast.checked==true){var rdoPush=getObj("rdoPush","2");var rdoPull=getObj("rdoPull","2");var rdoTape=getObj("rdoTape","2");var rdoAptn=getObj("rdoAptn","2");var rdoPushTele=getObj("rdoPushTele","2");var rdoPushPath=getObj("rdoPushPath","2");var rdoDVD=getObj("rdoDVD","2");}else{var rdoWindowVideoFormat=getObj("rdoWindowVideoFormat","2");var rdoQuickTimeVideoFormat=getObj("rdoQuickTimeVideoFormat","2");}}else{var rdoPush=getObj("rdoPush","2");var rdoPull=getObj("rdoPull","2");var rdoTape=getObj("rdoTape","2");var rdoAptn=getObj("rdoAptn","2");var rdoPushTele=getObj("rdoPushTele","2");var rdoPushPath=getObj("rdoPushPath","2");var rdoDVD=getObj("rdoDVD","2");}var rdoWindowsPlayer=getObj("rdoWindowsPlayer","2");var rdoQuickPlayer=getObj("rdoQuickPlayer","2");var objcboVDOption=getObj("cboVDOption","1");if(trimtxt(txtNewPassword.value).length!=0||trimtxt(txtVerPassword.value).length!=0){if(isBlank(txtCurrPassword,'Current Password'))return false;if(txtCurrPassword.value.length<4){alert('Please enter password more than 3 characters');txtCurrPassword.focus();return false;}if(isBlank(txtNewPassword,'New Password'))return false;if(txtNewPassword.value.length<4){alert('Please enter password more than 3 characters');txtNewPassword.focus();return false;}if(isBlank(txtVerPassword,'Verify Password'))return false;if(trimtxt(txtVerPassword)==''){alert("Please verify your password.");txtVerPassword.focus();return false;}if(txtNewPassword.value!==txtVerPassword.value){alert('Verify Password and Password should be same');txtNewPassword.focus();return false;}}var deliveryId;var videostreamId;if(ObjrdoBrodcast){if(ObjrdoBrodcast.checked==true){if(rdoPull.checked==true){deliveryId=1}else if(rdoPush.checked==true){deliveryId=2}else if(rdoTape.checked==true){deliveryId=4}else if(rdoAptn.checked==true){deliveryId=5}else if(rdoPushTele.checked==true){deliveryId=6}else if(rdoDVD.checked==true){deliveryId=8}else if(rdoPushPath.checked==true){deliveryId=7}}else{if(rdoWindowVideoFormat.checked==true){deliveryId=9}else if(rdoQuickTimeVideoFormat.checked==true){deliveryId=10}}}else{if(rdoPull.checked==true){deliveryId=1}else if(rdoPush.checked==true){deliveryId=2}else if(rdoTape.checked==true){deliveryId=4}else if(rdoAptn.checked==true){deliveryId=5}else if(rdoPushTele.checked==true){deliveryId=6}else if(rdoDVD.checked==true){deliveryId=8}else if(rdoPushPath.checked==true){deliveryId=7}}if(rdoWindowsPlayer.checked==true){videostreamId=9}else if(rdoQuickPlayer.checked==true){videostreamId=10}document.forms[0].hidPassword.value=txtNewPassword.value;document.forms[0].hidCurrPassword.value=txtCurrPassword.value;document.forms[0].hidDeliveryID.value=deliveryId;document.forms[0].hidVideoStreamID.value=videostreamId;document.forms[0].hidSaveMyAcc.value="SAVE";if(typeof objcboVDOption=='object'){document.forms[0].hidDeliveryFormat.value=objcboVDOption.options[objcboVDOption.selectedIndex].value;}document.forms[0].submit();return false;}function OpenMyAccount(path,newWindow){if(newWindow=='TRUE'){window.open(path,'','resizable=yes,width=700,height=450,scrollbars=yes,menubar=yes,status=yes,toolbar=yes,location=yes','yes');}else if(newWindow=='FALSE'){submitPageFE(path);return false;}}function RemoveAllAsset(Id,varType,operationType,AssetCount,iUserType,mstrUserStatus,PreApproved,IsTNMCartAllowed,CallingPage,FromWhere,ApplicationName,StoryAssetGUID,strServername){if(typeof document.forms[0].hidPageNum=='object'){document.forms[0].hidPageNum.value='1';}if(IsTNMCartAllowed.toUpperCase()=='TRUE'){IsTNMCartAllowed='1';}else{IsTNMCartAllowed='0';}if(Id==0){if(IsTNMCartAllowed=='0'){var strLink;if(CallingPage=='Story')strDefaultLink="https://"+strServername+"/"+ApplicationName+'/br/Sample/SampleWrapperPage.aspx?hidIsCart=Y&hidStoryGUID='+StoryAssetGUID;elsestrDefaultLink="https://"+strServername+"/"+ApplicationName+'/br/Sample/SampleWrapperPage.aspx?hidIsCart=Y&hidAssetGUID='+StoryAssetGUID;submitPageFE(strDefaultLink);return false;}else{if(CallingPage=='Story'){if(AssetCount=='0'){alert('There are no media assets associated with this story.');return false;}}}}else{if(mstrUserStatus=='4'&& PreApproved=='0'){alert('Your registration is still in progress.\nYou will receive a notification when your registration is approved after which you will be allowed to order media.')return false;}if(iUserType=='8'||iUserType=='4'){alert("We're sorry, but this feature is only available to registered media journalists.\nYou are currently on a demonstration account and do not have rights to order any media assets.\nPlease send an email to mediarelations@thenewsmarket.com if you do need to order assets. Thank you.");return false;}if(CallingPage=='Story'){if(AssetCount==0){alert('There are no media assets associated with this story.');return false;}}}GetRemovedAssetCheckedCount();if(checkboxcount==0){switch(operationType){case 1:alert("To add Media Assets to the Cart, please check at least one Media Asset.");break;case 2:alert("To remove Media Assets, please check at least one Media Asset.");break;case 3:alert("To move Media Assets, please check at least one Media Asset.");break;}return false;}else{document.forms[0].hidRemovedAssetIDs.value=checkedIds;document.forms[0].hidRemoveClicked.value="REMOVE";return true;}}function GetRemovedAssetCheckedCount(){totalcheckboxcount=0;checkboxcount=0;checkedIds="";for(i=0;i<window.document.forms[0].elements.length;i++){if(window.document.forms[0].elements[i].type=="checkbox"){totalcheckboxcount=totalcheckboxcount+1;if(window.document.forms[0].elements[i].checked==true){if(checkedIds==""){checkedIds=window.document.forms[0].elements[i].value;}else{checkedIds=checkedIds+","+window.document.forms[0].elements[i].value;}checkboxcount=checkboxcount+1;}}}}function DisablePalRadio(intPathFire,intNumberOfFormats,iLockNTSC){var iLoopCount;if(intPathFire==1){if(iLockNTSC==1){for(iLoopCount=0;iLoopCount<intNumberOfFormats;iLoopCount++){var objTNMFormat=getObj("TnmTapeRadioList_"+iLoopCount)if(typeof(objTNMFormat)=='object'){if(iLoopCount!=0){objTNMFormat.disabled=true;}else{objTNMFormat.disabled=false;objTNMFormat.checked=true;}}}}}else{for(iLoopCount=0;iLoopCount<intNumberOfFormats;iLoopCount++){var objTNMFormat=getObj("TnmTapeRadioList_"+iLoopCount)if(typeof(objTNMFormat)=='object'){objTNMFormat.disabled=false;}}}}function DeliveryRadioChangedMyAccount(intDelivery,intLockNTSC){var objcboVideoOption=getObj("cboVDOption")if(typeof objcboVideoOption=='object'){if(intLockNTSC==1){if(intDelivery==7){objcboVideoOption.options[0].selected=true;objcboVideoOption.disabled=true;}else{objcboVideoOption.disabled=false;}}}}function SelectDeliveryFormat(intDeliveryFormat,intLockNTSC){var objChecked;var iLoopCount;var objrdoPathFire=getObj("rdoPushPath")var objcboVideoOption=getObj("cboVDOption")objChecked=DeliveryChecked(objrdoPathFire)if(typeof objcboVideoOption=='object'){if(objChecked==true){if(intLockNTSC==1){objcboVideoOption.options[0].selected=true;objcboVideoOption.disabled=true;}else{objcboVideoOption.disabled=false;for(iLoopCount=0;iLoopCount<objcboVideoOption.options.length;iLoopCount++){if(objcboVideoOption.options[iLoopCount].value==intDeliveryFormat){objcboVideoOption.options[iLoopCount].selected=true;}}}}else{for(iLoopCount=0;iLoopCount<objcboVideoOption.options.length;iLoopCount++){if(objcboVideoOption.options[iLoopCount].value==intDeliveryFormat){objcboVideoOption.options[iLoopCount].selected=true;}}}}}function PageOnLoad(){var strRadio=eval('document.forms[0].hidRadioId')if(strRadio.value!=''){var strRadioId='objContainerControl_objTemplateContainerControl_objVerifyDeliveryInfoControl_objMediaDeliveryControl_'+strRadio.value;var objRadio=document.getElementById(strRadioId)objRadio.checked=true;}}function DeliveryPrefChanged(ControlID){var hidDelPref=document.getElementById("hidDeliveryPref");hidDelPref.value=ControlID;document.forms[0].submit();}function CartStep2DeliveryPrefChanged(ControlID,strServerName,strServerPath){var hidDelPref=document.getElementById("hidDeliveryPrefCheckOut");hidDelPref.value=ControlID;document.forms[0].submit();}function ValidateUserForCart_1(AssetCount,storyAssetId,Id,iUserType,mstrUserStatus,PreApproved,IsTNMCartAllowed,CallingPage,FromWhere,ApplicationName,StoryAssetGUID,strServername,strPageName,strDownloadPath){var objFrm=window.document.forms[0];if(strDownloadPath!=""){document.forms[0].hidIsDownloadListAsset.value="1";document.forms[0].hidIsDownloadPath.value=strDownloadPathdocument.forms[0].submit();return false;}else{alert("The downloaded asset file is temporarily unavailable.");return false;}}function ImagePreviewIcon(){if(typeof document.forms[0].hidIsDownloadListAsset=='object'){document.forms[0].hidIsDownloadListAsset.value="";}if(typeof document.forms[0].hidIsDownloadPath=='object'){document.forms[0].hidIsDownloadPath.value="";}return true;}function CheckDownLoad(){var objFrm=window.document.forms[0];if(objFrm.hidISDownLoad.value=="1"&& objFrm.hidDownloadPath.value!=""){objFrm.hidIsLoad.value="1";objFrm.submit();}}function DownloadDocStills(strPreviewPath){if(strPreviewPath!=""){document.forms[0].hidIsDownloadListAsset.value="1";document.forms[0].hidIsDownloadPath.value=strPreviewPath;document.forms[0].submit();return false;}else{alert("The downloaded asset file is temporarily unavailable.");return false;}}function MediaPlayerSubmit(){var objFrmName='window.document.forms[0]';var objFrm=eval(objFrmName);objMediaPlayer=getObj("lstMediaPlayer1");if(typeof objMediaPlayer=='object'){if(typeof objFrm.hidMPSelectedValue=='object')objFrm.hidMPSelectedValue.value=objMediaPlayer.options[objMediaPlayer.selectedIndex].value}objFrm.submit();return false;}