<!--

//
// Window POPUP - Dante - 02/08/2002
//
// parametros: w    => largura da janela
//             h    => altura da janela
//             more => parametros diretos para o java-script se omitido assume 
//                     top=10,left=10,status=no,toolbar=no,menubar=no,resizable=yes
//

function POPUP(mypage, w, h, more, name) {

	var ws = screen.width  - 100;
    var hs = screen.height - 100;

	if (! name)
	{
      
	  name = 'TechnopopPOPUP'

    } 

	if (more) { 
		
		winprops = "top=0,left=0, " + more 
			
	} else {

        winprops = "top=0,left=0,status=no,toolbar=no,menubar=no,resizable=yes"

	}

	if (w) { 
		
		winprops = winprops + ",width=" + w 

		if (ws <= w) { 
			
			   winprops = winprops + ",scrollbars=yes"

		} 

	} else {

        winprops = winprops + ",scrollbars=yes,width=" + ws * .8

	}

	if (h) { 
		
		winprops = winprops + ",height=" + h

		if (hs <= h) { 
		
		   winprops = winprops + ",scrollbars=yes"

		} 

	} else {
     
	    winprops = winprops + ",scrollbars=yes,height=" + hs * .8

	}

	win = window.open(mypage, name, winprops)

}

//
// Funcao antiga para abris janelas (a ser desativada)
//

function MM_openBrWindow(theURL, winName, features) {

        winprops = 'top=0,left=0,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no,' + features

        window.open(theURL, winName, winprops)

}

//
// Funcao para fazer janela POPUP pular ao carregar pagina
//
// parametros:                cookiename => nome do cookie para evitar que a janela pule a cada carga da pagina
//             mypage, w, h, more & name => veja funcao POPUP
//
// para obter pop modifique o body como no exemplo:
// <body bgcolor="#000000" onLoad="javascript:AutoPOPUP('DOWNLOADWARNINGVIDEOCLIPS','downloadwarning.php',470,180)">
//

function AutoPOPUP(cookiename, mypage, w, h, more) {

	if (getCookie(cookiename) == null)

       POPUP(mypage, w, h, more, 'AutoPOPUP');
	
    document.cookie = cookiename + "=1";

}

//-->