/* * jsQari: JavaScript Quran Recitation widget * http://www.qurantracker.com/jsQari * * Copyright (c) 2011 Ziad Mannan * Dual licensed under the MIT and GPL licenses. * - http://www.opensource.org/licenses/mit-license.php * - http://www.gnu.org/copyleft/gpl.html * * Author: Ziad Mannan * Version: 1.0.0 * Date: 23rd April 2011 */ var sura_no ; var Aya_no; var selectedmoshah; var JSQari = function() { this.jsqariPlayer = $("#jquery_jplayer_1"); this.jsqariSurah; this.jsqariAyah; this.jsqariReciter; this.jsqariMode; this.surahAyahstart = [0,1,22,42,62, 82,102,122,142,162,182,202,222,242,262,282,302,322,342,362,382,402,422,442,462,482,502,522,542,562,582]; this.surahAyahs = [0,21,41,61,81,101,121,141,161,181,201,221,241,261,281,301,321,341,361,381,401,421,441,461,481,501,521,541,561,581,604]; this.uiSurahSelector = $('#jsqari-ui-surah-selector'); this.uiAyahSelector = $('#jsqari-ui-ayah-selector'); this.uiReciterSelector = $('#jsqari-ui-reciter-selector'); this.uiModeSelector = $('#jsqari-ui-mode-selector'); }; JSQari.prototype = { init: function () { var _this = this; this.jsqariSurah = this.uiSurahSelector.val(); this.jsqariAyah = this.uiAyahSelector.val(); this.jsqariReciter = this.uiReciterSelector.val(); this.jsqariMode = this.uiModeSelector.val(); this.jsqariPlayer.jPlayer({ // ready: function () { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // document.getElementById('3').src = 'Play.gif'; // $(_this.jsqariPlayer).jPlayer("setMedia", { // mp3: "http://www.quran4u.net/quran/abdelbasit_Pages/001.mp3" // }); // }, ended: function () { _this.handleJSQariAyahEnd(); }, swfPath: "" }); // set up event handlers this.uiSurahSelector.change(function () { _this.jsqariSurah = $(this).val(); _this.handleSurahChange(); _this.setMediaFile(); }); this.uiAyahSelector.change(function () { _this.jsqariAyah = $(this).val(); _this.setMediaFile(); }); this.uiReciterSelector.change(function () { _this.jsqariReciter = $(this).val(); _this.setMediaFile(); }); this.uiModeSelector.change(function () { _this.jsqariMode = $(this).val(); _this.setMediaFile(); }); this.setMediaFile(); }, // CONTROLLER methods handleSurahChange: function () { //------------------------------------------------------ Gamal ----------------------------------------------------------------------- this.jsqariAyah = this.surahAyahstart[this.jsqariSurah]; this.uiAyahSelector.children().remove(); var surahAyahNumber = this.surahAyahs[this.jsqariSurah]; for (i = this.jsqariAyah; i <= surahAyahNumber; i++) { this.uiAyahSelector.append(''); } }, handleJSQariAyahEnd: function (event) { document.getElementById('3').src = 'Play.gif'; if (this.jsqariMode == 'continious') { // go to next ayah and play again this.jsqariAyah = parseInt(this.jsqariAyah) + 1; if (this.jsqariAyah > this.surahAyahs[this.jsqariSurah]) { this.jsqariAyah = 1; this.jsqariSurah = parseInt(this.jsqariSurah) + 1; if (this.jsqariSurah > 30) { this.jsqariSurah = 1; } this.handleSurahChange(); } this.setMediaFile(); this.jsqariPlayer.jPlayer("play"); } else if (this.jsqariMode == 'repeatayah') { // play again this.jsqariPlayer.jPlayer("play"); } this.updateUI(); }, // VIEW functions updateUI: function () { this.uiSurahSelector.val(this.jsqariSurah); this.uiAyahSelector.val(this.jsqariAyah); }, // API functions playSurah: function (surahNumber) { return this.playSurahAyah(surahNumber, 1); }, playSurahAyah: function (surahNumber, ayahNumber) { // check surah number surahNumberParsed = parseInt(surahNumber); if (isNaN(surahNumberParsed)) { alert('إكتب رقم الجزء ورقم الآية'); return false; } else if (surahNumberParsed > 114 || surahNumberParsed < 1) { alert('إكتب رقم الجزء ورقم الآية'); return false; } // check ayah number ayahNumberParsed = parseInt(ayahNumber); if (isNaN(ayahNumberParsed)) { alert('رقم الصفحة غير صحيح'); return false; } else if (ayahNumberParsed > this.surahAyahs[surahNumberParsed] || ayahNumberParsed < 1) { alert('رقم الصفحة غير صحيح'); return false; } if (this.jsqariSurah != surahNumberParsed) { this.jsqariSurah = surahNumberParsed; this.handleSurahChange(); } this.jsqariAyah = ayahNumberParsed; this.updateUI(); this.setMediaFile(); this.jsqariPlayer.jPlayer("play"); }, // 'PRIVATE' functions setMediaFile: function () { document.getElementById('3').src = 'Play_On.gif'; document.getElementById('4').src = 'Pause.gif'; document.getElementById('5').src = 'Stop.gif'; //---------------------------- Gamal ------------------------------------------------------- document.getElementById("surahNumber").value = this.jsqariSurah document.getElementById("ayahNumber").value = this.jsqariAyah var flashvars = {}; var params = { scale: "exactFit"}; var attributes = {}; //* selectedmoshah = document.getElementById("moshaf_type").selectedIndex if (selectedmoshah == 0) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Doory_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Doory_swf/Al-Doory.jpg" }; if (selectedmoshah == 1) { swfobject.embedSWF('https://archive.org/download/Quran4u_Ebn_thakwan_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Ebn_thakwan_swf/ebn_thakwan.jpg" }; if (selectedmoshah == 2) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Soosy_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Soosy_swf/Al-Soosy.jpg" }; if (selectedmoshah == 3) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Bazzy_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Bazzy_swf/Al-Bazzy.jpg" }; if (selectedmoshah == 4) { swfobject.embedSWF('https://archive.org/download/Quran4u_Ebn_Katheer_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Ebn_Katheer_swf/Ebn_Katheer.jpg" }; if (selectedmoshah == 5) { swfobject.embedSWF('https://archive.org/download/Quran4u_AbuJafar_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_AbuJafar_swf/Abujaffar.jpg" }; if (selectedmoshah == 6) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Kasae_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Kasae_swf/Al-Kasae.jpg" }; if (selectedmoshah == 7) { swfobject.embedSWF('https://archive.org/download/Quran4u_EbnJammaz_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_EbnJammaz_swf/jammaz-hamesh-wardan.jpg" }; if (selectedmoshah == 8) { swfobject.embedSWF('https://archive.org/download/Quran4u_Rawh_hamesh_Ruawais_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Rawh_hamesh_Ruawais_swf/rawh-rwais.jpg" }; if (selectedmoshah == 9) { swfobject.embedSWF('https://archive.org/download/Quran4u_yaqoob_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_yaqoob_swf/yaqoob.jpg" }; if (selectedmoshah == 10) { swfobject.embedSWF('https://archive.org/download/Quran4u_Khalafsada_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Khalafsada_swf/khalaf_hamesh.jpg" }; if (selectedmoshah == 11) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Yazedy_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Yazedy_swf/alyazedy.jpg" }; if (selectedmoshah == 12) { swfobject.embedSWF('https://archive.org/download/Quran4u_Hamza_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Hamza_swf/bannerhamzah.jpg" }; if (selectedmoshah == 13) { swfobject.embedSWF('https://archive.org/download/Quran4u_EbnAmer_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_EbnAmer_swf/ebnamer-hafs_hamesh_ebnamer.jpg" }; if (selectedmoshah == 14) { swfobject.embedSWF('https://archive.org/download/EbnAmer_Hesham_Sada_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/EbnAmer_Hesham_Sada_swf/bnamer-hesham.jpg" }; if (selectedmoshah == 15) { swfobject.embedSWF('https://archive.org/download/Quran4u_Qaloon_Altayseer_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Qaloon_Altayseer_swf/qaloon-tayseer.jpg" }; if (selectedmoshah == 16) { swfobject.embedSWF('https://archive.org/download/Quran4u_Warsh_Asbhany_Mesbah_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Warsh_Asbhany_Mesbah_swf/Warsh_asbahani_mesbah.jpg" }; if (selectedmoshah == 17) { swfobject.embedSWF('https://archive.org/download/Quran4u_ShobaEnner_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_ShobaEnner_swf/shoba-inner.jpg" }; //* //var base = 'http://www.everyayah.com/data/'; var base = ''; var selrec = document.getElementById("jsqari-ui-reciter-selector").selectedIndex this.jsqariReciter = document.getElementById("jsqari-ui-reciter-selector").value var mp3file = base + this.jsqariReciter + this.pad(this.jsqariAyah, 3) + '.mp3'; // alert(mp3file); this.jsqariPlayer.jPlayer("setMedia", { mp3: mp3file }); //--------------------------------------------------------------------------------------------------------- // document.getElementById("frm_Man").src = "Quran-Maany-Page/wp-" + this.jsqariAyah + ".htm"; // document.getElementById("frm_moyassar").src = "Tafsir_Page_Moyassar/taf-" + this.jsqariAyah + ".htm"; document.getElementById("frm_Man").src = "https://archive.org/download/Quran4u_Maany_Surah_Part_Page/wp-" + this.jsqariAyah + ".htm"; document.getElementById("frm_moyassar").src = "https://archive.org/download/Quran4u_Tafsir_Page_Part_Surah_Moyassar/taf-" + this.jsqariAyah + ".htm"; }, pad: function (number, length) { var str = '' + number; while (str.length < length) { str = '0' + str; } return str; } } function Img_border_On(iid) { document.getElementById(iid).border = '1'; } function Img_border_Off(iiid) { document.getElementById(iiid).border = '0'; } function play_next() { //alert (kk.val()) document.getElementById("ayahNumber").value = parseInt(document.getElementById("ayahNumber").value) + 1 jsQari.playSurahAyah($('#surahNumber').val(), $('#ayahNumber').val()); } function opentafsir() { var ourayah1 = document.getElementById("ayahNumber").value var oursurah1 = document.getElementById("surahNumber").value var width = 660; var height = 500; var x = (800 - width) / 2; var y = (600 - height) / 2; if (screen) { y = (screen.availHeight - height) / 2; x = (screen.availWidth - width) / 2; } // alert('Quran-Ayah-Tafseer.aspx?Surah=' + oursurah1 + '&Ayah=' + ourayah1) window.open('Quran-Page-Tafseer.aspx?p=' + ourayah1, 'newWin', 'width=' + width + ',height=' + height + ',screenX=' + x + ',scrollbars=yes,screenY=' + y + ',top=' + y + ',left=' + x) }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function createCookie(name, value, days) { if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); } else var expires = ""; document.cookie = escape(name) + "=" + escape(value) + expires + "; path=/"; } function readCookie(name) { var nameEQ = escape(name) + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length, c.length)); } return null; } function eraseCookie(name) { createCookie(name, "", -1); } //---------------------------------------------------------------------------------------------------------------------- function save_it() { if (are_cookies_enabled() == true) { //change_moshaf() var finalsurah = document.getElementById('jsqari-ui-surah-selector').selectedIndex; var finalayah = document.getElementById('jsqari-ui-ayah-selector').selectedIndex ; var finalreciter = document.getElementById('jsqari-ui-reciter-selector').selectedIndex; var moshaftype = document.getElementById('moshaf_type').selectedIndex createCookie('taj_lastsurah', finalsurah, '365'); createCookie('taj_lastayah', finalayah, '365'); createCookie('taj_reciternum', finalreciter, '365'); createCookie('taj_moshaf', moshaftype, '365'); var oursurah = document.getElementById("surahNumber").value var ourayah = document.getElementById("ayahNumber").value createCookie('taj_ayah', ourayah, '365'); createCookie('taj_surah', oursurah, '365'); } else { alert("المتصفح المستعمل لايقبل الحفظ - Please Allow cookies") } }; //----------------------------------------------------------------- function are_cookies_enabled() { var cookieEnabled = (navigator.cookieEnabled) ? true : false; if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) { document.cookie = "testcookie"; cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false; } return (cookieEnabled); } function del_it() { eraseCookie('taj_lastsurah'); eraseCookie('taj_lastayah'); eraseCookie('taj_reciternum'); }; function get_it() { // alert(readCookie('taj_lastsurah') + " - " + readCookie('taj_lastayah') + " - " + readCookie('taj_reciternum')); if (document.cookie.indexOf("taj_lastsurah") >= 0) { var savedsurah = readCookie('taj_lastsurah'); var savedayah = readCookie('taj_lastayah'); var savedrecieternum = readCookie('taj_reciternum'); var savedmos = readCookie('taj_moshaf'); var savedsurahhh = readCookie('taj_surah'); var savedayahhh = readCookie('taj_ayah'); document.getElementById('jsqari-ui-reciter-selector').selectedIndex = savedrecieternum; jsQari.jsqariReciter = document.getElementById('jsqari-ui-reciter-selector').value; document.getElementById('moshaf_type').selectedIndex = savedmos; //* selectedmoshah = document.getElementById("moshaf_type").selectedIndex //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- if (selectedmoshah == 0) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Doory_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Doory_swf/Al-Doory.jpg" }; if (selectedmoshah == 1) { swfobject.embedSWF('https://archive.org/download/Quran4u_Ebn_thakwan_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Ebn_thakwan_swf/ebn_thakwan.jpg" }; if (selectedmoshah == 2) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Soosy_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Soosy_swf/Al-Soosy.jpg" }; if (selectedmoshah == 3) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Bazzy_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Bazzy_swf/Al-Bazzy.jpg" }; if (selectedmoshah == 4) { swfobject.embedSWF('https://archive.org/download/Quran4u_Ebn_Katheer_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Ebn_Katheer_swf/Ebn_Katheer.jpg" }; if (selectedmoshah == 5) { swfobject.embedSWF('https://archive.org/download/Quran4u_AbuJafar_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_AbuJafar_swf/Abujaffar.jpg" }; if (selectedmoshah == 6) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Kasae_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Kasae_swf/Al-Kasae.jpg" }; if (selectedmoshah == 7) { swfobject.embedSWF('https://archive.org/download/Quran4u_EbnJammaz_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_EbnJammaz_swf/jammaz-hamesh-wardan.jpg" }; if (selectedmoshah == 8) { swfobject.embedSWF('https://archive.org/download/Quran4u_Rawh_hamesh_Ruawais_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Rawh_hamesh_Ruawais_swf/rawh-rwais.jpg" }; if (selectedmoshah == 9) { swfobject.embedSWF('https://archive.org/download/Quran4u_yaqoob_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_yaqoob_swf/yaqoob.jpg" }; if (selectedmoshah == 10) { swfobject.embedSWF('https://archive.org/download/Quran4u_Khalafsada_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Khalafsada_swf/khalaf_hamesh.jpg" }; if (selectedmoshah == 11) { swfobject.embedSWF('https://archive.org/download/Quran4u_Al-Yazedy_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Al-Yazedy_swf/alyazedy.jpg" }; if (selectedmoshah == 12) { swfobject.embedSWF('https://archive.org/download/Quran4u_Hamza_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Hamza_swf/bannerhamzah.jpg" }; if (selectedmoshah == 13) { swfobject.embedSWF('https://archive.org/download/Quran4u_EbnAmer_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_EbnAmer_swf/ebnamer-hafs_hamesh_ebnamer.jpg" }; if (selectedmoshah == 14) { swfobject.embedSWF('https://archive.org/download/EbnAmer_Hesham_Sada_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/EbnAmer_Hesham_Sada_swf/bnamer-hesham.jpg" }; if (selectedmoshah == 15) { swfobject.embedSWF('https://archive.org/download/Quran4u_Qaloon_Altayseer_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_Qaloon_Altayseer_swf/qaloon-tayseer.jpg" }; if (selectedmoshah == 16) { swfobject.embedSWF('https://archive.org/download/Quran4u_Warsh_Asbhany_Mesbah_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "'https://archive.org/download/Quran4u_Warsh_Asbhany_Mesbah_swf/Warsh_asbahani_mesbah.jpg" }; if (selectedmoshah == 17) { swfobject.embedSWF('https://archive.org/download/Quran4u_ShobaEnner_swf/' + this.pad((Math.floor(this.jsqariAyah) + 4), 3) + '.swf', "flash", "600", "900", "9", false, flashvars, params, attributes); document.getElementById("qiraat_name").src = "https://archive.org/download/Quran4u_ShobaEnner_swf/shoba-inner.jpg" }; //* document.getElementById("surahNumber").value = savedsurahhh; document.getElementById("ayahNumber").value = savedayahhh; // change_moshaf() jsQari.playSurahAyah($('#surahNumber').val(), $('#ayahNumber').val()) jsQari.jsqariPlayer.jPlayer('stop'); } } function padd (number, length) { var str = '' + number; while (str.length < length) { str = '0' + str; } return str; } function change_moshaf() { //disab() /// document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // var selectedmoshah2 = document.getElementById("moshaf_type").selectedIndex // if (selectedmoshah2 == 0) // { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // } // if (selectedmoshah2 == 1) // { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex =33 // } // if (selectedmoshah2 == 2 ) // { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // } // if (selectedmoshah2 ==3) { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // } // if (selectedmoshah2 == 4) { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // } // if (selectedmoshah2 == 5) { // document.getElementById("jsqari-ui-reciter-selector").selectedIndex = 33 // } jsQari.playSurahAyah($('#surahNumber').val(), $('#ayahNumber').val()) jsQari.jsqariPlayer.jPlayer('stop'); document.getElementById('qiraat_name').focus() } function disab() { //* var op if (selectedmoshah == 0) { op = document.getElementById("jsqari-ui-reciter-selector").getElementsByTagName("option"); for (var i = 0; i < 50; i++) { op[i].disabled = false; } for (var i = 36; i < 50; i++) { op[i].disabled = true; } } //* //* else if (selectedmoshah == 1) { op = document.getElementById("jsqari-ui-reciter-selector").getElementsByTagName("option"); for (var i = 0; i < 50; i++) { op[i].disabled = true; } for (var i = 36 ; i < 42; i++) { op[i].disabled = false; } } //* else if (selectedmoshah == 2) { op = document.getElementById("jsqari-ui-reciter-selector").getElementsByTagName("option"); for (var i = 0; i < 50; i++) { op[i].disabled = true; } for (var i = 41; i < 50; i++) { op[i].disabled = false; } //* } }