<?php


// yahoo_ads.php
function yahooAds($ad_format) {
global $show_yahoo, $yahoo_pub, $yahoo_channel, $site, $templatefoldername, $sitexml;


if ($show_yahoo == "1") {

switch($ad_format) {

//Text only ads
case "728x90": //Leaderboard
$ad_width = "728";
$ad_height = "90";

break;

case "468x60": //Banner
$ad_width = "468";
$ad_height = "60";
$color_border="FFFFFF";
$color_bg="FFFFFF";
$color_text="000000";
$color_url="000000";
$color_link="1731C1";
break;

case "336x280": //Large Rectangle
$ad_width = "336";
$ad_height = "280";
$color_bg="FFFFFF";
$color_border="FFFFFF";
$color_text="000000";
$color_url="000000";
$color_link="1731C1";
break;

case "300x250": //Medium Rectangle
$ad_width = "300";
$ad_height = "250";
break;

case "250x250": //Square
$ad_width = "250";
$ad_height = "250";
break;

case "234x60": //Half Banner
$ad_width = "234";
$ad_height = "60";
break;

case "180x150": //Small Rectangle
$ad_width = "180";
$ad_height = "150";
break;

case "160x600": //Wide Skyscraper
$ad_width = "160";
$ad_height = "600";
$color_bg="eeeeee";
$color_border="eeeeee";
$color_text="000000";
$color_url="000000";
$color_link="1731C1";
break;


case "120x600": //Skyscraper
$ad_width = "120";
$ad_height = "600";
break;

case "120x240": //Vertical Banner
$ad_width = "120";
$ad_height = "240";
break;
}

$ad =  
"<script type=\"text/javascript\"><!--
ctxt_ad_partner = \"$yahoo_pub\";
ctxt_ad_width = $ad_width;
ctxt_ad_height = $ad_height;

ctxt_ad_section =\"$yahoo_channel\";
ctxt_ad_bc = \"$color_border\";
ctxt_ad_cc = \"$color_bg\";
ctxt_ad_lc = \"$color_link\";
ctxt_ad_uc = \"$color_url\";
ctxt_ad_tc = \"$color_text\";
//--></script>
<script type=\"text/javascript\" src=\"http://ypn-js.overture.com/partner/js/ypn.js\">
</script>";
} else {
$ad = "&nbsp;";
}

return $ad;
}
?>
