function doIndex() {
  var which = "animation_index_01.swf";
  //if(document.location.href.substr(0,30)=="http://www.regimac-bonaire.com") which = "animation_index_bonaire.swf";
  if(document.location.href.substr(0,30)=="http://www.regimac-bonaire.com") which = "animation_index_01.swf";
  else if(document.location.href.substr(0,31)=="http://www.regimac-stmartin.com") which = "animation_index_stmarten.swf";
  else if(document.location.href.substr(0,28)=="http://www.regimac-aruba.com") which = "animation_index_aruba.swf";

  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="404" height="268" wmode="transparent"><param name="wmode" value="transparent"><param name="movie" value="images/'+which+'"><param name="quality" value="high"><embed src="images/'+which+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="404" height="268" wmode="transparent"></embed></object>');
}

function fisherYates ( myArray ) {
  var i = myArray.length;
  if ( i == 0 ) return false;
  while ( --i ) {
     var j = Math.floor( Math.random() * ( i + 1 ) );
     var tempi = myArray[i];
     var tempj = myArray[j];
     myArray[i] = tempj;
     myArray[j] = tempi;
   }
}

randArray = new Array("anim_small.swf","anim_small_02.swf");
fisherYates (randArray);

function doFisher(nr) {
  for(i=0;i<nr;i++) {
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="184" height="155" wmode="transparent"><param name="movie" value="images/'+randArray[i]+'"><param name="wmode" value="transparent"><param name="quality" value="high"><embed src="images/'+randArray[i]+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="184" height="155" wmode="transparent"></embed></object>');
  }
}

function findPos(obj) {
	var curleft = curtop = 0;
  var x = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
 //     if(obj.id=="menu") x=1;
 //     if(x==1) {
  			curleft += obj.offsetLeft
  			curtop += obj.offsetTop
 //     }
		}
	}
	return [curleft,curtop];
}
function doDrop(which,posEl) {
  var pos=findPos(posEl);
  frEl = document.getElementById(which);
  //alert(pos[0]+","+pos[1]);
  frEl.style.left = (pos[0]+0)+"px";
  frEl.style.top = (pos[1]+20)+"px";
  frEl.style.display = "block";
}

function noDrop(which){
  frEl = document.getElementById(which);
  frEl.style.display = "none";
}


