Version:1.0 StartHTML:000000232 EndHTML:000065057 StartFragment:000056579 EndFragment:000064988 StartSelection:000056579 EndSelection:000064972 SourceURL:http://ezto.mheducation.com/hm.tpx?_=0.7862599712668789_1512396415246 .video-js { width: 300px; height: 150px; } .vjs-fluid { padding-top: 56.25% } Tax Return Project $(document).ready(function(){ $(‘.french’).palette({auto:true,language:’french’}); $(‘.frenchInstructor’).palette({auto:false,language:’french’}); $(‘.german’).palette({auto:true,language:’german’}); $(‘.germanInstructor’).palette({auto:false,language:’german’}); $(‘.italiano’).palette({auto:true,language:’italiano’}); $(‘.italianoInstructor’).palette({auto:false,language:’italiano’}); $(‘.spanish’).palette({auto:true,language:’spanish’}); $(‘.spanishInstructor’).palette({auto:false,language:’spanish’}); }); function doHelp() { theWin= window.open( ‘/EZTestOnline/Classware/Help/index.html’, ‘Help’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=625,height=450,screenX=20,screenY=20,left=20,top=20’ ); theWin.focus(); } var navControlsEnabled= false; var bgSave= false; // Notify getcompletion call is required or not var completionRequired = false; function doNext( nextID ) { disableNavigationButton(‘http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm’); continueTest(nextID); } var abortCompletenessCheck= false; function doJump( nextID ) { disableNavigationButton(‘http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm’); return continueTest(nextID); } function doSave( nextID ) { if (!checkTinymceContent()) return false; bgSave= true; backgroundSave(); try{ ex_allow_regather(); }catch (err) {} } function backgroundSave() { if (!bgSave) return; ex_startgather(‘backgroundSave’, null); if(!ex_gather()) return; if (!lsiGather(‘backgroundSave’, ”, false)) return; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”bgframe”; document.questionForm.nextID.value=”save”; document.questionForm.background.value=”true”; var form = $(‘form[name=”questionForm”]’); var formAction = form.attr( ‘action’ ); $.ajax({ url: formAction, type: ‘POST’, async: false, data: form.serialize(), error: function(XMLHttpRequest, textStatus, errorThrown) { alert(‘There was a problem in saving. Please try again, later.’); }, success: function(data){ try{ var responseJson = $.parseJSON(data); form.find(‘input[name=”eaid”]’).val(responseJson.eaid); } catch(e){ $(‘body’).replaceWith(‘<table width=”100%” height=”100%”><tr><td style=”vertical-align: middle; text-align: center; font-size: 18pt”>Unable to authenticate request.<br>If you opened this assignment in another browser or tab, you may continue with that instance of your assignment.<br>Or, click <a target=”_top” style=”font-size: 18pt” href=”http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm”>here</a> to return to your assignment list.</td></tr></table>’); } } }); } function eztoChatSave( chatFunction ) { ex_startgather(‘eztoChatSave’, chatFunction); if(!ex_gather()) return; if (!lsiGather(‘eztoChatSave’, ”, false)) return; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”bgframe”; document.questionForm.nextID.value=”save”; document.questionForm.background.value=”true”; document.questionForm.submit(); if (chatFunction != ”) window.setTimeout( chatFunction, 750 ); } function completeContinue( forceFlag ) { if (forceFlag) document.questionForm.nextID.value=”submit”; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=””; document.questionForm.background.value=””; document.questionForm.submit(); } function continueTest( nextID ) { isValidNavigation = true; if (!checkTinymceContent()) { enableNavigationButton(); return false; } if (!navControlsEnabled) { enableNavigationButton(); window.setTimeout(‘navControlsEnabled= true;’, 10000); return; } document.body.style.cursor=”wait”; ex_startgather(‘continueTest’, nextID); if (!ex_gather()) { enableNavigationButton(); return; } document.questionForm.nextID.value= nextID; // add lone sectionbreak jumpid to completion cookie to avoid displaying incomplete question link. QC#3580 8/12/09 CSP if (pageContainsLoneSectionBreak()) forcePageQuestionsCompleted(); completionRequired = true; if (nextID == ‘submit’) { checkCompleteness(‘submit’, completeContinue); } else if (!abortCompletenessCheck) checkCompleteness(”, completeContinue); else completeContinue(); } function updateElapsedTime(qid) { $.ajax({ url: ‘/hm.tpx?todo=saveElapsedTime&wid=13252706498588094&userID=18516336&activityID=2311099401§ionID=84385152&itemId=’+qid+’&attemptNo=1’, type: ‘GET’, error: function(XMLHttpRequest, textStatus, errorThrown){ alert(‘There is a problem while updating elapsed time. Please try again, later.’); }, success: function(){ console.info(‘Elapsed Time Updated’); } }); } function forceSubmission() { bgSave= false; ex_startgather(‘forceSubmission’, null); if(!ex_gather()) return; var forceSubmission = document.createElement(‘INPUT’); forceSubmission.setAttribute(‘type’, ‘hidden’); forceSubmission.setAttribute(‘name’, ‘forceSubmission’); forceSubmission.setAttribute(‘value’, ‘timedForcedSubmission’); document.questionForm.appendChild(forceSubmission);destroyAllRecorder(); isValidNavigation = true; document.body.style.cursor=”wait”; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=””; document.questionForm.nextID.value=”submit”; document.questionForm.background.value=””; document.questionForm.submit(); } function doExit( nextID ) { isValidNavigation = true; if (!checkTinymceContent()) return false; ex_startgather(‘doExit’, nextID); if(!ex_gather()) return; document.questionForm.nextID.value= nextID; document.questionForm.todo.value=”showT”; document.questionForm.exiting.value=”true”; document.questionForm.target=”_top”; document.questionForm.background.value=””; document.questionForm.submit(); } function doSubmit() { continueTest(‘submit’); } var cwqid= null; function doPregrade( qid ) { if (qid != ”) { ex_startgather(‘doPregrade’, qid); if(!ex_gather()) return; cwqid= qid; try { var cwcount= $(‘#Q_’ + cwqid + ‘_cw’).val(); var cwlimit= $(‘#p_checkwork_limit’).val(); if (cwlimit != ”) { if (Number(cwcount) >= Number(cwlimit)) { pregradeDenial(cwlimit); return; } } var cwdeduct=”” + $(‘#p_deduct_checkwork’).val(); if (cwdeduct == ‘undefined’) cwdeduct=”0″; if (cwdeduct == ”) cwdeduct=”0″; if ((Number(cwcount) == 0) && ((cwlimit != ”) || (cwdeduct != ‘0’))) { pregradeWarning(cwlimit, cwdeduct); return; } cwcount= Number(cwcount) + 1; $(‘#Q_’ + cwqid + ‘_cw’).val( String( Number(cwcount) ) ); bgSave= true; window.setTimeout(‘pregradeSave();’, 1000); } catch (err) {}; var recorder= $(‘#cw_recorder’).val(); if (recorder.indexOf(cwqid) == -1) $(‘#cw_recorder’).val( recorder + ‘,’ + cwqid ); theWin= window.open( ”, ‘pregrade’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=30,screenY=30,left=30,top=30’ ); theWin.focus(); window.setTimeout(‘ex_allow_regather();’, 500); document.questionForm.todo.value=”checkMyWork”; document.questionForm.checkMyWork.value= cwqid; document.questionForm.target=”pregrade”; document.questionForm.submit(); } } function completePregrade() { $(‘#pregradeWarning’).jqm().jqmHide(); var cwcount= $(‘#Q_’ + cwqid + ‘_cw’).val(); cwcount= Number(cwcount) + 1; $(‘#Q_’ + cwqid + ‘_cw’).val( String( Number(cwcount) ) ); bgSave= true; window.setTimeout(‘pregradeSave();’, 1000); var recorder= $(‘#cw_recorder’).val(); if (recorder.indexOf(cwqid) == -1) $(‘#cw_recorder’).val( recorder + ‘,’ + cwqid ); theWin= window.open( ”, ‘pregrade’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=30,screenY=30,left=30,top=30’ ); theWin.focus(); window.setTimeout(‘ex_allow_regather();’, 500); document.questionForm.todo.value=”checkMyWork”; document.questionForm.checkMyWork.value= cwqid; document.questionForm.target=”pregrade”; document.questionForm.submit(); } function cancelPregrade() { window.setTimeout(‘ex_allow_regather();’, 500); } function pregradeWarning( limit, deduction ) { $(‘#pregradeWarningDeduction’).html(”); $(‘#pregradeWarningLimit’).html(”); if (deduction != ‘0’) $(‘#pregradeWarningDeduction’).html(‘Using <i>check my work</i> on this question will reduce total score by: <span style=”color: red”>’ + deduction + ‘%</span>’); if (limit != ”) { var lmsg= limit + ‘ times’; if (limit == ‘1’) lmsg= ‘once’; $(‘#pregradeWarningLimit’).html(‘You may use <i>check my work</i>: <b>’ + lmsg + ‘ per question.</b>’); } $(‘#pregradeWarning’).jqm().jqmShow(); } function pregradeDenial( limit ) { $(‘#pregradeDenialLimit’).html(limit); $(‘#pregradeDenial’).jqm().jqmShow(); } function pregradeSave() { if (!bgSave) return; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”bgframe”; document.questionForm.nextID.value=”save”; document.questionForm.background.value=”true”; var form = $(‘form[name=”questionForm”]’); var formAction = form.attr( ‘action’ ); $.ajax({ url: formAction, type: ‘POST’, async: false, data: form.serialize(), error: function(XMLHttpRequest, textStatus, errorThrown) { alert(‘There was a problem in saving. Please try again, later.’); }, success: function(data){ try{ var responseJson = $.parseJSON(data); form.find(‘input[name=”eaid”]’).val(responseJson.eaid); } catch(e){ $(‘body’).replaceWith(‘<table width=”100%” height=”100%”><tr><td style=”vertical-align: middle; text-align: center; font-size: 18pt”>Unable to authenticate request.<br>If you opened this assignment in another browser or tab, you may continue with that instance of your assignment.<br>Or, click <a target=”_top” style=”font-size: 18pt” href=”http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm”>here</a> to return to your assignment list.</td></tr></table>’); } } }); } function doPrint() { $(“.rightSideBySide”).each(function() { $(this).css(“border”,”0″); $(this).html(”); }); $(“.leftSideBySide”).each(function() { $(this).removeClass(“noScreen”); }); window.print(); } function doPrintWindow( qid ) { if (qid != ”) { ex_startgather(‘doPrintWindow’, qid); if(!ex_gather()) return; theWin= window.open( ”, ‘printView’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=30,screenY=30,left=30,top=30’ ); theWin.focus(); document.questionForm.todo.value=”printview”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”printView”; document.questionForm.submit(); } } function doTegrity() { var deduction= $(‘#p_deduct_resources’).val(); if ((deduction != ”) && (deduction != ‘0’)) { try { var recorder= $(‘#res_recorder’).val(); if (recorder.indexOf(‘tegrity’) == -1) { if (!confirm(“Using this resource will reduce your attempt’s total score by ” + deduction + “%”)) return; } } catch (e) {} } incResRecorder(‘tegrity’); theWin= window.open( ‘http://connect.mheducation.com/connect/openTegrity.do?caller=EZTest&’, ‘lectures’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=40,screenY=40,left=40,top=40’ ); theWin.focus(); } function doPreview( nextID ) { theWin= window.open( ”, ‘overview’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=40,screenY=40,left=40,top=40’ ); theWin.focus(); document.questionForm.checkMyWork.value=””; document.questionForm.todo.value=”studentPreview”; document.questionForm.target=”overview”; document.questionForm.nextID.value= nextID; document.questionForm.submit(); } $(document).ready(function(){ navMenu(‘navbarSelect’, ”); $(‘.lsiForm’).each(function() { this.submit(); }); var suppressIntructions = $.trim($(‘input[type=hidden][name=p_suppressinstructions]’).val());var showDialog = populataInstructionsDialog();if(showDialog){ if(suppressIntructions != ‘yes’){ $(‘#instructionsDialog’).jqm({onHide:contentVisible}).jqmShow(); }else{ contentVisible(); }}else{ contentVisible();} mpPhasedInit(); }); var instructionsModal; function showInstructions() { $(‘#contentArea’).addClass(‘content-area-invisible’); $(‘.lsiFrame’).css(‘visibility’,’hidden’); var showDialog = populataInstructionsDialog(); if(showDialog){ $(‘#instructionsDialog’).jqm({onHide:contentVisible}).jqmShow(); }else{ contentVisible(); } } function showContent(e) { if (e == null) e = window.event; e.returnValue = false; // for IE try { e.preventDefault(); } catch (ex) {}; // for everyone else $(‘#instructionsDialog’).jqm().jqmHide(); $(‘#geniusDialog’).jqm().jqmHide(); $(‘#contentArea’).removeClass(‘content-area-invisible’); $(‘.lsiFrame’).css(‘visibility’,”); return false; } function contentVisible(hash) { $(‘#contentArea’).removeClass(‘content-area-invisible’); $(‘.lsiFrame’).css(‘display’,”); if(hash){ hash.o.remove(); hash.w.hide(); } } var flashOK= true; function flashCheck() { return(flashOK); } function enableSubmit() { flashOK= true; } function disableSubmit() { flashOK= false; } function getFormData(fieldName) { if (document.questionForm[fieldName]) return(document.questionForm[fieldName].value); return(”); } function setFormData(fieldName, outPutValue) { if (document.questionForm[fieldName]) document.questionForm[fieldName].value = outPutValue; enableSubmit(); } // – End of JavaScript – –> var Html5Recorder=Html5Recorder||{}; (function(){var g_oLogger=null;var g_oRecorders=null;var g_oLibToken=null;var g_sLibURL=null;var g_oStateEnum=null;var g_nNumOfRecorders=0;var g_dProgBarLenInPixles=90;var g_bRecMaxLenInSecs=120;var g_audioContext;var g_isRecording=false;var g_player=null;var g_context;var g_fnSendGAEvent=null;var g_fnLoadJSScript=null;var g_fnGetSourceCode=null;var g_fnIsCssLoaded=null;var g_fnGetBrowser=null;var g_encoderMp3Worker=null;var g_channelLeft=null;var g_LastTimeAudioProcess=null;this._OnRecTick=function(sRecorderId){try{var currTime= new Date/1E3;var one_second=1;if(currTime-g_LastTimeAudioProcess>one_second){g_oRecorders[sRecorderId].StopVideo();g_context=null;g_oRecorders[sRecorderId].RecordVideo(false,null,null)}var maxRecLen=g_oRecorders[sRecorderId].GetRecordLength();document.getElementById(“recProgress”+sRecorderId).recLen=parseFloat(document.getElementById(“recProgress”+sRecorderId).recLen+parseFloat(g_dProgBarLenInPixles/maxRecLen));document.getElementById(“recProgress”+sRecorderId).style.width=document.getElementById(“recProgress”+ sRecorderId).recLen+”px”;document.getElementById(“recProgress”+sRecorderId).setAttribute(“aria-valuenow”,Math.min(100,parseFloat(document.getElementById(“recProgress”+sRecorderId).recLen*maxRecLen/100)));if(document.getElementById(“stopRecording”+sRecorderId).style.display==”inline-block”)setTimeout(function(){Html5Recorder._OnRecTick(sRecorderId)},1E3)}catch(exc){g_oLogger.Error(“Html5Recorder._OnRecTick(“+sRecorderId+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};this._OnPlaybackTick= function(sRecorderId){try{if(document.getElementById(“stopPlaying”+sRecorderId).style.display==”inline-block”){var maxRecLen=g_oRecorders[sRecorderId].GetRecordLength();var recLen=parseFloat(document.getElementById(“recProgress”+sRecorderId).recLen/g_dProgBarLenInPixles*maxRecLen);document.getElementById(“playProgress”+sRecorderId).recLen=parseFloat(document.getElementById(“playProgress”+sRecorderId).recLen+parseFloat(g_dProgBarLenInPixles/recLen));document.getElementById(“playProgress”+sRecorderId).style.width= document.getElementById(“playProgress”+sRecorderId).recLen+”px”;document.getElementById(“playProgress”+sRecorderId).setAttribute(“aria-valuenow”,Math.min(100,parseFloat(document.getElementById(“playProgress”+sRecorderId).recLen*recLen/100)));if(document.getElementById(“stopPlaying”+sRecorderId).style.display==”inline-block”)setTimeout(function(){Html5Recorder._OnPlaybackTick(sRecorderId)},1E3)}}catch(exc){g_oLogger.Error(“Html5Recorder._OnPlaybackTick(“+sRecorderId+”), Failed with error, Error = “+ (exc.message?exc.message:exc),this)}};this.Init=function(oLibToken,oLogger,oStateEnum,sLibURL,oRecorders,fnSendGAEvent,fnLoadJSScript,fnGetSourceCode,fnIsCssLoaded,fnGetBrowser){g_oLogger=oLogger;g_oLibToken=oLibToken;g_oStateEnum=oStateEnum;g_sLibURL=sLibURL;g_oRecorders=oRecorders;g_fnSendGAEvent=fnSendGAEvent;g_fnLoadJSScript=fnLoadJSScript;g_fnGetSourceCode=fnGetSourceCode;g_fnIsCssLoaded=fnIsCssLoaded;g_fnGetBrowser=fnGetBrowser;try{g_fnLoadJSScript(“Html5Template.js”,g_sLibURL+”../Style/Html5Template.js”); g_fnLoadJSScript(“https://sdk.amazonaws.com/js/aws-sdk-2.2.5.min.js”,”https://sdk.amazonaws.com/js/aws-sdk-2.2.5.min.js”);var mp3WorkerSourceCode=g_fnGetSourceCode(g_sLibURL+”../jshtml5/enc/mp3/mp3Worker.js”);var libmp3lameSourceCode=g_fnGetSourceCode(g_sLibURL+”../jshtml5/enc/mp3/libmp3lame.min.js”);mp3WorkerSourceCode=mp3WorkerSourceCode.replace(“importScripts(‘libmp3lame.js’);”,””);mp3WorkerSourceCode=libmp3lameSourceCode+”rn”+mp3WorkerSourceCode;var oBuilder2=new Blob([mp3WorkerSourceCode], {“type”:”text/javascript”});var obj_url2=window.URL.createObjectURL(oBuilder2);window.addEventListener(“beforeunload”,function(event){for(var sRecorderId in g_oRecorders)if(g_oRecorders[sRecorderId]!=null&&(g_oRecorders[sRecorderId].isRecSaved!=null&&g_oRecorders[sRecorderId].isRecSaved==false))return event.returnValue=”Your recording was not saved and will be lost when you navigate away from this page.”});g_encoderMp3Worker=new Worker(obj_url2);g_encoderMp3Worker.onmessage=function(e){var command= e.data.command;switch(command){case “data”:var buf=e.data.buf;break;case “mp3”:var buf=e.data.buf;g_oRecorders[e.data.recorderId].blobUrl=URL.createObjectURL(buf);g_oRecorders[e.data.recorderId].blob=buf;break}}}catch(exc){g_oLogger.Error(“Html5Recorder.Init(“+sRecorderId+”,”+oLogger+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};this.CreateRecorder=function(recParams,isReCall){try{if(g_encoderMp3Worker==null)return null;if(!IsObject(g_oLibToken)){g_oLogger.Error(“Html5Recorder.CreateRecorder(), Please initialize the MVS lib prior calling to any of its functions.”, this);return null}var id=recParams.id;if(typeof isReCall==”undefined”)for(var sRecorderId in g_oRecorders)if(sRecorderId==id+”_Recorder”&&g_oRecorders[sRecorderId]!=null)return g_oRecorders[sRecorderId];var requestHeaders=recParams.requestHeaders;var requestBody=recParams.requestBody;var callbackUrl=recParams.callbackUrl;var maxLength=typeof recParams.maxLength==”undefined”?g_bRecMaxLenInSecs:parseInt(recParams.maxLength);var recordMode=typeof recParams.recordMode==”undefined”?”AUDIO”:recParams.recordMode; var width=typeof recParams.width==”undefined”?545:parseInt(recParams.width);var height=typeof recParams.height==”undefined”?100:parseInt(recParams.height);var aspectRatio=typeof recParams.aspectRatio==”undefined”?”4:3″:recParams.aspectRatio;var layout=typeof recParams.layout==”undefined”?”HORIZONTAL”:recParams.layout;if(typeof g_oRecorders[id+”_Recorder”]==”undefined”||g_oRecorders[id+”_Recorder”]==null)g_oRecorders[id+”_Recorder”]=new Recorder(id,recordMode,requestHeaders,requestBody,maxLength,aspectRatio, callbackUrl,height,width,recParams);if(typeof g_sHtml5RecorderTemplate==”undefined”){var oThis=this;setTimeout(function(){oThis.CreateRecorder(recParams,true)},500);return g_oRecorders[id+”_Recorder”]}g_fnSendGAEvent(“MVSRecorder.CreateRecorder”,”maxLength:”+maxLength+”;”+”recordMode:”+recordMode+”;”+”aspectRatio:”+aspectRatio+”;”+”height:”+height+”;”+”width:”+width);var sHtml5Template=g_sHtml5RecorderTemplate;sHtml5Template=sHtml5Template.replaceAll(“[[id]]”,id+”_Recorder”);sHtml5Template=sHtml5Template.replaceAll(“[[disabled]]”, “”);if(layout==”VERTICAL”){sHtml5Template=sHtml5Template.replaceAll(“[[layoutWidth]]”,”140px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutHeight]]”,”80px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutBottomPosition]]”,”position:relative;top:15px;”)}else{sHtml5Template=sHtml5Template.replaceAll(“[[layoutWidth]]”,”295px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutHeight]]”,”30px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutBottomPosition]]”,””)}DrawRecorder(id,sHtml5Template); var sRecorderId=id+”_Recorder”;setTimeout(function(){MVSRecorder._UpdateRecorderState(sRecorderId,g_oStateEnum.ready)},500);return g_oRecorders[sRecorderId]}catch(exc){g_oLogger.Error(“Html5Recorder.CreateRecorder(“+recParams+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};this.DeleteRecorder=function(sRecorderId){MVSRecorder.DeleteRecorder(sRecorderId)};function Recorder(id,mode,requestHeaders,requestBody,maxLength,aspectRatio,callbackUrl,height,width,recParams){try{this.id= id+”_Recorder”;this.mode=mode;this.requestHeaders=requestHeaders;this.requestBody=requestBody;this.recParamsJson=null;this.maxLength=Math.min(Number(maxLength),g_bRecMaxLenInSecs);this.aspectRatio=aspectRatio;this.callbackUrl=callbackUrl;this.state=g_oStateEnum.initializing;this.height=height;this.width=width;this.recParams=recParams;this.isRecSaved=null;this.fnOnStateChange=null;this.oMedia=null;this.recordTimer=null;this.blobUrl=null;this.blob=null;this.savedVideoId=null}catch(exc){g_oLogger.Error(“Recorder(“+ id+”,”+mode+”,”+publicKey+”,”+requestHeaders+”,”+requestBody+”,”+maxLength+”,”+aspectRatio+”,”+callbackUrl+”,”+height+”,”+width+”,”+recParams+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}}function DrawRecorder(id,sHtml5Template){try{if(IsObject(document.getElementById(id))){document.getElementById(id).innerHTML=sHtml5Template;document.getElementById(id).className+=” MVSRecorder”}else{var oSpan=document.createElement(“span”);oSpan.id=id;oSpan.innerHTML=sHtml5Template;oSpan.className= “MVSRecorder”;document.body.appendChild(oSpan)}if(!g_fnIsCssLoaded(“MediaPlayers.css”)){var oLinkMediaPlayers=document.createElement(“link”);oLinkMediaPlayers.rel=”stylesheet”;oLinkMediaPlayers.href=g_sLibURL+”../Style/MediaPlayers.css”;oLinkMediaPlayers.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayers);if(g_fnGetBrowser()==”IExplorer”){var oMeta=document.createElement(“meta”);oMeta.httpEquiv=”X-UA-Compatible”;oMeta.content=”IE=edge”;document.getElementsByTagName(“head”)[0].insertBefore(oMeta, document.getElementsByTagName(“head”)[0].children[0]);var oDiv=document.createElement(“div”);oDiv.innerHTML=”x3c!–[if IE]><i></i><![endif]–x3e”;if(oDiv.getElementsByTagName(“i”).length){var oLinkMediaPlayersIE=document.createElement(“link”);oLinkMediaPlayersIE.rel=”stylesheet”;oLinkMediaPlayersIE.href=g_sLibURL+”../Style/IEMP.css”;oLinkMediaPlayersIE.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayersIE)}}}}catch(exc){g_oLogger.Error(“DrawRecorder(“+id+”,”+sHtml5Template+ “), Failed with error, Error = “+(exc.message?exc.message:exc),this)}}function HandlerStartUserMedia(stream){source=g_audioContext.createMediaStreamSource(stream);var bufferLen=4096;g_context=source.context;this.node=(g_context.createScriptProcessor||g_context.createJavaScriptNode).call(g_context,bufferLen,1,1);this.node.connect(g_context.destination);this.node.onaudioprocess=function(e){g_LastTimeAudioProcess=new Date/1E3;var channelLeft=e.inputBuffer.getChannelData(0);g_channelLeft=channelLeft; if(!g_isRecording)return;g_encoderMp3Worker.postMessage({command:”encode”,buf:channelLeft})};source.connect(this.node);for(var sRecorderId in g_oRecorders)if(g_oRecorders[sRecorderId]!=null&&g_oRecorders[sRecorderId].state==”waitingForMic”){g_oRecorders[sRecorderId].state=g_oStateEnum.ready;g_oRecorders[sRecorderId].RecordVideo(false,null,true);return}}function HandlerErrorUserMedia(e){switch(g_fnGetBrowser()){case “FireFox”:alert(“To record you must allow access to your microphone and/or camera. To change your access permissions right click this page, select View Page Info, in the window that appears select Permissions and allow use of the microphone and camera.”); break;case “Chrome”:alert(“To record you must allow access to your microphone and/or camera. To change your access permissions type chrome://settings/contentExceptions#media-stream-mic in the address bar and press the return key.”);break;case “Edge”:alert(“To record you must allow access to your microphone and/or camera. To change your access permissions refresh the page and click record again.”);break;default:alert(“To record you must allow access to your microphone and/or camera.”);break}}function IsMicShared(isRecAfterMicShare){if(g_fnGetBrowser()!= “FireFox”)return true;var SAMPLING_INTERVAL=500;if(g_channelLeft==null||isRecAfterMicShare!=null&&isRecAfterMicShare==true)return true;for(i=0;i<g_channelLeft.length;i+=SAMPLING_INTERVAL)if(g_channelLeft[i]!=0)return true;g_context=null;return false}Recorder.prototype.CheckConcurrency=function(){var isConcurrency=false;try{var stateEnum=MVSRecorder._GetStateEnum();for(var sRecorderId in g_oRecorders)if(g_oRecorders[sRecorderId]!=null&&(g_oRecorders[sRecorderId].state==stateEnum.recording||(g_oRecorders[sRecorderId].state== stateEnum.rerecorded||g_oRecorders[sRecorderId].state==stateEnum.playing))){g_oRecorders[sRecorderId].StopVideo();isConcurrency=true}}catch(exc){g_oLogger.Error(“Recorder.CheckConcurrency(“+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}return isConcurrency};Recorder.prototype.RecordVideo=function(isReRec,isAddVideoReqSent,isRecAfterMicShare){try{document.getElementById(“accept”+this.id).style.display=”none”;if(g_context==null||!IsMicShared(isRecAfterMicShare)){this.state=”waitingForMic”; window.AudioContext=window.AudioContext||(window.webkitAudioContext||window.mozAudioContext);navigator.getUserMedia=navigator.getUserMedia||(navigator.webkitGetUserMedia||(navigator.mozGetUserMedia||navigator.msGetUserMedia));window.URL=window.URL||window.webkitURL;if(g_audioContext!=null)g_audioContext.close();g_audioContext=new AudioContext;navigator.getUserMedia({vide:false,audio:true},HandlerStartUserMedia,HandlerErrorUserMedia);if(isReRec&&document.getElementById(“accepted”+this.id).style.display== “none”)document.getElementById(“accept”+this.id).style.display=”inline-block”;return}var oThis=this;if(this.recParamsJson==null||this.recParamsJson.isError==”true”)if(typeof isAddVideoReqSent==”undefined”||isAddVideoReqSent==null)MVSRecorder.AddVideo(this.id);if(this.CheckConcurrency()){setTimeout(function(){oThis.RecordVideo(isReRec,isAddVideoReqSent,isRecAfterMicShare)},500);return}if(g_player!=null&&g_player.src!=””)this.StopVideo();if(!isReRec)g_fnSendGAEvent(“MVSRecorder.Record”,this.mode);else g_fnSendGAEvent(“MVSRecorder.ReRecord”); this.isRecSaved=false;this.state=”recording”;g_isRecording=true;var sampleRate=g_context.sampleRate;this.blob=this.blobUrl=null;g_encoderMp3Worker.postMessage({command:”init”,recorderId:this.id,config:{channels:1,mode:3,samplerate:22050,bitrate:64,in_samplerate:sampleRate}});this.recordTimer=setTimeout(function(){oThis.StopVideo()},oThis.maxLength*1E3);if(this.savedVideoId==null)MVSRecorder._UpdateRecorderState(this.id,”recording”);else{MVSRecorder._UpdateRecorderState(this.id,”rerecorded”,this.savedVideoId); this.savedVideoId=null}this.RecordingStarted()}catch(exc){g_oLogger.Error(“Recorder.RecordVideo(“+isReRec+”,”+isAddVideoReqSent+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.StopVideo=function(){try{g_fnSendGAEvent(“MVSRecorder.Stop”);if(g_isRecording){g_isRecording=false;g_encoderMp3Worker.postMessage({command:”finish”});this.RecordingStopped()}else{if(g_player!=null)g_player.src=””;this.PlaybackStopped()}}catch(exc){g_oLogger.Error(“Recorder.StopVideo(“+ “), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.SaveVideo=function(){try{var oThis=this;if(this.recParamsJson==null||this.blob==null){document.getElementById(“accepted”+this.id).style.display=”inline-block”;document.getElementById(“accepted”+this.id).innerHTML=”saving…”;document.getElementById(“accept”+this.id).style.display=”none”;setTimeout(function(){oThis.SaveVideo()},500);return}if(this.recParamsJson.isError==”true”)return;var maxRecLen=this.GetRecordLength(); var recLen=parseFloat(document.getElementById(“recProgress”+this.id).recLen/g_dProgBarLenInPixles*maxRecLen);g_fnSendGAEvent(“MVSRecorder.Save”,”Recording Duration”,recLen);if(g_oRecorders[this.id].state!=MVSRecorder._GetStateEnum().stopped)this.StopVideo();var videoId=this.recParamsJson.id;MVSRecorder._UpdateRecorderState(this.id,MVSRecorder._GetStateEnum().saving,videoId);document.getElementById(“accepted”+this.id).style.display=”inline-block”;document.getElementById(“accepted”+this.id).innerHTML= “saving…”;document.getElementById(“rerecord”+this.id).style.display=”none”;document.getElementById(“accept”+this.id).style.display=”none”;var creds=new AWS.Credentials(this.recParamsJson.token.accessToken.accessKey,this.recParamsJson.token.accessToken.secretKey,this.recParamsJson.token.accessToken.sessionToken);AWS.config.credentials=creds;AWS.config.region=”us-east-1″;var bucket=new AWS.S3({params:{Bucket:this.recParamsJson.token.identifier.container}});var params={Key:this.recParamsJson.token.identifier.keyPrefix+ “.mp3″,ContentType:”audio/mp3”,Body:this.blob};var sRecorderId=this.id;bucket.upload(params,function(err){if(err){g_oLogger.Error(“failed to save video , err=”+err,oThis);MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().error,videoId);document.getElementById(“accepted”+sRecorderId).innerHTML=MVSRecorder._GetStateEnum().error}else{MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().saved,videoId);document.getElementById(“accepted”+sRecorderId).innerHTML= MVSRecorder._GetStateEnum().saved;oThis.isRecSaved=true;oThis.recParamsJson=null;oThis.savedVideoId=videoId}document.getElementById(“rerecord”+sRecorderId).style.display=”inline-block”;document.getElementById(“accepted”+sRecorderId).focus()})}catch(exc){g_oLogger.Error(“Recorder.SaveVideo(“+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.Preview=function(){try{var sRecorderId=this.id;if(this.blobUrl==null){var oThis=this;document.getElementById(“play”+sRecorderId).style.display= “none”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”inline-block”;setTimeout(function(){oThis.Preview()},500);return}g_fnSendGAEvent(“MVSRecorder.Play”);this.CheckConcurrency();if(g_player==null)g_player=new window.Audio;g_player.onended=function(){g_oRecorders[sRecorderId].PlaybackStopped()};var xhr=new XMLHttpRequest;xhr.onreadystatechange=function(){if(this.readyState==4&&this.status==200){g_player.src=window.URL.createObjectURL(this.response);g_oRecorders[sRecorderId].PlaybackStarted(); g_player.play()}};xhr.open(“GET”,this.blobUrl);xhr.responseType=”blob”;xhr.send()}catch(exc){g_oLogger.Error(“Recorder.Preview(“+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.GetRecordLength=function(){return this.maxLength};Recorder.prototype.GetState=function(){return this.state};Recorder.prototype.RecordingStarted=function(){var sRecorderId=this.id;document.getElementById(“recProgress”+sRecorderId).recLen=0;document.getElementById(“recProgress”+sRecorderId).style.width= “0px”;document.getElementById(“record”+sRecorderId).style.display=”none”;document.getElementById(“rerecord”+sRecorderId).style.display=”none”;document.getElementById(“stopRecording”+sRecorderId).style.display=”inline-block”;document.getElementById(“stopRecording”+sRecorderId).focus();document.getElementById(“recProgressBar”+sRecorderId).style.display=”inline-block”;document.getElementById(“play”+sRecorderId).style.display=”none”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”none”; document.getElementById(“playProgressBar”+sRecorderId).style.display=”none”;document.getElementById(“accept”+sRecorderId).style.display=”none”;document.getElementById(“accepted”+this.id).style.display=”none”;setTimeout(function(){Html5Recorder._OnRecTick(sRecorderId)},1E3)};Recorder.prototype.RecordingStopped=function(){var recordTimer=this.recordTimer;if(typeof recordTimer==”number”&&Number(recordTimer)==recordTimer)clearTimeout(recordTimer);var sRecorderId=this.id;document.getElementById(“stopRecording”+ sRecorderId).style.display=”none”;document.getElementById(“recProgressBar”+sRecorderId).style.display=”none”;document.getElementById(“play”+sRecorderId).style.display=”inline-block”;document.getElementById(“play”+sRecorderId).focus();document.getElementById(“playProgressBar”+sRecorderId).style.display=”inline-block”;document.getElementById(“rerecord”+sRecorderId).style.display=”inline-block”;if(this.recParamsJson==null||this.recParamsJson.isError!=”true”)document.getElementById(“accept”+sRecorderId).style.display= “inline-block”;MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().stopped)};Recorder.prototype.PlaybackStarted=function(){var sRecorderId=this.id;document.getElementById(“playProgress”+sRecorderId).recLen=0;document.getElementById(“playProgress”+sRecorderId).style.width=”0px”;document.getElementById(“play”+sRecorderId).style.display=”none”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”inline-block”;document.getElementById(“stopPlaying”+sRecorderId).focus(); MVSRecorder._UpdateRecorderState(sRecorderId,”playing”);setTimeout(function(){Html5Recorder._OnPlaybackTick(sRecorderId)},1E3)};Recorder.prototype.PlaybackStopped=function(){var sRecorderId=this.id;document.getElementById(“playProgress”+sRecorderId).recLen=0;document.getElementById(“playProgress”+sRecorderId).style.width=”0px”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”none”;document.getElementById(“recProgressBar”+sRecorderId).style.display=”none”;document.getElementById(“play”+ sRecorderId).style.display=”inline-block”;document.getElementById(“play”+sRecorderId).focus();MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().stopped)};Recorder.prototype.OnStateChange=function(fnOnStateChange){if(IsFunction(fnOnStateChange))this.fnOnStateChange=fnOnStateChange}}).apply(Html5Recorder); var MVSUploader=MVSUploader||{}; (function(){var g_dProgBarLenInPixles=90;var g_oLogger=null;var g_oRecorders=null;var g_sLibURL=null;var g_fnSendGAEvent=null;var g_fnIsCssLoaded=null;var g_fnGetBrowser=null;this._GetUploaders=function(){return g_oRecorders};this.CreateUploader=function(uploadParams,oRecorders,sLibURL,oLogger,fnIsCssLoaded,fnGetBrowser,fnSendGAEvent,fnIsObject,oMobile){var id=uploadParams.id;var requestHeaders=uploadParams.requestHeaders;var requestBody=uploadParams.requestBody;var uploadMode=typeof uploadParams.uploadMode== “undefined”?”AUDIO”:uploadParams.uploadMode;if(typeof id==”undefined”||(typeof requestHeaders==”undefined”||typeof requestBody==”undefined”))return null;if(g_oRecorders==null)g_oRecorders=oRecorders;g_sLibURL=sLibURL;g_fnIsCssLoaded=fnIsCssLoaded;g_fnGetBrowser=fnGetBrowser;g_fnSendGAEvent=fnSendGAEvent;if(g_oLogger==null)g_oLogger=oLogger;if(typeof g_oRecorders[id]==”undefined”||g_oRecorders[id]==null)g_oRecorders[id]=new Uploader(id,requestHeaders,requestBody,uploadMode,uploadParams);else if(fnIsObject(g_oRecorders[id].oBucketUploader)){g_oRecorders[id].oBucketUploader.abort(); g_oRecorders[id].oBucketUploader=null}if(typeof g_sUploaderTemplate==”undefined”){var oThis=this;setTimeout(function(){oThis.CreateUploader(uploadParams,oRecorders,sLibURL,oLogger,fnIsCssLoaded,fnGetBrowser,fnSendGAEvent,fnIsObject,oMobile)},500);return g_oRecorders[id]}var sTemplate=g_sUploaderTemplate;sTemplate=sTemplate.replaceAll(“[[id]]”,id);sTemplate=sTemplate.replaceAll(“[[layoutWidth]]”,”295px”);sTemplate=sTemplate.replaceAll(“[[layoutHeight]]”,”30px”);sTemplate=sTemplate.replaceAll(“[[layoutBottomPosition]]”, “”);if(uploadMode==”AUDIO”)if(!oMobile.Any())sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”.mp3,.m4a,.ogg,.wav”);else sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”audio/*”);else if(!oMobile.Any())sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”.flv,.mpeg,.mpg,.mp4,.m4v,.mp4v,.3gp,.3gpp,.mov,.asf,.avi”);else sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”video/*”);DrawUploader(id,sTemplate);setTimeout(function(){MVSRecorder._UpdateRecorderState(id,MVSRecorder._GetStateEnum().ready)}, 500);g_fnSendGAEvent(“MVSUploader.CreateUploader”,”uploadMode:”+uploadMode);return g_oRecorders[id]};this.DeleteUploader=function(sUploaderId,fnIsString,fnIsObject,fnSafeDeleteElement){try{if(!fnIsString(sUploaderId)||(!fnIsObject(g_oRecorders[sUploaderId])||!fnIsObject(document.getElementById(sUploaderId)))){var loggerType=(g_oLogger.constructor.toString().match(/function (.+?)(/)||[,””])[1];if(loggerType==”SMLogger”||loggerType==”SpecLogger”)g_oLogger.Error(‘MVSUploader.DeleteUploader(“‘+sUploaderId+ ‘”), Invalid or missing Recorder ID.’,this);return}if(g_oRecorders[sUploaderId].state==MVSRecorder._GetStateEnum().uploading&&fnIsObject(g_oRecorders[sUploaderId].oBucketUploader)){g_oRecorders[sUploaderId].oBucketUploader.abort();g_oRecorders[sUploaderId].oBucketUploader=null}g_oRecorders[sUploaderId]=null;fnSafeDeleteElement(“panel”+sUploaderId);fnSafeDeleteElement(“nimbbFlashSettingsDialog”+sUploaderId)}catch(exc){g_oLogger.Error(“MVSUploader.DeleteUploader(“+sUploaderId+”), Failed with error, Error = “+ (exc.message?exc.message:exc),this)}};function Uploader(id,requestHeaders,requestBody,uploadMode,uploadParams){try{this.id=id;this.requestHeaders=requestHeaders;this.requestBody=requestBody;this.uploadMode=uploadMode;this.uploadParams=uploadParams;this.recParamsJson=null;this.fnOnStateChange=null;this.oBucketUploader=null}catch(exc){g_oLogger.Error(“Uploader(“+id+”,”+requestHeaders+”,”+requestBody+”,”+uploadMode+”,”+uploadParams+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}} function DrawUploader(id,sTemplate){try{if(IsObject(document.getElementById(id))){document.getElementById(id).innerHTML=sTemplate;document.getElementById(id).className+=” MVSRecorder”}else{var oSpan=document.createElement(“span”);oSpan.id=id;oSpan.innerHTML=sTemplate;oSpan.className=”MVSRecorder”;document.body.appendChild(oSpan)}if(!g_fnIsCssLoaded(“MediaPlayers.css”)){var oLinkMediaPlayers=document.createElement(“link”);oLinkMediaPlayers.rel=”stylesheet”;oLinkMediaPlayers.href=g_sLibURL+”../Style/MediaPlayers.css”; oLinkMediaPlayers.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayers);if(g_fnGetBrowser()==”IExplorer”){var oMeta=document.createElement(“meta”);oMeta.httpEquiv=”X-UA-Compatible”;oMeta.content=”IE=edge”;document.getElementsByTagName(“head”)[0].insertBefore(oMeta,document.getElementsByTagName(“head”)[0].children[0]);var oDiv=document.createElement(“div”);oDiv.innerHTML=”x3c!–[if IE]><i></i><![endif]–x3e”;if(oDiv.getElementsByTagName(“i”).length){var oLinkMediaPlayersIE= document.createElement(“link”);oLinkMediaPlayersIE.rel=”stylesheet”;oLinkMediaPlayersIE.href=g_sLibURL+”../Style/IEMP.css”;oLinkMediaPlayersIE.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayersIE)}}}}catch(exc){g_oLogger.Error(“DrawUploader(“+id+”,”+sTemplate+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}}Uploader.prototype.Click=function(isReupload){if(isReupload){document.getElementById(“reupload”+this.id).value=null;g_fnSendGAEvent(“MVSUploader.ReUpload”, “uploadMode:”+this.uploadMode)}else{document.getElementById(“upload”+this.id).value=null;g_fnSendGAEvent(“MVSUploader.Upload”,”uploadMode:”+this.uploadMode)}MVSRecorder.AddVideo(this.id)};Uploader.prototype.UploadFile=function(evt){var oThis=this;document.getElementById(“divUpload”+oThis.id).style.display=”none”;document.getElementById(“divReupload”+oThis.id).style.display=”none”;document.getElementById(“accepted”+oThis.id).style.display=”inline-block”;document.getElementById(“accepted”+oThis.id).innerHTML= “uploading…”;document.getElementById(“recProgressBar”+oThis.id).style.display=”inline-block”;document.getElementById(“recProgress”+oThis.id).style.width=”0px”;if(this.recParamsJson==null){setTimeout(function(){oThis.UploadFile(evt)},500);return}if(this.recParamsJson.isError==”true”)return;var videoId=oThis.recParamsJson.id;MVSRecorder._UpdateRecorderState(oThis.id,MVSRecorder._GetStateEnum().uploading,videoId);var creds=new AWS.Credentials(oThis.recParamsJson.token.accessToken.accessKey,oThis.recParamsJson.token.accessToken.secretKey, oThis.recParamsJson.token.accessToken.sessionToken);AWS.config.credentials=creds;AWS.config.region=”us-east-1″;var contentType=evt.files[0].type;var fileExt=”.”+evt.value.match(/.([^.]+)$/)[1];var bucket=new AWS.S3({params:{Bucket:oThis.recParamsJson.token.identifier.container}});var params={Key:oThis.recParamsJson.token.identifier.keyPrefix+fileExt,ContentType:contentType,Body:evt.files[0]};var sUploaderId=oThis.id;oThis.oBucketUploader=bucket.upload(params).on(“httpUploadProgress”,function(evt){document.getElementById(“recProgress”+ sUploaderId).style.width=evt.loaded/evt.total*g_dProgBarLenInPixles+”px”});oThis.oBucketUploader.send(function(err){if(err){g_oLogger.Error(“failed to upload video , err=”+err,oThis);g_fnSendGAEvent(“MVSUploader.Error”,err);MVSRecorder._UpdateRecorderState(sUploaderId,MVSRecorder._GetStateEnum().error,videoId);document.getElementById(“accepted”+sUploaderId).innerHTML=MVSRecorder._GetStateEnum().error}else{if(oThis.oBucketUploader!=null){g_fnSendGAEvent(“MVSUploader.Uploaded”,”uploadMode:”+oThis.uploadMode, evt.files[0].size);MVSRecorder._UpdateRecorderState(sUploaderId,MVSRecorder._GetStateEnum().uploaded,videoId);document.getElementById(“accepted”+sUploaderId).innerHTML=MVSRecorder._GetStateEnum().uploaded}oThis.recParamsJson=null}if(document.getElementById(“divUpload”+oThis.id).style.display==”none”)document.getElementById(“divReupload”+sUploaderId).style.display=”inline-block”;document.getElementById(“recProgressBar”+sUploaderId).style.display=”none”})};Uploader.prototype.UploadFileErrorHandler= function(evt){switch(evt.target.error.code){case evt.target.error.NOT_FOUND_ERR:alert(“File Not Found!”);break;case evt.target.error.NOT_READABLE_ERR:alert(“File is not readable”);break;case evt.target.error.ABORT_ERR:break;default:alert(“An error occurred reading this file.”)}};Uploader.prototype.GetState=function(){return this.state};Uploader.prototype.OnStateChange=function(fnOnStateChange){if(IsFunction(fnOnStateChange))this.fnOnStateChange=fnOnStateChange}}).apply(MVSUploader); Lou and Joann Girardi are married and file a joint return. They recently bought a new home on 21680 Skyline Drive, Henderson, NV 89077. Their son, Stuart, attends the University of Pennsylvania full-time on a full scholarship. Stuart is claimed as a dependent on the Girardis’ tax return. Their SSNs are Lou, 412-34-5670; Joann, 412-34-5671; and Stuart, 412-34-5672. Their birth dates are as follows: Lou, May 18, 1964; Joann, December 24, 1964; and Stuart, May 9, 1997. Their relevant tax information follows:Â
Lou is an attorney and owns his law firm, which is operating as an S corporation. His W-2 information and Schedule K-1 from his law firm are as follows:Â Â Wages (box 1)=$114,800.50Federal W/H (box 2)=$15,000.14Social security wages (box 3)=$114,800.50Social security W/H (box 4)=$7,117.63Medicare wages (box 5)=$114,800.50Medicare W/H (box 6)=$1,664.61Â
Schedule K-1 from the law offices of Lou Girardi – Attorney at Law ID # 12-3456789 100% Owner Material participation:Line 1 Â Â = Â $22,582.00 (ordinary business income)
Line 11 =  $22,582.00 (§ 179 deduction)Â
Joann is a full-time lecturer at Arizona State University. Her W-2 information from ASU is as follows:Â Wages (box 1)=$65,000.00Federal W/H (box 2)=$9,950.25Social security wages (box 3)=$65,000.00Social security W/H (box 4)=$4,030.00Medicare wages (box 5)=$65,000.00Medicare W/H (box 6)=$942.50
Â
 The following are other income and expenses they received and incurred during the year:  Income  Dividend (qualified)$666Interest 765Expenses  Real estate taxes 7,836State sales tax 1,629Mortgage interest 32,562Charitable contribution 2,598  Prepare the Girardis’ federal tax return for 2016. Use Form 1040, and Schedules A, B, and E. Assume that the Girardis do not qualify for any credits (although they may). For any missing information, make reasonable assumptions. The taxpayers had qualifying health care coverage at all times during the tax year. (Assume no AMT although it may apply; Form 6251 or the AMT calculation is not required.) (List the names of the taxpayers in the order in which they appear in the problem. Do not round intermediate computations. Input all the values as positive numbers.)
Â
Use the appropriate Tax Tables or Tax Rate Schedules.Version:1.0 StartHTML:000000232 EndHTML:000065057 StartFragment:000056579 EndFragment:000064988 StartSelection:000056579 EndSelection:000064972 SourceURL:http://ezto.mheducation.com/hm.tpx?_=0.7862599712668789_1512396415246 .video-js { width: 300px; height: 150px; } .vjs-fluid { padding-top: 56.25% } Tax Return Project $(document).ready(function(){ $(‘.french’).palette({auto:true,language:’french’}); $(‘.frenchInstructor’).palette({auto:false,language:’french’}); $(‘.german’).palette({auto:true,language:’german’}); $(‘.germanInstructor’).palette({auto:false,language:’german’}); $(‘.italiano’).palette({auto:true,language:’italiano’}); $(‘.italianoInstructor’).palette({auto:false,language:’italiano’}); $(‘.spanish’).palette({auto:true,language:’spanish’}); $(‘.spanishInstructor’).palette({auto:false,language:’spanish’}); }); function doHelp() { theWin= window.open( ‘/EZTestOnline/Classware/Help/index.html’, ‘Help’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=625,height=450,screenX=20,screenY=20,left=20,top=20’ ); theWin.focus(); } var navControlsEnabled= false; var bgSave= false; // Notify getcompletion call is required or not var completionRequired = false; function doNext( nextID ) { disableNavigationButton(‘http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm’); continueTest(nextID); } var abortCompletenessCheck= false; function doJump( nextID ) { disableNavigationButton(‘http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm’); return continueTest(nextID); } function doSave( nextID ) { if (!checkTinymceContent()) return false; bgSave= true; backgroundSave(); try{ ex_allow_regather(); }catch (err) {} } function backgroundSave() { if (!bgSave) return; ex_startgather(‘backgroundSave’, null); if(!ex_gather()) return; if (!lsiGather(‘backgroundSave’, ”, false)) return; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”bgframe”; document.questionForm.nextID.value=”save”; document.questionForm.background.value=”true”; var form = $(‘form[name=”questionForm”]’); var formAction = form.attr( ‘action’ ); $.ajax({ url: formAction, type: ‘POST’, async: false, data: form.serialize(), error: function(XMLHttpRequest, textStatus, errorThrown) { alert(‘There was a problem in saving. Please try again, later.’); }, success: function(data){ try{ var responseJson = $.parseJSON(data); form.find(‘input[name=”eaid”]’).val(responseJson.eaid); } catch(e){ $(‘body’).replaceWith(‘<table width=”100%” height=”100%”><tr><td style=”vertical-align: middle; text-align: center; font-size: 18pt”>Unable to authenticate request.<br>If you opened this assignment in another browser or tab, you may continue with that instance of your assignment.<br>Or, click <a target=”_top” style=”font-size: 18pt” href=”http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm”>here</a> to return to your assignment list.</td></tr></table>’); } } }); } function eztoChatSave( chatFunction ) { ex_startgather(‘eztoChatSave’, chatFunction); if(!ex_gather()) return; if (!lsiGather(‘eztoChatSave’, ”, false)) return; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”bgframe”; document.questionForm.nextID.value=”save”; document.questionForm.background.value=”true”; document.questionForm.submit(); if (chatFunction != ”) window.setTimeout( chatFunction, 750 ); } function completeContinue( forceFlag ) { if (forceFlag) document.questionForm.nextID.value=”submit”; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=””; document.questionForm.background.value=””; document.questionForm.submit(); } function continueTest( nextID ) { isValidNavigation = true; if (!checkTinymceContent()) { enableNavigationButton(); return false; } if (!navControlsEnabled) { enableNavigationButton(); window.setTimeout(‘navControlsEnabled= true;’, 10000); return; } document.body.style.cursor=”wait”; ex_startgather(‘continueTest’, nextID); if (!ex_gather()) { enableNavigationButton(); return; } document.questionForm.nextID.value= nextID; // add lone sectionbreak jumpid to completion cookie to avoid displaying incomplete question link. QC#3580 8/12/09 CSP if (pageContainsLoneSectionBreak()) forcePageQuestionsCompleted(); completionRequired = true; if (nextID == ‘submit’) { checkCompleteness(‘submit’, completeContinue); } else if (!abortCompletenessCheck) checkCompleteness(”, completeContinue); else completeContinue(); } function updateElapsedTime(qid) { $.ajax({ url: ‘/hm.tpx?todo=saveElapsedTime&wid=13252706498588094&userID=18516336&activityID=2311099401§ionID=84385152&itemId=’+qid+’&attemptNo=1’, type: ‘GET’, error: function(XMLHttpRequest, textStatus, errorThrown){ alert(‘There is a problem while updating elapsed time. Please try again, later.’); }, success: function(){ console.info(‘Elapsed Time Updated’); } }); } function forceSubmission() { bgSave= false; ex_startgather(‘forceSubmission’, null); if(!ex_gather()) return; var forceSubmission = document.createElement(‘INPUT’); forceSubmission.setAttribute(‘type’, ‘hidden’); forceSubmission.setAttribute(‘name’, ‘forceSubmission’); forceSubmission.setAttribute(‘value’, ‘timedForcedSubmission’); document.questionForm.appendChild(forceSubmission);destroyAllRecorder(); isValidNavigation = true; document.body.style.cursor=”wait”; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=””; document.questionForm.nextID.value=”submit”; document.questionForm.background.value=””; document.questionForm.submit(); } function doExit( nextID ) { isValidNavigation = true; if (!checkTinymceContent()) return false; ex_startgather(‘doExit’, nextID); if(!ex_gather()) return; document.questionForm.nextID.value= nextID; document.questionForm.todo.value=”showT”; document.questionForm.exiting.value=”true”; document.questionForm.target=”_top”; document.questionForm.background.value=””; document.questionForm.submit(); } function doSubmit() { continueTest(‘submit’); } var cwqid= null; function doPregrade( qid ) { if (qid != ”) { ex_startgather(‘doPregrade’, qid); if(!ex_gather()) return; cwqid= qid; try { var cwcount= $(‘#Q_’ + cwqid + ‘_cw’).val(); var cwlimit= $(‘#p_checkwork_limit’).val(); if (cwlimit != ”) { if (Number(cwcount) >= Number(cwlimit)) { pregradeDenial(cwlimit); return; } } var cwdeduct=”” + $(‘#p_deduct_checkwork’).val(); if (cwdeduct == ‘undefined’) cwdeduct=”0″; if (cwdeduct == ”) cwdeduct=”0″; if ((Number(cwcount) == 0) && ((cwlimit != ”) || (cwdeduct != ‘0’))) { pregradeWarning(cwlimit, cwdeduct); return; } cwcount= Number(cwcount) + 1; $(‘#Q_’ + cwqid + ‘_cw’).val( String( Number(cwcount) ) ); bgSave= true; window.setTimeout(‘pregradeSave();’, 1000); } catch (err) {}; var recorder= $(‘#cw_recorder’).val(); if (recorder.indexOf(cwqid) == -1) $(‘#cw_recorder’).val( recorder + ‘,’ + cwqid ); theWin= window.open( ”, ‘pregrade’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=30,screenY=30,left=30,top=30’ ); theWin.focus(); window.setTimeout(‘ex_allow_regather();’, 500); document.questionForm.todo.value=”checkMyWork”; document.questionForm.checkMyWork.value= cwqid; document.questionForm.target=”pregrade”; document.questionForm.submit(); } } function completePregrade() { $(‘#pregradeWarning’).jqm().jqmHide(); var cwcount= $(‘#Q_’ + cwqid + ‘_cw’).val(); cwcount= Number(cwcount) + 1; $(‘#Q_’ + cwqid + ‘_cw’).val( String( Number(cwcount) ) ); bgSave= true; window.setTimeout(‘pregradeSave();’, 1000); var recorder= $(‘#cw_recorder’).val(); if (recorder.indexOf(cwqid) == -1) $(‘#cw_recorder’).val( recorder + ‘,’ + cwqid ); theWin= window.open( ”, ‘pregrade’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=30,screenY=30,left=30,top=30’ ); theWin.focus(); window.setTimeout(‘ex_allow_regather();’, 500); document.questionForm.todo.value=”checkMyWork”; document.questionForm.checkMyWork.value= cwqid; document.questionForm.target=”pregrade”; document.questionForm.submit(); } function cancelPregrade() { window.setTimeout(‘ex_allow_regather();’, 500); } function pregradeWarning( limit, deduction ) { $(‘#pregradeWarningDeduction’).html(”); $(‘#pregradeWarningLimit’).html(”); if (deduction != ‘0’) $(‘#pregradeWarningDeduction’).html(‘Using <i>check my work</i> on this question will reduce total score by: <span style=”color: red”>’ + deduction + ‘%</span>’); if (limit != ”) { var lmsg= limit + ‘ times’; if (limit == ‘1’) lmsg= ‘once’; $(‘#pregradeWarningLimit’).html(‘You may use <i>check my work</i>: <b>’ + lmsg + ‘ per question.</b>’); } $(‘#pregradeWarning’).jqm().jqmShow(); } function pregradeDenial( limit ) { $(‘#pregradeDenialLimit’).html(limit); $(‘#pregradeDenial’).jqm().jqmShow(); } function pregradeSave() { if (!bgSave) return; document.questionForm.todo.value=”showT”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”bgframe”; document.questionForm.nextID.value=”save”; document.questionForm.background.value=”true”; var form = $(‘form[name=”questionForm”]’); var formAction = form.attr( ‘action’ ); $.ajax({ url: formAction, type: ‘POST’, async: false, data: form.serialize(), error: function(XMLHttpRequest, textStatus, errorThrown) { alert(‘There was a problem in saving. Please try again, later.’); }, success: function(data){ try{ var responseJson = $.parseJSON(data); form.find(‘input[name=”eaid”]’).val(responseJson.eaid); } catch(e){ $(‘body’).replaceWith(‘<table width=”100%” height=”100%”><tr><td style=”vertical-align: middle; text-align: center; font-size: 18pt”>Unable to authenticate request.<br>If you opened this assignment in another browser or tab, you may continue with that instance of your assignment.<br>Or, click <a target=”_top” style=”font-size: 18pt” href=”http://lms.mheducation.com/mghmiddleware/mheproducts/lmsCloseWindow.htm”>here</a> to return to your assignment list.</td></tr></table>’); } } }); } function doPrint() { $(“.rightSideBySide”).each(function() { $(this).css(“border”,”0″); $(this).html(”); }); $(“.leftSideBySide”).each(function() { $(this).removeClass(“noScreen”); }); window.print(); } function doPrintWindow( qid ) { if (qid != ”) { ex_startgather(‘doPrintWindow’, qid); if(!ex_gather()) return; theWin= window.open( ”, ‘printView’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=30,screenY=30,left=30,top=30’ ); theWin.focus(); document.questionForm.todo.value=”printview”; document.questionForm.checkMyWork.value=””; document.questionForm.target=”printView”; document.questionForm.submit(); } } function doTegrity() { var deduction= $(‘#p_deduct_resources’).val(); if ((deduction != ”) && (deduction != ‘0’)) { try { var recorder= $(‘#res_recorder’).val(); if (recorder.indexOf(‘tegrity’) == -1) { if (!confirm(“Using this resource will reduce your attempt’s total score by ” + deduction + “%”)) return; } } catch (e) {} } incResRecorder(‘tegrity’); theWin= window.open( ‘http://connect.mheducation.com/connect/openTegrity.do?caller=EZTest&’, ‘lectures’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=40,screenY=40,left=40,top=40’ ); theWin.focus(); } function doPreview( nextID ) { theWin= window.open( ”, ‘overview’, ‘toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=600,screenX=40,screenY=40,left=40,top=40’ ); theWin.focus(); document.questionForm.checkMyWork.value=””; document.questionForm.todo.value=”studentPreview”; document.questionForm.target=”overview”; document.questionForm.nextID.value= nextID; document.questionForm.submit(); } $(document).ready(function(){ navMenu(‘navbarSelect’, ”); $(‘.lsiForm’).each(function() { this.submit(); }); var suppressIntructions = $.trim($(‘input[type=hidden][name=p_suppressinstructions]’).val());var showDialog = populataInstructionsDialog();if(showDialog){ if(suppressIntructions != ‘yes’){ $(‘#instructionsDialog’).jqm({onHide:contentVisible}).jqmShow(); }else{ contentVisible(); }}else{ contentVisible();} mpPhasedInit(); }); var instructionsModal; function showInstructions() { $(‘#contentArea’).addClass(‘content-area-invisible’); $(‘.lsiFrame’).css(‘visibility’,’hidden’); var showDialog = populataInstructionsDialog(); if(showDialog){ $(‘#instructionsDialog’).jqm({onHide:contentVisible}).jqmShow(); }else{ contentVisible(); } } function showContent(e) { if (e == null) e = window.event; e.returnValue = false; // for IE try { e.preventDefault(); } catch (ex) {}; // for everyone else $(‘#instructionsDialog’).jqm().jqmHide(); $(‘#geniusDialog’).jqm().jqmHide(); $(‘#contentArea’).removeClass(‘content-area-invisible’); $(‘.lsiFrame’).css(‘visibility’,”); return false; } function contentVisible(hash) { $(‘#contentArea’).removeClass(‘content-area-invisible’); $(‘.lsiFrame’).css(‘display’,”); if(hash){ hash.o.remove(); hash.w.hide(); } } var flashOK= true; function flashCheck() { return(flashOK); } function enableSubmit() { flashOK= true; } function disableSubmit() { flashOK= false; } function getFormData(fieldName) { if (document.questionForm[fieldName]) return(document.questionForm[fieldName].value); return(”); } function setFormData(fieldName, outPutValue) { if (document.questionForm[fieldName]) document.questionForm[fieldName].value = outPutValue; enableSubmit(); } // – End of JavaScript – –> var Html5Recorder=Html5Recorder||{}; (function(){var g_oLogger=null;var g_oRecorders=null;var g_oLibToken=null;var g_sLibURL=null;var g_oStateEnum=null;var g_nNumOfRecorders=0;var g_dProgBarLenInPixles=90;var g_bRecMaxLenInSecs=120;var g_audioContext;var g_isRecording=false;var g_player=null;var g_context;var g_fnSendGAEvent=null;var g_fnLoadJSScript=null;var g_fnGetSourceCode=null;var g_fnIsCssLoaded=null;var g_fnGetBrowser=null;var g_encoderMp3Worker=null;var g_channelLeft=null;var g_LastTimeAudioProcess=null;this._OnRecTick=function(sRecorderId){try{var currTime= new Date/1E3;var one_second=1;if(currTime-g_LastTimeAudioProcess>one_second){g_oRecorders[sRecorderId].StopVideo();g_context=null;g_oRecorders[sRecorderId].RecordVideo(false,null,null)}var maxRecLen=g_oRecorders[sRecorderId].GetRecordLength();document.getElementById(“recProgress”+sRecorderId).recLen=parseFloat(document.getElementById(“recProgress”+sRecorderId).recLen+parseFloat(g_dProgBarLenInPixles/maxRecLen));document.getElementById(“recProgress”+sRecorderId).style.width=document.getElementById(“recProgress”+ sRecorderId).recLen+”px”;document.getElementById(“recProgress”+sRecorderId).setAttribute(“aria-valuenow”,Math.min(100,parseFloat(document.getElementById(“recProgress”+sRecorderId).recLen*maxRecLen/100)));if(document.getElementById(“stopRecording”+sRecorderId).style.display==”inline-block”)setTimeout(function(){Html5Recorder._OnRecTick(sRecorderId)},1E3)}catch(exc){g_oLogger.Error(“Html5Recorder._OnRecTick(“+sRecorderId+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};this._OnPlaybackTick= function(sRecorderId){try{if(document.getElementById(“stopPlaying”+sRecorderId).style.display==”inline-block”){var maxRecLen=g_oRecorders[sRecorderId].GetRecordLength();var recLen=parseFloat(document.getElementById(“recProgress”+sRecorderId).recLen/g_dProgBarLenInPixles*maxRecLen);document.getElementById(“playProgress”+sRecorderId).recLen=parseFloat(document.getElementById(“playProgress”+sRecorderId).recLen+parseFloat(g_dProgBarLenInPixles/recLen));document.getElementById(“playProgress”+sRecorderId).style.width= document.getElementById(“playProgress”+sRecorderId).recLen+”px”;document.getElementById(“playProgress”+sRecorderId).setAttribute(“aria-valuenow”,Math.min(100,parseFloat(document.getElementById(“playProgress”+sRecorderId).recLen*recLen/100)));if(document.getElementById(“stopPlaying”+sRecorderId).style.display==”inline-block”)setTimeout(function(){Html5Recorder._OnPlaybackTick(sRecorderId)},1E3)}}catch(exc){g_oLogger.Error(“Html5Recorder._OnPlaybackTick(“+sRecorderId+”), Failed with error, Error = “+ (exc.message?exc.message:exc),this)}};this.Init=function(oLibToken,oLogger,oStateEnum,sLibURL,oRecorders,fnSendGAEvent,fnLoadJSScript,fnGetSourceCode,fnIsCssLoaded,fnGetBrowser){g_oLogger=oLogger;g_oLibToken=oLibToken;g_oStateEnum=oStateEnum;g_sLibURL=sLibURL;g_oRecorders=oRecorders;g_fnSendGAEvent=fnSendGAEvent;g_fnLoadJSScript=fnLoadJSScript;g_fnGetSourceCode=fnGetSourceCode;g_fnIsCssLoaded=fnIsCssLoaded;g_fnGetBrowser=fnGetBrowser;try{g_fnLoadJSScript(“Html5Template.js”,g_sLibURL+”../Style/Html5Template.js”); g_fnLoadJSScript(“https://sdk.amazonaws.com/js/aws-sdk-2.2.5.min.js”,”https://sdk.amazonaws.com/js/aws-sdk-2.2.5.min.js”);var mp3WorkerSourceCode=g_fnGetSourceCode(g_sLibURL+”../jshtml5/enc/mp3/mp3Worker.js”);var libmp3lameSourceCode=g_fnGetSourceCode(g_sLibURL+”../jshtml5/enc/mp3/libmp3lame.min.js”);mp3WorkerSourceCode=mp3WorkerSourceCode.replace(“importScripts(‘libmp3lame.js’);”,””);mp3WorkerSourceCode=libmp3lameSourceCode+”rn”+mp3WorkerSourceCode;var oBuilder2=new Blob([mp3WorkerSourceCode], {“type”:”text/javascript”});var obj_url2=window.URL.createObjectURL(oBuilder2);window.addEventListener(“beforeunload”,function(event){for(var sRecorderId in g_oRecorders)if(g_oRecorders[sRecorderId]!=null&&(g_oRecorders[sRecorderId].isRecSaved!=null&&g_oRecorders[sRecorderId].isRecSaved==false))return event.returnValue=”Your recording was not saved and will be lost when you navigate away from this page.”});g_encoderMp3Worker=new Worker(obj_url2);g_encoderMp3Worker.onmessage=function(e){var command= e.data.command;switch(command){case “data”:var buf=e.data.buf;break;case “mp3”:var buf=e.data.buf;g_oRecorders[e.data.recorderId].blobUrl=URL.createObjectURL(buf);g_oRecorders[e.data.recorderId].blob=buf;break}}}catch(exc){g_oLogger.Error(“Html5Recorder.Init(“+sRecorderId+”,”+oLogger+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};this.CreateRecorder=function(recParams,isReCall){try{if(g_encoderMp3Worker==null)return null;if(!IsObject(g_oLibToken)){g_oLogger.Error(“Html5Recorder.CreateRecorder(), Please initialize the MVS lib prior calling to any of its functions.”, this);return null}var id=recParams.id;if(typeof isReCall==”undefined”)for(var sRecorderId in g_oRecorders)if(sRecorderId==id+”_Recorder”&&g_oRecorders[sRecorderId]!=null)return g_oRecorders[sRecorderId];var requestHeaders=recParams.requestHeaders;var requestBody=recParams.requestBody;var callbackUrl=recParams.callbackUrl;var maxLength=typeof recParams.maxLength==”undefined”?g_bRecMaxLenInSecs:parseInt(recParams.maxLength);var recordMode=typeof recParams.recordMode==”undefined”?”AUDIO”:recParams.recordMode; var width=typeof recParams.width==”undefined”?545:parseInt(recParams.width);var height=typeof recParams.height==”undefined”?100:parseInt(recParams.height);var aspectRatio=typeof recParams.aspectRatio==”undefined”?”4:3″:recParams.aspectRatio;var layout=typeof recParams.layout==”undefined”?”HORIZONTAL”:recParams.layout;if(typeof g_oRecorders[id+”_Recorder”]==”undefined”||g_oRecorders[id+”_Recorder”]==null)g_oRecorders[id+”_Recorder”]=new Recorder(id,recordMode,requestHeaders,requestBody,maxLength,aspectRatio, callbackUrl,height,width,recParams);if(typeof g_sHtml5RecorderTemplate==”undefined”){var oThis=this;setTimeout(function(){oThis.CreateRecorder(recParams,true)},500);return g_oRecorders[id+”_Recorder”]}g_fnSendGAEvent(“MVSRecorder.CreateRecorder”,”maxLength:”+maxLength+”;”+”recordMode:”+recordMode+”;”+”aspectRatio:”+aspectRatio+”;”+”height:”+height+”;”+”width:”+width);var sHtml5Template=g_sHtml5RecorderTemplate;sHtml5Template=sHtml5Template.replaceAll(“[[id]]”,id+”_Recorder”);sHtml5Template=sHtml5Template.replaceAll(“[[disabled]]”, “”);if(layout==”VERTICAL”){sHtml5Template=sHtml5Template.replaceAll(“[[layoutWidth]]”,”140px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutHeight]]”,”80px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutBottomPosition]]”,”position:relative;top:15px;”)}else{sHtml5Template=sHtml5Template.replaceAll(“[[layoutWidth]]”,”295px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutHeight]]”,”30px”);sHtml5Template=sHtml5Template.replaceAll(“[[layoutBottomPosition]]”,””)}DrawRecorder(id,sHtml5Template); var sRecorderId=id+”_Recorder”;setTimeout(function(){MVSRecorder._UpdateRecorderState(sRecorderId,g_oStateEnum.ready)},500);return g_oRecorders[sRecorderId]}catch(exc){g_oLogger.Error(“Html5Recorder.CreateRecorder(“+recParams+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};this.DeleteRecorder=function(sRecorderId){MVSRecorder.DeleteRecorder(sRecorderId)};function Recorder(id,mode,requestHeaders,requestBody,maxLength,aspectRatio,callbackUrl,height,width,recParams){try{this.id= id+”_Recorder”;this.mode=mode;this.requestHeaders=requestHeaders;this.requestBody=requestBody;this.recParamsJson=null;this.maxLength=Math.min(Number(maxLength),g_bRecMaxLenInSecs);this.aspectRatio=aspectRatio;this.callbackUrl=callbackUrl;this.state=g_oStateEnum.initializing;this.height=height;this.width=width;this.recParams=recParams;this.isRecSaved=null;this.fnOnStateChange=null;this.oMedia=null;this.recordTimer=null;this.blobUrl=null;this.blob=null;this.savedVideoId=null}catch(exc){g_oLogger.Error(“Recorder(“+ id+”,”+mode+”,”+publicKey+”,”+requestHeaders+”,”+requestBody+”,”+maxLength+”,”+aspectRatio+”,”+callbackUrl+”,”+height+”,”+width+”,”+recParams+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}}function DrawRecorder(id,sHtml5Template){try{if(IsObject(document.getElementById(id))){document.getElementById(id).innerHTML=sHtml5Template;document.getElementById(id).className+=” MVSRecorder”}else{var oSpan=document.createElement(“span”);oSpan.id=id;oSpan.innerHTML=sHtml5Template;oSpan.className= “MVSRecorder”;document.body.appendChild(oSpan)}if(!g_fnIsCssLoaded(“MediaPlayers.css”)){var oLinkMediaPlayers=document.createElement(“link”);oLinkMediaPlayers.rel=”stylesheet”;oLinkMediaPlayers.href=g_sLibURL+”../Style/MediaPlayers.css”;oLinkMediaPlayers.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayers);if(g_fnGetBrowser()==”IExplorer”){var oMeta=document.createElement(“meta”);oMeta.httpEquiv=”X-UA-Compatible”;oMeta.content=”IE=edge”;document.getElementsByTagName(“head”)[0].insertBefore(oMeta, document.getElementsByTagName(“head”)[0].children[0]);var oDiv=document.createElement(“div”);oDiv.innerHTML=”x3c!–[if IE]><i></i><![endif]–x3e”;if(oDiv.getElementsByTagName(“i”).length){var oLinkMediaPlayersIE=document.createElement(“link”);oLinkMediaPlayersIE.rel=”stylesheet”;oLinkMediaPlayersIE.href=g_sLibURL+”../Style/IEMP.css”;oLinkMediaPlayersIE.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayersIE)}}}}catch(exc){g_oLogger.Error(“DrawRecorder(“+id+”,”+sHtml5Template+ “), Failed with error, Error = “+(exc.message?exc.message:exc),this)}}function HandlerStartUserMedia(stream){source=g_audioContext.createMediaStreamSource(stream);var bufferLen=4096;g_context=source.context;this.node=(g_context.createScriptProcessor||g_context.createJavaScriptNode).call(g_context,bufferLen,1,1);this.node.connect(g_context.destination);this.node.onaudioprocess=function(e){g_LastTimeAudioProcess=new Date/1E3;var channelLeft=e.inputBuffer.getChannelData(0);g_channelLeft=channelLeft; if(!g_isRecording)return;g_encoderMp3Worker.postMessage({command:”encode”,buf:channelLeft})};source.connect(this.node);for(var sRecorderId in g_oRecorders)if(g_oRecorders[sRecorderId]!=null&&g_oRecorders[sRecorderId].state==”waitingForMic”){g_oRecorders[sRecorderId].state=g_oStateEnum.ready;g_oRecorders[sRecorderId].RecordVideo(false,null,true);return}}function HandlerErrorUserMedia(e){switch(g_fnGetBrowser()){case “FireFox”:alert(“To record you must allow access to your microphone and/or camera. To change your access permissions right click this page, select View Page Info, in the window that appears select Permissions and allow use of the microphone and camera.”); break;case “Chrome”:alert(“To record you must allow access to your microphone and/or camera. To change your access permissions type chrome://settings/contentExceptions#media-stream-mic in the address bar and press the return key.”);break;case “Edge”:alert(“To record you must allow access to your microphone and/or camera. To change your access permissions refresh the page and click record again.”);break;default:alert(“To record you must allow access to your microphone and/or camera.”);break}}function IsMicShared(isRecAfterMicShare){if(g_fnGetBrowser()!= “FireFox”)return true;var SAMPLING_INTERVAL=500;if(g_channelLeft==null||isRecAfterMicShare!=null&&isRecAfterMicShare==true)return true;for(i=0;i<g_channelLeft.length;i+=SAMPLING_INTERVAL)if(g_channelLeft[i]!=0)return true;g_context=null;return false}Recorder.prototype.CheckConcurrency=function(){var isConcurrency=false;try{var stateEnum=MVSRecorder._GetStateEnum();for(var sRecorderId in g_oRecorders)if(g_oRecorders[sRecorderId]!=null&&(g_oRecorders[sRecorderId].state==stateEnum.recording||(g_oRecorders[sRecorderId].state== stateEnum.rerecorded||g_oRecorders[sRecorderId].state==stateEnum.playing))){g_oRecorders[sRecorderId].StopVideo();isConcurrency=true}}catch(exc){g_oLogger.Error(“Recorder.CheckConcurrency(“+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}return isConcurrency};Recorder.prototype.RecordVideo=function(isReRec,isAddVideoReqSent,isRecAfterMicShare){try{document.getElementById(“accept”+this.id).style.display=”none”;if(g_context==null||!IsMicShared(isRecAfterMicShare)){this.state=”waitingForMic”; window.AudioContext=window.AudioContext||(window.webkitAudioContext||window.mozAudioContext);navigator.getUserMedia=navigator.getUserMedia||(navigator.webkitGetUserMedia||(navigator.mozGetUserMedia||navigator.msGetUserMedia));window.URL=window.URL||window.webkitURL;if(g_audioContext!=null)g_audioContext.close();g_audioContext=new AudioContext;navigator.getUserMedia({vide:false,audio:true},HandlerStartUserMedia,HandlerErrorUserMedia);if(isReRec&&document.getElementById(“accepted”+this.id).style.display== “none”)document.getElementById(“accept”+this.id).style.display=”inline-block”;return}var oThis=this;if(this.recParamsJson==null||this.recParamsJson.isError==”true”)if(typeof isAddVideoReqSent==”undefined”||isAddVideoReqSent==null)MVSRecorder.AddVideo(this.id);if(this.CheckConcurrency()){setTimeout(function(){oThis.RecordVideo(isReRec,isAddVideoReqSent,isRecAfterMicShare)},500);return}if(g_player!=null&&g_player.src!=””)this.StopVideo();if(!isReRec)g_fnSendGAEvent(“MVSRecorder.Record”,this.mode);else g_fnSendGAEvent(“MVSRecorder.ReRecord”); this.isRecSaved=false;this.state=”recording”;g_isRecording=true;var sampleRate=g_context.sampleRate;this.blob=this.blobUrl=null;g_encoderMp3Worker.postMessage({command:”init”,recorderId:this.id,config:{channels:1,mode:3,samplerate:22050,bitrate:64,in_samplerate:sampleRate}});this.recordTimer=setTimeout(function(){oThis.StopVideo()},oThis.maxLength*1E3);if(this.savedVideoId==null)MVSRecorder._UpdateRecorderState(this.id,”recording”);else{MVSRecorder._UpdateRecorderState(this.id,”rerecorded”,this.savedVideoId); this.savedVideoId=null}this.RecordingStarted()}catch(exc){g_oLogger.Error(“Recorder.RecordVideo(“+isReRec+”,”+isAddVideoReqSent+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.StopVideo=function(){try{g_fnSendGAEvent(“MVSRecorder.Stop”);if(g_isRecording){g_isRecording=false;g_encoderMp3Worker.postMessage({command:”finish”});this.RecordingStopped()}else{if(g_player!=null)g_player.src=””;this.PlaybackStopped()}}catch(exc){g_oLogger.Error(“Recorder.StopVideo(“+ “), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.SaveVideo=function(){try{var oThis=this;if(this.recParamsJson==null||this.blob==null){document.getElementById(“accepted”+this.id).style.display=”inline-block”;document.getElementById(“accepted”+this.id).innerHTML=”saving…”;document.getElementById(“accept”+this.id).style.display=”none”;setTimeout(function(){oThis.SaveVideo()},500);return}if(this.recParamsJson.isError==”true”)return;var maxRecLen=this.GetRecordLength(); var recLen=parseFloat(document.getElementById(“recProgress”+this.id).recLen/g_dProgBarLenInPixles*maxRecLen);g_fnSendGAEvent(“MVSRecorder.Save”,”Recording Duration”,recLen);if(g_oRecorders[this.id].state!=MVSRecorder._GetStateEnum().stopped)this.StopVideo();var videoId=this.recParamsJson.id;MVSRecorder._UpdateRecorderState(this.id,MVSRecorder._GetStateEnum().saving,videoId);document.getElementById(“accepted”+this.id).style.display=”inline-block”;document.getElementById(“accepted”+this.id).innerHTML= “saving…”;document.getElementById(“rerecord”+this.id).style.display=”none”;document.getElementById(“accept”+this.id).style.display=”none”;var creds=new AWS.Credentials(this.recParamsJson.token.accessToken.accessKey,this.recParamsJson.token.accessToken.secretKey,this.recParamsJson.token.accessToken.sessionToken);AWS.config.credentials=creds;AWS.config.region=”us-east-1″;var bucket=new AWS.S3({params:{Bucket:this.recParamsJson.token.identifier.container}});var params={Key:this.recParamsJson.token.identifier.keyPrefix+ “.mp3″,ContentType:”audio/mp3”,Body:this.blob};var sRecorderId=this.id;bucket.upload(params,function(err){if(err){g_oLogger.Error(“failed to save video , err=”+err,oThis);MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().error,videoId);document.getElementById(“accepted”+sRecorderId).innerHTML=MVSRecorder._GetStateEnum().error}else{MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().saved,videoId);document.getElementById(“accepted”+sRecorderId).innerHTML= MVSRecorder._GetStateEnum().saved;oThis.isRecSaved=true;oThis.recParamsJson=null;oThis.savedVideoId=videoId}document.getElementById(“rerecord”+sRecorderId).style.display=”inline-block”;document.getElementById(“accepted”+sRecorderId).focus()})}catch(exc){g_oLogger.Error(“Recorder.SaveVideo(“+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.Preview=function(){try{var sRecorderId=this.id;if(this.blobUrl==null){var oThis=this;document.getElementById(“play”+sRecorderId).style.display= “none”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”inline-block”;setTimeout(function(){oThis.Preview()},500);return}g_fnSendGAEvent(“MVSRecorder.Play”);this.CheckConcurrency();if(g_player==null)g_player=new window.Audio;g_player.onended=function(){g_oRecorders[sRecorderId].PlaybackStopped()};var xhr=new XMLHttpRequest;xhr.onreadystatechange=function(){if(this.readyState==4&&this.status==200){g_player.src=window.URL.createObjectURL(this.response);g_oRecorders[sRecorderId].PlaybackStarted(); g_player.play()}};xhr.open(“GET”,this.blobUrl);xhr.responseType=”blob”;xhr.send()}catch(exc){g_oLogger.Error(“Recorder.Preview(“+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}};Recorder.prototype.GetRecordLength=function(){return this.maxLength};Recorder.prototype.GetState=function(){return this.state};Recorder.prototype.RecordingStarted=function(){var sRecorderId=this.id;document.getElementById(“recProgress”+sRecorderId).recLen=0;document.getElementById(“recProgress”+sRecorderId).style.width= “0px”;document.getElementById(“record”+sRecorderId).style.display=”none”;document.getElementById(“rerecord”+sRecorderId).style.display=”none”;document.getElementById(“stopRecording”+sRecorderId).style.display=”inline-block”;document.getElementById(“stopRecording”+sRecorderId).focus();document.getElementById(“recProgressBar”+sRecorderId).style.display=”inline-block”;document.getElementById(“play”+sRecorderId).style.display=”none”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”none”; document.getElementById(“playProgressBar”+sRecorderId).style.display=”none”;document.getElementById(“accept”+sRecorderId).style.display=”none”;document.getElementById(“accepted”+this.id).style.display=”none”;setTimeout(function(){Html5Recorder._OnRecTick(sRecorderId)},1E3)};Recorder.prototype.RecordingStopped=function(){var recordTimer=this.recordTimer;if(typeof recordTimer==”number”&&Number(recordTimer)==recordTimer)clearTimeout(recordTimer);var sRecorderId=this.id;document.getElementById(“stopRecording”+ sRecorderId).style.display=”none”;document.getElementById(“recProgressBar”+sRecorderId).style.display=”none”;document.getElementById(“play”+sRecorderId).style.display=”inline-block”;document.getElementById(“play”+sRecorderId).focus();document.getElementById(“playProgressBar”+sRecorderId).style.display=”inline-block”;document.getElementById(“rerecord”+sRecorderId).style.display=”inline-block”;if(this.recParamsJson==null||this.recParamsJson.isError!=”true”)document.getElementById(“accept”+sRecorderId).style.display= “inline-block”;MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().stopped)};Recorder.prototype.PlaybackStarted=function(){var sRecorderId=this.id;document.getElementById(“playProgress”+sRecorderId).recLen=0;document.getElementById(“playProgress”+sRecorderId).style.width=”0px”;document.getElementById(“play”+sRecorderId).style.display=”none”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”inline-block”;document.getElementById(“stopPlaying”+sRecorderId).focus(); MVSRecorder._UpdateRecorderState(sRecorderId,”playing”);setTimeout(function(){Html5Recorder._OnPlaybackTick(sRecorderId)},1E3)};Recorder.prototype.PlaybackStopped=function(){var sRecorderId=this.id;document.getElementById(“playProgress”+sRecorderId).recLen=0;document.getElementById(“playProgress”+sRecorderId).style.width=”0px”;document.getElementById(“stopPlaying”+sRecorderId).style.display=”none”;document.getElementById(“recProgressBar”+sRecorderId).style.display=”none”;document.getElementById(“play”+ sRecorderId).style.display=”inline-block”;document.getElementById(“play”+sRecorderId).focus();MVSRecorder._UpdateRecorderState(sRecorderId,MVSRecorder._GetStateEnum().stopped)};Recorder.prototype.OnStateChange=function(fnOnStateChange){if(IsFunction(fnOnStateChange))this.fnOnStateChange=fnOnStateChange}}).apply(Html5Recorder); var MVSUploader=MVSUploader||{}; (function(){var g_dProgBarLenInPixles=90;var g_oLogger=null;var g_oRecorders=null;var g_sLibURL=null;var g_fnSendGAEvent=null;var g_fnIsCssLoaded=null;var g_fnGetBrowser=null;this._GetUploaders=function(){return g_oRecorders};this.CreateUploader=function(uploadParams,oRecorders,sLibURL,oLogger,fnIsCssLoaded,fnGetBrowser,fnSendGAEvent,fnIsObject,oMobile){var id=uploadParams.id;var requestHeaders=uploadParams.requestHeaders;var requestBody=uploadParams.requestBody;var uploadMode=typeof uploadParams.uploadMode== “undefined”?”AUDIO”:uploadParams.uploadMode;if(typeof id==”undefined”||(typeof requestHeaders==”undefined”||typeof requestBody==”undefined”))return null;if(g_oRecorders==null)g_oRecorders=oRecorders;g_sLibURL=sLibURL;g_fnIsCssLoaded=fnIsCssLoaded;g_fnGetBrowser=fnGetBrowser;g_fnSendGAEvent=fnSendGAEvent;if(g_oLogger==null)g_oLogger=oLogger;if(typeof g_oRecorders[id]==”undefined”||g_oRecorders[id]==null)g_oRecorders[id]=new Uploader(id,requestHeaders,requestBody,uploadMode,uploadParams);else if(fnIsObject(g_oRecorders[id].oBucketUploader)){g_oRecorders[id].oBucketUploader.abort(); g_oRecorders[id].oBucketUploader=null}if(typeof g_sUploaderTemplate==”undefined”){var oThis=this;setTimeout(function(){oThis.CreateUploader(uploadParams,oRecorders,sLibURL,oLogger,fnIsCssLoaded,fnGetBrowser,fnSendGAEvent,fnIsObject,oMobile)},500);return g_oRecorders[id]}var sTemplate=g_sUploaderTemplate;sTemplate=sTemplate.replaceAll(“[[id]]”,id);sTemplate=sTemplate.replaceAll(“[[layoutWidth]]”,”295px”);sTemplate=sTemplate.replaceAll(“[[layoutHeight]]”,”30px”);sTemplate=sTemplate.replaceAll(“[[layoutBottomPosition]]”, “”);if(uploadMode==”AUDIO”)if(!oMobile.Any())sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”.mp3,.m4a,.ogg,.wav”);else sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”audio/*”);else if(!oMobile.Any())sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”.flv,.mpeg,.mpg,.mp4,.m4v,.mp4v,.3gp,.3gpp,.mov,.asf,.avi”);else sTemplate=sTemplate.replaceAll(“[[acceptFilter]]”,”video/*”);DrawUploader(id,sTemplate);setTimeout(function(){MVSRecorder._UpdateRecorderState(id,MVSRecorder._GetStateEnum().ready)}, 500);g_fnSendGAEvent(“MVSUploader.CreateUploader”,”uploadMode:”+uploadMode);return g_oRecorders[id]};this.DeleteUploader=function(sUploaderId,fnIsString,fnIsObject,fnSafeDeleteElement){try{if(!fnIsString(sUploaderId)||(!fnIsObject(g_oRecorders[sUploaderId])||!fnIsObject(document.getElementById(sUploaderId)))){var loggerType=(g_oLogger.constructor.toString().match(/function (.+?)(/)||[,””])[1];if(loggerType==”SMLogger”||loggerType==”SpecLogger”)g_oLogger.Error(‘MVSUploader.DeleteUploader(“‘+sUploaderId+ ‘”), Invalid or missing Recorder ID.’,this);return}if(g_oRecorders[sUploaderId].state==MVSRecorder._GetStateEnum().uploading&&fnIsObject(g_oRecorders[sUploaderId].oBucketUploader)){g_oRecorders[sUploaderId].oBucketUploader.abort();g_oRecorders[sUploaderId].oBucketUploader=null}g_oRecorders[sUploaderId]=null;fnSafeDeleteElement(“panel”+sUploaderId);fnSafeDeleteElement(“nimbbFlashSettingsDialog”+sUploaderId)}catch(exc){g_oLogger.Error(“MVSUploader.DeleteUploader(“+sUploaderId+”), Failed with error, Error = “+ (exc.message?exc.message:exc),this)}};function Uploader(id,requestHeaders,requestBody,uploadMode,uploadParams){try{this.id=id;this.requestHeaders=requestHeaders;this.requestBody=requestBody;this.uploadMode=uploadMode;this.uploadParams=uploadParams;this.recParamsJson=null;this.fnOnStateChange=null;this.oBucketUploader=null}catch(exc){g_oLogger.Error(“Uploader(“+id+”,”+requestHeaders+”,”+requestBody+”,”+uploadMode+”,”+uploadParams+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}} function DrawUploader(id,sTemplate){try{if(IsObject(document.getElementById(id))){document.getElementById(id).innerHTML=sTemplate;document.getElementById(id).className+=” MVSRecorder”}else{var oSpan=document.createElement(“span”);oSpan.id=id;oSpan.innerHTML=sTemplate;oSpan.className=”MVSRecorder”;document.body.appendChild(oSpan)}if(!g_fnIsCssLoaded(“MediaPlayers.css”)){var oLinkMediaPlayers=document.createElement(“link”);oLinkMediaPlayers.rel=”stylesheet”;oLinkMediaPlayers.href=g_sLibURL+”../Style/MediaPlayers.css”; oLinkMediaPlayers.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayers);if(g_fnGetBrowser()==”IExplorer”){var oMeta=document.createElement(“meta”);oMeta.httpEquiv=”X-UA-Compatible”;oMeta.content=”IE=edge”;document.getElementsByTagName(“head”)[0].insertBefore(oMeta,document.getElementsByTagName(“head”)[0].children[0]);var oDiv=document.createElement(“div”);oDiv.innerHTML=”x3c!–[if IE]><i></i><![endif]–x3e”;if(oDiv.getElementsByTagName(“i”).length){var oLinkMediaPlayersIE= document.createElement(“link”);oLinkMediaPlayersIE.rel=”stylesheet”;oLinkMediaPlayersIE.href=g_sLibURL+”../Style/IEMP.css”;oLinkMediaPlayersIE.type=”text/css”;document.getElementsByTagName(“head”)[0].appendChild(oLinkMediaPlayersIE)}}}}catch(exc){g_oLogger.Error(“DrawUploader(“+id+”,”+sTemplate+”), Failed with error, Error = “+(exc.message?exc.message:exc),this)}}Uploader.prototype.Click=function(isReupload){if(isReupload){document.getElementById(“reupload”+this.id).value=null;g_fnSendGAEvent(“MVSUploader.ReUpload”, “uploadMode:”+this.uploadMode)}else{document.getElementById(“upload”+this.id).value=null;g_fnSendGAEvent(“MVSUploader.Upload”,”uploadMode:”+this.uploadMode)}MVSRecorder.AddVideo(this.id)};Uploader.prototype.UploadFile=function(evt){var oThis=this;document.getElementById(“divUpload”+oThis.id).style.display=”none”;document.getElementById(“divReupload”+oThis.id).style.display=”none”;document.getElementById(“accepted”+oThis.id).style.display=”inline-block”;document.getElementById(“accepted”+oThis.id).innerHTML= “uploading…”;document.getElementById(“recProgressBar”+oThis.id).style.display=”inline-block”;document.getElementById(“recProgress”+oThis.id).style.width=”0px”;if(this.recParamsJson==null){setTimeout(function(){oThis.UploadFile(evt)},500);return}if(this.recParamsJson.isError==”true”)return;var videoId=oThis.recParamsJson.id;MVSRecorder._UpdateRecorderState(oThis.id,MVSRecorder._GetStateEnum().uploading,videoId);var creds=new AWS.Credentials(oThis.recParamsJson.token.accessToken.accessKey,oThis.recParamsJson.token.accessToken.secretKey, oThis.recParamsJson.token.accessToken.sessionToken);AWS.config.credentials=creds;AWS.config.region=”us-east-1″;var contentType=evt.files[0].type;var fileExt=”.”+evt.value.match(/.([^.]+)$/)[1];var bucket=new AWS.S3({params:{Bucket:oThis.recParamsJson.token.identifier.container}});var params={Key:oThis.recParamsJson.token.identifier.keyPrefix+fileExt,ContentType:contentType,Body:evt.files[0]};var sUploaderId=oThis.id;oThis.oBucketUploader=bucket.upload(params).on(“httpUploadProgress”,function(evt){document.getElementById(“recProgress”+ sUploaderId).style.width=evt.loaded/evt.total*g_dProgBarLenInPixles+”px”});oThis.oBucketUploader.send(function(err){if(err){g_oLogger.Error(“failed to upload video , err=”+err,oThis);g_fnSendGAEvent(“MVSUploader.Error”,err);MVSRecorder._UpdateRecorderState(sUploaderId,MVSRecorder._GetStateEnum().error,videoId);document.getElementById(“accepted”+sUploaderId).innerHTML=MVSRecorder._GetStateEnum().error}else{if(oThis.oBucketUploader!=null){g_fnSendGAEvent(“MVSUploader.Uploaded”,”uploadMode:”+oThis.uploadMode, evt.files[0].size);MVSRecorder._UpdateRecorderState(sUploaderId,MVSRecorder._GetStateEnum().uploaded,videoId);document.getElementById(“accepted”+sUploaderId).innerHTML=MVSRecorder._GetStateEnum().uploaded}oThis.recParamsJson=null}if(document.getElementById(“divUpload”+oThis.id).style.display==”none”)document.getElementById(“divReupload”+sUploaderId).style.display=”inline-block”;document.getElementById(“recProgressBar”+sUploaderId).style.display=”none”})};Uploader.prototype.UploadFileErrorHandler= function(evt){switch(evt.target.error.code){case evt.target.error.NOT_FOUND_ERR:alert(“File Not Found!”);break;case evt.target.error.NOT_READABLE_ERR:alert(“File is not readable”);break;case evt.target.error.ABORT_ERR:break;default:alert(“An error occurred reading this file.”)}};Uploader.prototype.GetState=function(){return this.state};Uploader.prototype.OnStateChange=function(fnOnStateChange){if(IsFunction(fnOnStateChange))this.fnOnStateChange=fnOnStateChange}}).apply(MVSUploader); Lou and Joann Girardi are married and file a joint return. They recently bought a new home on 21680 Skyline Drive, Henderson, NV 89077. Their son, Stuart, attends the University of Pennsylvania full-time on a full scholarship. Stuart is claimed as a dependent on the Girardis’ tax return. Their SSNs are Lou, 412-34-5670; Joann, 412-34-5671; and Stuart, 412-34-5672. Their birth dates are as follows: Lou, May 18, 1964; Joann, December 24, 1964; and Stuart, May 9, 1997. Their relevant tax information follows:Â
Lou is an attorney and owns his law firm, which is operating as an S corporation. His W-2 information and Schedule K-1 from his law firm are as follows:Â Â Wages (box 1)=$114,800.50Federal W/H (box 2)=$15,000.14Social security wages (box 3)=$114,800.50Social security W/H (box 4)=$7,117.63Medicare wages (box 5)=$114,800.50Medicare W/H (box 6)=$1,664.61Â
Schedule K-1 from the law offices of Lou Girardi – Attorney at Law ID # 12-3456789 100% Owner Material participation:Line 1 Â Â = Â $22,582.00 (ordinary business income)
Line 11 =  $22,582.00 (§ 179 deduction)Â
Joann is a full-time lecturer at Arizona State University. Her W-2 information from ASU is as follows:Â Wages (box 1)=$65,000.00Federal W/H (box 2)=$9,950.25Social security wages (box 3)=$65,000.00Social security W/H (box 4)=$4,030.00Medicare wages (box 5)=$65,000.00Medicare W/H (box 6)=$942.50
Â
 The following are other income and expenses they received and incurred during the year:  Income  Dividend (qualified)$666Interest 765Expenses  Real estate taxes 7,836State sales tax 1,629Mortgage interest 32,562Charitable contribution 2,598  Prepare the Girardis’ federal tax return for 2016. Use Form 1040, and Schedules A, B, and E. Assume that the Girardis do not qualify for any credits (although they may). For any missing information, make reasonable assumptions. The taxpayers had qualifying health care coverage at all times during the tax year. (Assume no AMT although it may apply; Form 6251 or the AMT calculation is not required.) (List the names of the taxpayers in the order in which they appear in the problem. Do not round intermediate computations. Input all the values as positive numbers.)
Â
Use the appropriate Tax Tables or Tax Rate Schedules.