Pay-Per-Click: Strategies for Cost-Effective Online Advertising