jQuery(document).ready(function(){var options={beforeSubmit:validate_profile_comments,success:showServerResponse_comments,timeout:8000,type:"post",url:"http://www.bobproctornetwork.com/beta/bp_ajax.php"};jQuery('#frm_profile_comments').ajaxForm(options);});function send_profile_comment(){val=jQuery('#profile_comment_box').attr('value');val=jQuery.trim(val);to=jQuery('#profile_comment_to').attr('value');if(val==''){jQuery('#validation_profile_comments_postnew').empty().append('

- Message is empty.

').show();}else{jQuery.ajax({type:"POST",data:"action=writeonwall_popup&_ajax_nonce=af477959f8&profile_comment="+val+"&to="+to,url:"http://www.bobproctornetwork.com/beta/bp_ajax.php",success:function(msg){text_parts=msg.substr(0,7);if(text_parts=="__Error"){message=msg.split(":");jQuery('#validation_profile_comments_postnew').empty().html('Following errors have occured.
');jQuery('#validation_profile_comments_postnew').append('

- '+message[1]+'

');jQuery('#validation_profile_comments_postnew').show();}else{jQuery('#validation_profile_comments_postnew').hide();html='
Write a Comment
'+msg+'
';jQuery("#profile_comment_div").empty().html(html);}}});}} function validate_profile_comments(){jQuery('#validation_profile_comments').empty().hide();jQuery('#validation_profile_comments').html('Following errors have occured.
');isvalidated=true;var message=jQuery('#profile_comment').fieldValue();if(!message[0]){jQuery('#validation_profile_comments').append('

- Message is empty.

');isvalidated=false;} if(!isvalidated){jQuery('.profile_comment_textbox blur').attr('value','');jQuery('#validation_profile_comments').show();return false;} return isvalidated;} function showServerResponse_comments(responseText,statusText){text=jQuery.trim(responseText);text_parts=text.substr(0,7);if(text_parts=="__Error"){message=text.split(":");jQuery('#validation').html('Following errors have occured.
');jQuery('#validation').append('

- '+message[1]+'

');jQuery('#validation').show();}else{jQuery('#profile_comment').attr('value','');if((jQuery('td.contactCommentBoxHolder').html())) jQuery("td.contactCommentBoxHolder").empty().html(text);else jQuery('The White Board ').appendTo('table.userProfInfoDetailTbl');jQuery("td.contactCommentBoxHolder").empty().html(text);}} function delete_profile_comment(m){jQuery.ajax({type:"POST",data:"action=delete_wall_message&_ajax_nonce=895411d34e&m="+m,url:"http://www.bobproctornetwork.com/beta/bp_ajax.php",success:function(msg){jQuery("td.contactCommentBoxHolder").empty().html(msg);}});} function removeFromMyMsiList(p,u){if(confirm("Are you sure you want to remove this MSI opportunity from your MSI's?")){jQuery.ajax({type:"POST",url:"http://www.bobproctornetwork.com/beta/bp_ajax.php",data:"action=removefrom_mymsi&m="+p+"&u="+u+"&_ajax_nonce=666b1c89e1",success:function(msg){jQuery("#msi_"+p).hide();}});}} function reply_profile_comment(id){url='http://www.bobproctornetwork.com/beta/whiteboard-popup.php?u='+id;jQuery.get(url,function(data){jQuery.facebox(jQuery(data).children());},'xml');} function sendmessage(url){jQuery.get(url,function(data){jQuery.facebox(jQuery(data).children());},'xml');} function validate(){jQuery("#validation").empty().hide();jQuery("#validation").html("Following errors have occured.
");isvalidated=true;subject=jQuery("#subject").attr("value");message=jQuery("#message").attr("value");if(typeof(subject)=="undefined"){jQuery("#validation").append("

- Subject is empty.

");isvalidated=false;} if(typeof(message)=="undefined"){jQuery("#validation").append("

- Message is empty.

");isvalidated=false;} if(isvalidated){subject=jQuery.trim(subject);message=jQuery.trim(message);if(subject==""){jQuery("#validation").append("

- Subject is empty.

");isvalidated=false;} if(message==""){jQuery("#validation").append("

- Message is empty.

");isvalidated=false;}} if(!isvalidated){jQuery("#validation").show();return false;} return isvalidated;} function showServerResponse(responseText){text=jQuery.trim(responseText);text_parts=text.substr(0,7);if(text_parts=="__Error"){message=text.split(":");jQuery("#validation").html("Following errors have occured.
");jQuery("#validation").append("

- "+message[1]+"

");jQuery("#validation").show();}else{jQuery("td.sendmessage_container").empty().html("

"+text+"

");}} function submit_message(){if(validate()){str=jQuery("#frm_sendmessage").serialize();jQuery.ajax({type:"POST",url:"bp_ajax.php",data:str,success:function(msg){showServerResponse(msg);}});}}