<!--
function decode_utf8(utftext) {
                var string = "";
                var i = 0;
                var c = c1 = c2 = 0;
                var agt=navigator.userAgent.toLowerCase();
		if (typeof(test)!="undefined")
		{
                if ((agt.indexOf("safari") != -1) ||  (agt.indexOf("msie") != -1)) 
                {
                while ( i < utftext.length ) {
 
                        c = utftext.charCodeAt(i);
 
                        if (c < 128) {
                                string += String.fromCharCode(c);
                                i++;
                        }
                        else if((c > 191) && (c < 224)) {
                                c2 = utftext.charCodeAt(i+1);
                                string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
                                i += 2;
                        }
                        else {
                                c2 = utftext.charCodeAt(i+1);
                                c3 = utftext.charCodeAt(i+2);
                                string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                                i += 3;
                        }

                }
                }
                else
                {
                return utftext;
                }
		}
		else
		{
		return utftext;
		}
                return string;
        }

function google_ad_request_done(google_ads) {
/*
* This function is required and is used to display
* the ads that are returned from the JavaScript
* request. You should modify the document.write
* commands so that the HTML they write out fits
* with your desired ad layout.
*/
var s = '';
var i;

/*
* Verify that there are actually ads to display.
*/
if (google_ads.length == 0) {
s+='<td style="padding:10px 10px 0 10px;background-color:#F0EEE8;" valign="top"><center>&nbsp;</center></td>';
document.write(s);
return;

}

/*
* If an image or flash ad is returned, display that ad.
* Otherwise, build a string containing all of the ads and
* then use a document.write() command to print that string.
*/

if (google_ads[0].type == "flash") {

   s += '<td style="padding:10px 10px 0 10px;background-color:#F0EEE8;" valign="top"><center><a href=\"' + google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br>' + 
'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"' +
' WIDTH="' + google_ad.image_width +
'" HEIGHT="' + google_ad.image_height + '">' +
'<PARAM NAME="movie" VALUE="' + google_ad.image_url + '">'
'<PARAM NAME="quality" VALUE="high">'
'<PARAM NAME="AllowScriptAccess" VALUE="never">'
'<EMBED src="' + google_ad.image_url +
'" WIDTH="' + google_ad.image_width +
'" HEIGHT="' + google_ad.image_height + 
'" TYPE="application/x-shockwave-flash"' + 
' AllowScriptAccess="never" ' + 
' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></center></td>';


} else if (google_ads[0].type == "image") {

   s += '<td style="padding:10px 10px 0 10px;background-color:#F0EEE8;" valign="top"><center><div class="googlelinkback"><a href=\"' + google_info.feedback_url + '\">Ads by Google</a></div>' +
'<a href="' + google_ads[0].url +
'" target="_top" title="go to ' + google_ads[0].visible_url +
'"><img border="0" src="' + google_ads[0].image_url +
'"width="' + google_ads[0].image_width + 
'"height="' + google_ads[0].image_height + '"></a></center><br /></td>';

} else {

if (google_ads.length == 1) {
/*
* Partners should adjust text sizes
* so ads occupy the majority of ad space.
*/
/*
line1=decode_utf8(google_ads[0].line1);
line2=decode_utf8(google_ads[0].line2);
line3=decode_utf8(google_ads[0].line3);
*/
line1=google_ads[0].line1;
line2=google_ads[0].line2;
line3=google_ads[0].line3;

   s += '<td style="padding:0px 10px 10px 10px;background-color:#FFFFFF;" valign="top"><center><div class="googlelinkback"><a href=\"' + google_info.feedback_url + 
'\">Ads by Google</a></div>' + 
'<a href="' + google_ads[0].url + '" ' +
'onmouseout="window.status=\'\'" ' +
'onmouseover="window.status=\'go to ' +
google_ads[0].visible_url + '\'" ' +
'style="text-decoration:none">' +
'<span style="text-decoration:underline;font-size:16pt">' +
'<b>' + line1 + '</b><br></span></a>' + 
'<span style="color:#000000;font-size:12pt">' +
line2 + '&nbsp;' +
line3 + '<br></span>' +
'<a href="' + google_ads[0].url + '" ' +
'onmouseout="window.status=\'\'" ' +
'onmouseover="window.status=\'go to ' +
google_ads[0].visible_url + '\'" ' +
'style="text-decoration:none;color:#008000;font-size:10pt">' +
google_ads[0].visible_url + '</a></center></td>';

} else if (google_ads.length > 1) {
  /*
* For text ads, append each ad to the string.
  */
for(i = 0; i < google_ads.length; i++) {

if (i == 0) {
/*
line1=decode_utf8(google_ads[i].line1);
line2=decode_utf8(google_ads[i].line2);
line3=decode_utf8(google_ads[i].line3);
*/
line1=google_ads[i].line1;
line2=google_ads[i].line2;
line3=google_ads[i].line3;

   s += '<td style="padding:10px 10px 0 10px;background-color:#FFFFFF; " width="33%" valign="top">' + 
'<a href="' + google_ads[i].url + '" ' + 
'onmouseout="window.status=\'\'" ' +
'onmouseover="window.status=\'go to ' +
google_ads[i].visible_url + '\'" ' +
'style="text-decoration:none">' +
'<span style="text-decoration:none">' +
'<b>' + line1 + '</b><br></span></a>' + 
'<span style="color:#000000">' +
line2 + '<br>' +
line3 + '<br></span>' +
'<a href="' + google_ads[i].url + '" ' + 
'onmouseout="window.status=\'\'" ' +
'onmouseover="window.status=\'go to ' +
google_ads[i].visible_url + '\'" ' +
'style="text-decoration:none;color:#008000">' +
google_ads[i].visible_url + '</a></td>';

} else if (i > 0) {
/*
line1=decode_utf8(google_ads[i].line1);
line2=decode_utf8(google_ads[i].line2);
line3=decode_utf8(google_ads[i].line3);
*/
line1=google_ads[i].line1;
line2=google_ads[i].line2;
line3=google_ads[i].line3;

   s += '<td style="padding:10px 10px 0 10px;background-color:#FFFFFF; " valign="top" width="33%"><a href="' + google_ads[i].url + '" ' +
'onmouseout="window.status=\'\'" ' + 
'onmouseover="window.status=\'go to ' + 
google_ads[i].visible_url + '\'" ' + 
'style="text-decoration:none">' + 
'<span style="text-decoration:none">' + 
'<b>' + line1 + '</b><br></span></a>' + 
'<span style="color:#000000">' + 
line2 + '<br>' + 
line3 + '<br></span>' + 
'<a href="' + google_ads[i].url + '" ' +
'onmouseout="window.status=\'\'" ' + 
'onmouseover="window.status=\'go to ' + 
google_ads[i].visible_url + '\'" ' + 
'style="text-decoration:none;color:#008000">' + 
google_ads[i].visible_url + '</a>';
s += '</td>'; 
}


        }
s += '</tr><tr><td colspan=' + google_ads.length + ' style="padding:0;background-color:#FFFFFF; "><center><div class="googlelinkback"><a href=\"' + google_info.feedback_url + '\">Ads by Google</a></center></div></td>';

      }
    }

    document.write(s);
    return;
  }

// -->
