function checkIndexValue(object,maxCount){var objvalue=new Number(document.getElementById(object).value);if(isNaN(objvalue))
objvalue=new Number(1);if(objvalue==0)
objvalue=1;if(objvalue>maxCount)
objvalue=maxCount;document.getElementById(object).value=objvalue;}
function showIndexDiv(divNo,maxCount,tabType,max_records_displayed,max_records,prefix,tabno){if(typeof(tabno)=='undefined'||tabno===null||tabno=="")
tabno="";var loc=""+ window.location+"";if(loc.indexOf("admin")!=-1){prefix="../";}
for(i=1;i<=maxCount;i++){document.getElementById("index_"+tabType+"_"+i).style.display="none";}
document.getElementById("index_"+tabType+"_"+divNo).style.display="";document.getElementById("index_info"+tabno).innerHTML="Displaying "+((divNo-1)*max_records_displayed+1)+" - "+((divNo*max_records_displayed>max_records)?max_records:(divNo*max_records_displayed))+" of "+ max_records+" records &nbsp;&nbsp;&nbsp;";document.getElementById("start_index"+tabno).value=divNo;var params1,params2;if(divNo!=1){params1="1,"+ maxCount+",'"+ tabType+"',"+ max_records_displayed+","+ max_records+",'"+ prefix+"','"+ tabno+"'";params2=(divNo-1)+","+ maxCount+",'"+ tabType+"',"+ max_records_displayed+","+ max_records+",'"+ prefix+"','"+ tabno+"'";document.getElementById("index_prev"+tabno).innerHTML='<a class="op" href="#" onClick="javascript:showIndexDiv('+ params1+');"><img src="'+ prefix+'theme/images/doublearrow_rtl.png" style="border:0px;" /></a> <a class="op" href="#" onClick="javascript:showIndexDiv('+ params2+');"><img src="'+ prefix+'theme/images/arrow_rtl.png" style="border:0px;" /></a>&nbsp;&nbsp;';}else{document.getElementById("index_prev"+tabno).innerHTML='<img src="'+ prefix+'theme/images/doublearrow_rtl_2.png" style="border:0px;" /> <img src="'+ prefix+'theme/images/arrow_rtl_2.png" style="border:0px;" />&nbsp;&nbsp;';}
if(divNo!=maxCount){params2=maxCount+","+ maxCount+",'"+ tabType+"',"+ max_records_displayed+","+ max_records+",'"+ prefix+"','"+ tabno+"'";params1="&nbsp;&nbsp;"+(Number(divNo)+1)+","+ maxCount+",'"+ tabType+"',"+ max_records_displayed+","+ max_records+",'"+ prefix+"','"+ tabno+"'";document.getElementById("index_next"+tabno).innerHTML='<a class="op" href="#" onClick="javascript:showIndexDiv('+ params1+');"><img src="'+ prefix+'theme/images/arrow.png" style="border:0px;" /></a> <a class="op" href="#" onClick="javascript:showIndexDiv('+ params2+');"><img src="'+ prefix+'theme/images/doublearrow.png" style="border:0px;" /></a>';}else{document.getElementById("index_next"+tabno).innerHTML='&nbsp;&nbsp;<img src="'+ prefix+'theme/images/arrow_2.png" style="border:0px;" /> <img src="'+ prefix+'theme/images/doublearrow_2.png" style="border:0px;" />';}}
