// Minified Admin Fuctions
function saveContent(obj,cancel,id){if(!cancel){var t=$(obj).parent().siblings(0).val();jQuery.ajax({url:'procs/contentpro.php',type:"POST",data:'update_value='+t+'&element_id='+id,dataType:"html",complete:function(request){editing=false;click_count=0;},success:function(html){var new_text=html||"(Click here to add text)";if(new_text.match("error_")){if(new_text.match("error_0")){humanMsg.displayMsg("<strong>Sorry,</strong> I did not recieve any content to save.<br/>Please try again or contact the site administrator.");}
if(new_text.match("error_1")){humanMsg.displayMsg("<strong>Sorry,</strong> there was an error accessing the database.<br/>Please contact the site administrator.<br/>"+new_text);}}else{$('#'+id).html(new_text);humanMsg.displayMsg("<strong>Success:</strong> Content updated");}},error:function(request){hmsg("<strong>Sorry,</strong> I could not submit the content for updating.<br/>Please contact the site administrator.");}});}else{var t=cancel;}}
function fbox(content){var output;output="<div id=\"fbox\"><table>\n<tbody>\n";output=output+"<tr><td class=\"tl\"/><td class=\"b\"/><td class=\"tr\"/></tr>\n";output=output+"<tr><td class=\"b\"><td class=\"body\"><h1>Edit Content</h1><div class=\"fcontent\">";output=output+content;output=output+"</div><div class=\"footer\"><a href\"#\" class=\"jqmClose bkbutton\"><span>Close</span></a>";output=output+"</div></td><td class=\"b\"/> </tr> \n";output=output+"<tr><td class=\"bl\"/><td class=\"b\"/><td class=\"br\"/></tr>\n";output=output+"</tbody>\n</table></div>\n";return output;}
function setFilters(col){var filterDelay;$('#txtFilter_'+col).val('').keyup(function(e){if((e.which>=37&&e.which<=40)||e.which==9)return true;var filterText=$(this).val();var triggerFilter=function(){$('#jtable thead:first th:eq('+col+')').trigger('filter',[filterText]);};clearTimeout(filterDelay);filterDelay=setTimeout(triggerFilter,500);});}
function adminSubmit(formid,url){var fdata=$('#'+formid).serialize();jQuery.ajax({url:url,type:"POST",data:fdata,dataType:"html",complete:function(request){editing=false;click_count=0;},success:function(html){var new_text=html||"(???)";hmsg(new_text);},error:function(request){hmsg("There was an error...");}});}
function fbrowser(){var name="FileBrowser";var parameters="location=0,menubar=0,height=630,width=620,toolbar=0,scrollbars=1,status=0,resizable=0";var flink=window.open("fman/browser.php?b=0",name,parameters).focus();return false;}
function cSwitch(c){var arr=["1","2","3","4","5"];$.each(arr,function(){$("#container-"+this).hide();});$("#container-"+c).fadeIn();}