function jmoment(){ $.blockUI({css: { color:'#000000','font-family':'Tahoma', 'font-size':'11px','text-decoration':'none',width:'75px',height:'15px',backgroundColor: '#e1e1e0'},message: 'Please wait...',fadeIn: 0}); }
function MyPaging(mydiv,uri){
	jmoment(); $.ajax({ type: "GET", url: uri,dataType: "html",success: function(myfunction) { $.unblockUI(); $(mydiv).html(myfunction);}});
}

function run_search(keyword,categ){window.location=('index.php?main=view&link=search&keyword='+keyword+'&category='+categ);}
function Checkradio(myform,x,count){if(count>1){for (y=0; y<count; y++){if (x == y){document.getElementById("td"+x).style.backgroundColor='#DA8C7E';}else{document.getElementById("td"+y).style.backgroundColor='white';}}}else{document.getElementById("td"+x).style.backgroundColor='#DA8C7E';}}
function openlocation(url){window.location=(url);}
function Checkbox(myform,x,count){if(myform.ids[x].checked == false){myform.ids[x].checked=true;document.getElementById("td"+x).style.backgroundColor='#DA8C7E';}else{myform.ids[x].checked=false;document.getElementById("td"+x).style.backgroundColor='white';}}
function confirmchekbox(myform,id,count,question,prompt1,prompt2){if(count > 1){for(i=0;i<count;i++){if(id[i].checked==true){if (confirm(question)==false){return false;}else{return true;}}}alert(prompt1);return false;}if(count !=0){if(id.checked==true){if (confirm(question)==false){return false;}else{return true;}}else{alert(prompt1);return false;}}else{alert(prompt2);return false;}}
function CheckAll(all,id,count) {for(i=0; i < count;i++){if(id[i].checked == false){id[i].checked =true;document.getElementById("td"+i).style.backgroundColor='#DA8C7E';}else{id[i].checked =false;document.getElementById("td"+i).style.backgroundColor='white';}}}
function codekey(keyword,categ){window.location=('index.php?main=view&link=search&keyword='+keyword+'&category='+categ);}
function openpop(url,w,h){window.open(url,"popup1","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, height="+h+",width="+w+",modal=yes");}
function redirectme(uri){ jmoment(); $.ajax({ type: "GET", url: uri,dataType: "html",success: function(myxmldata) { $("#list").html(myxmldata); $.unblockUI();}});}