
function google_ad_request_done(google_ads) {

//document.write("ttt");

/*
* 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) {
return;
}

/*
* If an image 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.
*/

s = '<table width=100% border=0 cellpadding=0 cellspacing=0><tr><td>';

// --------------  송 : 광고Type이 이미지일 경우
if (google_ads[0].type == "image") {


   //s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000">Google Adsense</a>' + 
   s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000" target="_blank"><span style=\"display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://pagead2.googlesyndication.com/pagead/abglogo/abg-ko-100c-000000.png\');height:16px;width:69px\"><img alt=\"Google 광고\" border=0 height=16 src=http://pagead2.googlesyndication.com/pagead/abglogo/abg-ko-100c-000000.png style=filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0) width=69></span></a>' + 

'<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>';


} else {// 송 : 광고 Type이 이미지가 아니면 

//송 : 광고가 딱 하나이면 
if (google_ads.length == 1) {
/*
* Partners should adjust text sizes
* so ads occupy the majority of ad space.
*/
   s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000" target="_blank"><span style=\"display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://pagead2.googlesyndication.com/pagead/abglogo/abg-ko-100c-000000.png\');height:16px;width:69px\"><img alt=\"Google 광고\" border=0 height=16 src=http://pagead2.googlesyndication.com/pagead/abglogo/abg-ko-100c-000000.png style=filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0) width=69></span></a>' + 

'<a href="' + google_ads[0].url + '" ' +
'onmouseout="window.status=\'\'" ' +
'onmouseover="window.status=\'go to ' +
google_ads[0].visible_url + '\'" ' +
'style="text-decoration:none" target="_blank">' +
'<span style="text-decoration:underline;font-size:10pt;font-family:굴림;color:#0000ff;">' +

'<b>' + google_ads[0].line1 + '</b><br></span>' + 
'<span style="color:#7DAD3C;font-size:7pt;font-family:Arial">' +
google_ads[0].line2 + '&nbsp;' +
google_ads[0].line3 + '<br></span>' +
'<span style="color:#6B6B6B;font-size:10pt;font-family:굴림">' +
google_ads[0].visible_url + '</span></a><br>';


//송 :광고가 하나 이상이면 
} else if (google_ads.length > 1) {

//송 : 상단의 [Google 광고] 이미지를 빼려면 아래를 주석처리하면 된다 
   
   s += '<h3 style="padding:10px 0 5px 10px;"><a href=\"' + google_info.feedback_url + '\" style="color:000000;cursor:pointer;" target="_blank"><span style=\"display:inline-block;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://pagead2.googlesyndication.com/pagead/abglogo/abg-ko-100c-000000.png\');height:16px;width:69px\"><img alt=\"Google 광고\" border=0 height=16 src=http://pagead2.googlesyndication.com/pagead/abglogo/abg-ko-100c-000000.png style=filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0) width=69></span></a></h3>' 

  /*
  * For text ads, append each ad to the string.
  */


/**
송 : 원하는 요소대로 하단의 html을 바꾸면 된다
**/




s += '<dl style="margin-top:5px">';

for(i = 0; i < google_ads.length; ++i) {

s += '<dd><a href="' + google_ads[i].url + '" ' + 
'onmouseout="window.status=\'\'" ' +
'onmouseover="window.status=\'go to ' +
google_ads[i].visible_url + '\'" ' +
' target="_blank">' +
'<em>' +  //광고제목 부분
'' + google_ads[i].line1 + '' +
'</em></a> <span class=bar>|</span> ' +
'<a href="' + google_ads[i].url + '" class="sponlnk"> '   + google_ads[i].visible_url + '</a>' + //제목옆의 URL부분 
'<br>' +
'' + //제목밑의 설명 부분 
google_ads[i].line2 + 
google_ads[i].line3 + '</dd>';

}

s += '</dl>';

s += '</td></tr></table>';


   }

    }

    document.write(s);  
    
    google_ads = null ;
    return;
  }
  
  
  
  
/**********   전역 변수 설정 부분 ***********************************************/

google_ad_client = 'pub-5528538072233445'; // substitute your client_id (pub-#) (송)
google_ad_channel = '';
google_ad_output = 'js';
google_max_num_ads = '2'; //게시하고 싶은 광고의 숫자 
google_ad_type = 'text_image';
//google_image_size = '468x60';  (송)
google_image_size = '1024x768';
google_feedback = 'on';



