function date_select() {
    var currentTime = new Date();
    var month = currentTime.getMonth() + 1;
    var day = currentTime.getDate();
    var year = currentTime.getFullYear(); 
    //alert (day + '/' + month + '/' + year);
    
    document.write ('D <select name="dd" >');
    for (i=1;i<=31;i++) {
       if (i == day) {
         document.write ('<option value="'+i+'" selected>'+i+'</option>');
       } else {
         document.write ('<option value="'+i+'" >'+i+'</option>'); 
       }
    }
    document.write ('</select>&nbsp;');
    
    document.write ('&nbsp;M <select name="mm" >');
    for (i=1;i<=12;i++) {
       if (i == month) {
         document.write ('<option value="'+i+'" selected>'+i+'</option>');
       } else {
         document.write ('<option value="'+i+'" >'+i+'</option>'); 
       }
    }
    document.write ('</select>&nbsp;');  
    
    document.write ('&nbsp; <select name="yyyy" >');
    for (i=year;i<=year+5;i++) {
       if (i == year) {
         document.write ('<option value="'+i+'" selected>'+i+'</option>');
       } else {
         document.write ('<option value="'+i+'" >'+i+'</option>'); 
       }
    }
    document.write ('</select>');  


}
var current_comment = 0;

function next_comment() {
     current_comment = current_comment + 1;
     if (current_comment > 21) { current_comment = 1; }
     var imgname = 'comment' + current_comment + '.gif';
     var imgsrc = "http://www.drivingcreekvillas.com/img/comments/"+imgname;
     
     if (document.images) {
        document['comment_img'].src = imgsrc;
     }
     setTimeout("next_comment();", 5000);
}

function comment_select() {
     var current_comment = randomnumber=Math.floor(Math.random()*20) + 1;
     
     var imgname = 'comment' + current_comment + '.gif';
     document.write ('<img name="comment_img" src="http://www.drivingcreekvillas.com/img/comments/'+imgname+'">');
     document.write ('<script>setTimeout("next_comment();", 5000);</script>');
      
}
