function getKeyPairs(pairList) {
    keypairs = new Object(); 
    numKP = 1; 
    query=pairList;
    while (query.indexOf('&') > -1) { 
     keypairs[numKP] = query.substring(0,query.indexOf('&')); 
     query = query.substring((query.indexOf('&')) + 1); 
     numKP++; 
    } 
    keypairs[numKP] = query; 
}

function extractArray(arrayName) {
	arrayPair = new Object(); 
	numPair = 1; 
	query = arrayName;
	while (query.indexOf('|') > -1) { 
	 arrayPair[numPair] = query.substring(0,query.indexOf('|')); 
	 query = query.substring((query.indexOf('|')) + 1); 
	 numPair++; 
	} 
	arrayPair[numPair] = query; 
}

function makeWindowPhoto(url,width,height) {
 w=window.open(url,'photo','width='+width+',height='+height+',top=0,left=0,resizable=no,status=no,dependant'); 
 if (w.opener == null) w.opener=self;
 w.focus();
}

function detectBrowser() {
  var nua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isOP    = false;  // Opera
  this.isNS    = false;  // Netscape
  this.version = null;

  nua = navigator.userAgent;

  s = "Opera";
  if ((i = nua.indexOf(s)) >= 0) {
    this.isOP = true;
    this.version = parseFloat(nua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = nua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(nua.substr(i + s.length));
    return;
  }

  s = "Gecko";
  if ((i = nua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }

  s = "MSIE";
  if ((i = nua.indexOf(s))) {
    this.isIE = true;
    this.version = parseFloat(nua.substr(i + s.length));
    return;
  }
}
