function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// ****************

function detail_toggle(strDetail) {
    var objDetail = MM_findObj(strDetail);
    var objImage   = MM_findObj('img_' + strDetail);
    if (objDetail.style.visibility == 'hidden') {
        // **** EXPAND ****
        objDetail.style.visibility = 'visible';
        objDetail.style.position   = 'static';
        objImage.src = '../images/collapse.gif';
    } else {
        // **** COLLAPSE ****
        objDetail.style.visibility = 'hidden';
        objDetail.style.position   = 'absolute';
        objImage.src = '../images/expand.gif';
    }
}

function option_move(n1, n2) {
    obj1 = MM_findObj(n1);
    obj2 = MM_findObj(n2);
    for ( i=0; i<obj1.length ; i++){
        if (obj1.options[i].selected == true ) {
	      obj2.options[obj2.length] = new Option(obj1.options[i].text, obj1.options[i].value);
	      obj1.options[i] = null;
	      i--;
        }
    }
}

function option_selectall(n) {
    obj = MM_findObj(n);
	for ( i=0; i<obj.length ; i++){
        obj.options[i].selected = true;
	}
}