
var root_path='';function sp_alert(message)
{$.facebox('<p>'+message+'</p>');}
function toggleCB(theElement){var cbname=theElement.name;var theForm=theElement.form,z=0;for(z=0;z<theForm.length;z++){if(theForm[z].type=='checkbox'&&theForm[z].name!=cbname){theForm[z].checked=theElement.checked;}}}
function countCBSelected(f)
{cc=0;for(z=0;z<f.length;z++){if(f[z].type=='checkbox'&&f[z].checked)
cc++}
return cc;}
function bulkSend(f)
{ac=f.bulkaction.value;if(1>countCBSelected(f)){sp_alert('Please select an item first');return false;}
if(ac==""){sp_alert('Please select an action');return false;}else if(ac=="delete"||ac=="-1"){return confirm('Are you sure to delete?\nthis action can not be undone!');}
return true;}
function simpleMCE(editor)
{tinyMCE.init({mode:"textareas",theme:"advanced",plugins:"safari,pagebreak",theme_advanced_buttons1:"bold,italic,underline,separator,strikethrough,bullist,numlist,undo,redo,pagebreak,link,unlink",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",editor_selector:editor,inline_styles:false,entity_encoding:"raw"})}
function advanceMCE(editor)
{tinyMCE.init({mode:"textareas",theme:"advanced",skin:"thebigreason",plugins:"safari,pagebreak,advimage,paste,paste2,fullscreen,advhr,sepidol",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,undo,redo,|,link,unlink,image,|,sp_more,fullscreen,code",theme_advanced_buttons2:"",theme_advanced_buttons3:"",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"center",theme_advanced_statusbar_location:"bottom",editor_selector:editor,theme_advanced_resizing:true,theme_advanced_resize_horizontal:false,paste_strip_class_attributes:"all",dialog_type:"modal",relative_urls:false,remove_script_host:false,convert_urls:false,apply_source_formatting:false,remove_linebreaks:true,paste_convert_middot_lists:true,paste_remove_spans:true,paste_remove_styles:true,paste_convert_headers_to_strong:true,paste_create_paragraphs:false,entities:"38,amp,60,lt,62,gt",accessibility_focus:"1",tab_focus:":prev,:next",inline_styles:false,entity_encoding:"raw"})}
function toggleMCEVisual(editor)
{}
function disableMCE(editor)
{tinyMCE.execCommand('mceToggleEditor',false,editor);}
function sp_confirm(elem,message)
{c=confirm(message);if(c){$.facebox({ajax:elem.href});return true;}
return false;}
$(document).ready(function(){var fboption={closeImage:root_path+'../images/closelabel.gif',loadingImage:root_path+'../images/loading.gif'};jQuery('a[rel*=facebox]').facebox(fboption);jQuery('a[rel*=ipopbox]').click(function(){fboption['iframe']=this.href;jQuery.facebox(fboption);return false;});$('#facebox').livequery(function(){$(this).find('#faceform').livequery(function(){$(this).ajaxForm({beforeSubmit:$.facebox.loading,success:function(html){$.facebox.reveal(html);}});});});$('#inboks').livequery(function(){$(this).find('#inboksform').livequery(function(){$(this).ajaxForm({beforeSubmit:$.inboks.loading,success:function(html){$.inboks.result(html);}});});});});var js=/application\.js(\?.*)?$/;$('head script[src]').each(function(i,s){if(s.src.match(js)){var path=s.src.replace(js,'');root_path=path;}});