How to flag if a 'webform' exists on a page? I an fairly new to Drupal and have a custom module in which I need to write some PHP logic. It needs to insert a flag basically, on any page which contains a 'webform' of any kind.  

I see the webform api page, but I don't see anything which would just tell me if a webform is on a page.  

I have tried this if statement to insert my little flag - but it is showing on every page.  I assume because drupal calls every page a form?  so technically my code bit is flagging every page?  

if (function_exists(form_id)) {
    $variables['s.event4'] = "event4";
  }


Any help?
This appears to be a preprocess function. If it's hook_preprocess_page(), you can do this:

function hook_preprocess_page(&amp;$variables)
{
  if(isset($variables['node']) &amp;&amp; $variables['node']-&gt;type == 'webform')
  {
    $variables['s.event4'] = "event4";
  }
}