/* modified from the Sajax PHP/AJAX include library:
   (c) copyright 2005 modernmethod, inc
*/
var sajax_request_type="POST";var sajax_target_id="";var sajax_failure_redirect="";function sajax_init_object(){var A;var _3=new Array("Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");for(var i=0;i<_3.length;i++){try{A=new ActiveXObject(_3[i]);}catch(e){A=null;}}if(!A&&typeof XMLHttpRequest!="undefined"){A=new XMLHttpRequest();}if(!A){}return A;}var sajax_requests=new Array();function sajax_cancel(){for(var i=0;i<sajax_requests.length;i++){sajax_requests[i].abort();}}function sajax_do_call(_6,_7){var i,x,n;var _9;var _a;var _b;_b=sajax_target_id;if(typeof (sajax_request_type)=="undefined"||sajax_request_type==""){sajax_request_type="GET";}_9="";if(sajax_request_type=="GET"){if(_9.indexOf("?")==-1){_9+="?rs="+escape(_6);}else{_9+="&rs="+escape(_6);}if (document.getElementById("sid")){_9+="&PHPSESSID="+document.getElementById("sid").value;}_9+="&rst="+escape(sajax_target_id);_9+="&rsrnd="+new Date().getTime();for(i=0;i<_7.length-1;i++){_9+="&rsargs[]="+escape(_7[i]);}_a=null;}else{if(sajax_request_type=="POST"){_a="rs="+escape(_6);_a+="&rst="+escape(sajax_target_id);_a+="&rsrnd="+new Date().getTime();for(i=0;i<_7.length-1;i++){_a=_a+"&rsargs[]="+escape(_7[i]);}}}x=sajax_init_object();if(x==null){if(sajax_failure_redirect!=""){location.href=sajax_failure_redirect;return false;}else{return false;}}else{x.open(sajax_request_type,'index.php',true);sajax_requests[sajax_requests.length]=x;if(sajax_request_type=="POST"){x.setRequestHeader("Method","POST "+_9+" HTTP/1.1");x.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");}x.onreadystatechange=function(){if(x.readyState!=4){return;};var _c;var _d;var _e=x.responseText.replace(/^\s*|\s*$/g,"");_c=_e.charAt(0);_d=_e.substring(2);if(_c==""){}else{if(_c=="-"){}else{if(_b!=""){document.getElementById(_b).innerHTML=eval(_d);}else{try{var _f;var _10=false;if(typeof _7[_7.length-1]=="object"){_f=_7[_7.length-1].callback;_10=_7[_7.length-1].extra_data;}else{_f=_7[_7.length-1];}_f(eval(_d),_10);}catch(e){}}}}};}x.send(_a);delete x;return true;}
/* wrappers for individual functions */
function x_ajax_update_page(){sajax_do_call("ajax_update_page",x_ajax_update_page.arguments);}
function x_ajax_save_outgoing_message(){sajax_do_call("ajax_save_outgoing_message",x_ajax_save_outgoing_message.arguments);}
function x_ajax_prev_contacts(){sajax_do_call("ajax_prev_contacts",x_ajax_prev_contacts.arguments);}
function x_ajax_next_contacts(){sajax_do_call("ajax_next_contacts",x_ajax_next_contacts.arguments);}
function x_ajax_save_folder_state(){sajax_do_call("ajax_save_folder_state",x_ajax_save_folder_state.arguments);}
function x_ajax_save_folder_vis_state(){sajax_do_call("ajax_save_folder_vis_state",x_ajax_save_folder_vis_state.arguments);}
