//variables
// use softaware version and also set a solid exp date to avoid the sotagea problem, 
//the version  and expiary should change every time b4 u create Apk sale

var PRESENtday=new Date().getTime();
  var launchDate=1633233542483; // 2 October 2021  
  var OneDayDuration=86400000;
 var ExpirAfterdays=launchDate+OneDayDuration*1900; // note will expire 31 may 2025
var UpdatApp=(PRESENtday-launchDate)/OneDayDuration;
var APP_NAME="Math+Pro=Solver";
var CELL_NUMBA1="+263717031921";
var CELL_NUMBA2="+263774144279";
var WhatsAppCELL_NUMBA1="<img src='img/whatsapp_014.png' style='width:20px; height:20px;' >  "+CELL_NUMBA2;
var AppWebsite="";
var ContactUs="Contact us <table width='100%' rules='all' border='1' style='color:wite;'><tr><td><div ><a href='https://api.whatsapp.com/send?phone=*"+CELL_NUMBA2+"*&text= *hie*'><img src='img/whatsapp_014.png' style='width:20px; height:20px;' >"+CELL_NUMBA2+"</a><br><br>hsvutete@gmail.com</div><br></td></tr></table>";//<tr><td><br><div ><a href='https://twitter.com/intent/tweet?screen_name=promath1000&ref_src=twsrc%5Etfw' ><span ><img alt='twitter sharing button' src='img/twitter.svg'>@promath1000</span></a></div></td></tr></table>";
function showContacUs(){loadAlertSchoolBk(ContactUs);}
var PriceCurrency="$";
var AppPrize="500"; //the price for the app
var SoftwareVersion="1";
var ProgramOnAir=launchDate*OneDayDuration*365; // 365 day from 24 feb 2020 time at which program is going to operate before new app
var SIX_MONTHS_FROM_RELEASE=launchDate*OneDayDuration*(365/2); // 6 months fom 24 feb 2020 means app expiers in August 2019
var MAINUSER="08790727m12";
var USER1="io00212";
var USER2="io87977";
var USER4="io79771";
function DayLeftBfoExpiry(noter){ 
  var say="<b>Update "+APP_NAME+"</b><br> This version of "+APP_NAME+" needs to be update in "+noter+" days. Update to the latest version?<br><br><button onclick='breakAlert()' ><img src='img/Amazon Appstore.png'  style='width:100px; height:50px;'></button>&nbsp;&nbsp;&nbsp;  <button onclick='ApprateUs(),breakAlert()' ><img src='img/google-play.png'  style='width:100px; height:50px;'></button>";
loadAlertSchoolBk(say);}
function AppHasExpired(){
var say= "<b>Update "+APP_NAME+"</b><br> This version of "+APP_NAME+" needs to be update. Update to the latest version?<br><br><button onclick='breakAlert()' ><img src='img/Amazon Appstore.png'  style='width:100px; height:50px;'></button>&nbsp;&nbsp;&nbsp;  <button onclick='ApprateUs(),breakAlert()' ><img src='img/google-play.png'  style='width:100px; height:50px;'></button> get it on  <br>";
loadAlertSchoolBk(say);
}
//Above are the variables to change 
//norilsystems@gm
//var USER3="io08022";ail.con
//pw liron0774144279
var VENDORLIST; //list of all user ecorded on this device
//var HOME_WELCOME_NOTE=""; //REGULATES the welcome note to apear once perssesion
var passwordSeparator="-";
var SYS_USER_NAME;
var SYS_USER_SUR_NAME="";
var SYS_USER_PASS_WORD="";
var SYS_Temp_USER_ACC_TYP="";

var APPPASSWORDs;
var SYS_USER_CELLNUM="";
var SYS_USER_CELLNAME="";
var ShowSchoolbookExer=""  //sends exercicise to be shown for working
var PROGRAMEXPIRYLOADNEWONE="";
var SYS_USER_ACC_TYP="";// user acc type :1 for gardian, 2 for teacher, 3 for learner
var EXPIRY_DAY=0;
var FIRST_TRIAL_END_DAY=1585603938448;//31st mach
var LICENSEAGREEMENT;
var myname="";
var SHow1stDay="";
var IS_TRIAL_VERSION="";
var FRIST_DAY;


var SYS_Temp_USER_NAME="";
var SYS_Temp_USER_SUR_NAME="";
var SYS_Temp_USER_PASS_WORD="";
var SYS_Temp_USER_PASS_WORD2="";
var SYS_Temp_USER_ACC_TYP="";
var STUDENT_LEVEL="";
var LogCOMMENT=true; //allows comments on working to be given to  the user
var subLeng=0; // use in backspace calc
var ShowAllExamQnsInTopic=false;
var ShowOneExamRunQuestion=false;
var ProInput="";
var AftrPro=""; //AftrProinput   put aftr ProInput
var BackspaceProInputLen=0;
var TrackProInputChanges=[];
var Comment="";// showing how working is done in calculator
var Commentfunc="";// showing table of values is done in calculator function
var CommentExamQnText="";// show comment for exam text
var CommentExamQnVideo=[];// show comment for exam Audio and Video
var ExamQnAry=[]; // arry for listing comment 4 video and text and also the base ary for every exm question
var SubstitutingProcess=false; // to deny comment deletion in tEnter() Function 
	var  CalculationProcessResult="";//copiesContentsOfComment
	var CalculatorMainMode=true;
	var  mathtype="";//the type of math we are solving
	var ShowWorking="";
	var CalInputExercise=false; // calcMainInput used in textbook
	var numRows=0;	//num of rows to be used in calc n typin
	var numColumns=0;	//num of rows to be used in calc n typin
	var MatrixMode=false;
	var SemicolonCounter=0;
	var rowByColumn=0;
	var CalcERROR=false;//detects error in data inputed by user and stops calculation
	var isStandardForm=false;
	var BathProcessing=false; //to indicate batch processing and avoid button confusion in typein
	 // input to be used by program and passed to other clases
	var  ProMemory=[];// stores inuput processed by calc
	var isBase=10;
	var wasBase=10;
	var errorlog="";
	var memA=null;
	var memB=null;
	var memC=null;
	var memD=null;
	var memE=null;
	var memF=null;
	var memX=null;
	var memY=null;
	var memZ=null;
	var memPie=Math.PI;
	var memAnsw="";
	var DRG=0;
	var  indicies="School Book\\indicies.txt";
	var  glosary="School Book\\glosary.txt";

/////////////////////////encypt error here/////////////img begin////////////////////////////////////////
var imgINCREASE = true;
var imgDECREASE = false;
 
var state = imgINCREASE;

function imgSizeIncrease() {
  var state = imgSizeINCREASE;
 const img = document.getElementById('imgshow');
  if (state === imgSizeINCREASE) {
    img.width += 50;
    img.height += 50;
    if (img.width >= 500) { state = imgSizeDECREASE; }
  } else {
    img.width -= 50;
    img.height -= 50;
    if (img.width <= 200) { state = imgSizeINCREASE; }
  }
}
/////////////////////////encypt error here/////////////img begin////////////////////////////////////////
function imgSizeDecrease() {
  var state = imgSizeDECREASE;
  const img = document.getElementById('imgshow');
  if (state === imgSizeINCREASE) {
    img.width += 50;
    img.height += 50;
    if (img.width >= 500) { state = imgSizeDECREASE; }
  } else {
    img.width -= 50;
    img.height -= 50;
    if (img.width <= 200) { state = imgSizeINCREASE; }
  }
}
//
function resize(multiplier) { 
  if (document.body.style.fontSize == "") 
    { document.body.style.fontSize = "1.0em"; } 
  document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.2) + "em"; }

//// new video console   ////////////////////////// showVideooo(){        CloseshowVideooo(){

function showTemplate(MainID,toClas){
  //console.log("vido is "+MainID+" || toClas is    "+toClas)
  document.getElementById("displayInput").innerHTML="";
    var vido =document.getElementById(MainID);
    vido.className = "";
    vido.className =toClas; //"fireAlert";
  }
 //
//////////////////////////////////////////////////////////////////////
////////////////////////////////????/////////////////////////////

function hideTemplate(MainID,toClas){
    var vido =document.getElementById(MainID);
   // console.log("vido is "+MainID+" || toClas is    "+toClas)
    vido.className = "";
    vido.className =toClas; //"hideGm1";
  }

function closeSkMainCalc(){console.log("^^^");
  
  hideTemplate('Calc1','hideCalc1');
}
//
////////////////////ended//////////////////////////////////
function loadAlertCalc(inputThis){
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' ><TR><TD onclick='breakAlertCalc()' width='5%' ><img src='img/close.png' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: left'></TD><TD width='95%' ></TD></TR><TR><TD colspan='2'>"+inputThis+"</TD></TR></TABLE> </td></tr></table>";
}

function breakAlertCalc(){
document.getElementById('AlertFireWorks').innerHTML="";
}

/////////////////////////////old video////////////////////////////////////////
function AlertVideo(vido,vido1,playPause, prog){ //console.log("its here . . .");
var pict="stop.png";
var stp="stop";
if(playPause=="stop"){pict="playsmall.png";}
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' ><TD colspan='2' onclick='stopvideoAry()'><img src='img/close.png' height='9' width='10'  style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: left'></TD></TR><TR><TD  colspan='2' style='height: 240px' id='showVid'>"+vido+"</TD></TR><TR><TD width='100%'  colspan='2' >"+vido1+"</TD></TR><TR><TD width='100%'  colspan='2' ><div id='myProgress'><div  style='width:"+prog+"%;height: 10px;background-color:orange;margin-top: 5px;'></div></div></TD></TR><TR><TD width='50%' onclick='playvid(3)'><img src='img/"+pict+"' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float:right'> <TD width='50%'></TD></TR></TABLE> </td></tr></table>";
//videoSlide(vido);
}
/////////////////////////////ended //////////////////////////////////////
//
function loadAlertSchoolBkimg(pic,texta,audior){ //console.log("its here . . .");
player11(audior);
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert' ><TR><TD><TABLE class='fireContent' style='background-color: #ff6600;'><TR><TD onclick='breakAlert()' width='5%' > <img src='img/close.png' style='width:20px; height:20px; border-radius: 15px; float: left'></TD><TD  width='35%' ></TD><TD width='5%' onclick='imgIncrease()'><img src='img/arrow_up_float.png'><img src='img/pic raw.png'></TD><TD  width='35%' ></TD><TD width='5%' onclick='imgDecrease()'><img src='img/arrow_down_float.png'><img src='img/pic raw.png'></TD><TD width='20%' ></TD></TR><TR><TD colspan='6' style='background-color:white;'><div class='Aletshowimg'><img  id='imgshow' src='img/schoolbook diag/"+pic+"'></div><br>"+texta+"</TD></TR></TABLE> </td></tr></table>";
}


//////////////////////////////////////////////////
function work_space(){
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent'  style='color:blue;'><TR><TD onclick='breakAlert()'  ><img src='img/close.png' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: left'></TD><TD  ></TD></TR><TR><TD colspan='2'><form><textarea name='outputex' cols='35' rows='12'  placeholder='you can type in your working here if u don not have paper.'></textarea></form></TD></TR><TR><TD></TD></TR></TABLE> </td></tr></table>";
}
         


/////////////////////////img end ////////////////////

function loadAlertSchoolBk(inputThis){ //**console.log("its here . . .");
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' style='color:blue;' ><TR><TD onclick='breakAlert()' width='5%' ><img src='img/close.png' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: left'></TD><TD width='95%' ></TD></TR><TR><TD colspan='2'>"+inputThis+"</TD></TR></TABLE> </td></tr></table>";
}




function loadAlertTimerProcessing(){ // show rocessing icon
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert' width='10%' ><TR><TD><TABLE class='fireContentTimedSpin' width='10%' ><TR><TD><img src='img/ajax-loader.gif' ></TD></TR></TABLE> </td></tr></table>";
setTimeout("breakAlert();", 500);
}


function loadAlertTimed(inputThis){ //**console.log("its here . . .");
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' style='color:blue;'><TR><TD></TD><TD width='95%' ></TD></TR><TR><TD colspan='2'>"+inputThis+"</TD></TR></TABLE> </td></tr></table>";
setTimeout("breakAlert();", 500);
}


function loadAlertTimed_InputTime(inputThis,timed){ //**put in mili seconds i.e 5000 is 5 seonds
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' style='color:blue;'><TR><TD></TD><TD width='95%' ></TD></TR><TR><TD colspan='2'>"+inputThis+"</TD></TR></TABLE> </td></tr></table>";
setTimeout("breakAlert();", timed);
}


function loadAlertTimed_InputTime_Audio(inputThis,timed,audio){ //**put in mili seconds i.e 5000 is 5 seonds
document.getElementById('AlertFireWorks').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' style='color:blue;'><TR><TD></TD><TD width='95%' ></TD></TR><TR><TD colspan='2'>"+inputThis+"</TD></TR></TABLE><button class='pOvalPlay'  onClick='player11("+audior+")'><img src='img/playHome.png'></button> </td></tr></table>";
setTimeout("breakAlert();", timed);
}

/////////////////////////////////////////////////////////////////
var ExampleInvestgate="Select example to view a solved problem. A New expmples are shown every time you select";
var ExerciseSolveBanner="Select new exercise <br>and<br> Simplify the problem presented. A new exercise is presented every time you select";
var DragInvestigate="<img src='img/gestures-gesture-scroll-left-right.png'>Drag Points Of The Lines & Investigate. Play around with these point, Have fun";

function OnloadAlertAudio(inputThis,audior){ //**console.log("its here . . .");
//var OnFire=document.getElementById('AlertFireWorks');
player11(audior);
//OnFire.innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' style='color:blue;'><TR><TD onclick='breakAlert()' width='5%' ><img src='img/close.png' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: left'></TD><TD width='95%' ></TD></TR><TR><TD colspan='2'>"+inputThis+"</TD></TR></TABLE> </td></tr></table>";
}


function focusOnPartOfPage(partpage){// allows the prog to scroll to a particular part of a page
var partpage=document.getElementById(partpage);
partpage.style.display='';
partpage.scrollIntoView();
}

///////////////////////////////////////////////////////////////////
function breakAlert(){//**
document.getElementById('AlertFireWorks').innerHTML="";
if(displayfireworks==true){displayfireworks=false;stopCount(); return false; }
}

function loadAlertSchoolBkAudio(inputThis,musz){ //* works on  a footer
if(inputThis.charAt(0)=="*"&&inputThis.charAt(1)=="@"){inputThis=inputThis.replace("*@", "<span class='Advt'><img src='img/happy75.png'></span><br><br>");}

  player11(musz);

document.getElementById('footer').innerHTML="<TABLE style='background-color: white; color: black;' width='100%' ><TR><TD width='95%' ></TD><TD onclick='breakAudio()' width='5%' ><img src='img/close.png' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: right'></TD></TR><TR><TD colspan='2'><div style='border-radius: 15px; border: 1px solid orange ; background-color: light blue;'>"+inputThis+"</div></TD></TR></TABLE>";
}

function player11(nn){
  if(nn!=""&&nn!="com"){
var bMusic = new Audio("music/"+nn+".mp3");
  bMusic.play();}}
  //////////////////////////////////////


/////////////////////////encypt error here/////////////img begin////////////////////////////////////////
function playableAudio(inputThis,musz){ //**console.log("its here . . .");
if(inputThis.charAt(0)=="*"&&inputThis.charAt(1)=="@"){inputThis=inputThis.replace("*@", "<span class='Advt'><img src='img/happy75.png'></span><br>");}
if(musz!=""||musz!="com"){
const music=document.getElementById('kom6');
music.play();
}
document.getElementById('footer').innerHTML="<TABLE class='fireAlert'  ><TR><TD><TABLE class='fireContent' ><TR><TD width='95%' ></TD><TD onclick='breakAudio()' width='5%' ><img src='img/close.png' style='width:20px; height:20px; border-radius: 15px;background-color: #ff6600; float: right'></TD></TR><TR><TD colspan='2'>"+inputThis+"<br><audio controls volume='0.5' id='audio-example-low' class='audio-example'><source src='music/"+musz+".mp3'></audio></TD></TR></TABLE> </td></tr></table>";
}


function breakAudio(){
document.getElementById('footer').innerHTML="";}
/////////////////////////////???/?/////////////////////


function Explain(logtxt){
if(LogCOMMENT==true){
    Comment=Comment+"<br>"+logtxt;
    //console.log(Comment);
    }
  }


function ExmExplainText(logtxt){
//if(LogCOMMENTrr==true){
    CommentExamQnText=CommentExamQnText+"<br>"+logtxt;
//  console.log(ForHTMLUnsupportedPresentadion(CommentExamQnText));
   // }
  }

function ExmExplainVideo(logtxt){
  CommentExamQnVideo=CommentExamQnVideo+"<br>"+logtxt;
  //console.log(ForHTMLUnsupportedPresentadion(CommentExamQnVideo));
}




function lsTest(){
    var test='test';
    try {
	window.localStorage.playerName = "Bridget";
       window.localStorage.setItem(test, test);
        window.localStorage.removeItem(test);
        return true;
    } catch(e){
        return false;
    }
}
function StoreData(storeTo,item){
if(lsTest()===true){localStorage.setItem(storeTo, item);
   return true;}
else{return false;}
}


function GetData(){}
function clearData(){}

// below is Alp2Num is a password maker





var showAnsw="";
function Alp2Num(vv){
//console.log(" code Alp2num "+vv);
var len=vv.length;
var retunVV=0;
for(i=0;i<len;i++){
if(vv.charAt(i)=="0"){retunVV=retunVV+9;}
else if(vv.charAt(i)=="0"){retunVV=retunVV+9;}
else if(vv.charAt(i)=="1"){retunVV=retunVV+8;}
else if(vv.charAt(i)=="2"){retunVV=retunVV+7;}
else if(vv.charAt(i)=="3"){retunVV=retunVV+6;}
else if(vv.charAt(i)=="4"){retunVV=retunVV+5;}
else if(vv.charAt(i)=="5"){retunVV=retunVV+4;}
else if(vv.charAt(i)=="6"){retunVV=retunVV+3;}
else if(vv.charAt(i)=="7"){retunVV=retunVV+2;}
else if(vv.charAt(i)=="8"){retunVV=retunVV+1;}
else if(vv.charAt(i)=="a"||vv.charAt(i)=="A"){retunVV=retunVV+1;}
else if(vv.charAt(i)=="b"||vv.charAt(i)=="B"){retunVV=retunVV+2;}
else if(vv.charAt(i)=="c"||vv.charAt(i)=="C"){retunVV=retunVV+3;}
else if(vv.charAt(i)=="d"||vv.charAt(i)=="D"){retunVV=retunVV+6;}
else if(vv.charAt(i)=="e"||vv.charAt(i)=="E"){retunVV=retunVV-5;}
else if(vv.charAt(i)=="f"||vv.charAt(i)=="F"){retunVV=retunVV+4;}
else if(vv.charAt(i)=="g"||vv.charAt(i)=="G"){retunVV=retunVV-3;}
else if(vv.charAt(i)=="h"||vv.charAt(i)=="H"){retunVV=retunVV+2;}
else if(vv.charAt(i)=="i"||vv.charAt(i)=="I"){retunVV=retunVV+1;}
else if(vv.charAt(i)=="j"||vv.charAt(i)=="J"){retunVV=retunVV+9;}
else if(vv.charAt(i)=="k"||vv.charAt(i)=="K"){retunVV=retunVV-8;}
else if(vv.charAt(i)=="l"||vv.charAt(i)=="L"){retunVV=retunVV+7;}
else if(vv.charAt(i)=="m"||vv.charAt(i)=="M"){retunVV=retunVV+6;}
else if(vv.charAt(i)=="n"||vv.charAt(i)=="N"){retunVV=retunVV+5;}
else if(vv.charAt(i)=="o"||vv.charAt(i)=="O"){retunVV=retunVV+4;}
else if(vv.charAt(i)=="p"||vv.charAt(i)=="P"){retunVV=retunVV+3;}
else if(vv.charAt(i)=="q"||vv.charAt(i)=="Q"){retunVV=retunVV-2;}
else if(vv.charAt(i)=="r"||vv.charAt(i)=="R"){retunVV=retunVV+1;}
else if(vv.charAt(i)=="s"||vv.charAt(i)=="S"){retunVV=retunVV+8;}
else if(vv.charAt(i)=="t"||vv.charAt(i)=="T"){retunVV=retunVV-7;}
else if(vv.charAt(i)=="u"||vv.charAt(i)=="U"){retunVV=retunVV+6;}
else if(vv.charAt(i)=="v"||vv.charAt(i)=="V"){retunVV=retunVV-5;}
else if(vv.charAt(i)=="w"||vv.charAt(i)=="W"){retunVV=retunVV+7;}
else if(vv.charAt(i)=="x"||vv.charAt(i)=="X"){retunVV=retunVV-8;}
else if(vv.charAt(i)=="y"||vv.charAt(i)=="Y"){retunVV=retunVV+9;}
else if(vv.charAt(i)=="z"||vv.charAt(i)=="Z"){retunVV=retunVV-2;}
else{retunVV=retunVV-1;}
}
if(retunVV<0){retunVV=-1*retunVV;}
var VVToString=retunVV+"-1";

var len2=VVToString.length;
for(var j=0;j<len2;j++){
     if(VVToString.charAt(j)=="0"){showAnsw=showAnsw+"9";}
else if(VVToString.charAt(j)=="1"){showAnsw=showAnsw+"8";}
else if(VVToString.charAt(j)=="2"){showAnsw=showAnsw+"7";}
else if(VVToString.charAt(j)=="3"){showAnsw=showAnsw+"6";}
else if(VVToString.charAt(j)=="4"){showAnsw=showAnsw+"5";}
else if(VVToString.charAt(j)=="5"){showAnsw=showAnsw+"0";}
else if(VVToString.charAt(j)=="6"){showAnsw=showAnsw+"3";}
else if(VVToString.charAt(j)=="7"){showAnsw=showAnsw+"2";}
else if(VVToString.charAt(j)=="8"){showAnsw=showAnsw+"1";}
else {showAnsw=showAnsw+"5";}
}
//console.log("VVToString is "+VVToString+"showAnsw is"+showAnsw+" and returnVV is"+retunVV);
return retunVV;
}


function cryptAlpha(aa){
  var vv=aa+"";
  //console.log("  pword "+vv);
var len=vv.length;
var retunVV="";
for(i=0;i<len;i++){
if(vv.charAt(i)=="a"||vv.charAt(i)=="A"){retunVV=retunVV+"0";}
else if(vv.charAt(i)=="e"||vv.charAt(i)=="E"){retunVV=retunVV+"1";}
else if(vv.charAt(i)=="i"||vv.charAt(i)=="I"){retunVV=retunVV+"2";}
else if(vv.charAt(i)=="o"||vv.charAt(i)=="O"){retunVV=retunVV+"3";}
else if(vv.charAt(i)=="u"||vv.charAt(i)=="U"){retunVV=retunVV+"4";}
else if(vv.charAt(i)=="m"||vv.charAt(i)=="M"){retunVV=retunVV+"5";}
else if(vv.charAt(i)=="n"||vv.charAt(i)=="N"){retunVV=retunVV+"6";}
else if(vv.charAt(i)=="h"||vv.charAt(i)=="H"){retunVV=retunVV+"7";}
else if(vv.charAt(i)=="l"||vv.charAt(i)=="L"){retunVV=retunVV+"8";}
else if(vv.charAt(i)=="r"||vv.charAt(i)=="R"){retunVV=retunVV+"9";}
else if(vv.charAt(i)=="0"){retunVV=retunVV+"@";}
else if(vv.charAt(i)=="1"){retunVV=retunVV+"#";}
else if(vv.charAt(i)=="2"){retunVV=retunVV+"$";}
else if(vv.charAt(i)=="3"){retunVV=retunVV+"%";}
else if(vv.charAt(i)=="4"){retunVV=retunVV+"&";}
else if(vv.charAt(i)=="5"){retunVV=retunVV+"(";}
else if(vv.charAt(i)=="6"){retunVV=retunVV+")";}
else if(vv.charAt(i)=="7"){retunVV=retunVV+"+";}
else if(vv.charAt(i)=="8"){retunVV=retunVV+"-";}
else if(vv.charAt(i)=="9"){retunVV=retunVV+"?";}
else {retunVV=retunVV+vv.charAt(i);}
  }
  // console.log("  pword  finish"+retunVV);
return retunVV;
}

function decryptAlpha(vv){
 // var bb=new Number(parseInt(aa));
 // var vv=bb.toString();
    //console.log("  pword vv decrypt "+vv);
var len=vv.length;
var retunVV="";
for(i=0;i<len;i++){
if(vv.charAt(i)=="@"){retunVV=retunVV+"0";}
else if(vv.charAt(i)=="#"){retunVV=retunVV+"1";}
else if(vv.charAt(i)=="$"){retunVV=retunVV+"2";}
else if(vv.charAt(i)=="%"){retunVV=retunVV+"3";}
else if(vv.charAt(i)=="&"){retunVV=retunVV+"4";}
else if(vv.charAt(i)=="("){retunVV=retunVV+"5";}
else if(vv.charAt(i)==")"){retunVV=retunVV+"6";}
else if(vv.charAt(i)=="+"){retunVV=retunVV+"7";}
else if(vv.charAt(i)=="-"){retunVV=retunVV+"8";}
else if(vv.charAt(i)=="?"){retunVV=retunVV+"9";}
else if(vv.charAt(i)=="0"){retunVV=retunVV+"a";}
else if(vv.charAt(i)=="1"){retunVV=retunVV+"e";}
else if(vv.charAt(i)=="2"){retunVV=retunVV+"i";}
else if(vv.charAt(i)=="3"){retunVV=retunVV+"o";}
else if(vv.charAt(i)=="4"){retunVV=retunVV+"u";}
else if(vv.charAt(i)=="5"){retunVV=retunVV+"m";}
else if(vv.charAt(i)=="6"){retunVV=retunVV+"n";}
else if(vv.charAt(i)=="7"){retunVV=retunVV+"h";}
else if(vv.charAt(i)=="8"){retunVV=retunVV+"l";}
else if(vv.charAt(i)=="9"){retunVV=retunVV+"r";}
else{retunVV=retunVV+vv.charAt(i);}
  }
  //console.log("  pword vv decrypt finish "+retunVV);
return retunVV;
}




function vibrator(n){
if ('vibrate' in window.navigator){window.navigator.vibrate(n);} 
    // browser has support for vibrations 
else {}
    // no support
}




var IOLOGIQLicenseAgreement="<p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><i>Please read the license agreement:</i><br><b>"+APP_NAME+"  End User License Agreement</b><br>NOTICE TO USERS: CAREFULLY READ THE FOLLOWING LEGAL AGREEMENT. USE OF "+APP_NAME+" (the 'SOFTWARE') PROVIDED WITH THIS AGREEMENT CONSTITUTES YOUR ACCEPTANCE OF THESE TERMS. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, DO NOT INSTALL AND/OR USE THIS SOFTWARE. USER'S USE OF THIS SOFTWARE IS CONDITIONED UPON COMPLIANCE BY USER WITH THE TERMS OF THIS AGREEMENT.<br><b>1. License grant</b><br>This EULA grants you the right to store, load, install, execute or display a copy of the SOFTWARE on your Device.<br><br>'You' means the company, entity or individual who received the SOFTWARE. “Device” must be wholly owned, rented or leased by you.<br><br>You may not modify the SOFTWARE or disable features of the SOFTWARE except as an intended part of the SOFTWARE's programming features.<br><br><b>2. Restrictions</b><br>You may not, lease, sub-license, or sell the SOFTWARE. You agree not to modify, adapt, translate, reverse engineer, decompile, disassemble or otherwise attempt to discover the source code of the SOFTWARE. You may not alter or modify the installer program or create a new installer for the SOFTWARE. <br><br><b>3. Ownership</b><br>The SOFTWARE is owned and copyrighted by IOLOGIQ. This license confers no title or ownership of the SOFTWARE and should not be construed as a grant of any right in the SOFTWARE.<br><br><b>4. Copyright</b><br>The SOFTWARE and all rights are owned by IOLOGIQ and/or its suppliers and are protected by copyright law and international copyright treaties. You acknowledge that no title to the intellectual property in the SOFTWARE is transferred to you. You further acknowledge that title and full ownership rights to the SOFTWARE will remain the exclusive property of IOLOGIQ and you will not acquire any rights to the SOFTWARE except as expressly set forth in this license. <br><br><b>5. Termination</b><br>The License is in effect until terminated. You may terminate this License at any time by ceasing any and all use of the SOFTWARE, and deleting or destroying the SOFTWARE. This agreement shall terminate automatically upon breach of any term of this agreement.  <br><b>6. No Warranty, No Liability</b><br>IOLOGIQ AND ITS SUPPLIERS DO NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULTS YOU MAY OBTAIN BY USING THE SOFTWARE OR DOCUMENTATION. IOLOGIQ AND ITS SUPPLIERS MAKE NO WARRANTIES, EXPRESS OR IMPLIED, AS TO NONINFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL IOLOGIQ OR ITS SUPPLIERS BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS OR LOST SAVINGS, EVEN IF A IOLOGIQ REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY. YOU HEREBY ASSUME THE ENTIRE RISK OF ALL USE OF THE COPIES OF SOFTWARE COVERED BY THIS LICENSE.<br><br><b>7. Governing Law </b><br>This agreement is governed by the laws of ZIMBABWE. Any claim, dispute or controversy with respect to, in connection with or arising out of this agreement shall be subject to and decided by arbitration in ZIMBABWE. If any part of this agreement is found void and unenforceable by a court of competent jurisdiction, it will not affect the validity of the balance of the agreement, which shall remain valid and enforceable according to its terms.<br> <br><b>8. Entire Agreement </b><br>This agreement is the final, complete and exclusive agreement between you and IOLOGIQ that supersedes any prior agreement or understanding, whether written or oral, relating to the subject matter of this license.<br>Copyright © 2016-2020 IOLOGIQ. All rights reserved.<br>";

function ExitApp(){Website2APK.exitApp();}
function now_Year_Month_Date_Hour(){var NowDate=new Date().toUTCString(); return NowDate;}
function printPDF(){Website2APK.printPage();}
function UniqueDeviceID(){
var pword="j22e457h";
return pword; //Website2APK.getUniqueDeviceID();
}

function AppShare(){Website2APK.shareIntent();}
function ApprateUs(){Website2APK.rateUs();}

function resetExasetup(){  Website2APK.refreshPage();}

function RefreshPage(){Website2APK.refreshPage();}
/*
Website2APK builder JS API
Share App
<script>
        Website2APK.shareIntent();
</script>
•Display a Toast Notification
<script>
        Website2APK.showToast("This is a Toast");
</script>
•Exit or Close App
<script>
        Website2APK.exitApp();
</script>
•Display App About Dialog
<script>
        Website2APK.showAboutDialog();
</script>
•Display Custom Dialog 
showAboutDialog(String text, String title, String ok)
<script>
        Website2APK.showAboutDialog("Hello There, It is a Custom Dialog","Title Text","OK");
</script>
•Open Link in External Browser 
openExternal(String url)
<script>
        Website2APK.openExternal("https://websitetoapk.com/");
</script>
•Rate App on Google Play 
<script>
        Website2APK.rateUs();
</script>
•Prompt User to Enable GPS 
<script>
        Website2APK.askEnableGPS();
</script>
•Get Unique Device ID
<script>
        var devId=Website2APK.getUniqueDeviceID();
  alert(devId);
</script>
•Refresh Page
<script>
        Website2APK.refreshPage();
</script>
•Open Options Menu
<script>
        Website2APK.clickMenuButton();
</script>
•Get App Version Name
<script>
        var verName=Website2APK.getAppVersionName();
  alert(verName);
</script>
•Get App Version Code
<script>
        var verCode=Website2APK.getAppVersionCode();
  alert(verCode);
</script>
•Get App Package Name
<script>
        var pkgname=Website2APK.getAppPackageName();
  alert(pkgname);
</script>
•Print Page
<script>
        Website2APK.printPage();
</script>
•Get Firebase Messaging Device Token
<script>
        var token=Website2APK.getFirebaseDeviceToken();
</script>
•Enable Broadcast Push
<script>
        Website2APK.subscribeBroadcastPush();
</script>
•Disable Broadcast Push
<script>
        Website2APK.unsubscribeBroadcastPush();
</script>
•Hide/Show AdMob Banner on Specific Pages
enableShowBannerAd(Boolean boolean)<script>
        Website2APK.enableShowBannerAd(false); //true to display, false to hide
</script>
•Display Interstitial Ad
<script>
        Website2APK.showInterstitialAd();
</script>
•Disable Non Personalized Ads
<script>
        Website2APK.disableNpa();
</script>
•Enable Non Personalized Ads
<script>
        Website2APK.enableNpa();
</script>
•Check Non Personalized Ads Status
<script>
        var check=Website2APK.isNpaEnabled();
</script>



This documentation is still under development, we are working to add more things to it to make it complete. Keep yourself up to date by visiting this page whenever you needs any help. If heaving some issues, you can contact Support


*/