function NewWindow(mypage,myname,w,h,scroll){
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+','
	win = window.open(mypage,myname,settings)
}
function abrir_janela_popup(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function enquete() {  
  NewWindow('loading.html','enquete','340','280','yes');
}

function comentarios(id) {  
  NewWindow('pops_emails/pop_comentario.php?id=' + id,'comments','350','300','yes');
}
function amigo(id, materia){
	 NewWindow('pops_emails/pop_envieamigo.php?id=' + id + '&materia=' + materia,'amigo','350','300','yes');
}

function AlterCss()
{
	var MyMode = arguments[0];
	var MaxLen = 5;
	var MinLen = 0;
	var CssObj = document.styleSheets;
	var CssLen = CssObj.length;
	var LimCnt = 0;
	var ClsObj = new Array()
		ClsObj[0] = "style7"

	for(i = 0; i < CssLen; i++)
	{
		var MyCss = CssObj[i];
		var MyRul = (document.all ? MyCss.rules : MyCss.cssRules);
		var Valid = MyCss.href != document.location && MyCss.href != "" ? true : false;
		if(Valid)
		{
			for(j = 0; j < MyRul.length; j++)
			{
				for(k = 0; k < ClsObj.length; k++)
				{
					var Classe = "#" + ClsObj[k];
					var ClsTxt = MyRul[j].selectorText;
					if(ClsTxt == Classe)
					{
						var MySize = MyRul[j].style.fontSize;
						if(MyMode > 0)
						{
							if(Limit < MaxLen)
							{
								MyRul[j].style.fontSize = (parseInt(MySize) + 1) + "px";
								LimCnt++;
							}
						}
						else
						{
							if(Limit > MinLen)
							{
								MyRul[j].style.fontSize = (parseInt(MySize) - 1) + "px";
								LimCnt++;
							}
						}
					}
				}
			}
			if(LimCnt > 0)
			{
				MyMode > 0 ? Limit++ : Limit--;
			}
		}
	}
	return void(0);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
