<!--  

function randRange(nMinNumber, nMaxNumber) 
{
    return Math.floor(Math.random() * (nMaxNumber - nMinNumber + 1)) + nMinNumber;
}

function ClosePopupForm()
{
    var pPopupForm = getObject("PopupForm");
    if (pPopupForm)
    {
        document.body.removeChild(pPopupForm);
        hideFixMSIE();
    }
}

function ShowImageGalleryPopup()
{
    ClosePopupForm();
    
    pPopupForm = document.createElement('DIV');	
	pPopupForm.id = 'PopupForm';
    pPopupForm.className = 'imagegallerypopupform';
    pPopupForm.style.zIndex = '100';
    
	var dToday = new Date();
	var nDay = dToday.getDate();    
    var nMonth = dToday.getMonth()
    
    var expdate = dToday.getTime();
    expdate -= 1000*60*60*24; //expires in 1 day(milliseconds) 
    dToday.setTime(expdate);
    var nDayYesterday = dToday.getDate();
    expdate -= 1000*60*60*24; //expires in 1 day(milliseconds) 
    dToday.setTime(expdate);
    var nDayBeforeYesterday = dToday.getDate();

    // alert(nDay + ' : ' + nDayYesterday + ' : ' + nDayBeforeYesterday);
	if(nMonth % 2)
	{
		nDay += 31;	
        nDayYesterday += 31;
        nDayBeforeYesterday += 31;
	}
	
    // strImageFileName = arImages[nDay - 1];
    strImageFileNameToday = nDay + '.jpg';  
    strImageFileNameYesterday = nDayYesterday + '.jpg';
    strImageFileNameBeforeYesterday = nDayBeforeYesterday + '.jpg'; 
    
	pPopupForm.innerHTML = '<div class="imagegallerytitle"><div><img src="../images/imagegallery/close.gif" onclick="ClosePopupForm();" style="cursor:pointer;"></div><div class="containercontent"><a href="#" onclick="swapImg(\'' + strImageFileNameBeforeYesterday + '\');">two days ago</a> &nbsp; <a href="#" onclick="swapImg(\'' + strImageFileNameYesterday + '\')">yesterday</a> &nbsp; <a href="#" onclick="swapImg(\'' + strImageFileNameToday + '\')">today</a> &nbsp;</div><div><img src="../images/pixel.gif"></div><img id="shsgalleryimg" src="../imagegallery/' + strImageFileNameToday + '"></div>';        

    
	document.body.appendChild(pPopupForm); 
    
    var x = (getFrameWidth() / 2) - 200 + getScrollX();
    var y = (getFrameHeight() / 2) - 200 + getScrollY();   
              
    pPopupForm.style.top = y + 'px';
    pPopupForm.style.left = x + 'px';
    
    resizeFixMSIE('PopupForm');
}

function swapImg(strImgName)
{                         
    
    getObject('shsgalleryimg').src = '/imagegallery/' +strImgName;                     
}

function PopupPosition()
{
    var x = (getFrameWidth() / 2) - 200 + getScrollX();
    var y = (getFrameHeight() / 2) - 200 + getScrollY();   
              
    pPopupForm.style.top = y + 'px';
    pPopupForm.style.left = x + 'px';
}




// -->