<!--

button_search            = new Image();
button_search.src        = "/graf/button_procurar_arrow.png";
button_search_s          = new Image();
button_search_s.src      = "/graf/button_procurar_arrow_s.png";

button_options           = new Image();
button_options.src       = "/graf/button_procurar_plus.png";
button_options_s         = new Image();
button_options_s.src     = "/graf/button_procurar_plus_s.png";

button_imprimir_pt       = new Image();
button_imprimir_pt.src   = "/graf/button_imprimir_pt.png";
button_imprimir_pt_s     = new Image();
button_imprimir_pt_s.src = "/graf/button_imprimir_pt_s.png";

button_imprimir_en       = new Image();
button_imprimir_en.src   = "/graf/button_imprimir_en.png";
button_imprimir_en_s     = new Image();
button_imprimir_en_s.src = "/graf/button_imprimir_en_s.png";

button_icalendar          = new Image();
button_icalendar.src      = "/graf/button_icalendar.png";
button_icalendar_s        = new Image();
button_icalendar_s.src    = "/graf/button_icalendar_s.png";

button_qr_code            = new Image();
button_qr_code.src        = "/graf/button_qr_code.png";
button_qr_code_s          = new Image();
button_qr_code_s.src      = "/graf/button_qr_code_s.png";

button_facebook           = new Image();
button_facebook.src       = "/graf/button_facebook.png";
button_facebook_s         = new Image();
button_facebook_s.src     = "/graf/button_facebook_s.png";

button_pesquisar_pt       = new Image();
button_pesquisar_pt.src   = "/graf/button_pesquisar_pt.png";
button_pesquisar_pt_s     = new Image();
button_pesquisar_pt_s.src = "/graf/button_pesquisar_pt_s.png";

button_pesquisar_en       = new Image();
button_pesquisar_en.src   = "/graf/button_pesquisar_en.png";
button_pesquisar_en_s     = new Image();
button_pesquisar_en_s.src = "/graf/button_pesquisar_en_s.png";

button_subscrever_pt       = new Image();
button_subscrever_pt.src   = "/graf/button_subscrever_pt.png";
button_subscrever_pt_s     = new Image();
button_subscrever_pt_s.src = "/graf/button_subscrever_pt_s.png";

button_subscrever_en       = new Image();
button_subscrever_en.src   = "/graf/button_subscrever_en.png";
button_subscrever_en_s     = new Image();
button_subscrever_en_s.src = "/graf/button_subscrever_en_s.png";

button_anular_pt         = new Image();
button_anular_pt.src     = "/graf/button_anular_pt.png";
button_anular_pt_s       = new Image();
button_anular_pt_s.src   = "/graf/button_anular_pt_s.png";

button_anular_en         = new Image();
button_anular_en.src     = "/graf/button_anular_en.png";
button_anular_en_s       = new Image();
button_anular_en_s.src   = "/graf/button_anular_en_s.png";

button_email_00          = new Image();
button_email_00.src      = "/graf/button_email_00.png";
button_email_00_s        = new Image();
button_email_00_s.src    = "/graf/button_email_00_s.png";

arrow_left               = new Image();
arrow_left.src           = "/graf/arrow_left_13x11.png";
arrow_left_s             = new Image();
arrow_left_s.src         = "/graf/arrow_left_13x11s.png";

arrow_right              = new Image();
arrow_right.src          = "/graf/arrow_right_13x11.png";
arrow_right_s            = new Image();
arrow_right_s.src        = "/graf/arrow_right_13x11s.png";

icon_page                = new Image(14,16);
icon_page.src            = "/graf/icon_page_14x16.gif";
icon_page_s              = new Image(14,16);
icon_page_s.src          = "/graf/icon_page_14x16s.gif";

icon_page_first          = new Image(14,16);
icon_page_first.src      = "/graf/icon_page_first_14x16.gif";
icon_page_first_s        = new Image(14,16);
icon_page_first_s.src    = "/graf/icon_page_first_14x16s.gif";

icon_page_previous       = new Image(14,16);
icon_page_previous.src   = "/graf/icon_page_previous_14x16.gif";
icon_page_previous_s     = new Image(14,16);
icon_page_previous_s.src = "/graf/icon_page_previous_14x16s.gif";

icon_page_next           = new Image(14,16);
icon_page_next.src       = "/graf/icon_page_next_14x16.gif";
icon_page_next_s         = new Image(14,16);
icon_page_next_s.src     = "/graf/icon_page_next_14x16s.gif";

icon_page_last           = new Image(14,16);
icon_page_last.src       = "/graf/icon_page_last_14x16.gif";
icon_page_last_s         = new Image(14,16);
icon_page_last_s.src     = "/graf/icon_page_last_14x16s.gif";

icon_magnifier_1x        = new Image();
icon_magnifier_1x.src    = "/graf/icon_magnifier_1x_15x19.gif";
icon_magnifier_1xs       = new Image();
icon_magnifier_1xs.src   = "/graf/icon_magnifier_1x_15x19s.gif";

icon_magnifier_2x        = new Image();
icon_magnifier_2x.src    = "/graf/icon_magnifier_2x_15x19.gif";
icon_magnifier_2xs       = new Image();
icon_magnifier_2xs.src   = "/graf/icon_magnifier_2x_15x19s.gif";

icon_magnifier_3x        = new Image();
icon_magnifier_3x.src    = "/graf/icon_magnifier_3x_15x19.gif";
icon_magnifier_3xs       = new Image();
icon_magnifier_3xs.src   = "/graf/icon_magnifier_3x_15x19s.gif";

icon_magnifier_4x        = new Image();
icon_magnifier_4x.src    = "/graf/icon_magnifier_4x_15x19.gif";
icon_magnifier_4xs       = new Image();
icon_magnifier_4xs.src   = "/graf/icon_magnifier_4x_15x19s.gif";

icon_tickets_00          = new Image();
icon_tickets_00.src      = "/graf/icon_tickets_00_53x33.png";
icon_tickets_00_s        = new Image();
icon_tickets_00_s.src    = "/graf/icon_tickets_00_53x33s.png";

// ---------------------------------------------------------------------------------------

var cookie_name = "";
var cookie_email = "";
var cookie_search = "";
var cookie_pairs = document.cookie.split(";");

for (var f=0; f < cookie_pairs.length; f++) {
  var cookie_pairs_split = cookie_pairs[f].split("=");
  if (cookie_pairs_split[0] == " webnews_pro_username" || cookie_pairs_split[0] == "webnews_pro_username") {
    cookie_name = cookie_pairs_split[1];
  }
  if (cookie_pairs_split[0] == " webnews_pro_useremail" || cookie_pairs_split[0] == "webnews_pro_useremail") {
    cookie_email = cookie_pairs_split[1];
  }
  if (cookie_pairs_split[0] == " webnews_pro_search" || cookie_pairs_split[0] == "webnews_pro_search") {
    cookie_search = cookie_pairs_split[1];
  }
}

// ---------------------------------------------------------------------------------------

function cookie_subscribe_set() {
  var e = document.subscribe.form_email.value;

  if (e != "") {
    document.cookie = "webnews_pro_useremail=" + e + ";expires=Thursday, 31-Dec-2099 12:00:00 GMT; domain=" + document.domain + "; path=/";
  }
}

function cookie_unsubscribe_set() {
  var e = document.unsubscribe.form_email.value;

  if (e != "") {
    document.cookie = "webnews_pro_useremail=" + e + ";expires=Thursday, 31-Dec-2099 12:00:00 GMT; domain=" + document.domain + "; path=/";
  }
}

function onfocus_subscribe_email_pt() {
   if (document.subscribe.form_email.value == "Indique o seu E-mail") {
     document.subscribe.form_email.value = "";
   } 
}

function onblur_subscribe_email_pt() {
   if (document.subscribe.form_email.value == "") {
     document.subscribe.form_email.value = "Indique o seu E-mail";
   }
}

function onfocus_subscribe_email_en() {
   if (document.subscribe.form_email.value == "Your E-mail address") {
     document.subscribe.form_email.value = "";
   } 
}

function onblur_subscribe_email_en() {
   if (document.subscribe.form_email.value == "") {
     document.subscribe.form_email.value = "Your E-mail address";
   }
}

// ---------------------------------------------------------------------------------------

function cookie_send_mail_set() {
  var n = document.send_mail.form_name.value;
  var e = document.send_mail.form_email.value;

  if (n != "") {
    document.cookie = "webnews_pro_username=" + n + ";expires=Thursday, 31-Dec-2099 12:00:00 GMT; domain=" + document.domain + "; path=/";
  }
  if (e != "") {
    document.cookie = "webnews_pro_useremail=" + e + ";expires=Thursday, 31-Dec-2099 12:00:00 GMT; domain=" + document.domain + "; path=/";
  }
}

// ---------------------------------------------------------------------------------------

function cookie_search_set() {
  var s = document.form_search.form_pattern.value;

  if (s != "") {
    document.cookie = "webnews_pro_search=" + s + ";expires=Thursday, 31-Dec-2099 12:00:00 GMT; domain=" + document.domain + "; path=/";
  }
}

function cookie_search_set_header() {
  var s = document.form_search_header.form_pattern.value;

  if (s != "") {
    document.cookie = "webnews_pro_search=" + s + ";expires=Thursday, 31-Dec-2099 12:00:00 GMT; domain=" + document.domain + "; path=/";
  }
}

// ---------------------------------------------------------------------------------------

function on_submit_form_search() {
  if (document.form_search.form_pattern.value == "") {
    return false;
  } else {
    cookie_search_set();
    return true;
  }
}

function on_submit_form_search_button() {
  if (document.form_search.form_pattern.value == "") {
  } else {
    cookie_search_set();
    document.form_search.submit();
  }
}

function on_submit_form_search_header() {
  if (document.form_search_header.form_pattern.value == "") {
    return false;
  } else {
    cookie_search_set_header();
    return true;
  }
}

function on_submit_form_search_header_button() {
  if (document.form_search_header.form_pattern.value == "") {
  } else {
    cookie_search_set_header();
    document.form_search_header.submit();
  }
}

// ---------------------------------------------------------------------------------------

function img_over_out(img_target,img_source) {
  img_target.src = img_source.src;
}

function letter_over_out(img_target,img_source) {
  img_target.src = img_source;
}

// ---------------------------------------------------------------------------------------

function magnifier(m,s,o) {
  document.getElementById(o).style.height = m * s + "px";
}

// ---------------------------------------------------------------------------------------

function podcast_popout(file_name,window_name) {
  var pos_x = (screen.width - 400);
  var pos_y = 150;

  var win_features = "menubar=no,scrollbars=no,status=no,resizable=yes,location=no,titlebar=no,toolbar=no,directories=no,width=280,height=120,left=" + pos_x + ",top=" + pos_y;
  msgWindow=window.open(file_name,"",win_features);
}

// ---------------------------------------------------------------------------------------

function thousands(num) {
  var f;
  var g;

  g = 0;
  for (f = num.length - 1; f >= 1; f--) {
    g++;
    if (g == 3) {
      num = num.substring(0,f) + "," + num.substring(f);
      g = 0;
    }
  }

  document.write(num);
}

// ---------------------------------------------------------------------------------------

function print_record(link) {
  var w;
  var h;
  var monitor = screen.width;

  link = "http://www.musica.gulbenkian.pt" + link;

  if (monitor == "640") {
    w =  540;
    h =  380;
  } else if (monitor == "800") {
    w =  640;
    h =  480;
  } else if (monitor == "1024") {
    w =  800;
    h =  600;
  } else if (monitor == "1152") {
    w =  800;
    h =  600;
  } else if (monitor == "1280") {
    w =  800;
    h =  600;
  } else if (monitor == "1281") {
    w =  800;
    h =  600;
  } else if (monitor == "1400") {
    w =  800;
    h =  600;
  } else if (monitor == "1440") {
    w =  800;
    h =  600;
  } else if (monitor == "1600") {
    w = 1024;
    h = 1078;
  } else if (monitor == "1680") {
    w = 1024;
    h = 768;
  } else if (monitor == "1920") {
    w = 1280;
    h = 1024;
  } else if (monitor == "2048") {
    w = 1280;
    h = 1024;
  } else if (monitor == "2560") {
    w = 1280;
    h = 1024;
  } else {
    w =  640;
    h =  480;
  }

  var pos_x = (screen.width - w) / 2 - 10;
  var pos_y = (screen.height - h) / 2 - 20;
  var win_features = "menubar=no,scrollbars=yes,resizable=no,status=no,width=" + w + ",height=" + h + ",left=" + pos_x + ",top=" + pos_y;
  msgWindow=window.open(link,"",win_features);
}

// ---------------------------------------------------------------------------------------

function show_hires(name,type,subtype,width_thousands,height_thousands,width,height,bitdepth,link,size,lang) {
  if (type == "" || type == "@DB_RECORD_OBJECT_HIRES_TYPE@") {
    return;
  }

  document.write("<BR>");
  document.write("<A HREF=\"javascript:float_hires('" + name + "','" + type + "','" + subtype + "','" + width + "','" + height + "','" + bitdepth + "','" + link + "','" + size + "');\" onMouseOver=\"this.style.background='transparent'; window_status('" + link + "'); return true\" onMouseOut=\"window.status=''; return true\"><IMG ALT='Imagem de alta resolução' SRC='/graf/icon_hires_60x33.gif' WIDTH=60 HEIGHT=33 BORDER=0></A>");
  document.write("<BR CLEAR=ALL>");
  document.write("<B>" + type + "</B> " + width + "×" + height + " pixels<BR>");
  document.write(bitdepth + "-bit / " + size + " kbytes");
  document.write("<BR><BR>");
  if (lang == "pt") {
    document.write("Clique no ícone acima para fazer download da fotografia em alta resolução, para impressão tipográfica em jornais, revistas, etc.");
  } else {
    document.write("Click on the above icon to download an high resolution version of the picture, suitable for printing in newspapers, magazines, etc.");
  }

  document.write("<BR>");
}

// ---------------------------------------------------------------------------------------

function show_image_caption(caption) {
  if (caption == "") {
    return;
  }

  document.write("<B>" + caption + "</B><BR CLEAR=ALL>");
}

// ---------------------------------------------------------------------------------------

function window_status(fname) {
  if (fname == "") {
    window.status = "";
  } else {
    window.status = fname;
  }
}

function window_status_uri(fname) {
  if (fname == "") {
    window.status = "";
  } else {
    window.status = "http://www.musica.gulbenkian.pt" + fname;
  }
}

// ---------------------------------------------------------------------------------------

function float_picture(window_title,fname,x,y) {
  var pos_x = (screen.width - x) / 2;
  var pos_y = (screen.height - y) / 2 - 20;
  var win_x = x + 30;
  var win_y = y + 30;

  var win_features = "menubar=no,scrollbars=no,resizable=no,status=no,width=" + win_x + ",height=" + win_y + ",left=" + pos_x + ",top=" + pos_y;
  msgWindow=window.open("","",win_features);

  msgWindow.document.write("<HTML>");
  msgWindow.document.write("<HEAD>");
  msgWindow.document.write("<TITLE>" + window_title + "</TITLE>");
  msgWindow.document.write("</HEAD>");
  msgWindow.document.write("<BODY BGCOLOR=#FFFFFF>");

  msgWindow.document.write("<CENTER>");
  msgWindow.document.write("<IMG ALT='" + window_title + "' SRC='" + fname + "' WIDTH=" + x + " HEIGHT=" + y + ">");
  msgWindow.document.write("</CENTER>");

  msgWindow.document.write("</BODY>");
  msgWindow.document.write("</HTML>");
}

// ---------------------------------------------------------------------------------------

function float_hires(name,type,subtype,width,height,bitdepth,link,size) {
  var w;
  var h;
  var monitor = screen.width;

  link = "http://www.musica.gulbenkian.pt" + link;

  if (monitor == "640") {
    w =  540;
    h =  380;
  } else if (monitor == "800") {
    w =  640;
    h =  480;
  } else if (monitor == "1024") {
    w =  800;
    h =  600;
  } else if (monitor == "1152") {
    w =  800;
    h =  600;
  } else if (monitor == "1280") {
    w =  800;
    h =  600;
  } else if (monitor == "1281") {
    w =  800;
    h =  600;
  } else if (monitor == "1400") {
    w =  800;
    h =  600;
  } else if (monitor == "1440") {
    w =  800;
    h =  600;
  } else if (monitor == "1600") {
    w = 1024;
    h = 1078;
  } else if (monitor == "1680") {
    w = 1024;
    h = 768;
  } else if (monitor == "1920") {
    w = 1280;
    h = 1024;
  } else if (monitor == "2048") {
    w = 1280;
    h = 1024;
  } else if (monitor == "2560") {
    w = 1280;
    h = 1024;
  } else {
    w =  640;
    h =  480;
  }

  h += 50;

  var pos_x = (screen.width - w) / 2 - 10;
  var pos_y = (screen.height - h) / 2 - 20;

  var win_features = "menubar=no,scrollbars=yes,resizable=no,status=no,width=" + w + ",height=" + h + ",left=" + pos_x + ",top=" + pos_y;

  w -= 50;

  var info = type + " (" + subtype + ") &nbsp; &nbsp; &nbsp; " + width + " x " + height + " pixels &nbsp; &nbsp; &nbsp; " + bitdepth + "-bit &nbsp; &nbsp; &nbsp; " + size + " kbytes";

  msgWindow = window.open("","",win_features);

  msgWindow.document.write("<HTML>");
  msgWindow.document.write("<HEAD>");
  msgWindow.document.write("<TITLE>" + name + "</TITLE>");
  msgWindow.document.write("</HEAD>");
  msgWindow.document.write("<BODY BGCOLOR=#FFFFFF>");

  msgWindow.document.write("<CENTER>");
  msgWindow.document.write("<FONT FACE='Arial','Helvetica','sans-serif' SIZE=-2>" + info + "</FONT>");
  msgWindow.document.write("<BR CLEAR=ALL>");
  msgWindow.document.write("<IMG SRC='" + link + "' WIDTH='" + w + "'>");
  msgWindow.document.write("</CENTER>");

  msgWindow.document.write("</BODY>");
  msgWindow.document.write("</HTML>");

  // Here is a more detailed explanation of what to do. go to your RUN window from the start menu. 1. type in "regsvr32 msscript.ocx" and hit enter 2. do the same with dispex.dll, and vbscript.dll 3. open windows explorer, select folder options in the tools drop down. 4. select the file types tab 5. scroll down to the extension type JS, highlight it and hit the advanced button 6. highlight the Open command and hit the edit button. If you have more than one "Open" command showing (which was part of my problem)delete one of them. 7. In the field "application used to perform action" paste in this - C:\WINNT\System32\WScript.exe "%1" %* your done.
}

// ---------------------------------------------------------------------------------------

function float_media_player(window_title,fname,x,y) {
  var pos_x = (screen.width - x) / 2;
  var pos_y = (screen.height - y) / 2 - 20;
  var win_x = x + 30;
  var win_y = y + 30;

  fname = "http://www.musica.gulbenkian.pt/" + fname;

  var win_features = "menubar=no,scrollbars=no,resizable=no,status=no,width=" + win_x + ",height=" + win_y + ",left=" + pos_x + ",top=" + pos_y;
  msgWindow=window.open("","",win_features);

  msgWindow.document.write("<HTML>");
  msgWindow.document.write("<HEAD>");
  msgWindow.document.write("<TITLE>" + window_title + "</TITLE>");
  msgWindow.document.write("</HEAD>");
  msgWindow.document.write("<BODY BGCOLOR=#FFFFFF>");

  msgWindow.document.write("<CENTER>");

  msgWindow.document.write("<object id='video' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='" + x + "' height='" + y + "'><param name='movie' value='http://www.musica.gulbenkian.pt/template/software/media_player.swf?file=" + fname + "'><param name='quality' value='high'><param name='menu' value='false'><param name='allowFullScreen' value='true'><param name='flashvars' value='autostart=true&amp;showstop=true&amp;stretching=fill'><embed name='media-flash-video' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' src='http://www.musica.gulbenkian.pt/template/software/media_player.swf?file=" + fname + "' width='" + x + "' height='" + y + "' quality='high' menu='false' allowfullscreen='true' flashvars='autostart=true&amp;showstop=true&amp;stretching=fill'></embed></object>");

  msgWindow.document.write("</CENTER>");

  msgWindow.document.write("</BODY>");
  msgWindow.document.write("</HTML>");
}

// ---------------------------------------------------------------------------------------

function search_show_author(author) {
  if (author != "José De Almeida" && author != "Jorge Freire" && author != "Rute Henriques" && author != "Cristina Gallo" && author != "Joana Francisco") {
    document.write(author + " / ");
  }
}

// ---------------------------------------------------------------------------------------

function change_target(id) {
  var db = new Array(
      "fcg_descobrir|db_musica_projecto_educativo_2007_2008_pt",
      "fcg_descobrir|db_musica_projecto_educativo_2007_2008_en",
      "fcg_descobrir|db_musica_bios_pt&sn=descobrir",
      "fcg_jazz|db_musica_bios_pt&sn=jazz",
      "fcg_jazz|db_jazz_em_agosto_pt|fcg_jazz",
      "fcg_jazz|db_jazz_em_agosto_en|fcg_jazz",
      "fcg_jazz|db_jazz_em_agosto_discs_pt",
      "fcg_jazz|db_jazz_em_agosto_news_pt");

  var uri = document.getElementById(id).href;

  for (var f = 0; f <= db.length; f++) {
    pairs = db[f].split("|");
    pos = uri.indexOf(pairs[1]);
    if (pos != -1) {
      document.getElementById(id).target = pairs[0];
    }
  }
}

// ---------------------------------------------------------------------------------------

function seasons_show_review(text) {
  if (text != "") {
    document.write("<BR>");
    document.write("<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR><TD HEIGHT='21' COLSPAN='3' BACKGROUND='/graf/line_656x21.gif'></TD></TR></TABLE>");
    document.write("<P>");
    document.write("<SPAN CLASS='default-record-text'>");
    document.write(text);
    document.write("</SPAN>");
  }
}

// ---------------------------------------------------------------------------------------

function show_links_to_events(type,events) {
  if (events == "") {
    return;
  }

  document.write("<SPAN CLASS='default-record-text'>");

  var new_events = events.split("<br/>");

  if (type == "normal") {
    document.write("<UL CLASS='default-ul-arrow'>");
  }
  for (var f = 0; f < new_events.length; f++) {
    var pairs = new_events[f].split("|");
    if (type == "normal") {
      document.write("<LI><A HREF=\"" + pairs[1] + "\">" + pairs[0] + "</A>");
    } else {
      document.write(pairs[0] + "<BR>");
    }
  }
  if (type == "normal") {
    document.write("</UL>");
  }

  document.write("</SPAN>");

  if (type == "normal") {
    document.write("<TABLE WIDTH='100%' BORDER='0' CELLSPACING='0' CELLPADDING='0'><TR><TD HEIGHT='21' BACKGROUND='/graf/line_656x21.gif'></TD></TR></TABLE>");
  }
}

// ---------------------------------------------------------------------------------------

function get_coordinates(obj) {
  var curleft = 0;
  var curtop = 0;

  if (obj.offsetParent) {
    do {
      curleft += obj.offsetLeft;
      curtop += obj.offsetTop;
    } while (obj = obj.offsetParent);
    return [curleft,curtop];
  }
}

// ---------------------------------------------------------------------------------------

function facebook_share(url) {
  var x = 600;
  var y = 400;

  var pos_x = (screen.width - x) / 2;
  var pos_y = (screen.height - y) / 2 - 20;
  var win_x = x + 30;
  var win_y = y + 30;

  //       http://www.facebook.com/sharer.php?u=&t=
  fname = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(url);

  var win_features = "menubar=no,scrollbars=no,resizable=no,status=no,width=" + win_x + ",height=" + win_y + ",left=" + pos_x + ",top=" + pos_y;
  window.open(fname,"",win_features);
}

// -->

