function doesSwitchOnTrue(){var a=new XMLHttpRequest();a.open("GET","https://cashkar.in/ajax/does-switchon.php?switchon=true&","TRUE");a.send();a.onreadystatechange=function(){if(a.readyState==4&&a.status==200){next(2);var b=document.getElementById("section1-q1").classList.add("is-selected");var c=document.getElementById("section1-q1").classList.remove("border-black-2");var c=document.getElementById("section1-q2").classList.add("border-black-2");var c=document.getElementById("section1-q2").classList.remove("is-selected")}}}function doesSwitchOnFalse(){var a=new XMLHttpRequest();a.open("GET","https://cashkar.in/ajax/does-switchon.php?switchon=false&","TRUE");a.send();a.onreadystatechange=function(){if(a.readyState==4&&a.status==200){next(2);var b=document.getElementById("section1-q2").classList.add("is-selected");var c=document.getElementById("section1-q2").classList.remove("border-black-2");var c=document.getElementById("section1-q1").classList.remove("is-selected");var c=document.getElementById("section1-q1").classList.add("border-black-2")}}}function screenConditon1(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/screenCondition.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){next(3);var c=document.getElementById("section2-q1").classList.add("is-selected");document.getElementById("section2-q1").classList.remove("border-black-2");document.getElementById("section2-q2").classList.add("border-black-2");document.getElementById("section2-q3").classList.add("border-black-2");document.getElementById("section2-q4").classList.add("border-black-2");document.getElementById("section2-q3").classList.remove("is-selected");document.getElementById("section2-q2").classList.remove("is-selected");document.getElementById("section2-q4").classList.remove("is-selected");activeNxtBtn();previous(1)}}}function screenConditon2(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/screenCondition.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){next(3);var c=document.getElementById("section2-q2").classList.add("is-selected");document.getElementById("section2-q2").classList.remove("border-black-2");document.getElementById("section2-q1").classList.add("border-black-2");document.getElementById("section2-q3").classList.add("border-black-2");document.getElementById("section2-q4").classList.add("border-black-2");document.getElementById("section2-q1").classList.remove("is-selected");document.getElementById("section2-q3").classList.remove("is-selected");document.getElementById("section2-q4").classList.remove("is-selected");activeNxtBtn();previous(1)}}}function screenConditon3(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/screenCondition.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){next(3);var c=document.getElementById("section2-q3").classList.add("is-selected");document.getElementById("section2-q3").classList.remove("border-black-2");document.getElementById("section2-q1").classList.add("border-black-2");document.getElementById("section2-q2").classList.add("border-black-2");document.getElementById("section2-q4").classList.add("border-black-2");document.getElementById("section2-q1").classList.remove("is-selected");document.getElementById("section2-q2").classList.remove("is-selected");document.getElementById("section2-q4").classList.remove("is-selected");activeNxtBtn();previous(1)}}}function screenConditon4(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/screenCondition.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){next(3);var c=document.getElementById("section2-q4").classList.add("is-selected");document.getElementById("section2-q4").classList.remove("border-black-2");document.getElementById("section2-q1").classList.add("border-black-2");document.getElementById("section2-q3").classList.add("border-black-2");document.getElementById("section2-q2").classList.add("border-black-2");document.getElementById("section2-q1").classList.remove("is-selected");document.getElementById("section2-q3").classList.remove("is-selected");document.getElementById("section2-q2").classList.remove("is-selected");activeNxtBtn();previous(1)}}}function deviceFunction1(){var a=new XMLHttpRequest();a.open("GET","https://cashkar.in/ajax/device-function.php?allcase=true&","TRUE");a.send();a.onreadystatechange=function(){if(a.readyState==4&&a.status==200){next(4);var b=document.getElementById("section3-q1").classList.add("is-selected");var c=document.getElementById("section3-q1").classList.remove("border-black-2");var c=document.getElementById("section3-q2").classList.add("border-black-2");var c=document.getElementById("section3-q2").classList.remove("is-selected")}};previous(2)}function deviceFunction2(d){selectIssue(d);var b=document.getElementById("section3-q2");var a=document.getElementById("section3-q2").classList.add("is-selected");var c=document.getElementById("section3-q2").classList.remove("border-black-2");var c=document.getElementById("section3-q1").classList.add("border-black-2");var c=document.getElementById("section3-q1").classList.remove("is-selected");previous(2)}function selectIssue(f){var g=document.getElementById(f).classList.toggle("issueSelected");if(g===true){if(f=="i1"){var b="backCamera";ajaxForIssues(f,b)}if(f=="i2"){var e="fingerprintSensor";ajaxForIssues(f,e)}if(f=="i4"){var d="speaker-vibrator";ajaxForIssues(f,d)}if(f=="i5"){var c="faceSanner";ajaxForIssues(f,c)}if(f=="i6"){var m="battery";ajaxForIssues(f,m)}if(f=="i7"){var l="wifi";ajaxForIssues(f,l)}if(f=="i9"){var i="network";ajaxForIssues(f,i)}if(f=="i10"){var a="microphone";ajaxForIssues(f,a)}if(f=="i12"){var k="displayChanged";ajaxForIssues(f,k)}if(f=="i13"){var j="chargingProblem";ajaxForIssues(f,j)}if(f=="i14"){var h="bluetooth";ajaxForIssues(f,h)}if(f=="i5"){var c="frontCamera";ajaxForIssues(f,c)}}else{if(f=="i1"){var b="backCamera";ajaxForIssuesUnselection(f,b)}if(f=="i2"){var e="fingerprintSensor";ajaxForIssuesUnselection(f,e)}if(f=="i4"){var d="speaker-vibrator";ajaxForIssuesUnselection(f,d)}if(f=="i3"){var d="bentPhone";ajaxForIssuesUnselection(f,d)}if(f=="i5"){var c="faceSanner";ajaxForIssuesUnselection(f,c)}if(f=="i6"){var m="battery";ajaxForIssuesUnselection(f,m)}if(f=="i7"){var l="wifi";ajaxForIssuesUnselection(f,l)}if(f=="i9"){var i="network";ajaxForIssuesUnselection(f,i)}if(f=="i10"){var a="microphone";ajaxForIssuesUnselection(f,a)}if(f=="i12"){var k="displayChanged";ajaxForIssuesUnselection(f,k)}if(f=="i13"){var j="chargingProblem";ajaxForIssuesUnselection(f,j)}if(f=="i14"){var h="bluetooth";ajaxForIssuesUnselection(f,h)}if(f=="i5"){var c="frontCamera";ajaxForIssuesUnselection(f,c)}}}; function ajaxForIssues(id, problems) { var ajax1 = new XMLHttpRequest(); ajax1.open( "GET", `https://cashkar.in/ajax/device-function.php?case=${id}&problem=${problems}`, "TRUE" ); ajax1.send(); } function ajaxForIssuesUnselection(id, problems) { var ajax1 = new XMLHttpRequest(); ajax1.open( "GET", `https://cashkar.in/ajax/device-function.php?unset=true&case=${id}&problem=${problems}`, "TRUE" ); ajax1.send(); } //over all body condition function bodyCondition1(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/overallBody.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){var c=document.getElementById("section4-q1").classList.add("is-selected");document.getElementById("section4-q1").classList.remove("border-black-2");document.getElementById("section4-q2").classList.add("border-black-2");document.getElementById("section4-q3").classList.add("border-black-2");document.getElementById("section4-q4").classList.add("border-black-2");document.getElementById("section4-q3").classList.remove("is-selected");document.getElementById("section4-q2").classList.remove("is-selected");document.getElementById("section4-q4").classList.remove("is-selected");activeNxtBtn();previous(5)}}}function bodyCondition2(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/overallBody.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){var c=document.getElementById("section4-q2").classList.add("is-selected");document.getElementById("section4-q2").classList.remove("border-black-2");document.getElementById("section4-q3").classList.add("border-black-2");document.getElementById("section4-q4").classList.add("border-black-2");document.getElementById("section4-q3").classList.remove("is-selected");document.getElementById("section4-q4").classList.remove("is-selected");activeNxtBtn();previous(5);document.getElementById("section4-q1").classList.add("border-black-2");document.getElementById("section4-q1").classList.remove("is-selected")}}}function bodyCondition3(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/overallBody.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){var c=document.getElementById("section4-q3").classList.add("is-selected");document.getElementById("section4-q3").classList.remove("border-black-2");document.getElementById("section4-q2").classList.add("border-black-2");document.getElementById("section4-q4").classList.add("border-black-2");document.getElementById("section4-q2").classList.remove("is-selected");document.getElementById("section4-q4").classList.remove("is-selected");activeNxtBtn();previous(5);document.getElementById("section4-q1").classList.add("border-black-2");document.getElementById("section4-q1").classList.remove("is-selected")}}}function bodyCondition4(a){var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/overallBody.php?case="+a,"TRUE");b.send();b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){var c=document.getElementById("section4-q4").classList.add("is-selected");document.getElementById("section4-q4").classList.remove("border-black-2");document.getElementById("section4-q3").classList.add("border-black-2");document.getElementById("section4-q2").classList.add("border-black-2");document.getElementById("section4-q3").classList.remove("is-selected");document.getElementById("section4-q2").classList.remove("is-selected");activeNxtBtn();previous(5);document.getElementById("section4-q1").classList.add("border-black-2");document.getElementById("section4-q1").classList.remove("is-selected")}}}function checkBackGlassBroken(c){var b=document.getElementById("backglass").checked;if(b===false){var a=new XMLHttpRequest();a.open("GET","https://cashkar.in/ajax/backglass-broken.php?is-selected=no","TRUE");a.send()}else{var a=new XMLHttpRequest();a.open("GET","https://cashkar.in/ajax/backglass-broken.php?is-selected=yes","TRUE");a.send()}}function accessories(d){var a=document.getElementById(d).classList.toggle("is-selected");var b=document.getElementById(d).value;activeNxtBtn();previous(4);if(a==false){var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/accessories.php?setSession=false&have="+b,"TRUE");c.send();nextIndir(5)}else{var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/accessories.php?setSession=true&have="+b,"TRUE");c.send();nextIndir(5)}}function accessoriesBill(d){var a=document.getElementById(d).classList.toggle("is-selected");var b=document.getElementById(d).value;activeNxtBtn();previous(4);if(a==false){var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/accessories.php?setSession=false&have="+b,"TRUE");c.send();warrantyBill();nextIndir(5)}else{var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/accessories.php?setSession=true&have="+b,"TRUE");c.send();nextIndir(5)}}function warranty2(d){var a=document.getElementById(d).classList.add("is-selected");document.getElementById("section6-q1").classList.remove("is-selected");document.getElementById("section6-q3").classList.remove("is-selected");document.getElementById("section6-q4").classList.remove("is-selected");var b=document.getElementById(d).value;previous(5);var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/warrantyCase.php?warranty="+b,"TRUE");c.send();next(6)}function warranty3(d){var a=document.getElementById(d).classList.add("is-selected");document.getElementById("section6-q2").classList.remove("is-selected");document.getElementById("section6-q1").classList.remove("is-selected");document.getElementById("section6-q4").classList.remove("is-selected");var b=document.getElementById(d).value;previous(5);var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/warrantyCase.php?warranty="+b,"TRUE");c.send();next(6)}function warranty4(d){var a=document.getElementById(d).classList.add("is-selected");document.getElementById("section6-q2").classList.remove("is-selected");document.getElementById("section6-q3").classList.remove("is-selected");document.getElementById("section6-q1").classList.remove("is-selected");var b=document.getElementById(d).value;previous(5);var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/warrantyCase.php?warranty="+b,"TRUE");c.send();next(6)}function warrantyBill(){var a="no";var b=new XMLHttpRequest();b.open("GET","https://cashkar.in/ajax/warrantyCase.php?warranty="+a,"TRUE");b.send()}function warranty1(d){var a=document.getElementById(d).classList.add("is-selected");document.getElementById("section6-q2").classList.remove("is-selected");document.getElementById("section6-q3").classList.remove("is-selected");document.getElementById("section6-q4").classList.remove("is-selected");var b=document.getElementById(d).value;previous(5);var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/ajax/warrantyCase.php?warranty="+b,"TRUE");c.send();next(6)}var btnDeviceClick=document.getElementById("model_data");btnDeviceClick.addEventListener("click",function(){next(4)});function activeNxtBtn(){var a=document.getElementById("nxt");a.removeAttribute("disabled")}function next(a){window.location.href=a}function nextIndir(a){document.getElementById("nxt").addEventListener("click",function(){window.location.href=a})}function previous(b){var a=document.getElementById("prev");a.addEventListener("click",function(){window.location.href=b})}function goFinal(){window.location.href="https://cashkar.in/checkout/"}function goBack(a){window.location.href=a}function validatePromo(){var b=document.getElementById("promoCodes").value;var a=new XMLHttpRequest();a.open("GET","https://cashkar.in/ajax/validate-promo.php?code="+b,"TRUE");a.send();if(a.onreadystatechange=function(){if(a.readyState==4&&a.status==200){window.location.href="?apllied=true"}}){}}function checkbillNext(){var a=document.getElementById("section5-q4").classList.contains("is-selected");if(a==false){warrantyBill();next(5)}}function mdlOpen(a){document.getElementById(a).toggleAttribute("disabled")}function srchmbl(b){var a=b;if(b.length>1){var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/sell-mobile/ajaxSearch.php?keyword="+a,"TRUE");c.send();if(c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){document.getElementById("searchMbl").style.display="block";document.getElementById("searchMbl").innerHTML=c.responseText}else{}}){}}}function srchtablets(b){var a=b;if(b.length>1){var c=new XMLHttpRequest();c.open("GET","https://cashkar.in/sell-ipad-and-tablets/ajaxSearch.php?keyword="+a,"TRUE");c.send();if(c.onreadystatechange=function(){if(c.readyState==4&&c.status==200){document.getElementById("searchMbl").style.display="block";document.getElementById("searchMbl").innerHTML=c.responseText}else{}}){}}};