// Java Document
function IsImageOk(img) {
    // During the onload event, IE correctly identifies any images that
    // weren't downloaded as not complete. Others should too. Gecko-based
    // browsers act like NS4 in that they report this incorrectly.
    if (!img.complete) {
        return false;
    }

    // However, they do have two very useful properties: naturalWidth and
    // naturalHeight. These give the true size of the image. If it failed
    // to load, either of these should be zero.
    if (typeof img.naturalWidth != "undefined" && img.naturalWidth == 0) {
        return false;
    }

    // No other way of checking: assume it's ok.
    return true;
}

function checkBadImages()
{
    for (var i = 0; i < document.images.length; i++) {
        if (!IsImageOk(document.images[i])) {
			document.images[i].src = "/Images/build/ImageSoon.jpg";
            //document.images[i].style.visibility = "hidden";
        }
    }
}
//setTimeout("checkBadImages()",4000);

function addToSelect(boxToAdd,displayValue,actualValue,toSelect)
{
	var selectOption = document.createElement('option');
	selectOption.text = displayValue;
	selectOption.value = actualValue;

	if (toSelect == actualValue)
	{
		selectOption.selected = true;
	}
	try {
		boxToAdd.add(selectOption,null);
	}
	catch(ex) {
		boxToAdd.add(selectOption);
	}
}

function popUpHTML(URL,width,height)
{
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+width+",height="+height+",left = 326,top = 182');");
}

function cheese()
{
	alert("cheesy!");
	
}

