var timeseq = (new Date()).getTime(); var staticSrv = "https://download3.showmypc.com"; var loadHTML = "
"; var loading = 0; function showDefDetails(){ $('#productName').html("Remote Access and Meetings"); $('#productDet').html('ShowMyPC provides cross-platform remote support, remote access, and collaboration tools. Customize the service the way you want to deliver a fast, effective, and seamless user experience.'); } function showServiceDetails(){ $('#productName').html("Access Home Or Office PC"); $('#productDet').html(" Access Home or Office computer from anywhere
Reboot a remote PC
Access and manage multiple unattended PCs
Access from any mobile device
Track PCs"); } function showPremiumDetails(){ $('#productName').html("Premium Meetings/Support"); $('#productDet').html(" All inclusive account
Remote support and online meetings
Unattended remote access
Video conference
Branded domain and integration"); } function showPrivateDetails(){ $('#productName').html("Enterprise Hosted Solution"); $('#productDet').html(" Provide remote support, conduct meetings online
Dedicated private hosting
Access and manage multiple unattended PCs
Option to use your own private server or VM
Easy setup and better than any costly appliance you buy"); } function showTicketDetails(){ $('#productName').html("Free Helpdesk System"); $('#productDet').html(" Helpdesk system lets you manage your support requests
Improve customer support efficiency
Provide staff with efficient productivity tools
Deliver fast, effective and measurable support"); } function showService() { $("#promoDiv").css({top: getAbsTop('showButton') - 35, left: getAbsLeft('prodDiv') - 5, position:'fixed'}); $('#subPopupDiv').html(loadHTML); $('#warnDiv').hide(); $('#promoDiv').show(); $('#subPopupDivTitle').html(" Access Home or Office PC"); $('#subPopupDiv').load('/faq/access-remote-pc-promo.html?seq=' + timeseq); } function showTickets() { $("#promoDiv").css({top: getAbsTop('showButton') - 35, left: getAbsLeft('prodDiv'), position:'fixed'}); $('#subPopupDiv').html(loadHTML); $('#warnDiv').hide(); $('#promoDiv').show(); $('#subPopupDivTitle').html(" Help Desk and Tickets"); $('#subPopupDiv').load('/faq/free-ticket-system-sub.html?seq=' + timeseq); } function showInvoices() { $("#promoDiv").css({top: getAbsTop('showButton') - 35, left: getAbsLeft('prodDiv'), position:'fixed'}); $('#subPopupDiv').html(loadHTML); $('#warnDiv').hide(); $('#promoDiv').show(); $('#subPopupDivTitle').html(" Quote, Invoice and Get Paid"); $('#subPopupDiv').load('/faq/free-invoice-system-include.html?seq=' + timeseq); } function showRemoteSupport() { $("#promoDiv").css({top: getAbsTop('showButton') - 35, left: getAbsLeft('prodDiv'), position:'fixed'}); $('#subPopupDiv').html(loadHTML); $('#warnDiv').hide(); $('#promoDiv').show(); $('#subPopupDiv').load('/faq/remote-support-include.html?seq=' + timeseq); $('#subPopupDivTitle').html(" Premium Meeting and Remote Support"); } function showRemoteSupportTrial() { $("#promoDiv").css({top: getAbsTop('showButton') - 35, left: getAbsLeft('prodDiv'), position:'fixed'}); $('#subPopupDiv').html(loadHTML); $('#warnDiv').hide(); $('#promoDiv').show(); $('#subPopupDivTitle').html(" Premium Meeting and Remote Support Trial"); $('#subPopupDiv').load('/faq/remote-support-include.html?trm=1001&seq=' + timeseq); } var bShowMenu = false; function showhidemenu() { if(bShowMenu) { bShowMenu = false; $('#showMenu').show(); } else { $('#showMenu').hide(); } } function openJVer(showButton) { if ($.client.os != "mac" && $.client.os != "Mac") { popUpWH("https://showmypc.com/mac/java-client.html?seq=1", 560, 290); } else { if (showButton){ //$("#showWaitWheelMac").hide(); //$("#showWaitWheelMacRoll").show(); $("#warnMacText").html("Downloading.. Check Downloads folder unzip and run app."); $("#warnText").css("background-color", "orange"); //$("#warnText").css("color", "orange"); $("#arrow-down").css({"border-color": "black", "border-weight":"1px", "border-style":"solid"}); $("#macArrowDown").hide(); $("#warnDiv").show(); } else { $("#showWaitWheelMacView").show(); $("#missingPwd").html("Downloading...Look up the file in downloads folder."); $("#missingPwdDiv").show(); } window.setTimeout(revertWarn, 15000); self.location="https://showmypc.com/mac/ShowMyPC3610.app.zip"; } } function revertWarn(){ $("#showWaitWheelMac").show(); $("#showWaitWheelMacRoll").hide(); $("#showWaitWheelMacView").hide(); $("#missingPwdDiv").hide(); $("#warnText").css("background-color", "red"); $("#warnMacText").html("Do not accept help from unknown callers.
Share password with trusted users only."); $("#showWaitWheelMac").attr('src', staticSrv + '/images/show128.png'); $("#showWaitWheelMac").css('width', '42px'); $("#macArrowDown").show(); $("#warnDiv").hide(); } function showVideo() { $("#viddiv").toggle(); if($('#viddiv').is(':visible')) { $("#viddiv").html(''); } else { $("#viddiv").html(''); } } //addes swati var bShowMenu = false; function makeMouseOutFn(elem){ var list = traverseChildren(elem); return function onMouseOut(event) { var e = event.toElement || event.relatedTarget; if (!!~list.indexOf(e)) { return; } //alert('MouseOut'); $('#showJava').hide(); }; } function makeViewMouseOutFn(elem){ var list = traverseChildren(elem); return function onMouseOut(event) { var e = event.toElement || event.relatedTarget; if (!!~list.indexOf(e)) { return; } //alert('MouseOut'); $('#viewOptions').hide(); //$('#missingPwdDiv').hide(); // handle mouse event here! }; } function makeWarnMouseOutFn(elem){ var list = traverseChildren(elem); return function onMouseOut(event) { var e = event.toElement || event.relatedTarget; if (!!~list.indexOf(e)) { return; } $('#warnDiv').fadeOut("slow"); }; } //quick and dirty DFS children traversal, function traverseChildren(elem){ var children = []; var q = []; q.push(elem); while (q.length > 0) { var elem = q.pop(); children.push(elem); pushAll(elem.children); } function pushAll(elemArray){ for(var i=0; i < elemArray.length; i++) { q.push(elemArray[i]); } } return children; } function isMobile(){ //var agent = navigator.userAgent.toLowerCase(); if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { return true; } else { return false; } } function showViewDD() { if($.client.os == "Mac" || $.client.os == "mac") { $('#viewDownRun').hide(); } let isMac = ($.client.os == "Mac" || $.client.os == "mac"); if (isMobile() == false && isMac == false){ $('#viewOptions').show(); } $('#showJava').hide(); $("#warnDiv").hide(); } function hideViewDD() { if (!$.browser || !$.browser.msie || ($.browser.msie && $.browser.version > 9)){ $("#missingPwd").html(" "); $("#missingPwdDiv").hide(); } } function hideViewEle(){ $('#viewOptions').hide(); } function showShowDD() { if($.client.os != "Mac" && $.client.os != "mac") { $('#showJava').show(); } if (isMobile() == false){ $('#showMenu').show(); } else { $('#showJava').hide(); } $('#warnDiv').fadeIn("slow"); $('#viewOptions').hide(); } function hideShowDD() { $('#warnDiv').hide(); } function clearInit(){ if ($("#mid").val() == null || $("#mid").val() == "enter password"){ $("#mid").val(""); $("#mid").css('color', 'black'); $("#mid").focus(); } } function showHelpDiv(e, color, info){ $("#" + e).css('background-color', color); $("#helpDiv").css({top: getAbsTop(e), left: getAbsLeft(e) + 246, position:'absolute'}); $("#helpText").css('padding', 5); $("#helpText").html(info); $('#helpDiv').show(); } function hideHelpDiv(e, color){ $("#" + e).css('background-color', color); $('#helpDiv').hide(); } function getAbsTop(objectId) { // Get an object top position from the upper left viewport corner o = document.getElementById(objectId) oTop = o.offsetTop // Get top position from the parent object while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element oParent = o.offsetParent // Get parent object reference oTop += oParent.offsetTop // Add parent top position o = oParent } return oTop } function getAbsLeft(objectId) { // Get an object left position from the upper left viewport corner o = document.getElementById(objectId) oLeft = o.offsetLeft // Get left position from the parent object while(o.offsetParent!=null) { // Parse the parent hierarchy up to the document element oParent = o.offsetParent // Get parent object reference oLeft += oParent.offsetLeft // Add parent left position o = oParent } return oLeft } var inputTemp; function startHTMLMtg(){ //$('#missingPwdTD').css("background-color", "orange"); //document.getElementById("viewDownArrow").className="arrow-down-gray"; if (loading == 0) { loading = 1; var letterNumber = /^[0-9]+$/; if ($("#mid").val() != null) {//check password format//todo if(smpcWAP && $("#mid").val() && $("#mid").val().startsWith("meet")){ smpcWAP.startViewer(); return; } var input = $("#mid").val(); if (input != null && input.length < 12) { //make sure all numbers $("#missingPwd").html("Incorrect password."); $("#missingPwdDiv").show(); bViewMenu=true; $("#mid").focus(); loading = 0; return false; } if (input != null && (input.length == 12 || input.length == 13) && !input.match(letterNumber)) { //make sure all numbers $("#missingPwd").html("Incorrect password."); $("#missingPwdDiv").show(); bViewMenu=true; $("#mid").focus(); loading = 0; return false; } if (input != null && (input.length == 12 || input.length == 13) && input.match(letterNumber)) { //add dashes at the right place if (input.length == 12){ inputNew = input.substring(0, 4) + "-" + input.substring(4, 8) + "-" + input.substring(8, 12); } if (input.length == 13){ inputNew = input.substring(0, 5) + "-" + input.substring(5, 13); } input = inputNew; } //make sure password only has numbers var letterNumber = /^[0-9-]+$/; if (input != null && input.length == 14 && !input.match(letterNumber)) { $("#missingPwd").html("Password should contain numbers/dashes."); $("#missingPwdDiv").show(); bViewMenu=true; $("#mid").focus(); loading = 0; return false; } //make sure not old format if (input != null && input.length == 14 && input.substring(5, 6) == "-") { $("#missingPwd").html("Please request host to upgrade to the latest version to use Web Viewer."); $("#missingPwdDiv").show(); bViewMenu=true; $("#mid").focus(); loading = 0; return false; } bViewMenu=true; //$("#showWaitWheel").attr('src', staticSrv + '/images/three-dots.svg'); $("#showWaitWheel").attr('src', '/images/three-dots.svg'); $("#showWaitWheel").css('width', '32px'); var retry = false; inputTemp = input; //check for view session count checkViewCountAndContinue(); } loading = 0; } } function checkViewCountAndContinue(){ $.ajax({ url: "/live/get-v-count.html", type: "GET", cache: false, success: function (response) { if (response != null && response < 16) { //make call to get server details and url getURL(true); } else { $("#missingPwd").html("Excessive Usage Alert. Get Business Version or Contact support@showmypc.com"); $("#missingPwdDiv").show(); bViewMenu=true; showhidemenu(); $("#showWaitWheel").attr('src', staticSrv + '/images/play-circle.png'); $("#showWaitWheel").css('width', '40px'); $("#showWaitWheel").css('height', '40px'); loading = 0; } } }); } function getURL(repeat){ grecaptcha.ready(function() { grecaptcha.execute('6Lf3zrMZAAAAAMrXSsvHAmo9stpRko9ThQdbG2-q', {action: 'submit'}).then(function(token) { $.post("/live/html-viewer-enterfree.html", {"np": inputTemp, recapresp: token}, function (response) { if (response != null && response != "" && response.startsWith("https://")) { self.location=response; } else { //if (repeat){ // setTimeout(getURL, 4000); //} else { $("#missingPwd").html("Web Viewer is unavailable for this session. Use alternate Windows or Java version."); $("#missingPwdDiv").show(); bViewMenu=true; showhidemenu(); $("#showWaitWheel").attr('src', staticSrv + '/images/play-circle.png'); $("#showWaitWheel").css('width', '40px'); $("#showWaitWheel").css('height', '40px'); loading = 0; //} } }); /*$.ajax({ url: "https://showmypc.com/live/html-viewer-enterfree.html", type: "POST", date: {"np": inputTemp}, cache: false, success: });*/ }); }); } //Masked the input phone number to display in "123-123-1234" format function maskInput(input, textbox) { //return;//todo if (input.length == 5 && input.substring(4, 5) != "-") { input = input.substring(0, 4) + "-" + input.substring(4, input.length); } else if (input.length == 10 && input.substring(9, 10) != "-") { input = input.substring(0, 9) + "-" + input.substring(9, 11); } textbox.value = input; } function openLink(url) { if (HasRuntimeVersion(runtimeVersion, false) || (checkClient && HasRuntimeVersion(runtimeVersion, checkClient))) { launcherLink = "https://showmypc.com/users/appbuilder/smlaunch.application?ur=" + encodeURIComponent(url); window.location.href = launcherLink; } else { window.location.href= url; } } function viewDDMOver(){ $('#missingPwd').html('User Warning
Do not accept help from unknown callers.
Share password with trusted users only.'); $('#missingPwdTD').css("background-color", "#E65100"); //document.getElementById("viewDownArrow").className="arrow-down"; $('#missingPwdDiv').show(); } var handNotSureClicked = ""; function handWarningDialog() { //debugger; if (handNotSureClicked == ""){ if ($.cookie('ckallowuse') == null || $.cookie('ckallowuse') == ""){ $("#warnImgSpace").hide(); $("#warnBtnMsg1").hide(); $("#warnBtnMsg2").show(); } else { $("#realDownloadButton").show(); $("#warnDownloadButton").hide(); } } handNotSureClicked = ""; } function handNotSure() { handNotSureClicked = "1"; $("#warnImgSpace").show(); $("#warnBtnMsg1").show(); $("#warnBtnMsg2").hide(); $("#warnText").html("For your safety, you should not run the app if you do not trust the Remote User.
See details here."); } function handSure() { $("#realDownloadButton").show(); $("#warnDownloadButton").hide(); $.cookie('ckallowuse', "1", { expires: 365, path: '/', domain: 'showmypc.com'}); } function showWarningDialog() { $('#warnDiv').fadeIn("slow"); } function smpcWapStart() { $("#warnDiv").hide(); smpcWAP.launchApp(); } function initMainUI() { if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { $(".ios_logo").show(); $(".android_logo").hide(); $("#showButton").hide(); $("#mobbtns").show(); } else if(navigator.userAgent.match(/(Android)/)) { $(".ios_logo").hide(); $(".android_logo").show(); $("#showButton").hide(); $("#mobbtns").show(); } if($.client.os == "Mac" || $.client.os == "mac") { $("#warnBtnMsg1").html("ShowMyMac"); $("#macLabel").html("ShowMyMac"); $("#headtext").html("Show or View Mac from Anywhere"); //$("#downlink").attr("href", "javascript:openJVer(false);"); //$("#downlink1").attr("href", "javascript:openJVer(true);"); $("#downlink").attr("href", "javascript:smpcWapStart();"); $("#downlink1").attr("href", "javascript:smpcWapStart();"); $("#mnuShowJava").hide(); } if(window.location.href.includes("#web") || window.location.href.includes("web.showmypc.com")) { //console.log("web interface"); $("#warnBtnMsg1").html("ShowMyPC Web"); $("#macLabel").html("ShowMyPC Web"); $("#downlink").attr("href", "javascript:smpcWapStart();"); $("#downlink1").attr("href", "javascript:smpcWapStart();"); } if($.client.os != "Windows" && isMobile() == false && $.client.os != "Mac") { $("#downlink").attr("href", "javascript:openJVer(false);"); $("#downlink1").attr("href", "javascript:openJVer(true);"); } if($.client.os == "Windows" || $.client.os == "Mac" || $.client.os == "mac") { $("#viewJavaDiv").hide(); } if($.client.browser == "Explorer") { $("#downlinkDiv").show(); } if(isMobile()) { $("#missingPwdDiv").hide(); } //if ($.browser && (!$.browser.msie || ($.browser.msie && $.browser.version > 9))){ var parent = document.getElementById("showButton"); if(parent) parent.addEventListener('mouseout',makeMouseOutFn(parent),true); var parent = document.getElementById("viewButton"); if(parent) parent.addEventListener('mouseout',makeViewMouseOutFn(parent),true); //only if not first visit if ($.cookie('ckallowuse') != null && $.cookie('ckallowuse') != "") { var parent = document.getElementById("warnDiv"); if(parent) parent.addEventListener('mouseout',makeWarnMouseOutFn(parent),true); $("#realDownloadButton").show(); $("#warnDownloadButton").hide(); } //} $('#mid').keypress(function(e) { if (e.which == '13') { startHTMLMtg(); } }); if ($.browser && $.browser.msie && $.browser.version < 10){ $("#missingPwd").html("Please update your browser to the latest IE to get new features."); $("#missingPwdDiv").show(); } } $(document).ready(function(){ initMainUI(); });