// JavaScript Document

<!--

  var pic=new Array();
       pic[0]="http://www.kcfree.org/images/photo_head/head_image.jpg";
       pic[1]="http://www.kcfree.org/images/photo_head/head_image_01.jpg";
       pic[2]="http://www.kcfree.org/images/photo_head/head_image_02.jpg";
       pic[3]="http://www.kcfree.org/images/photo_head/head_image_03.jpg";
       pic[4]="http://www.kcfree.org/images/photo_head/head_image_04.jpg";
       pic[5]="http://www.kcfree.org/images/photo_head/head_image_05.jpg";
       pic[6]="http://www.kcfree.org/images/photo_head/head_image_06.jpg";
       pic[7]="http://www.kcfree.org/images/photo_head/head_image_07.jpg";
       pic[8]="http://www.kcfree.org/images/photo_head/head_image_08.jpg";
       pic[9]="http://www.kcfree.org/images/photo_head/head_image_09.jpg";
       pic[10]="http://www.kcfree.org/images/photo_head/head_image_10.jpg";
       pic[11]="http://www.kcfree.org/images/photo_head/head_image_11.jpg";
       pic[12]="http://www.kcfree.org/images/photo_head/head_image_12.jpg";
       pic[13]="http://www.kcfree.org/images/photo_head/head_image_13.jpg";
       pic[14]="http://www.kcfree.org/images/photo_head/head_image_14.jpg";
       pic[15]="http://www.kcfree.org/images/photo_head/head_image_15.jpg";

  var num=Math.floor(Math.random()*pic.length);
  
  var ad_pix = new Array();
  var ad_url = new Array();
  ad_pix[0]=new Image();
  ad_pix[0].src="http://www.kcfree.org/images/ads/221x231_ad_01.gif";
  ad_url[0] = new String('http://www.kcfree.org/about/index.html');
  ad_pix[1]=new Image();
  ad_pix[1].src="http://www.kcfree.org/images/ads/01.07_donate.gif";
  ad_url[1] = new String('http://www.kcfree.org/about/donationform.html');
  ad_pix[2]=new Image();
  ad_pix[2].src="http://www.kcfree.org/images/ads/ad-davidgregory.jpg";
  ad_url[2] = new String('http://www.kcfree.org/contact/partners.html');

  
  
  var ad_num=Math.floor(Math.random()*ad_pix.length);

function loadRandomImgs() {
     document.getElementById('head_region_3').style.backgroundImage='url('+pic[num]+')';
	 
	 var ad_box = document.getElementById('ads_box');
	 if(ad_box != null) {
		 ad_box.src = ad_pix[ad_num].src;
	 }
	 
	 var ad_link = document.getElementById('ads_link');
	 if(ad_link != null) {
		 ad_link.href = ad_url[ad_num];
	 }
}