function vardump( a ){
	aux = "";
	if( typeof a == "object" ){
		var espaco = ( typeof arguments[1] != "undefined" )?arguments[1]:"..";
		if( typeof a.nodeType != "undefined"){
			return "[NODE] = ( '"+ a.innerHTML.substr( 0, 15 ) +"...' )\n";
		}
		aux += typeof a + " {\n";
		for( i in a ){
			aux += espaco + "["+i+"]" + " = " + vardump( a[i], espaco + ".." );
		}
		aux += espaco + "}\n";
	}else{
		aux += typeof a + " '" + a + "'\n"
	}
	return aux;
}

function isArray()
{
  if (typeof arguments[0] == 'object')
  {
    var criterion = arguments[0].constructor.toString().match(/array/i);
   return (criterion != null);
  }
  return false;
}

function popup_window(nome, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
	LeftPosition = (screen.width) ? (screen.width-width)/2: 0;
	TopPosition = (screen.height) ? (screen.height-height)/4: 0;
	toolbar_str = toolbar ? 'yes' : 'no';
	menubar_str = menubar ? 'yes' : 'no';
	statusbar_str = statusbar ? 'yes' : 'no';
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	window.open(url,nome,'left='+LeftPosition+',top='+TopPosition+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}