How do I get the product id from a product page.

Im writting a plugin, and i need to get the product id from the product page and parse it to a public info funcion.

Anyone as any ideias?

Thanks,