var fColor="navy";
var bColor="EBF4FB";

function adx(sborder,slink,sURL,sBG,width,height,format,type)
{
document.write(
'<script>'+
gPosition(width,height,format,type,"")+
gColors(sborder,slink,sURL,sBG)+
'</script><script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
};

function draw_ad(ad_name)
{
 if(adAry[ad_name])document.write(adAry[ad_name]);
}

function draw(sBody)
{
 document.write(sBody);
}

function gad(width,height,format,type,channel)
{
 return(gadx(bColor,fColor,"000000",bColor,width,height,format,type,channel));
}

function gadx(sborder,slink,sURL,sBG,width,height,format,type,channel)
{
return(
'<script>'+
gPosition(width,height,format,type,channel)+
gColors(sborder,slink,sURL,sBG)+
'</script><script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
};

function gPosition(width,height,format,type,channel)
{
  return(
  ' google_ad_width = '+width+
  ';google_ad_height = '+height+
  ';google_ad_format = "'+format+'"'+
  ';google_ad_type = "'+type+'"'+
  ';google_ad_channel ="'+channel+'";'
  );
}

/* google ad settings */
function gColors(sborder,slink,sURL,sBG)
{

return(
 ' google_ad_client = "pub-8649269390130627";'
//+' google_alternate_ad_url = "http://www.boardexplorer.com/alt_ad.html";'
+' google_color_border ="'+sborder+'";' 
+' google_color_link = "'+slink+'";' 
+' google_color_url = "'+sURL+'";' 
+' google_color_bg = "'+sBG+'";' 
);

};



//-------- ad data ---

var adAry=new Array();

adAry['h50050'] = gad(468, 60, "468x60_as", "text_image", "");
adAry['h50050t'] = gad(468, 60, "468x60_as", "text", "");

//google 336X280
adAry['h300300'] = gad(336, 280, "336x280_as", "text_image", "");
//google 336X280
//google 336X280
adAry['h300300g'] = gad(336, 280, "336x280_as", "image", "");
adAry['h300300t'] = gad(336, 280, "336x280_as", "text", "");
adAry['h300300tb'] = gadx("EBF4FB","000000","000000","EBF4FB",336, 280, "336x280_as", "text", "");
//google 2X336X280
adAry['h600300']='<table><tr><td>'+gad(336,280,"336x280_as","text","") +'</td><td>'+gad(336,280,"336x280_as","text","") +'</td></tr></table>';
//google 728X90
adAry['h800100'] = gad(728, 90, "728x90_as", "text_image", "");

//google 728X90
adAry['h800100g'] = gad(728, 90, "728x90_as", "image", "");
adAry['h800100t'] = gad(728, 90, "728x90_as", "text", "");
//ggl 120X600
adAry['v100600'] = gad(120, 600, "120x600_as", "text_image", "");


//ggl 800*15
adAry['h80015']=gad(728,15,"728x15_0ads_al_s","","");

adAry['h1x4'] = gad(336, 280, "336x280_as", "text_image", "");
adAry['1x2'] = gad(120, 240, "120x240_as", "text_image", "");
adAry['1x1_HALF'] = gad(234, 60, "234x60_as", "text_image", "");



function draw800100g()
{
document.write('google_ad_client = "pub-8649269390130627";');
document.write('google_ad_width = 728;');
document.write('google_ad_height = 90;');
document.write('google_ad_format = "728x90_as";');
document.write('google_ad_type = "image";');
document.write('google_ad_channel ="";');
document.write('<script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
}

function hex2str(hex) {
    var str = '';
    for (var i = 0; i < hex.length; i += 2)
        str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
    return str;
}
function go(hexlnk) { lnk = hex2str(hexlnk); window.open(lnk); return (false); }

