function pp(url,w,h,n)
{
	var winW = w ? w : 300;
	var winH = w ? w : 300;
	var winN = n ? n : 'site_popup';
	var f = "width="+winW+", height="+winH+",  left=0, top=0, screenX=0, screenY=0, scrollbars=yes, statusbar=no";	
	var win = window.open(url,winN,f);		
	
	win.focus();
	
}

function BGColor (o,col,cur)
{
	o.style.backgroundColor=col;
	if (cur)
	{
		o.style.cursor = cur;
	}
}

function buscar()
{
	document.getElementById('frm_search').submit();
}

function SwapDivFeria(d,m)
{
	if (d)
	{
	var di = document.getElementById(d);
	di.style.display = m ? 'block' : 'none';
	}
}

function resizeWin(w,h,locate)
{
	f=document.getElementById('img');
	var winW = w;
	var winH = h;
	
	var l = self.screen.availWidth /2 - winW/2;
	var t = self.screen.availHeight/2 - winH/2;
	window.resizeTo(winW, winH);
	
	if (locate)
	{
		window.moveTo(l,t);
	}
	
	window.focus();	
}

function CheckboxChange(chkName,cmd)
{
	var chk =document.getElementsByName(chkName+'[]');
	
	for(var i=0; i<chk.length;i++)
	{
		if (!chk[i].disabled)
			{
			switch (cmd)
			{
				case 'all':
					chk[i].checked=true;
					break;
				case 'non':
					chk[i].checked=false;
					break;
				case 'inv':
					chk[i].checked=chk[i].checked?false:true;
					break;
			}
		}
	}
	
}

