function popUp (url, width, height) {			
	//center the pop-up	
	if (parseInt(navigator.appVersion) >= 4 ) {
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;}

	args = "width=" + width + ","
	+ "height=" + height + ","
	+ "location=0," 
	+ "menubar=0,"
	+ "resizable=1,"
	+ "scrollbars=1,"
	+ "status=no," 
	+ "titlebar=1,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + ","  //NN Only
	+ "screeny=" + yposition + ","  //NN Only
	+ "left=" + xposition + ","     //IE Only
	+ "top=" + yposition;           //IE Only
		
	
	
	window.open(url,'myfile',args);
}

function $() {
  var elements = new Array();

  for (var i = 0; i < arguments.length; i++) {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);

    if (arguments.length == 1) 
      return element;

    elements.push(element);
  }

  return elements;
}
