// This function is for the upload points
// ======================================

function set_upload_point(id) {
   // make the upload point visible   
   form = document.getElementById('upload_point_form');
   Element.show(form)
   // form.style.visibility = 'visible';
   // set the id of the upload point
   upload_id = document.getElementById('upload[upload_point_id]');
   upload_id.value = id;
   //
   return true;
}

// this is for embedding a movie in a page
function embed_video(file_name, width, height) {
   var myQTObject = new QTObject(file_name, "", width, height);
   myQTObject.addParam("autostart", "false");
   myQTObject.addParam("controller", "true");
   myQTObject.write();
   return true;
}

function embed_flash(file_name, div_id) {
   var fo = new SWFObject(file_name, "", "200", "100", "6.0.65");
   fo.write(div_id);
   return true;
}

function jump_to_anchor(anchor) {
   location.href = "#" + anchor;
   return false
}


function qsInit() {
    var el = $$('#navbar div form #qs');
    if(el.length > 0) {
        el[0].onfocus = function() { if(this.value == this.title) this.value = ""; };
        el[0].onblur = function() { if(this.value == "") this.value = this.title; };
    }
}

function toggleAbstract(obj, abs) {
    $(abs).toggle();
    obj.toggleClassName('active');
    
}

Event.observe(window, "load", function() { 
    qsInit(); 
});

// SIFR code below

var helvetica = {
  src: '/swf/helvetica.swf'
};

sIFR.activate(helvetica);

sIFR.replace(helvetica, {
  selector: 'h2',
  wmode: 'transparent',
  tuneHeight: -5,
  css: {
      '.sIFR-root': { 'leading': 1, 'color': '#06174d'}
  },
  ratios: [9,1.16,16,1.09,24,1.06,37,1.04,74,1.02,1.01]
});

sIFR.replace(helvetica, {
  selector: 'h3',
  wmode: 'transparent',
  tuneHeight: 0,
  css: {
      '.sIFR-root': { 'leading': 1, 'color': '#06174d'}
  },
  ratios: [9,1.16,16,1.09,24,1.06,37,1.04,74,1.02,1.01]
});

sIFR.replace(helvetica, {
  selector: 'h4',
  wmode: 'transparent',
  fitExactly: 'true',
  tuneHeight: 0,
  css: {
      '.sIFR-root': { 'leading': 1, 'color': '#06174d'}, 'a': { 'text-decoration': 'none', 'color': '#06174d'}, 'a:hover': { 'color': '#000000'}
  },
  ratios: [9,1.16,16,1.09,24,1.06,37,1.04,74,1.02,1.01]
});

