function initPage(n,t,i,r,u,f){sel==0&&(t=="schemeMF"?(footable123="",footable123=$("#"+t).footable().data("footable")):t=="modalitynew"?(footablenew="",footablenew=$("#"+t).footable().data("footable")):t=="modalitynew3"?(footablenew3="",footablenew3=$("#"+t).footable().data("footable")):(footable12="",footable12=$("#"+t).footable().data("footable")),sel=1);selnew==0&&t=="modalitynew"&&(footablenew="",footablenew=$("#"+t).footable().data("footable"),selnew=1);selnew3==0&&t=="modalitynew3"&&(footablenew3="",footablenew3=$("#"+t).footable().data("footable"),selnew3=1);$("#"+t+" > tbody").append("
<\/div>");$.ajax({url:n+"&pageNo=1&PageSize=10&opt=page"}).complete(function(e){t=="schemeMF"?(pagecount=parseInt(e.responseText),pagecountnew=pagecount):t=="modalitynew"?(pagecntnew=parseInt(e.responseText),pagecountnew=pagecntnew):t=="modalitynew3"?(pagecntnew3=parseInt(e.responseText),pagecountnew=pagecntnew3):(pagecnt=parseInt(e.responseText),pagecountnew=pagecnt);pagecountnew!=0&&pagecountnew!=null&&pagecountnew!=""?getPage(1,n,t,i,r,u,f):NoDataAvailable(t)})}function getPage(n,t,i,r,u,f,e){i=="schemeMF"?$(".nodatainner").remove():i=="modalitynew"?$("#"+i+" .nodatainner").remove():i=="modalitynew3"?$("#"+i+" .nodatainner").remove():$("#"+i+" .nodatainner").remove();n!=0&&(i=="schemeMF"?pagenos1=n:i=="modalitynew"?pagenos2=n:i=="modalitynew3"?pagenos3=n:pagenos4=n,pagenos=n);$("#"+i+" > tbody").append("
<\/div>");var o;$.ajax({url:t+"&pageNo="+pagenos+"&PageSize=10",dataType:"json",success:function(n){var s=$("#"+i).find("tbody > tr");i=="schemeMF"?footable123.removeRow(s):i=="modalitynew"?footablenew.removeRow(s):i=="modalitynew3"?footablenew3.removeRow(s):footable12.removeRow(s);$.each(n,function(n,r){var h=1,s="";u=="Fincode"||u=="FinCode"||u=="fincode"||u=="FINCODE"||u=="SYMBOL"||u=="SCHEMECODE"||u=="CLASSCODE"||u=="Top_schemecode"||u=="FMP_schemecode"||u=="NFO_schemecode"||u=="AMC_CODE"||u==""||u=="INDEXCODE"||u=="INDEX_ID"||u=="COMSYMBOL"?$.each(r,function(n,i){var b,a,k,g,v,d,c,l;if(n==u)o=i;else{if(n==f)if(f=="INDX_GRP")b=$("#ContentPlaceHolder1_ddlExchange").val(),a=o,a=a!==""?o:"null",k=e+"/"+a+"/"+i+"/"+b,s+=''+i+"<\/a><\/td>";else if(e.indexOf("SmartQuotes.aspx")>0){g=i;i=i.replace("&","-");var nt=i.replace(/[^a-zA-Z 0-9]+/g,""),tt=nt.replace(/ /g,"-"),it=tt.replace("--","-");s+=""+i+"<\/a><\/td>"}else e.indexOf("/company-profile/")>0?(v=i.toLowerCase().replace(/[^a-z0-9\s]/gi,"").replace(/[_\s]/g,"-").replace(/\--/g,"-"),s+=t.indexOf("MFWhatsInAjax.aspx")>0||t.indexOf("MFWhatsOutAjax.aspx")>0?''+i+"<\/a><\/td>":''+i+"<\/a><\/td>"):e.indexOf("/ipo/")>0?(d=i.toLowerCase().replace(/[^a-z0-9\s]/gi,"").replace(/[_\s]/g,"-").replace(/\--/g,"-"),s+=''+i+"<\/a><\/td>"):e.indexOf("/scheme-profile/")>0?(c=i.toLowerCase().replace(/\ /g,"-").replace(/\&/g,"-").replace(/\(/g,"-").replace(/\)/g,"-"),s+=''+i+"<\/a><\/td>"):f=="AMC"||f=="NFO_scheme"||f=="FMP_scheme"?s+=''+i+"<\/a><\/td>":f=="TypeName"?(l="../mutual-fund/scheme-category/",s+=''+i+"<\/a><\/td>"):e.indexOf("/mutual-fund/")>0?(c=i.toLowerCase().replace(/\ /g,"-").replace(/\&/g,"-").replace(/\(/g,"-").replace(/\)/g,"-"),l=$("#hdndomainname").val()+"/mutual-fund/",s+=''+i+"<\/a><\/td>"):s+=''+i+"<\/a><\/td>";else if($.isNumeric(i)&&n!="BSEDelistScripCode"||i=="NA"&&n!="BSEDelistScripCode"){if(i.indexOf(".")!=-1&&i.split(".")[1].length!=2){if(isNaN(parseFloat(i)))return;i=parseFloat(i).toFixed(2)}n=="ScripCode"||n=="SCRIPCODE"?s+=""+i+"<\/td>":n=="PERCHG"||n=="DiffPerformance"||n=="PerChng"||n=="PerChange"||n=="PERCHNG"||n=="PER_CHANGE"||n=="perChg"||n=="NETCHG"||n=="Chng"||n=="Change"||n=="faochg"||n=="faodiff"||n=="change"||n=="Perchange"||n=="AVGPERCHNG5DAYBEFOREVOLUME"||n=="CNIM_EX"||n=="Net_Value"||n=="CHANGE"?parseFloat(i)>0?s+=''+i+"<\/td>":parseFloat(i)<0?s+=''+i+"<\/td>":parseFloat(i)==0&&(s+=''+i+"<\/td>"):s+=''+i+"<\/td>"}else if(i.indexOf("/")!=-1&&i.split("/").length==3&&h!=1)if(n=="Details"||n=="DETAILS")s+=""+i+"<\/td>";else{var r=new Date(i),y=r.getDate(),p=GetMonthName(r.getMonth()+1),w=r.getFullYear();i.split("/")[0].length>2||i.split("/")[1].length>2?s+=""+i+"<\/td>":(i=y+"-"+p+"-"+w,s+=''+i+"<\/td>")}else if(i.indexOf("-")!=-1&&i.split("-").length==3&&h!=1)if(n=="Details"||n=="DETAILS")s+=""+i+"<\/td>";else{var r=new Date(i),y=r.getDate(),p=GetMonthName(r.getMonth()+1),w=r.getFullYear();Date.parse(r)?(i=y+"-"+p+"-"+w,s+=''+i+"<\/td>"):s+=""+i+"<\/td>"}else s+=i.indexOf("-")!=-1&&i.split("-").length==3&&h!=1&&i.split("-")[0].length<3&&i.split("-")[1].length<4?''+i+"<\/td>":n=="OI_Ltp"||n=="OI_OI"||n=="FundRank"?''+i+"<\/td>":i==""?n=="ISSUEPRICE"||n=="Volume"||n=="3YEARRET"||n=="1YEARRET"||n=="LASTPRICE"||n=="CurrentDELVVOLUME"||n=="PrevDELVVOLUME"||n=="DELVVOLUMEChange"||n=="DELVVOLUME_PERCHANGE"||n=="CurrentLTP"||n=="Change"||n=="Dividend %"||n=="LISTPRICE"||n=="IssueSize"?'NA<\/td>':'NA<\/td>':n=="IssueSize"||n=="PriceBand"||n=="ratio1"||n=="raaaaa"?''+i+"<\/td>":n=="OptType"||n=="OI_OptType"||n=="Interim / Final / Dividend"?''+i+"<\/td>":""+i+"<\/td>";h=0}}):u=="IPOCODEH"?$.each(r,function(n,t){if(n==u)o=t;else{if(n==f)s+=''+t+"<\/a><\/td>";else if($.isNumeric(t)||t=="NA"){if(t.indexOf(".")!=-1&&t.split(".")[1].length>2){if(isNaN(parseFloat(t)))return;t=parseFloat(t).toFixed(2)}s+=''+t+"<\/td>"}else if(t.indexOf("/")!=-1&&t.split("/").length==3&&h!=1){var i=new Date(t),r=i.getDate(),c=GetMonthName(i.getMonth()+1),l=i.getFullYear();t.split("/")[0].length>2||t.split("/")[1].length>2?s+=""+t+"<\/td>":(t=r+"-"+c+"-"+l,s+=''+t+"<\/td>")}else s+=t.indexOf("-")!=-1&&t.split("-").length==3&&h!=1&&t.split("-")[0].length<3&&t.split("-")[1].length<4?''+t+"<\/td>":""+t+"<\/td>";h=0}}):u=="IPOCODEP"?$.each(r,function(n,t){if(n==u)o=t;else{if(n==f)s+=''+t+"<\/a><\/td>";else if($.isNumeric(t)||t=="NA"){if(t.indexOf(".")!=-1&&t.split(".")[1].length>2){if(isNaN(parseFloat(t)))return;t=parseFloat(t).toFixed(2)}s+=''+t+"<\/td>"}else if(t.indexOf("/")!=-1&&t.split("/").length==3&&h!=1){var i=new Date(t),r=i.getDate(),c=GetMonthName(i.getMonth()+1),l=i.getFullYear();t.split("/")[0].length>2||t.split("/")[1].length>2?s+=""+t+"<\/td>":(t=r+"-"+c+"-"+l,s+=''+t+"<\/td>")}else s+=t.indexOf("-")!=-1&&t.split("-").length==3&&h!=1&&t.split("-")[0].length<3&&t.split("-")[1].length<4?''+t+"<\/td>":""+t+"<\/td>";h=0}}):u=="Javascrpt"?$.each(r,function(n,t){if(n==u)o=t;else{if(n==f)s+=''+t+"<\/a><\/td>";else if($.isNumeric(t)||t=="NA"){if(t.indexOf(".")!=-1&&t.split(".")[1].length>2){if(isNaN(parseFloat(t)))return;t=parseFloat(t).toFixed(2)}s+=''+t+"<\/td>"}else if(t.indexOf("/")!=-1&&t.split("/").length==3&&h!=1){var i=new Date(t),r=i.getDate(),e=GetMonthName(i.getMonth()+1),c=i.getFullYear();t.split("/")[0].length>2||t.split("/")[1].length>2?s+=""+t+"<\/td>":(t=r+"-"+e+"-"+c,s+=''+t+"<\/td>")}else s+=t.indexOf("-")!=-1&&t.split("-").length==3&&h!=1&&t.split("-")[0].length<3&&t.split("-")[1].length<4?''+t+"<\/td>":""+t+"<\/td>";h=0}}):u=="GetQuote"&&$.each(r,function(n,t){if(n==u)o=t;else{if(n==f)s+=''+t+"<\/a><\/td>";else if($.isNumeric(t)||t=="NA"){if(t.indexOf(".")!=-1&&t.split(".")[1].length>2){if(isNaN(parseFloat(t)))return;t=parseFloat(t).toFixed(2)}s+=n=="Perchange"?parseFloat(t)>0?''+t+"<\/td>":parseFloat(t)<0?''+t+"<\/td>":parseFloat(t)==0?''+t+"<\/td>":''+t+"<\/td>":''+t+"<\/td>"}else if(t.indexOf("/")!=-1&&t.split("/").length==3&&h!=1){var i=new Date(t),r=i.getDate(),c=GetMonthName(i.getMonth()+1),l=i.getFullYear();t.split("/")[0].length>2||t.split("/")[1].length>2?s+=""+t+"<\/td>":(t=r+"-"+c+"-"+l,s+=''+t+"<\/td>")}else s+=t.indexOf("-")!=-1&&t.split("-").length==3&&h!=1&&t.split("-")[0].length<3&&t.split("-")[1].length<4?''+t+"<\/td>":""+t+"<\/td>";h=0}});s+="<\/tr>";$("#"+i+" .ajaxloaderhmediv").remove();$("#"+i+" > tbody").append(s)});i=="schemeMF"?(paginateFoo(pagenos,pagecount,i,r,t,u,f,e),footable123.options.pageSize=10,footable123.redraw(),footable123.resize()):i=="modalitynew"?(paginateFoo(pagenos,pagecntnew,i,r,t,u,f,e),footablenew.options.pageSize=10,footablenew.redraw(),footablenew.resize()):i=="modalitynew3"?(paginateFoo(pagenos,pagecntnew3,i,r,t,u,f,e),footablenew3.options.pageSize=10,footablenew3.redraw(),footablenew3.resize()):(paginateFoo(pagenos,pagecnt,i,r,t,u,f,e),footable12.options.pageSize=10,footable12.redraw(),footable12.resize())},error:function(){NoDataAvailable(i)}})}function paginateClicks(n,t,i,r,u,f,e){if(n=="first")i=="schemeMF"?pagenos1=1:i=="modalitynew"?pagenos2=1:i=="modalitynew3"?pagenos3=1:pagenos4=1;else if(n=="prev")if(i=="schemeMF"){if(pagenos1==1)return!1;pagenos1--}else if(i=="modalitynew"){if(pagenos2==1)return!1;pagenos2--}else if(i=="modalitynew3"){if(pagenos3==1)return!1;pagenos3--}else{if(pagenos4==1)return!1;pagenos4--}else if(n=="next")if(i=="schemeMF"){if(pagenos1==pagecount)return!1;pagenos1++}else if(i=="modalitynew"){if(pagenos2==pagecntnew)return!1;pagenos2++}else if(i=="modalitynew3"){if(pagenos3==pagecntnew3)return!1;pagenos3++}else{if(pagenos4==pagecnt)return!1;pagenos4++}else n=="last"&&(i=="schemeMF"?pagenos1=pagecount:i=="modalitynew"?pagenos2=pagecntnew:i=="modalitynew3"?pagenos3=pagecntnew3:pagenos4=pagecnt);pagenos=i=="schemeMF"?pagenos1:i=="modalitynew"?pagenos2:i=="modalitynew3"?pagenos3:pagenos4;i=="schemeMF"?getPage(pagenos,t,i,r,u,f,e):getPage(pagenos,t,i,r,u,f,e)}function paginateFoo(n,t,r,u,f,e,o,s){var c,g,l,a,k,p,w,b,d,y,h,v;if(n>t)return r=="schemeMF"?$("#Schemepage").hide():r=="modalitynew"?$("#paginatenew").hide():r=="modalitynew3"?$("#paginatenew3").hide():$("#paginate").hide(),a="No Data Found<\/span>",k="No Data Found<\/span>",r=="schemeMF"?$("#schemeMF > tbody").html(k):r=="modality2"?$("#modality2 > tbody").html(a):r=="modalitynew"?$("#modalitynew > tbody").html(a):r=="modalitynew3"?$("#modalitynew3 > tbody").html(a):r=="modality1"?$("#modality1 > tbody").html(a):$("#modality > tbody").html(a),!1;if(t==1)r=="schemeMF"?$("#Schemepage").hide():r=="modalitynew"?$("#paginatenew").hide():r=="modalitynew3"?$("#paginatenew3").hide():$("#paginate").hide();else{for(r=="schemeMF"?$("#Schemepage").show():r=="modalitynew"?$("#paginatenew").show():r=="modalitynew3"?$("#paginatenew3").show():$("#paginate").show(),c="