// JavaScript Document
function picpopup(URL1, text, pix_width, pix_height){
  F=open("","_new","width="+pix_width+",height="+pix_height+",resizable=yes")
  with(F.document){
    open()
    write("<html>")
    write("<head><title>"+text+"</title></head>")
    write("<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' >")
    write("<table width=100%><TR><TD align='center' valign='middle'>")
    write("<img onclick='window.close();' src='"+URL1+"'>")
    write("</td></tr></table>")
    write("</body>")
    write("</html>")
    close()
}
F.resizeTo(pix_width+20,pix_height+42)
F.focus()

}

function popup(URL1, pix_width, pix_height){
  F=open(URL1,"_new","width="+pix_width+",height="+pix_height+",resizable=yes")
  F.resizeTo(pix_width+20,pix_height+42)
  F.focus()
}

window.onload = function() {
  var pattern = '/'+window.location.host.replace(/-/, '')+'/';
  links = document.getElementsByTagName('a');
   for(i=0; i<links .length; i++) {
    var clink = links[i].href.replace(/-/, '');
    if(!clink.match(pattern) && !links[i].href.match(/mailto/)) {
     links[i].target = '_blank';
     //links[i].onClick = 'var win = window.open(x, "_blank"); return true;';
    }
  }
}
