/* GCA - google custom ads */
var global_google_ads = new Array;
var gca = new Object ;
gca.ad_classes = '' ;
gca.ad_set_classes = '' ;
gca.ad_set_box_classes = '' ;
gca.ad_width = 336 ;
gca.start_pos = 0 ;
gca.ad_style = 1 ;
function google_ad_request_done(google_ads) { // called by google syndication script include
if (google_ads.length == 0) {
return;
}
global_google_ads = google_ads;
return;
}
function gca_process_ad_unit(ad_index) {
var s = '' ;
switch(gca.ad_style) {
case 1 : // vertical -- case 2 to be horizontal
s +=
'
' +
'
';
break ;
case 2 : // horizontal
s +=
'';
break ;
case 3 : // horizontal
s +=
'' +
'' +
global_google_ads[i].line1 +
'' +
global_google_ads[i].line2 +
' ' +
global_google_ads[i].line3 +
'
' +
'' +
global_google_ads[i].visible_url +
'' +
'';
break ;
case 4 : // horizontal
s +=
'';
break ;
}
return s ;
}
function gca_process_ad_units(ad_count) {
var s = '';
var for_start = -1;
var for_end = 0;
if (global_google_ads.length >= gca.start_pos) {
for_start = gca.start_pos;
if (global_google_ads.length >= gca.start_pos+ad_count) {
for_end = gca.start_pos+ad_count ;
gca.start_pos += ad_count ;
} else {
for_end = global_google_ads.length ;
gca.start_pos += global_google_ads.length - gca.start_pos ;
}
}
if (for_start >= 0) {
for(i=for_start; i < for_end; ++i) {
s += gca_process_ad_unit(i) ;
}
}
gca.ad_classes = '' ;
return s ;
}
function gca_display_ad_set(s) {
document.write(s);
}
function gca_display_nav_ad_set(s) {
document.write(s);
}
function gca_process_ad_set_label(s) { //style="padding-bottom:' + gca.ad_container_pad + 'px"
s = '' +
'' +
s +
'
' ;
gca.ad_set_box_classes = '' ; //default for next time
return s ;
}
function gca_process_nav_ad_set_label(s) { //style="padding-bottom:' + gca.ad_container_pad + 'px"
s = '' +
'' ;
gca.ad_set_box_classes = '' ; //default for next time
return s ;
}
function gca_process_ad_set_container(s) {
s = '' +
s +
'
' ;
gca.ad_set_classes = '' ;
return s ;
}
function gca_process_nav_ad_set_container(s) {
s = '' +
s +
'
' ;
gca.ad_set_classes = '' ;
return s ;
}
function create_google_ad_set(ad_count) {
var s = gca_process_ad_units(ad_count) ;
if (s != '') {
s = gca_process_ad_set_label(s);
s = gca_process_ad_set_container(s);
gca_display_ad_set(s);
}
}
function create_google_nav_ad_set(ad_count) {
var s = gca_process_ad_units(ad_count) ;
if (s != '') {
s = gca_process_nav_ad_set_label(s);
s = gca_process_nav_ad_set_container(s);
gca_display_nav_ad_set(s);
}
}