// In this section we set up the content to be placed dynamically on the page.
// Customize movie tags and alternate html content below.

var ads = new adArray(
"images/home_images/image01.gif","",
"images/home_images/image02.gif","",
"images/home_images/image03.gif","",
"images/home_images/image04.gif","");
var ad_num = getAdNum(); 

//link_num = document.links.length-1;


function adArray() {
 for (i=0; i*2<adArray.arguments.length; i++) {
  this[i] = new Object();
  this[i].src = adArray.arguments[i*2];
  this[i].href = adArray.arguments[i*2+1];
 }
 this.length = i;
}
function getAdNum() {
 dat = new Date();
 dat = (dat.getTime()+"").charAt(8);
 if (dat.length == 1)
  ad_num = dat%ads.length;
 else
  ad_num = 0;
 return ad_num;
}

function rotateSponsor() {
 if (document.images) {
  ad_num = (ad_num+1)%ads.length;
  document.js_ad.src = ads[ad_num].src;
  setTimeout("rotateSponsor()",20000);
 }
}

/* if (!useRedirect) {    // if dynamic embedding is turned on
 
	//document.write('<tr><td>' + hasRightVersion + '</td></tr>');
 
	if(hasRightVersion) {  // if we've detected an acceptable version
   
		var oeTags = '<td width="147" height="225"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    
			+ 'WIDTH="147" HEIGHT="225" ID="LOADER"'
    
			+ 'CODEBASE="../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0/default.htm">'
    
			+ '<PARAM NAME="MOVIE" VALUE="../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
    
			+ '<PARAM NAME="QUALITY" VALUE="high">'
    + '<PARAM NAME="BGCOLOR" VALUE="#6981A7">'
    
			+ '<EMBED SRC="loader.swf@filename=.legal.ini"'
    
			+ 'WIDTH="147" HEIGHT="225"'
    + 'BGCOLOR="#6981A7"'
    
			+ 'QUALITY="high"'
    + 'NAME="loader"'
    
			+ 'TYPE="application/x-shockwave-flash"'
    
			+ 'PLUGINSPAGE="../www.macromedia.com/go/getflashplayer">'
    
			+ '</EMBED>'
    
			+ '</object></td>';
	
    
		document.write(oeTags);   // embed the flash movie
 
	} else {  // flash is too old or we can't detect the plugin
   
		// NOTE: height, width are required!
	
	
		
	
    
		var alternateContent = '<td width="147" height="225"><img src="'+ads[ad_num].src+'" '
								 + 'width="147" height="225" border="0" name="js_ad"></td>' 
	
		//document.write('<tr><td>rotating gif</td></tr>');
   
		document.write(alternateContent);  
		// insert non-flash content
 
	}

} */

//delete these lines and uncomment above if construct when ready to use flash

		setTimeout("rotateSponsor()",20000);
		var alternateContent = '<td width="147" height="225"><img src="'+ads[ad_num].src+'" '
								 + 'width="147" height="225" border="0" name="js_ad"></td>' 
		document.write(alternateContent);  