
function gad(width,height,format,type,channel,alternate_ad_url)
{
return(
'<script>'+
 gsettings()+
' google_ad_width = '+width+
';google_ad_height = '+height+
';google_ad_format = "'+format+'"'+
';google_ad_type = "'+type+'"'+
';google_alternate_ad_url = "'+alternate_ad_url+'"'+
';google_ad_channel ="'+channel+'";'+
'</script><script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
}



/* google ad settings */
function gsettings()
{
return(
'google_ad_client = "pub-8649269390130627";'
+'google_color_border = "ffffff";'
+'google_color_link = "0000FF";'
+'google_color_url = "008000";'
+'google_color_bg = "ffffff";');
};

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

var adInfos = new Array();

adInfos['default'] = [160, 600];
adInfos['h800100'] = [728, 90];

//adAry['h50050']=gad(160,600,"468x60_as","text","","*");

//google 336X280
//adAry['h300300']=gad(336,280,"336x280_as","text","");
//adAry['h300300']=gad(160,600,"160x600_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","","*");

//ggl 120X600
//adAry['v100600']=gad(120,600,"120x600_as","text","","*");


function draw_ad(ad_name, alternate_ad_url, type, channel)
{
    var adInfo=adInfos[ad_name];
    if (adInfo) 
    {
        var format = adInfo[0] + 'x' + adInfo[1] + '_as';
        alternate_ad_url = alternate_ad_url.replace("@w@", adInfo[0]);
        alternate_ad_url = alternate_ad_url.replace("@h@", adInfo[1]);
        var ad_body = gad(adInfo[0], adInfo[1], format, type, channel, alternate_ad_url);
        document.write(ad_body);
    }
}

function draw_frm(ad_name, alternate_ad_url)
{
    var adInfo=adInfos[ad_name];
    if (adInfo) 
    {
        var ad_body = '<iframe src="' + alternate_ad_url + '" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" frameborder="0" height="@h@" width="@w@" scrolling="no" ></iframe>';
        ad_body = ad_body.replace("@w@", adInfo[0]);
        ad_body = ad_body.replace("@w@", adInfo[0]);
        ad_body = ad_body.replace("@h@", adInfo[1]);
        ad_body = ad_body.replace("@h@", adInfo[1]);        
        document.write(ad_body);
    }
}



function draw(sBody)
{
  drawEx(sBody,"http://www.boardexplorer.com/findgirlfriend.html");
}

function drawEx(sBody,alternate_ad_url)
{
    sBody = sBody.replace("*", alternate_ad_url);
    
 document.write(sBody);
}
