<!--

// convert date function

function convert_date(date_to_convert)
{
  var new_year;
  var new_month;
  var new_day;
  
//  new_year = date_to_convert.getFullYear();
  new_year=date_to_convert.getYear()
  if (new_year < 2000) {new_year=new_year+1900}

  new_month = date_to_convert.getMonth();
  new_day = date_to_convert.getDate();
  var tmp_var   

  new_month++;

  tmp_var = "" + new_month

  if (tmp_var.length==1)
  {
    new_month = "0" + new_month
  }


  tmp_var = "" + new_day
  if (tmp_var.length==1)
  {
    new_day = "0" + new_day
  }


  convert_date = new_year + "-" + new_month + "-" + new_day
  return convert_date;

}

function replace(str,txt,by)
{
    var strLength = str.length;
    var txtLength = txt.length;
    if ((strLength == 0) || (txtLength == 0)) return str;

    var i = str.indexOf(txt);
    if ((!i) && (txt != str.substring(0,txtLength))) return str;
    if (i == -1) return str;

    var newstr = str.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(str.substring(i+txtLength,strLength),txt,by);

    return newstr;
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

// -->

