<!-- hide script
function GU_decode(string) {
  return unescape(string.replace(/\+/g, " "));
}

/*
** This function parses comma-separated name=value argument pairs from
** the query string of the URL. It stores the name=value pairs in 
** properties of an object and returns that object. 
*/
function GU_get_arguments() {
  var args = new Object();
  var query = location.search.substring(1);   // Get query string.
  var pairs = query.split("&");               // Break at ampersand.
  for(var i = 0; i < pairs.length; i++) {
    var pos = pairs[i].indexOf('=');          // Look for "name=value".
    if (pos == -1) continue;                  // If not found, skip.
    var argname = pairs[i].substring(0,pos);  // Extract the name.
    var value = pairs[i].substring(pos+1);    // Extract the value.
    args[argname] = GU_decode(value);            // Store as a property.
  }
  return args;                                // Return the object.
}

function GU_get_content(url) {
  var content;

  if(document.all) { // IE version     
    // older versions (IE4 and some IE5.0) might be using MSXML2.XMLHTTP.4.0
    var xml = new ActiveXObject("Microsoft.XMLHTTP"); 
    xml.Open( "GET", url, false );
    xml.Send()
    content = xml.responseText;
  } else { // Mozilla/Netscrap 6+ version     
    var xml = new XMLHttpRequest();
    xml.open("GET",url,false);
    xml.send(null);
    content = xml.responseText;
  }

  return(content);
}

function GU_lookup_object_array(array, property, value) {
  for(var i=0; i<array.length; i++)
    if(array[i][property] == value) return array[i];
  return null; // not found
}

function GU_sort_object_array(array, property) 
{
  var length = array.length;
    
  for (var i=0; i<(length-1); i++) {
    for (var j=i+1; j<length; j++) { 
      if (array[j][property] < array[i][property]) { 
        var dummy = array[i]; 
        array[i] = array[j]; 
        array[j] = dummy; 
      } 
    } 
  } 
}

//
// Derived from: http://www.geekdaily.net/2007/07/04/javascript-cross-browser-window-size-and-centering/
//
function GU_get_window_size() {
  var w = 0;
  var h = 0;

  if(!window.innerWidth) { // IE
    if(!(document.documentElement.clientWidth == 0)) { // strict mode
      w = document.documentElement.clientWidth;
      h = document.documentElement.clientHeight;
    } else { // quirks mode
      w = document.body.clientWidth;
      h = document.body.clientHeight;
    }
  } else { // w3c
    w = window.innerWidth;
    h = window.innerHeight;
  }

  return {width:w,height:h};
}

function GU_get_window_center() {
  var elemSize = (arguments[0] != null) ? arguments[0] : {width:0,height:0};

  var _x = _y = 0;
  var offsetX = offsetY = 0;

  if(!window.pageYOffset) { // IE
    if(!(document.documentElement.scrollTop == 0)) { // strict mode
      offsetY = document.documentElement.scrollTop;
      offsetX = document.documentElement.scrollLeft;
    } else { // quirks mode
      offsetY = document.body.scrollTop;
      offsetX = document.body.scrollLeft;
    }
  } else { // w3c
    offsetX = window.pageXOffset;
    offsetY = window.pageYOffset;
  }

  var windowSize = GU_get_window_size(); 
  _x = ((windowSize.width-elemSize.width)/2)+offsetX;
  _y = ((windowSize.height-elemSize.height)/2)+offsetY;

  return{x:_x,y:_y};
}
// end script -->

