var apshow = 0; var reshow = 0; var miscshow = 0; function fktcreatePDF(lid){ var url = "https://registar.online/include/createPDF.php?lid="+lid; var w = window.innerWidth; var h = window.innerHeight; var a = window.navigator.standalone; if (a === true){ if ($("#dialog").length>0){$("#dialog").remove();} $("#top").append("
child element if (elementScrolled('#leads')){ var h = $("#leadreport").html().length; if (h==0){ $("#leadreport").load("https://registar.online/include/Leadlist.php"); } } if (elementScrolled('#reports')){ if (reshow!=1){ $("#report1").load("https://registar.online/include/Leadreport.php?Report=1",function(){ reshow=1; }); //$("#appreport").load("https://registar.online/include/Event_report.php"); if ($("#tcmreport").length){ $("#tcmreport").load("https://registar.online/include/TCM_report.php"); } } } if (elementScrolled('#actions')){ if (apshow!=1){ $("#aplan").load("https://registar.online/include/Actionplan.php",function(){ apshow=1; }); } } if (elementScrolled('#miscellaneous')){ if (miscshow!=1){ $('#miscellaneous').load('https://registar.online/include/miscellaneous.php',function(){ miscshow=1; }); } } }); function fktGraph(){ var w = window.innerWidth; var h = window.innerHeight; var top = 0; if (w>800){ $("#start").css("height","100vh"); $("#graph").css("display","block"); $("#graph").css("top",top+"px"); $("#graph").css("margin-left","-20%"); $("#graph1").load("https://registar.online/include/Leadreport.php",function(){ $("#graph").css("width","40%"); }); } else { if (h>w){ $("#start").css("height","120vh"); $("#graph").css("display","block"); var top = 220; $("#graph").css("top",top+"px"); $("#graph").css("margin-left","-45%"); $("#graph1").load("https://registar.online/include/Leadreport.php",function(){ $("#graph").css("width","90%"); }); } else { $("#graph").css("display","none"); } } var wi = $( window ).width(); var ht = $( window ).height(); if (ht>=768 && wi>=768 && wi<1240){ $(".msghole").css("width","220px"); $(".msghole").css("height","220px"); $(".TIleft").css("margin-top","3.3vh"); $(".TIleft").css("line-height","2em"); $(".TIright").css("margin-top","3.3vh"); $(".TIright").css("line-height","2em"); $(".msghole h1").css("font-size","40px"); $("#TID1").css("font-size","1em"); $("#TID2").css("font-size","1em"); $("#TID3").css("font-size","1em"); $("#TID4").css("font-size","1em"); } if (ht<768 || (wi<=767 && wi>400)){ $(".msghole").css("width","150px"); $(".msghole").css("height","150px"); $(".TIleft").css("margin-top","2.2vh"); $(".TIleft").css("line-height","1.2em"); $(".TIright").css("margin-top","2.2vh"); $(".TIright").css("line-height","1.2em"); $(".msghole h1").css("font-size","35px"); $("#TI1").css("padding-top","0em"); $("#TI2").css("padding-top","0em"); $("#TI3").css("padding-top","0em"); $("#TI4").css("padding-top","0em"); $("#TID1").css("font-size","0.7em"); $("#TID2").css("font-size","0.7em"); $("#TID3").css("font-size","0.7em"); $("#TID4").css("font-size","0.7em"); } if (ht<600 || wi<=400){ $(".msghole").css("width","100px"); $(".msghole").css("height","100px"); $(".TIleft").css("margin-top","1.7vh"); $(".TIleft").css("line-height","0.2em"); $(".TIright").css("margin-top","1.7vh"); $(".TIright").css("line-height","0.2em"); $(".msghole h1").css("font-size","25px"); $("#TI1").css("padding-top","2em"); $("#TI2").css("padding-top","2em"); $("#TI3").css("padding-top","2em"); $("#TI4").css("padding-top","2em"); $("#TID1").css("font-size","0.8em"); $("#TID2").css("font-size","0.8em"); $("#TID3").css("font-size","0.8em"); $("#TID4").css("font-size","0.8em"); } } $(window).resize(function(){ }); var myVar; function fktReload(){ myVar = setTimeout(function(){ location.href="https://registar.online/index.php"; },300000); } $(document).ready(function() { if ($("#leadreport").length){ fktGraph(); fktReload(); $(window).scroll(function () { if (myVar){clearTimeout(myVar);} var a = $(this).scrollTop(); if (a==0){ fktReload(); } }); } });