function addEvent(obj, evType, fn)
{
    if (obj.addEventListener)
    {
       obj.addEventListener(evType, fn, false);
       return true;
    }
    else if (obj.attachEvent)
    {
       var r = obj.attachEvent("on"+evType, fn);
       return r;
    } 
    else
    {
       return false;
    }
}

function WindowOpen(w, h, page)
{
	retorno = window.open(page,'popup','left=0, top=0, toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, width='+ w +', height='+ h ); 
	if (retorno == null)
	{
		//alert ("Você tem bloqueador de pop-up!")
		return false;
	}
	return true;
}
