PageSourceSearch

https://www.duaexplorer.com/Scripts/DuaApp.js

js duaexplorer.com collected 2026-10-02 00:29:21 UTC 29,496 bytes, 592 lines download raw bytes

1var varType;
2var varUrl;
3var varData;
4var varContentType;
5var varDataType;
6var varProcessData;
7var myServiceURL = "https://secure.quranexplorer.com/DuaAppServices/Service1.svc";
8var myServerAudioURL = "http://www.quranexplorer.com/Dua-Audio";
9
10function GetDuaIndexes(myPage, indexID) {
11    $.mobile.showPageLoadingMsg();
12    
13    var _isGeneral = false;
14
15    if (indexID == -1) {
16        _isGeneral = true;
17        indexID = 157;
18    }
19
20    $.ajax({
21        type: "GET",
22        url: myServiceURL + "/GetDuaIndexes/" + indexID + "?jsoncallback=?",
23        cache: false,
24        timeout: 15000,
25        dataType: "jsonp",
26        success: function (data) {
27            var lop = 0;
28            var html = "";
29            var param = "";
30
31            for (lop = 0; lop < data.length; lop++) {
32                if (data[lop].DuaID == 0) {
33                    if (lop == 0)
34                        html = html + '<li data-role="list-divider"><a href="#page_' + data[lop].IndexID + '"  data-transition="slide" data-ajax="true" data-prefetch><img src="images/folder_img.png" border="0" class="ui-li-icon" />' + data[lop].Title + '</a></li>';
35                    else
36                        html = html + '<li><a href="#page_' + data[lop].IndexID + '" data-ajax="true"  data-transition="slide" data-prefetch><img src="images/folder_img.png" border="0" class="ui-li-icon" />' + data[lop].Title + '</a></li>';
37
38                    create_page("page_" + data[lop].IndexID);
39                }
40                else {
41                    if (lop == 0)
42                        html = html + '<li data-role="list-divider"><a href="#dua_' + data[lop].DuaID + '" data-ajax="true" data-transition="slide" data-prefetch><img src="images/doc_img.png" border="0" class="ui-li-icon" />' + data[lop].ShortDescription + '</a></li>';
43                    else
44                        html = html + '<li><a href="#dua_' + data[lop].DuaID + '" data-ajax="true" data-transition="slide" data-prefetch><img src="images/doc_img.png" border="0" class="ui-li-icon" />' + data[lop].ShortDescription + '</a></li>';
45
46                    create_page("dua_" + data[lop].DuaID);
47                }
48            }
49
50            if (_isGeneral == false) {
51                $('#' + myPage + '_duaIndex').html(html);
52                $('#' + myPage + '_duaIndex').listview("refresh");
53            }
54            else {
55                $('#' + myPage + '_duaIndexGeneral').html(html);
56                $('#' + myPage + '_duaIndexGeneral').listview("refresh");
57                _isGeneral = false;
58            }
59            if (html == "")
60                $('#' + myPage + '_Error').show();
61
62            $.mobile.hidePageLoadingMsg();
63        },
64        //the error method seems to be unavailable until jquery 1.5
65        error: function (xhr, ajaxOptions, thrownError) {
66            $.mobile.hidePageLoadingMsg();
67            alert("Error  " + xhr.status + "    " + thrownError);
68        }
69    });
70}
71
72function GetDuaSearch(myPage, SearchText) {
73    $.mobile.showPageLoadingMsg();
74    $.ajax({
75        type: "GET",
76        url: myServiceURL + "/GetDuaSearch/" + SearchText + "?jsoncallback=?",
77        cache: false,
78        timeout: 15000,
79        dataType: "jsonp",
80        success: function (data) {
81            var lop = 0;
82            var html = "";
83            var param = "";
84            //$('#DetailPage').remove();
85
86            for (lop = 0; lop < data.length; lop++) {
87                if (lop == 0)
88                    html = html + '<li data-role="list-divider"><a href="#dua_' + data[lop].DuaID + '" data-ajax="true" data-transition="slide" data-prefetch><img src="images/doc_img.png" border="0" class="ui-li-icon" />' + data[lop].ShortDescription + '</a></li>';
89                else
90                    html = html + '<li><a href="#dua_' + data[lop].DuaID + '" data-ajax="true" data-transition="slide" data-prefetch><img src="images/doc_img.png" border="0" class="ui-li-icon" />' + data[lop].ShortDescription + '</a></li>';
91
92                create_page("dua_" + data[lop].DuaID);
93            }
94            
95            $('#' + myPage + '_duaIndex').html(html);
96            $('#' + myPage + '_duaIndex').listview("refresh");
97
98            $('#' + myPage + 'lbl_SearchDetail').html("<b><i>Total Search Count : " + data.length + "<br />Search Text : " + SearchText + "</i></b>");
99            
100            $.mobile.hidePageLoadingMsg();
101        },
102        //the error method seems to be unavailable until jquery 1.5
103        error: function (xhr, ajaxOptions, thrownError) {
104            $.mobile.hidePageLoadingMsg();
105            alert("Error  " + xhr.status + "    " + thrownError);
106        }
107    });
108}
109
110function SendFeedBack(Yemail, Summary, Comments, myBrowser, myOS) {
111    $.mobile.showPageLoadingMsg();
112
113    if (Yemail == "")
114        Yemail = "None";
115    if (Summary == "")
116        Summary = "None";
117    if (Comments == "")
118        Comments = "None";
119    //alert(window.location.toString());
120    $.ajax({
121        type: "GET",
122        url: myServiceURL + "/GetDuaFeedBack/" + Yemail + "/" + Summary + "/" + Comments + "/" + myBrowser + "/" + myOS + "/None?jsoncallback=?",
123        cache: false,
124        timeout: 15000,
125        dataType: "jsonp",
126        success: function (data) {
127            $.mobile.hidePageLoadingMsg();
128            $('#txtYEmail').val("");
129            $('#txtSummary').val("");
130            $('#txtComments').val("");
131            $('#pageFeedBack_err').html("Your comment/suggestion is sucessfully recorded!");
132
133            $('#txtComments').height(50);
134            $('#pageFeedBack').dialog('close');
135            $('#pageFeedBack_err').html("");
136        },
137        //the error method seems to be unavailable until jquery 1.5
138        error: function (xhr, ajaxOptions, thrownError) {
139            $.mobile.hidePageLoadingMsg();
140            $('#pageFeedBack_err').html("Error  " + xhr.status + "    " + thrownError);
141        }
142    });
143
144}
145
146function GetDuaDetailByDuaID(cur_page, DuaID) {
147    $.mobile.showPageLoadingMsg();
148    $('#' + cur_page + 'Dua_DetailSection').hide();
149
150    $.ajax({
151        type: "GET",
152        url: myServiceURL + "/GetDuaDetailByDuaID/" + DuaID + "?jsoncallback=?",
153        cache: false,
154        timeout: 15000,
155        dataType: "jsonp",
156        success: function (data) {
157
158            if (data.ErrorID == 0) {
159                if (data.ShortDescription != "") {
160                    $('#' + cur_page + 'Dua_Title').attr("class", data.DescLanguageName + '_header');
161                    $('#' + cur_page + 'Dua_Title').html("<center><h2>" + data.ShortDescription + "</h2></center>");
162                }
163                else {
164                    $('#' + cur_page + 'Dua_Title').attr("class", "error_css");
165                    $('#' + cur_page + 'Dua_Title').html("<center>Dua ID is not found!</center>");
166                }
167
168                $('#' + cur_page + 'Dua_Script').html("<center>" + data.Script + "</center>");
169
170                if (data.ArabicAudio != "") {
171                    var myCirclePlayer = new CirclePlayer("#" + cur_page + "jp_ArabicAudio",
172			        {
173			            m4a: myServerAudioURL + "/Script/" + data.ArabicAudio
174			        }, {
175			            cssSelectorAncestor: "#cp_container_1"
176			        });
177                    $('#' + cur_page + 'Dua_ArabicAudio').css('display', 'block');
178                }
179                else {
180                    $('#' + cur_page + 'Dua_ArabicAudio').css('display', 'none');
181                }
182
183                if (data.Transliteration != "") {
184                    $('#' + cur_page + 'Dua_Transliteration').attr("class", data.DescLanguageName);
185                    $('#' + cur_page + 'Dua_Transliteration').html($('#' + cur_page + 'Dua_Transliteration').html() + data.Transliteration);
186                    $('#' + cur_page + 'Dua_Transliteration').show();
187                }
188                else {
189                    $('#' + cur_page + 'Dua_Transliteration').hide();
190                }
191
192                if (data.Translation != "") {
193                    $('#' + cur_page + 'Dua_Translation').attr("class", data.TransLanguageName);
194                    $('#' + cur_page + 'Dua_Translation').html($('#' + cur_page + 'Dua_Translation').html() + data.Translation);
195                    $('#' + cur_page + 'Dua_Translation').show("fast");
196                }
197                else {
198                    $('#' + cur_page + 'Dua_Translation').hide("fast");
199                }
200
201                if (data.TranslationAudio != "") {
202                    var myCirclePlayer = new CirclePlayer("#" + cur_page + "jp_TranslationAudio",
203			        {
204			            m4a: myServerAudioURL + "/Translation/" + data.TranslationAudio
205			        }, {
206			            cssSelectorAncestor: "#cp_container_2"
207			        });
208                    $('#' + cur_page + 'Dua_TranslationAudio').css('display', 'block');
209                }
210                else {
211                    $('#' + cur_page + 'Dua_TranslationAudio').css('display', 'none');
212                }
213
214                if (data.LongDescription != "") {
215                    $('#' + cur_page + 'Dua_LongDescription').attr("class", data.DescLanguageName);
216                    $('#' + cur_page + 'Dua_LongDescription').html($('#' + cur_page + 'Dua_LongDescription').html() + data.LongDescription);
217                    $('#' + cur_page + 'Dua_DetailSection').show();
218                }
219                if (data.WhoReadItHistory != "") {
220                    $('#' + cur_page + 'Dua_WhoRead').attr("class", data.DescLanguageName);
221                    $('#' + cur_page + 'Dua_WhoRead').html($('#' + cur_page + 'Dua_WhoRead').html() + data.WhoReadItHistory);
222                    $('#' + cur_page + 'Dua_DetailSection').show();
223                }
224                if (data.WhatIsItFor != "") {
225                    $('#' + cur_page + 'Dua_WhatisitFor').attr("class", data.DescLanguageName);
226                    $('#' + cur_page + 'Dua_WhatisitFor').html($('#' + cur_page + 'Dua_WhatisitFor').html() + data.WhatIsItFor);
227                    $('#' + cur_page + 'Dua_DetailSection').show();
228                }
229                if (data.WhereToRead != "") {
230                    $('#' + cur_page + 'Dua_WhereRead').attr("class", data.DescLanguageName);
231                    $('#' + cur_page + 'Dua_WhereRead').html($('#' + cur_page + 'Dua_WhereRead').html() + data.WhereToRead);
232                    $('#' + cur_page + 'Dua_WhereRead').show();
233                }
234                if (data.WhenToRead != "") {
235                    $('#' + cur_page + 'Dua_WhenRead').attr("class", data.DescLanguageName);
236                    $('#' + cur_page + 'Dua_WhenRead').html($('#' + cur_page + 'Dua_WhenRead').html() + data.WhenToRead);
237                    $('#' + cur_page + 'Dua_WhenRead').show();
238                }
239                if (data.WhyToRead != "") {
240                    $('#' + cur_page + 'Dua_WhyRead').attr("class", data.DescLanguageName);
241                    $('#' + cur_page + 'Dua_WhyRead').html($('#' + cur_page + 'Dua_WhyRead').html() + data.WhyToRead);
242                    $('#' + cur_page + 'Dua_WhyRead').show();
243                }
244                if (data.HowToRead != "") {
245                    $('#' + cur_page + 'Dua_HowRead').attr("class", data.DescLanguageName);
246                    $('#' + cur_page + 'Dua_HowRead').html($('#' + cur_page + 'Dua_HowRead').html() + data.HowToRead);
247                    $('#' + cur_page + 'Dua_HowRead').show();
248                }
249            }
250            $.mobile.hidePageLoadingMsg();
251        },
252        //the error method seems to be unavailable until jquery 1.5
253        error: function (xhr, ajaxOptions, thrownError) {
254            $.mobile.hidePageLoadingMsg();
255            alert("Error  " + xhr.status + "    " + thrownError);
256        }
257    });
258}
259
260function Get_Dua(cur_page, dua_id) {
261    var DuaID = "";
262
263    //$("#Dua_ArabicAudio").hide();
264    //$("#Dua_TranslationAudio").hide();
265
266    $('#Dua_DetailSection').hide();
267    DuaID = Get_URLParam("DuaID");
268
269    if (dua_id == 0) {
270        if (DuaID != "")
271            DuaID = parseInt(DuaID);
272        else
273            DuaID = 0;
274    }
275    else
276        DuaID = parseInt(dua_id);
277    
278    if (DuaID == 0)
279        GetDuaDetailByDuaID(cur_page, 0);
280    else
281        GetDuaDetailByDuaID(cur_page, DuaID);
282}
283
284function create_page(page_id) {
285    //alert($('#' + page_id).length);
286    if ($('#' + page_id).length == 0) {
287        var html = "";
288        if (page_id.indexOf("page") != -1) {
289            var mycss = "";
290            mycss = mycss + "<link rel='apple-touch-icon-precomposed' href='images/icon-72x72.png' />";
291            mycss = mycss + "<link rel='apple-touch-icon-precomposed' sizes='72x72' href='images/icon-72x72.png' />";
292            mycss = mycss + "<link rel='apple-touch-icon-precomposed' sizes='114x114' href='images/icon-114x114.png' />";
293            mycss = mycss + "<link rel='stylesheet' href='styles/jquery.mobile-1.0rc3.css' />";
294            mycss = mycss + "<link rel='stylesheet' href='Styles/jquery.mobile-1.0rc3.min.css' />";
295            mycss = mycss + "<link rel='Stylesheet' href='Styles/jqm-docs.css' />";
296
297            html = html + "<div data-role='page' id='" + page_id + "'  class='type-home'>";
298            html = html + "<div data-role='header' data-position='inline' data-theme='b'>";
299            html = html + "<a href='javascript:history.go(-1);' data-ajax='true' data-transition='slide' style='height:24px;' data-role='button' data-icon='back'>Back</a>";
300            html = html + "<div class='bbg'> <h1>Dua Finder</h1></div>";
301            html = html + "<div data-type='horizontal' style='position:absolute;float:right;z-index:10;display:inline;' align='right' class='ui-btn-right'><table><tr><td valign='bottom'><a href='#pageFeedBack' title='Feedback' style='height:24px; top:-7px;' data-mini='true' data-rel='dialog' data-role='button' data-transition='pop'><img src='images/Comment2.png' width='16px' height='16px' alt='' /></a></td><td valign='top'><a href='#MainPage' data-ajax='true' style='top:-4px' data-role='button' data-transition='slide' data-icon='home' data-iconpos='notext'>Home</a></td></tr></table></div>";
302            html = html + "</div>";
303
304            html = html + "<div data-role='content' style='padding-bottom:20px'>";
305            html = html + "<div class='content-secondary' data-role='collapsible'>";
306            html = html + "<div id='jqm-homeheader'>";
307            html = html + "<p>A Dua Application for every occasion for web, Smartphones &amp; Tablets</p>";
308            html = html + "</div>";
309
310            html = html + "<p class='intro'><strong>Welcome.</strong> DuaApps is designed to enhance user experiences by make  them recite, remember and bookmark the records of  Day to Day Duas with an overall ease of usability.</p>";
311
312            html = html + "<ul id='" + page_id + "_ApplicationsLst' data-role='listview' data-inset='true' data-theme='c' data-dividertheme='f'>";
313            html = html + "<li data-role='list-divider'>Other Applications</li>";
314            html = html + "<li><a href='http://www.quranexplorer.com/quran' target='_blank'>Quran</a></li>";
315            html = html + "<li><a href='http://itunes.apple.com/us/app/quran-explorer-www.quranexplorer.com/id451133186?mt=8' target='_blank'>Quran for iPhone</a></li>";
316            html = html + "<li><a href='http://www.quranexplorer.com/hadithebook/english/index.html' target='_blank'>Hadith</a></li>";
317            html = html + "</ul>";
318            html = html + "</div><!--/content-primary-->";
319
320            html = html + "<div id='" + page_id + "_Dua_IndexView' class='content-primary'>";
321
322            html = html + "<label for='" + page_id + "txtsearch'>Search Input:</label>";
323            html = html + "<input type='search' name='" + page_id + "txtsearch' id='" + page_id + "txtsearch' width='100%' value='' />";
324
325            html = html + "<center><label for='" + page_id + "txtsearch' class='note_text'>Press enter for database search</label></center>";
326            html = html + "<p id='" + page_id + "lbl_SearchDetail' class='EnglishText'></p>";
327            html = html + "<div id='" + page_id + "_Error' class='error_css'>";
328            html = html + "Detail not found!";
329            html = html + "</div>";
330
331            html = html + "<ul id='" + page_id + "_duaIndex' data-filter='false' data-role='listview' data-filter-theme='c' data-inset='true' data-theme='c' data-dividertheme='f'>";
332
333            html = html + "</ul>";
334
335            html = html + "</div>";
336            html = html + "</div>";
337
338            html = html + "<div data-role='footer' data-position='inline' data-theme='b' data-position='fixed' style='position:absolute;bottom:0;'><h3>Copyright 2018 Noble Eductaion Institute. Inc. All Rights Reserved&nbsp;&nbsp;|&nbsp;&nbsp;<a href='https://www.duaexplorer.com/privacy-policy.htm' style='color:White;'>Privacy Policy</a></h3></div>";
339            html = html + "</div>";
340
341            html = html + "<script type='text/javascript'>";
342            html = html + "$('#" + page_id + "_Error').hide();";
343            html = html + "$('#" + page_id + "').live('pageshow', function (e, data) {";
344            html = html + "$(function () {";
345            html = html + "$('#" + page_id + "_Error').hide();";
346            html = html + "$('#" + page_id + "lbl_SearchDetail').hide();";
347            html = html + "$('#" + page_id + "txtsearch').focus();";
348            html = html + "$('#" + page_id + "txtsearch').keyup(function (e) {";
349            //html = html + "alert('ffffff');";
350            html = html + "var searchText = $('#" + page_id + "txtsearch').val();";
351            html = html + "if (e.which == 13 && searchText.length > 1) {";
352            html = html + "if ($('#" + page_id + "lbl_SearchDetail').html().toUpperCase().indexOf('<BR>SEARCH TEXT : ' + searchText.toUpperCase()) == -1) {";
353            html = html + "GetDuaSearch('" + page_id + "', searchText);";
354
355            html = html + "$('#" + page_id + "lbl_SearchDetail').show();";
356            html = html + "}}";
357            html = html + "else {";
358            html = html + "$('#" + page_id + "lbl_SearchDetail').hide();";
359
360            html = html + "$('#" + page_id + "_duaIndex li').each(function () {";
361
362            html = html + "if ($(this).text().toUpperCase().indexOf(searchText.toUpperCase()) >= 0){";
363            html = html + "$(this).show();";
364            html = html + "} else {";
365            html = html + "$(this).hide(); }";
366            html = html + "});";
367            html = html + "}";
368            html = html + "});";
369
370            html = html + "});";
371            html = html + "});";
372            html = html + "</script>";
373            $('#page_body').append(html);
374            //$(this).pushStack(mypage);
375        }
376        else{
377            html = html + "<div id='" + page_id + "' data-role='page'  class='type-home'>";
378            html = html + "<div data-role='header' data-position='inline' data-theme='b'>";
379            html = html + "<a href='javascript: history.go(-1);' data-ajax='true' style='height:24px;' data-role='button' data-icon='back'>Back</a>";
380            html = html + "<div class='bbg'> <h1>Dua Finder</h1></div>";
381            html = html + "<div data-type='horizontal' style='position:absolute;float:right;z-index:10;display:inline;' align='right' class='ui-btn-right'><table><tr><td valign='bottom'><a href='#pageFeedBack' title='Feedback' style='height:24px; top:-7px' data-mini='true' data-rel='dialog' data-role='button' data-transition='pop'><img src='images/Comment2.png' width='16px' height='16px' alt='' /></a></td><td valign='top'><a href='#MainPage' data-ajax='true' style='top:-4px' data-role='button' data-transition='slide' data-icon='home' data-iconpos='notext'>Home</a></td></tr></table></div>";
382            html = html + "</div>";
383
384            html = html + "<div data-role='content' style='padding-bottom:20px'>";
385            html = html + "<center>";
386            html = html + "<p class='note_text'>&nbsp;</p>";
387            html = html + "<img src='images/Bismillah.png' width='139px' height='40px' border='0' />";
388            html = html + "</center>";
389            html = html + "<div id='" + page_id + "Dua_Title' class='noText'>&nbsp;v</div>";
390            html = html + "<div id='" + page_id + "Dua_Script' class='Arabic'>&nbsp;</div>";
391
392            html = html + "<div id='" + page_id + "Dua_ArabicAudio' style='display:none;' data-content-theme='b'>";
393            html = html + "<center>";
394            html = html + "<div id='" + page_id + "jp_ArabicAudio' class='cp-jplayer'></div>";
395
396            html = html + "<div id='" + page_id + "cp_container_1' class='cp-container'>";
397            html = html + "<div class='cp-buffer-holder'> <!-- .cp-gt50 only needed when buffer is > than 50% -->";
398            html = html + "<div class='cp-buffer-1'></div>";
399            html = html + "<div class='cp-buffer-2'></div>";
400            html = html + "</div>";
401            html = html + "<div class='cp-progress-holder'> <!-- .cp-gt50 only needed when progress is > than 50% -->";
402            html = html + "<div class='cp-progress-1'></div>";
403            html = html + "<div class='cp-progress-2'></div>";
404            html = html + "</div>";
405            html = html + "<div class='cp-circle-control'></div>";
406            html = html + "<ul class='cp-controls'>";
407            html = html + "<li><a href='#' class='cp-play' tabindex='1'>play</a></li>";
408            html = html + "<li><a href='#' class='cp-pause' style='display:none;' tabindex='1'>pause</a></li> <!-- Needs the inline style here, or jQuery.show() uses display:inline instead of display:block -->";
409            html = html + "</ul>";
410            html = html + "</div>";
411            html = html + "</center>";
412            html = html + "</div>";
413
414            html = html + "<div id='" + page_id + "Dua_Transliteration' class='noText'>";
415            html = html + "<h3><u>Transliteration:</u></h3>";
416            html = html + "</div>";
417            html = html + "<div id='" + page_id + "Dua_Translation' class='noText' >";
418            html = html + "<h3><u>Translation:</u></h3>";
419            html = html + "</div>";
420
421            html = html + "<div id='" + page_id + "Dua_TranslationAudio' style='display:none;' data-content-theme='b'>";
422            html = html + "<center>";
423            html = html + "<div id='" + page_id + "jp_TranslationAudio' class='cp-jplayer'></div>";
424
425            html = html + "<div id='cp_container_2' class='cp-container'>";
426            html = html + "<div class='cp-buffer-holder'>";
427            html = html + "<div class='cp-buffer-1'></div>";
428            html = html + "<div class='cp-buffer-2'></div>";
429            html = html + "</div>";
430            html = html + "<div class='cp-progress-holder'>";
431            html = html + "<div class='cp-progress-1'></div>";
432            html = html + "<div class='cp-progress-2'></div>";
433            html = html + "</div>";
434            html = html + "<div class='cp-circle-control'></div>";
435            html = html + "<ul class='cp-controls'>";
436            html = html + "<li><a href='#' class='cp-play' tabindex='1'>play</a></li>";
437            html = html + "<li><a href='#' class='cp-pause' style='display:none;' tabindex='1'>pause</a></li>";
438            html = html + "</ul>";
439            html = html + "</div>";
440            html = html + "</center>";
441            html = html + "</div>";
442            
443            html = html + "<center>";
444            html = html + "<img src='images/line.png' border='0' />";
445            html = html + "</center>";
446
447            html = html + "<div id='" + page_id + "Dua_DetailSection' data-role='collapsible' data-theme='f' data-content-theme='c'>";
448            html = html + "<h3>More Dua Detail</h3>";
449               
450            html = html + "<div id='" + page_id + "Dua_LongDescription' class='noText'>";
451            html = html + "<h3><u>Description:</u></h3>";
452            html = html + "</div>";
453
454            html = html + "<div id='" + page_id + "Dua_WhoRead' class='noText'>";
455            html = html + "<h3><u>Who Read:</u></h3>";
456            html = html + "</div>";
457
458            html = html + "<div id='" + page_id + "Dua_WhatisitFor' class='noText'>";
459            html = html + "<h3><u>What is it for:</u></h3>";
460            html = html + "</div>";
461
462            html = html + "<div id='" + page_id + "Dua_WhereRead' class='noText'>";
463            html = html + "<h3><u>Where to Read:</u></h3>";
464            html = html + "</div>";
465
466            html = html + "<div id='" + page_id + "Dua_WhenRead' class='noText'>";
467            html = html + "<h3><u>When to Read:</u></h3>";
468            html = html + "</div>";
469
470            html = html + "<div id='" + page_id + "Dua_WhyRead' class='noText'>";
471            html = html + "<h3><u>Why to Read:</u></h3>";
472            html = html + "</div>";
473
474            html = html + "<div id='" + page_id + "Dua_HowRead' class='noText'>";
475            html = html + "<h3><u>How to Read:</u></h3>";
476            html = html + "</div>";
477            html = html + "</div>";
478
479            html = html + "</div>";
480
481            html = html + "<div data-role='footer' data-position='inline' data-theme='b' data-position='fixed' style='position:absolute;bottom:0;'><h3>Copyright 2012 Noble Eductaion Institute. Inc. All Rights Reserved</h3></div>";
482            html = html + "</div>";
483            $('#page_body').append(html);
484        }
485    }
486}
487
488function Get_Page() {
489    var duaID = 0;
490    var indexID = 0;
491    var str_loc = window.location.href;
492    indexID = Get_URLParam("indexid");
493
494    $('#MainPage_Error').hide();
495    $('#DetailPage_0_Error').hide();
496    $('#DetailPage_1_Error').hide();
497
498    if (indexID == "" || indexID == null)
499        indexID = "0";
500    if(str_loc.indexOf("state=dialog") != -1)
501        return;
502
503    if (str_loc.indexOf("#dua_") > 0) {
504        str_loc = location.hash.toString();
505        duaID = str_loc.substr(str_loc.indexOf("_") + 1);
506        Get_Dua("dua_" + duaID, duaID);
507    }
508    else if (str_loc.indexOf("#page") > 0) {
509        str_loc = location.hash.toString();
510        indexID = str_loc.substr(str_loc.indexOf("_") + 1);
511        pageref = "page_" + indexID;
512        GetDuaIndexes("page_" + indexID, indexID);
513    }
514    else {
515        GetDuaIndexes("MainPage", 0);
516        GetDuaIndexes("MainPage", -1);
517    }
518}
519
520function Check_URI() {
521    if (location.hash.toString() != "") {
522        if (location.hash.toString().indexOf("#") >= 0) {
523            if ($(location.hash.toString()).length == 0) {
524                var str_loc = location.hash.toString();
525                var get_ID = 0;
526
527                if (str_loc.indexOf("_") > 0) {
528                    get_ID = str_loc.substr(str_loc.indexOf("_") + 1);
529                }
530
531                if (str_loc.indexOf("#page") >= 0)
532                    window.location = "index.htm"; //?indexid=" + parseInt(get_ID);
533                else
534                    window.location = "dua.htm?duaid=" + parseInt(get_ID);
535            }
536        }
537    }
538}
539
540function Show_Page() {
541    $(function () {
542        var pageref = "MainPage";
543        pageref = "MainPage";
544        $('#' + pageref + '_Error').hide();
545        $('#' + pageref + 'lbl_SearchDetail').hide();
546        $('#' + pageref + 'txtsearch').val("");
547        $('#' + pageref + 'txtsearch').focus();
548
549        $('#' + pageref + 'txtsearch').keyup(function (e) {
550
551            var searchText = $('#' + pageref + 'txtsearch').val();
552            if (e.which == 13 && searchText.length > 1) {
553                //if ($('#MainPagelbl_SearchDetail').html().toUpperCase().indexOf("<BR>SEARCH TEXT : " + searchText.toUpperCase()) == -1) {
554                    GetDuaSearch(pageref, searchText);
555                    $('#' + pageref + 'lbl_SearchDetail').show();
556                //}
557            }
558            else {
559                $('#' + pageref + 'lbl_SearchDetail').hide();
560 
560               //alert($('#' + pageref + '_duaIndex li').length);
561                $('#' + pageref + '_duaIndex li').each(function () {
562                    if ($(this).text().toUpperCase().indexOf(searchText.toUpperCase()) >= 0)
563                        $(this).show();
564                    else
565                        $(this).hide();
566                });
567
568                $('#' + pageref + '_duaIndexGeneral li').each(function () {
569                    if ($(this).text().toUpperCase().indexOf(searchText.toUpperCase()) >= 0)
570                        $(this).show();
571                    else
572                        $(this).hide();
573                });
574            }
575        });
576    })
577}
578
579function Get_URLParam(param) {
580    param = param.toLowerCase();
581    param = param.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
582
583    var regexS = "[\\?&]" + param + "=([^&#]*)";
584    var regex = new RegExp(regexS);
585    var results = regex.exec(window.location.href.toLowerCase());
586    //alert(results);
587    if (results == null)
588        return "";
589    else
590        return results[1]; 
591    }
592

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.