How to stop a custom function?

How to stop a custom function?

If i have a custom function like this:

  1. function logoswitch() { 
  2.   var contentwidth = $('#content_all').width();
  3.   var content_alltop = $('#content_all').css('top'); 
  4.   if ((contentwidth) < '1250' || (content_alltop) > '749'){ 
  5.     $("#logo").hide();$("#logo_small").show(); 
  6.     } else { 
  7.       $("#logo_small").hide();$("#logo").show();
  8.       } 
  9.       } 

I can call the function like this:
  
      logoswitch ();


My question is how can I stop it or undo the call of the function later? To get the state like it's not called.
Is this possibble?

jbobbele