<!--
function ChangeImage(name,src,srcOriginal)
{
        var bFlag = false;
	var nCount = 0;
        var sCompSrc = src.replace("../","");  // get rid of any reference to "../" for string comparison

        while(!bFlag && (nCount < document.images.length))
	{
	   if(document.images[nCount].name == name)
		{
			bFlag = true;
                        if (document.images[nCount].src.indexOf(sCompSrc) > 0)
                        {
                            if(srcOriginal != '')
                                document.images[nCount].src = srcOriginal;
                        }
                        else
				document.images[nCount].src = src;
		}
		nCount++;
	}
}

// -->


function OpenWindow(sTarget, p_sHeight, p_sWidth, p_sScroll, sName)
{
        var sHeight = "600";
        var sWidth = "800";
        var sScroll = "Yes";

        if(p_sHeight != "")
                sHeight = p_sHeight;
        if(p_sWidth != "")
                sWidth = p_sWidth;
        if(p_sScroll != "")
                sScroll = p_sScroll;
        if(sName == null )
                sName = "popup";

        // get the user''s screen property to center the login page
        nLeft = (self.screen.availWidth - sWidth) / 2;
        nTop = (self.screen.availHeight - sHeight) / 2;

        hWindow = open(sTarget, sName, "width=" + sWidth + ",height=" + sHeight + ",top=" + nTop + ",left=" + nLeft + ",scrollbars=" + sScroll);
        hWindow.focus();

        return hWindow;
}

function ChangeCurrentDateToNumber()
{
	var dToday = new Date();
	var sMonth = new String(dToday.getMonth() + 1);
	var sDay = new String(dToday.getDate());

	if(sMonth.length == 1)
		sMonth = "0" + sMonth;
	if(sDay.length == 1)
		sMonth = "0" + sDay;
	return parseInt(dToday.getFullYear() + sMonth + sDay);
}