var loc = String(window.location);
var dom = String(document.domain);

function comic_option( comic_name, comic_url ) {
  return '<option value="http://www.platinumstudios.com/processing/track_hat_click.php?url='+comic_url+'" '+( (loc.substr(0, comic_url.length) == comic_url) ? 'SELECTED' : '' )+'>'+comic_name+'</option>';
}
function site_option( site_name, site_url ) {
  return '<option value="http://www.platinumstudios.com/processing/track_hat_click.php?url='+site_url+'" '+( (dom==String(site_url).substr(7))?'SELECTED':'' )+'>'+site_name+'</option>';
}
// onChange="window.open(this.options[this.selectedIndex].value,\'_top\');"
// onChange="window.open(\'http://www.platinumstudios.com/track_hat_click.php?url='+this.options[this.selectedIndex].value+'\', \'_top\');"
document.write('<div style="overflow:hidden;height:21px;width:100%;background:url(http://www.platinumstudios.com/processing/gfx/bg_fill.gif);" align="center">'+
'<div style="margin:0 auto;">' +
  '<table border="0" cellpadding="0" cellspacing="0" align="center">'+
    '<tr>'+
      '<td align="left" width="184" valign="top"><a href="http://www.platinumstudios.com/processing/track_hat_click.php?url=http://www.platinumstudios.com"><img src="http://www.platinumstudios.com/processing/gfx/logo.gif" border="0"></a></td>'+

      '<td align="left" width="10" valign="top" background="http://www.platinumstudios.com/processing/gfx/bg_fill_2.gif">'+
        '<select onChange="window.open(this.options[this.selectedIndex].value,\'_top\');" name="ps_hat_site" id="ps_hat_site" style="background:#424242;border:0px;color:#ffffff;font-size:9px;margin-top:1px;">'+
//          site_option( 'Gunplay', 'http://www.gunplaythecomic.com' )+
          site_option( 'Platinum Studios', 'http://www.platinumstudios.com' )+
          site_option( 'Platinum Studios Comics', 'http://www.platinumstudioscomics.com' )+
          site_option( 'Platinum Studios Store', 'http://store.platinumstudios.com' )+
          site_option( 'Comic Book Challenge', 'http://www.comicbookchallenge.com' )+
          site_option( 'DrunkDuck.com', 'http://www.drunkduck.com' )+
          //site_option( '&nbsp;&nbsp;DrunkDuck Forums', 'http://www.drunkduck.com/community/' )+
          site_option( 'Kiss Comics Group', 'http://www.kisscomicsgroup.com' )+
          site_option( 'PT78 Mobile', 'http://www.pt78mobile.com' )+
          site_option( 'Wowio', 'http://www.wowio.com' )+
        '</select>'+
      '</td>'+

      '<td align="left" width="5" valign="top"><img src="http://www.platinumstudios.com/processing/gfx/cap_right.gif"></td>'+

      '<td align="left" width="47" valign="top"><img src="http://www.platinumstudios.com/processing/gfx/tab_comics.gif"></td>'+

      '<td align="left" width="10" valign="top" background="http://www.platinumstudios.com/processing/gfx/bg_fill_2.gif">'+
          '<select onChange="window.open(this.options[this.selectedIndex].value,\'_top\');" name="ps_hat_comic" id="ps_hat_comic" style="background:#424242;border:0px;color:#ffffff;font-size:9px;margin-top:1px;">'+
            comic_option('Select',            loc)+
            comic_option('Alien At Large',                    'http://www.drunkduck.com/Alien_At_Large/')+
            comic_option('Alien Circus',                      'http://www.drunkduck.com/Alien_Circus/')+
            comic_option('Atlantis Rising',                   'http://www.drunkduck.com/Atlantis_Rising/')+
            comic_option('Bird and Worm',                     'http://www.drunkduck.com/Bird_and_Worm/')+
            comic_option('Blood Nation',                      'http://www.drunkduck.com/Blood_Nation/')+
            comic_option('Consumed',                          'http://www.drunkduck.com/Consumed/')+
            comic_option('Cowboys & Aliens',                  'http://www.drunkduck.com/CowboysAndAliens/')+
            comic_option('Cowboys & Aliens II',               'http://www.drunkduck.com/Cowboys_and_Aliens_II/')+
            comic_option('Ghosting',                          'http://www.drunkduck.com/Ghosting/')+
            comic_option('Hero by Night',                     'http://www.drunkduck.com/Hero_By_Night/')+
            comic_option('Incursion',                         'http://www.drunkduck.com/Incursion/')+
            comic_option('KISS4k Webcomic',                   'http://www.drunkduck.com/KISS_4K_the_webcomic/')+
            comic_option('Lesbian Pirates from Outer Space',  'http://www.drunkduck.com/I_Was_Kidnapped_By_Lesbian_Pirates_From_Outer_Space/')+
            comic_option('Love Bytes',                        'http://www.drunkduck.com/Love_Bytes/')+
            comic_option('Nightfall',                         'http://www.drunkduck.com/Nightfall_GN/')+
            comic_option('Red Mantis',                        'http://www.drunkduck.com/Red_Mantis/')+
            comic_option('Super Larry',                       'http://www.drunkduck.com/Super_Larry/')+
            comic_option('The Weapon',                        'http://www.drunkduck.com/The_Weapon/')+
            comic_option('Unique',                            'http://www.drunkduck.com/Unique/')+
            comic_option('Watchdogs',                         'http://www.drunkduck.com/watchdogs/')+
          '</select>'+
      '</td>'+

      '<td align="left" width="5" valign="top"><img src="http://www.platinumstudios.com/processing/gfx/cap_right.gif"></td>'+

      '<td align="left" width="47" valign="top"><img src="http://www.platinumstudios.com/processing/gfx/tab_search.gif"></td>'+

      '<td align="left" width="150" valign="top" background="http://www.platinumstudios.com/processing/gfx/bg_fill_2.gif">'+

        '<form method="get" action="http://www.google.com/custom" target="_top">'+
        '<input type="hidden" name="domains" value="'+document.domain+'"></input>'+
        '<input type="text" name="q" style="width:150px;background:#ffffff;border:0px;color:#919191;font-size:9px;margin-top:1px;padding-left:5px;" maxlength="255" value="" id="sbi"></input>'+
        '<input type="hidden" name="sitesearch" value="'+document.domain+'">'+
        '<input type="hidden" name="client" value="pub-2149547298462648"></input>'+
        '<input type="hidden" name="forid" value="1"></input>'+
        '<input type="hidden" name="ie" value="ISO-8859-1"></input>'+
        '<input type="hidden" name="oe" value="ISO-8859-1"></input>'+
        '<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>'+
        '<input type="hidden" name="hl" value="en"></input>'+
        '</form>'+

      '</td>'+

      '<td align="left" width="5" valign="top"><img src="http://www.platinumstudios.com/processing/gfx/cap_right.gif"></td>'+

    '</tr>'+
  '</table>'+
'</div>' +
  
'</div>');

// document.url
// document.domain
