/****************************
	Biblioteca de Funções
****************************/

/* popUp(src, wd, hg, sc, dr) - para a maioria dos popUps */
/* incluso instrucoes de toolbar e scroll*/
function popUp(src, wd, hg, sc, tb, sts) {
	var wx, tp, lf;
	
	tp = (screen.availHeight - hg) / 2;
	lf = (screen.availWidth - wd) / 2;
	if (sc == null || sc == "" || tb == null || tb == ""){
		wx = window.open(src,'','width='+wd+',height='+hg+',top=20,left=5,resizable=1,scrollbars=1');
	}else{
		if (sts == "yes"){
			wx = window.open(src,'','width='+wd+',height='+hg+',top=20,left=5,resizable=1,scrollbars='+sc+',menubar='+tb+',status=yes');
		}else{
			wx = window.open(src,'','width='+wd+',height='+hg+',top=20,left=5,resizable=1,scrollbars='+sc+',menubar='+tb);
		}	
	}
	wx.focus();
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}


/* popUpApp(src) - Apenas para popUps com width e height fixos em 640x400 */
function popUpApp(src) {
	var hg = 480;
	var wd = 640;
	var w, tp, lf;
	
	tp = (screen.availHeight - hg) / 2;
	lf = (screen.availWidth - wd) / 2;
	
	w = window.open(src,'','width='+wd+',height='+hg+',top='+tp+',left='+lf+',resizable=1,menubar=1,scrollbars=1');
	w.focus();
}


/* função de popup da rádio */

function popUpAppR(src) {
	var hg = 345;
	var wd = 300;
	var w, tp, lf;
	
	tp = (screen.availHeight - hg) / 2;
	lf = (screen.availWidth - wd) / 2;
	
	w = window.open(src,'','width='+wd+',height='+hg+',top='+tp+',left='+lf+',resizable=0,menubar=0,scrollbars=0');
	w.focus();
}

/* função de popup da video */

function popUpAppV(src) {
	var hg = 300;
	var wd = 451;
	var w, tp, lf;
	
	tp = (screen.availHeight - hg) / 2;
	lf = (screen.availWidth - wd) / 2;
	
	w = window.open(src,'','width='+wd+',height='+hg+',top='+tp+',left='+lf+',resizable=0,menubar=0,scrollbars=0');
	w.focus();
}

