/*======================================================================================
' Global functions
======================================================================================*/

// Open a new window
function openWin(url, name, toolbar, width, height, status, scrollbars, resize, menubar, location, directories) {
  var newWin = window.open(url, name, 'toolbar=' + toolbar + ', width=' + width + ', height=' + height + ', status=' + status + ', scrollbars=' + scrollbars + ', resizable=' + resize + ', menubar=' + menubar + ', location=' + location + ', directories=' + directories);  
  newWin.focus();
}

// Preload images
function preloadImages() {
  var images = new Array();
  for (var i=0; i<preloadImages.arguments.length; i++) {
    images[i] = new Image();  
    images[i].src = preloadImages.arguments[i];
} }

// Stop event propagation
function stopEvent(e) {
  if (!e) e = window.event;
  if (e.stopPropagation) e.stopPropagation();
  else e.cancelBubble = true;        
}
