window.defaultStatus='';

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0;
i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image;
d.p[j++].src=a[i];}}
}

var checkflag = "false";
function check(field,start,end) {

	if (checkflag == "false") {
		for (i = start; i < end; i++) {
			field[i].checked = true;
		}
		checkflag = "true";
		return "Uncheck All";
	}
	else {
		for (i = start; i < end; i++) {
			field[i].checked = false;
		}
		checkflag = "false";
		return "Check All";
	}
}

var popWin = null
var winCount = 0
var winName = "hustlePop"
window.self.name = "main"
function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
  var d_winLeft = 20
  var d_winTop = 20
  winName = "popWin" + winCount++
  closePopWin()
  if (openPopWin.arguments.length >= 4)
    winFeatures = "," + winFeatures
  else
    winFeatures = ""
  if (openPopWin.arguments.length == 6)
    winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
  else
    winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)
  popWin = window.open(winURL, winName, "width=" + winWidth
           + ",height=" + winHeight + winFeatures)
}
function closePopWin(){
  if (navigator.appName != "Microsoft Internet Explorer"
      || parseInt(navigator.appVersion) >=4)
    if(popWin != null) if(!popWin.closed) popWin.close()
}
function getLocation(winWidth, winHeight, winLeft, winTop){
  var winLocation = ""
  if (winLeft < 0)
    winLeft = screen.width - winWidth + winLeft
  if (winTop < 0)
    winTop = screen.height - winHeight + winTop
  if (winTop == "cen")
    winTop = (screen.height - winHeight)/2 - 20
  if (winLeft == "cen")
    winLeft = (screen.width - winWidth)/2
  if (winLeft>0 &winTop>0)
    winLocation =  ",screenX=" + winLeft + ",left=" + winLeft
                + ",screenY=" + winTop + ",top=" + winTop
  else
    winLocation = ""
  return winLocation
}

nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }

    clearTimeout(nereidFadeTimers[object.sourceIndex]);

    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
