function load_main_banner01(){
 var ADPosition = "Ma_Ce_To"
 var ADwidth = 402 //
 var ADheight = 105


 var ADCate = 1
 if (ADwidth == 402 && ADheight == 105) 
    ADCate = 1;
 if (ADwidth == 198 && ADheight == 135) 
    ADCate = 2;
 if (ADwidth == 210 && ADheight == 140) 
    ADCate = 3;
 if (ADwidth == 319 && ADheight == 243) 
    ADCate = 4;
 if (ADwidth == 222 && ADheight == 142) 
    ADCate = 5;
 if (ADwidth == 110 && ADheight == 316) 
    ADCate = 6;
 if (ADwidth == 230 && ADheight == 153) 
    ADCate = 7;
 if (ADwidth == 250 && ADheight == 75) 
    ADCate = 8;
 if (ADwidth == 240 && ADheight == 132) 
    ADCate = 9;
 if (ADwidth == 240 && ADheight == 72) 
    ADCate = 10;
 if (ADPosition == "Fi_Ma_Mi_Re1" || ADPosition == "Fi_Ma_Mi_Re2" || ADPosition == "Fi_Ma_Mi_Re3" || ADPosition == "Fi_Ma_Mi_Re4")
    ADCate = 11;
 if (ADPosition == "lo_Ma_Mi_Ev" || ADPosition =="lo_Ma_Mi_Re" || ADPosition =="lo_Ma_Mi_Ev2" || ADPosition =="lo_Ma_Mi_Re2")  
    ADCate = 12;
 if (ADwidth == 250 && ADheight == 92) 
    ADCate = 13;
 if (ADwidth == 330 && ADheight == 50) 
    ADCate = 14;
 if (ADwidth == 265 && ADheight == 156) 
    ADCate = 20;

 var ADcount = 12
 var weight = new Array()
 var ViewCheck = new Array()
 var LinkURL =  new Array()
 var Source = new Array()
 var Source_Type = new Array()
 
 
 
 weight[0] =12
 weight[1] =16
 weight[2] =16
 weight[3] =16
 weight[4] =0
 weight[5] =0
 weight[6] =1
 weight[7] =1
 weight[8] =1
 weight[9] =1
 weight[10] =6
 weight[11] =6

 
 ViewCheck[0]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=4&category=1&type=1"
 ViewCheck[1]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=3&category=1&type=1"
 ViewCheck[2]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=1&category=1&type=1"
 ViewCheck[3]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=5&category=1&type=1"
 ViewCheck[4]= ""
 ViewCheck[5]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=2&category=1&type=1"
 ViewCheck[6]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=6&category=1&type=1"
 ViewCheck[7]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=6&category=1&type=1"
 ViewCheck[8]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=6&category=1&type=1"
 ViewCheck[9]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=6&category=1&type=1"
 ViewCheck[10]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=8&category=1&type=1"
 ViewCheck[11]= ""


 LinkURL[0]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=4&category=1&type=2&href=flash"
 LinkURL[1]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=3&category=1&type=2&href=ok"  
 LinkURL[2]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=1&category=1&type=2&href=ok"  
 LinkURL[3]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=5&category=1&type=2&href=ok"                            
 LinkURL[4]= "http://www.creditbank.co.kr/r_jsp/loan/cpa/kamco_cpa1.jsp target=_blank"    
 LinkURL[5]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=2&category=1&type=2&href=ok"     
 LinkURL[6]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=6&category=1&type=2&href=ok"
 LinkURL[7]= "/FC.fc?CMD=CMD_SEQ_103557280831211612848182&menuid=credit"
 LinkURL[8]= "/FC.fc?CMD=CMD_SEQ_100049231941211613537399&menuid=name"
 LinkURL[9]= "/FC.fc?CMD=CMD_SEQ_109885481901207898517345&initPage=teen_body"
 LinkURL[10]= "http://credit.bpoolad.com/credit/set_credit.jsp?sponsor=8&category=1&type=2&href=ok target=_blank"
 LinkURL[11]= "http://www.creditbank.co.kr/FC.fc?CMD=CMD_SEQ_103142924271227155488867&menuid=customer_event&center"

 
 Source[0]= "http://image.creditbank.co.kr/static/img/ad/creditbank/hdcapital/"+ADPosition+"_hdcapital_"+ ADwidth+"x"+ADheight+".gif"
 Source[1]= "http://image.creditbank.co.kr/static/img/ad/creditbank/citif/"+ADPosition+"_citif_"+ ADwidth+"x"+ADheight+".gif"
 Source[2]= "http://image.creditbank.co.kr/static/img/ad/creditbank/hdswiss/"+ADPosition+"_hdswiss_"+ADwidth+"x"+ADheight+".gif"
 Source[3]= "http://image.creditbank.co.kr/static/img/ad/creditbank/with/"+ADPosition+"_with_"+ADwidth+"x"+ADheight+".gif"
 Source[4]= "http://image.creditbank.co.kr/static/img/ad/creditbank/kamco/20100105_kamco_402105.gif"
 Source[5]= "http://image.creditbank.co.kr/static/img/ad/creditbank/wbank/"+ADPosition+"_wbank_"+ADwidth+"x"+ADheight+".gif"
 Source[6]= "http://image.creditbank.co.kr/static/img/ad/creditbank/loancheck/"+ADPosition+"_loancheck_"+ADwidth+"x"+ADheight+".gif"
 Source[7]= "http://image.creditbank.co.kr/static/img/ad/creditbank/CBservice/credit_"+ADwidth+"x"+ADheight+".gif"
 Source[8]= "http://image.creditbank.co.kr/static/img/ad/creditbank/CBservice/idcare_"+ADwidth+"x"+ADheight+".gif"
 Source[9]= "http://image.creditbank.co.kr/static/img/ad/creditbank/CBservice/teen_"+ADwidth+"x"+ADheight+".gif"
 Source[10]= "http://image.creditbank.co.kr/static/img/ad/creditbank/hdcapitalmortgage/"+ADPosition+"_hdcapital_"+ ADwidth+"x"+ADheight+".gif"
 Source[11]= "http://image.creditbank.co.kr/static/img/ad/creditbank/CBservice/mainAD_credit01.swf"
 
 Source_Type[0] = "img"
 Source_Type[1] = "img"
 Source_Type[2] = "img"
 Source_Type[3] = "img"
 Source_Type[4] = "img"
 Source_Type[5] = "img"
 Source_Type[6] = "img"
 Source_Type[7] = "img"
 Source_Type[8] = "img"
 Source_Type[9] = "img"
 Source_Type[10] = "img"
 Source_Type[11] = "flash"

  var ActCount = 4
//======= ¸ÞÀÎ Áß¾Ó ¹è³Ê ¹× ¸ÞÀÎ ¿ìÃø »ó´Ü ¹è³Ê¿¡¸¸ Àû¿ëµÇ´Â ºÎºÐÀÔ´Ï´Ù.========
//======= 86400000 = 1000*60*60*24\
   var date1 = new Date();
   var date2 = new Date();
   date2.setMonth(0);
   date2.setDate(1);
   var date1_ms= date1.getTime();
   var date2_ms= date2.getTime();
   var difference_ms= Math.abs(date1.getTime() - date2.getTime());
   var dates = Math.round(difference_ms/86400000); 
   var newidx = dates % eval(ActCount);
//== ÇÏ·ç¹è³Ê»©°í ·Ñ¸µ
   for (i=0;i<eval(ADcount);i++)
    {
        if (newidx == i) 
            weight[i]=0;
    }
//===================================================

  var Mran =  Math.random();
 var a = Math.floor(Mran*100);
 var weightSum = 0
 if (a=='0') 
    a = '1' 
  for (i=0;i<eval(ADcount);i++)   
    weightSum = weightSum + weight[i];
 
 var weightRate = new Array()
 for (i=0;i<eval(ADcount);i++)
 { 
 weightRate[i] = Math.round((weight[i]/weightSum)*100)
 }
 

 
 var weightBoMin = 0
 var weightBoMax = weightRate[0]

 for (i=0;i<eval(ADcount);i++)
 { 
     if (i!=0) 
      {  
        weightBoMin = weightBoMin + weightRate[i-1]
        weightBoMax = weightBoMin + weightRate[i]
        }
     if (eval(a) > eval(weightBoMin) && eval(a) <= eval(weightBoMax)) 
        var idx = i ;
 }
 var Source_path = Source[idx]
var strBanner ="";

// strBanner = '';

if (Source_Type[idx] == "flash")
strBanner = strBanner + '<img src=' +ViewCheck[idx]+ ' width=0 height=0 border=0 ><OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 width='+ ADwidth +' height='+ADheight+' ><PARAM NAME=movie VALUE='+Source[idx]+'><PARAM NAME=AllowScriptAccess VALUE=always><PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src='+Source[idx]+' allowScriptAccess=always menu=false quality=high bgcolor=#FFFFFF width='+ADwidth+' height='+ADheight+' TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>';

if (Source_Type[idx] == "img")
strBanner = strBanner + '<img src=' +ViewCheck[idx]+ ' width=0 height=0 border=0 ><A HREF='+LinkURL[idx]+'><IMG SRC='+Source[idx]+' width='+ ADwidth +' height='+ ADheight +' BORDER=0></a>';

if (Source_Type[idx] == "txt")
strBanner = strBanner + '<table width='+ ADwidth +' height='+ADheight+' border=1><tr><td><A HREF='+LinkURL[idx]+' >'+Source[idx]+'</a></td></tr></table>';

document.getElementById("main_banner01").innerHTML = strBanner;

}
