


/***************Image Randomizer*************/



 // Type the number of images you are rotating.

 NumberOfImagesToRotate = 6;

 // Specify the first and last part of the image tag. 

 FirstPart = '<img src="/images/e';
 LastPart = '.jpg" width="196">';

 function printImage() {
 var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
 document.write(FirstPart + r + LastPart);
 }


/***************Image Randomizer*************/





/********** showCopyright **********/
function showCopyright(){
var myDate = new Date();
var myYear= myDate.getYear();
var out = '';

// solve Y2K problem
if((myYear>=0)&&(myYear<=1900)){
    myYear=myYear+1900;
}
out = "<font color=white>" + "&copy;" + myYear + " Enerplus" + "</font>";
return out;
}

/********** showContact **********/
function showContact(){
var myURL = window.document.URL;

var out = "E-mail us at <a href=\"mailto:general@enerplus.com?subject=Web site inquiry from: " + myURL + "\">general@enerplus.com</a>";
return out;
}

// ****** MouseOver Function ******
function swapImage(){
  if (document.images){
    var i,theObj,j=0,swapArray=new Array,oldArray=document.swapImgData;
    for (i=0; i < (swapImage.arguments.length-2); i+=3){
		    theObj = eval(swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1])
      if (theObj != null){
        swapArray[j++] = theObj;
        swapArray[j++] = (oldArray==null || oldArray[j-1]!=theObj)?theObj.src:oldArray[j];
        theObj.src = swapImage.arguments[i+2];
				  }
		  }
    document.swapImgData = swapArray; //used for restore
		}
}

/*******Pop-Up Window Script*******/
function launch(url) {
  self.name = "opener";
  remote = open(url, "remote", "directories,location,menubar,resizable,scrollbars,status,toolbar,width=700,height=540,left=20,top=20");
}
 /*********Glossary Popups*************/
function glossary_ttm_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 250;
  wndHeight = 350;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("/glossary/glossary_ttm.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=150,width=250");
}

function glossary_nda_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 250;
  wndHeight = 350;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("glossary_nda.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=150,width=250");
}

function glossary_pd_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 250;
  wndHeight = 450;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("/glossary/glossary_pd.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=450,width=250");
}

function glossary_dad_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 250;
  wndHeight = 350;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("/glossary/glossary_dad.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=350,width=250");
}

function glossary_rd_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 250;
  wndHeight = 350;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("/glossary/glossary_rd.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=350,width=250");
}

function glossary_ed_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 250;
  wndHeight = 350;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("/glossary/glossary_ed.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=350,width=250");
}


/**********nav stuff**************/

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function tsx_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 760;
  wndHeight = 400;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("tsx_lg.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=400,width=760");
}

function nyse_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 760;
  wndHeight = 400;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("nyse_lg.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=400,width=760");
}

function compound_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 760;
  wndHeight = 400;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("compound_lg.shtml", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=400,width=760");
}

function simple_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 760;
  wndHeight = 400;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("simple_lg.shtml", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=400,width=760");
}

function to_popupWindow() {
  var X = 0;
  var Y = 0;
  wndWidth = 200;
  wndHeight = 300;
  if (screen.availWidth){
    X = (screen.availWidth / 2) - (wndWidth / 2);
    Y = (screen.availHeight / 2) - (wndHeight / 2);
  }
  window.open("toronto_details.asp", "Enerplus","left=" + X + "screenX=" + X +
"screenY=" + Y + ",top=" + Y +
",toolbar=0,location=0,scrollbars=0,resizable=0,height=200,width=300");
}
 
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
 
