if(((navigator.appName=="Microsoft Internet Explorer")||(navigator.appName=="Netscape")) && (navigator.appVersion.substring(0,1)>="4")) {

var photoNum=11;  //Largest Photo index number(0-N)
var ImageString = ""; //The string will show on the screen
var DelayTime = 3000; //Delay time between images

if (photoNum==0) { //if There is just one images
  ImageString = "";
  DelayTime = 900000;
}

var indexNum = new Array(); //temp variable to store the photos index number

//create the random number from 0 to Max.
function getRandom(Max) {
  return Math.round(Max * Math.random());
}

var flag=0;
indexNum[0] = getRandom(photoNum);
for (var i = 1; i <= photoNum; i++) {
  do{
    flag=0;
    indexNum[i] = getRandom(photoNum);
    for(var j=0; j<i; j++){
      if (indexNum[i]==indexNum[j]) {
        flag=1;
        break;
      }
    }
  }while(flag==1);
}

for (var i = 0; i <= photoNum; i++) {
  if (indexNum[i]<10) indexNum[i]="0"+indexNum[i];
}
document.write("<p><applet code=\"srcctx.class\" name=\"Scroll Image\" width=\"272\" height=\"282\" align=\"baseline\" id=\"Scroll Image\"></p>");
document.write("<param name=\"ProgressBar\" value=\"1,Loading Image...\">");
document.write("<param name=\"ApMargin\" value=\"0,0\">");
document.write("<param name=\"ApBorderWidth\" value=\"20\">");
document.write("<param name=\"ApBorderType\" value=\"4\">");
document.write("<param name=\"ApBKImg\" value=\"bigchip5.gif\">");
document.write("<param name=\"ApBKColor\" value=\"000000\">");
document.write("<param name=\"BackMoveSpeed\" value=\"0\">");
document.write("<param name=\"Notice\" value=\"Bin Li, CopyRight (c) 2002, Virginia Tech, 24060, USA, bili1@vt.edu\">");
for (var i = 0; i <= photoNum; i++) {
  document.write("<param name=\"PgBKStyle-" + i + "\" value=\"0,ffffff,photo/" + indexNum[i] + ".jpg,0\">");
  document.write("<param name=\"PgConnStyle-" + i + "\" value=\"" + getRandom(12) + "\">");
  document.write("<param name=\"PgDelay-" + i + "\" value=\"" + DelayTime + "\">");
  document.write("<param name=\"PgURL-" + i + "\" value=\"photo/" + indexNum[i] + ".jpg\">");
  document.write("<param name=\"UrlTarget-" + i + "\" value=\"_blank\">");
  document.write("<param name=\"FontStyle-" + i + "\" value=\"14,t,cc0000,b,"+0+","+0+","+0+","+0+",000000\">");
  document.write("<param name=\"PgText-" + i + "\" value=\"" + ImageString +"\">");
  document.write("<param name=\"PgTextSpeed-" + i + "\" value=\"10\">");
  document.write("<param name=\"PgTextAnimate-" + i + "\" value=\""+getRandom(14)+",3000,0\">");
}
document.write("<param name=\"PgTotal\" value=\"" + photoNum+1 + "\">");
document.write("</applet>");

}
else
{
	document.write("<img src=\"images/bigchip5.jpg\" width=\"272\" height=\"282\">");
}