function roll(img,type)
{
		if (type == "on")
			img.src = img.src.replace('_off','_on');
		else if (type == "off")
			img.src = img.src.replace('_on','_off');
}

function rollID(imgID, type)
{
		var obj = (document.layers)?document[imgID]:document.all?document.all[imgID]:document.getElementById(imgID);
	    roll(obj, type);
}

function showGalleryDetail(objAnchor, strDetailID, iNum, strFolder)
{
    var objDetail = (document.layers)?document[strDetailID]:document.all?document.all[strDetailID]:document.getElementById(strDetailID);
    objDetail.src = strFolder + "/hdr" + iNum.toString() + ".jpg";
    
    resetGallery();
    
    var objThumb = objAnchor.firstChild;
    objThumb.onmouseout = function() { rollID(this.id, 'on') };
    objThumb.src = strFolder + "/th" + iNum.toString() + "_on.gif"; 
    
    strCurrentThumbID = objThumb.id; 
}

function resetGallery()
{
    var strThumbID = "";
    for (i = 1; i <= iNumThumbs; i++)
    {
        strThumbID = "th" + i; 
        var objThumb = (document.layers)?document[strThumbID]:document.all?document.all[strThumbID]:document.getElementById(strThumbID);
        
        objThumb.src = objThumb.src.replace("_on", "_off");
        objThumb.onmouseout = function() { rollID(this.id, 'off') };
    }
}

function popCal(id,x,y) {

	link = window.open("/admin/webCal.aspx?id=" + id,"Cal","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=200,height=216,left=" + x + ",top=" + y + ",alwaysRaised=1");
	link.focus();

}