

function ChangeObjectDisplay(obj, display) {
	if (document.getElementById(obj) != null) {
		document.getElementById(obj).style.display = display;
	}
}

function ChangeObjectDisplayWithDelay(obj, display, delay) {
	window.setTimeout( function () {
	if (document.getElementById(obj) != null) {
		document.getElementById(obj).style.display = display;
	}
	}, delay)
}	

function PopupImage(img, width, height){
	janela = window.open( "image.html", "Imagem", "height=" + (height + 30) + ",width=" + (width + 30) + ",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0");
	janela.document.write("<img src='" + img + "' border='0'>");
}

function openWindow(pageToLoad, winName, width, height, scrollbars)
{                                          
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=" + scrollbars + ","
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + left + ","  /*Netscape*/
    + "screeny=" + top + ","  /*Netscape*/
    + "left=" + left + ","     /*Internet Explorer*/
    + "top=" + top;          /*Internet Explorer*/
    /* + "alwaysRaised=1"; */
    window.open( pageToLoad,winName,args );
}

function openWindow(pageToLoad, winName, width, height, top, left, scrollbars)
{                                          
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=" + scrollbars + ","
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + left + ","  /*Netscape*/
    + "screeny=" + top + ","  /*Netscape*/
    + "left=" + left + ","     /*Internet Explorer*/
    + "top=" + top;          /*Internet Explorer*/
    /* + "alwaysRaised=1"; */
    window.open( pageToLoad,winName,args );
}

function openWindowTopRight(pageToLoad, winName, width, height, scrollbars)
{                                          
    xposition=screen.width-width; 
    yposition=0;
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=" + scrollbars + ","
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  /*Netscape*/
    + "screeny=" + yposition + ","  /*Netscape*/
    + "left=" + xposition + ","     /*Internet Explorer*/
    + "top=" + yposition;          /*Internet Explorer*/
    /* + "alwaysRaised=1"; */
    window.open( pageToLoad,winName,args );
}

function ChangeObjectBGColor(src, color)
{
	src.bgColor = color;
}

function AddToFavorites()
{
	if (document.all) 
		window.external.AddFavorite(window.location.href, document.title);
}