var imagenumber = 4 ;
var rand_old = 0;
var randomnumber = Math.random() ;
var rand1 = Math.round((imagenumber-1) * randomnumber) + 1 ;
images2 = new Array
images2[1] = "http://www.hankooki.com/ad/por_adn4_1.gif"
images2[2] = "http://www.hankooki.com/ad/por_adn4_2.gif"
images2[3] = "http://www.hankooki.com/ad/sgater_han.gif"
images2[4] = "http://www.hankooki.com/ad/surnia_ban.gif"
if(rand_old == 0){
   var image2 = images2[rand1]
  }
else{
   var image2 = images2[rand_old]
}
rand_old = rand1;
links = new Array
links[1] = "http://www.hankooki.com/loop/por_loop_1.htm"
links[2] = "http://www.hankooki.com/loop/por_loop_2.htm"
links[3] = "http://www.hankooki.com/loop/sgater_han.htm"
links[4] = "http://www.hankooki.com/loop/surnia.htm"
var link = links[rand1]
if (rand1 == 2) {
   var ad_script = "<A HREF=" + link + " target=new><IMG SRC=" + image2 + " border=0></a>"
} else {
   var ad_script = "<A HREF=" + link + " target=new><IMG SRC=" + image2 + " border=0></a>"
}  

