
<!--
// **** language toggle
var newurl;
function toggle(){

{
 if (document.images)
   {
   var url = document.URL;
   }
 else
   {
   var url = document.location;
   }

 var pos = url.lastIndexOf(".")
 var ext = url.substring(pos, url.length); // get the extension 
 
 if (pos > 0)
  {
   // check if it is an old style file name
   var old_style = (url.charAt(pos-2));
   if (old_style == "_")
   {
   // get the char before the . 
   var lang_char = (url.charAt(pos-1));
 
   // check what lang. we are currently in
   if (lang_char == "e") 
   {
     newurl=url.substring(0,pos-1) + "f" + ext; // create the new url
//     document.location = newurl;
   } 
   else
   {
     newurl=url.substring(0,pos-1) + "e" + ext; // create the new url
//     document.location = newurl;
   }
   }
   else
   // must be a new style so do the new style code
   { 
   // get the char before the . 
   var lang_char = (url.charAt(pos-3));
 
   // check what lang. we are currently in
   if (lang_char == "e") 
   {
     newurl=url.substring(0,pos-3) + "fra" + ext; // create the new url
//     document.location = newurl;
   } 
   else
   {
     newurl=url.substring(0,pos-3) + "eng" + ext; // create the new url
//     document.location = newurl;
   }
  }
 } // done check if found .
  
}
}
toggle();
// -->

<!--
// 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;
}

// -->



// **** open new window
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;


// exit notice

function DisplayDisclaimer(url_, message)
{
  var default_message = "You are now leaving the Security Intelligence Review Committee Web site. Please be advised that the legislation and policy governing Government of Canada Web sites, including official language requirements do not apply beyond this point.";
  var temp_message = "" + message;
  
  // if we are passed a message use it instead of default
  if (temp_message != "undefined")
  {
    default_message = "You are now leaving the Security Intelligence Review Committee Web site. Please be advised that the legislation and policy governing Government of Canada Web sites, including official language requirements do not apply beyond this point.";
  }
  
  if (confirm(default_message))
  {
    var xpos = 0;
    var ypos = 0;
    open(url_,"NewWindow","width=750,height=450,menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes,location=yes,status=yes,screenx=" + xpos + ",screeny=" + ypos + ",left=" + xpos + ",top=" + ypos)
  }
}

// -->
