<!--// hide
// Copyright © 2005 Symphony Systems. All Rights Reserved.

// function to obfusticate email address  (link argument is optional)
// call like this: document.write(display_email('user','domain','link text'));

function display_email(user,domain,link){
  if (link == null) {
    return("<a href='mailto:" + user + "@" + domain + "'" + ">" + user + "@" + left_match(domain,"?") + "</a>");
  } else {
    return("<a href='mailto:" + user + "@" + domain + "'" + ">" + link + "</a>");
  }
}

// function returns part of a string prior to occurance of passed in char
function left_match(string,match){
  var lm = (string.indexOf(match) > 0) ? string.substring(0,string.indexOf(match)) : string;
  return(lm);
}

function refresh_screen(){
  window.location.reload();
}

function OpenNewWindow(theURL,winName,features){
  window.open(theURL,winName,features);
}

function OpenNewWindowConsent(message,theURL,winName,features){
  if (confirm(message))
    window.open(theURL,winName,features);
}

function linkTrigger(statusmsg){
  if (!statusmsg){statusmsg = '';}
    window.status = statusmsg;
}

function translate(lp){
  if (location.hostname.substring(0, 14) == 'www.sch.edu.au') { // at home
    if (lp != 'en_en') {
      window.location='http://babelfish.altavista.com/babelfish/urltrurl?lp='+lp+'&url='+window.location.href;
    }
  } else { // away
    var strHref = window.location.href
    var myurl = strHref.substring(strHref.indexOf("url=")+4,strHref.length);
    if (lp == 'en_en') {
      window.location=unescape(myurl); // note need to decode url which is sometimes encoded by babelfish
    } else {
      window.location='http://babelfish.altavista.com/babelfish/urltrurl?lp='+lp+'&url='+unescape(myurl)
    }
  }
}

//-->