//** Tab Content script v2.0- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Updated Oct 7th, 07 to version 2.0. Contains numerous improvements:
//   -Added Auto Mode: Script auto rotates the tabs based on an interval, until a tab is explicitly selected
//   -Ability to expand/contract arbitrary DIVs on the page as the tabbed content is expanded/ contracted
//   -Ability to dynamically select a tab either based on its position within its peers, or its ID attribute (give the target tab one 1st)
//   -Ability to set where the CSS classname "selected" get assigned- either to the target tab's link ("A"), or its parent container
//** Updated Feb 18th, 08 to version 2.1: Adds a "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically
//** Updated April 8th, 08 to version 2.2: Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) 
////NO NEED TO EDIT BELOW////////////////////////
function ddtabcontent(tabinterfaceid){
 this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
 this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
 this.enabletabpersistence=true
 this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
 this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
 this.subcontentids=[] //Array to store ids of the sub contents ("rel" attr values)
 this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
 this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
}
ddtabcontent.getCookie=function(Name){ 
 var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
 if (document.cookie.match(re)) //if cookie found
  return document.cookie.match(re)[0].split("=")[1] //return its value
 return ""
}
ddtabcontent.setCookie=function(name, value){
 document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
}
ddtabcontent.prototype={
 expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
  this.cancelautorun() //stop auto cycling of tabs (if running)
  var tabref=""
  try{
   if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
    tabref=document.getElementById(tabid_or_position)
   else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
    tabref=this.tabs[tabid_or_position]
  }
  catch(err){alert("Invalid Tab ID or position entered!")}
  if (tabref!="") //if a valid tab is found based on function parameter
   this.expandtab(tabref) //expand this tab
 },
 cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
  if (dir=="next"){
   var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
  }
  else if (dir=="prev"){
   var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
  }
  if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
   this.cancelautorun() //stop auto cycling of tabs (if running)
  this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
 },
 setpersist:function(bool){ //PUBLIC function to toggle persistence feature
   this.enabletabpersistence=bool
 },
 setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
  this.selectedClassTarget=objstr || "link"
 },
 getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
  return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
 },
 urlparamselect:function(tabinterfaceid){
  var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
  return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
 },
 expandtab:function(tabref){
  var subcontentid=tabref.getAttribute("rel") //Get id of subcontent to expand
  //Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through
  var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
  this.expandsubcontent(subcontentid)
  this.expandrevcontent(associatedrevids)
  for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
   this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : ""
  }
  if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
   ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition)
  this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
 },
 expandsubcontent:function(subcontentid){
  for (var i=0; i<this.subcontentids.length; i++){
   var subcontent=document.getElementById(this.subcontentids[i]) //cache current subcontent obj (in for loop)
   subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none" //"show" or hide sub content based on matching id attr value
  }
 },
 expandrevcontent:function(associatedrevids){
  var allrevids=this.revcontentids
  for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
   //if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
   document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
  }
 },
 setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
  for (var i=0; i<this.hottabspositions.length; i++){
   if (tabposition==this.hottabspositions[i]){
    this.currentTabIndex=i;
    doFlashThing("homeBanner"+i);
    break
   }
  }
 },
 autorun:function(){ //function to auto cycle through and select tabs based on a set interval
  this.cycleit('next', true)
 },
 cancelautorun:function(){
  if (typeof this.autoruntimer!="undefined")
   clearInterval(this.autoruntimer)
 },
 init:function(automodeperiod){
  var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
  var selectedtab=-1 //Currently selected tab index (-1 meaning none)
  var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
  this.automodeperiod=automodeperiod || 0
  for (var i=0; i<this.tabs.length; i++){
   this.tabs[i].tabposition=i //remember position of tab relative to its peers
   if (this.tabs[i].getAttribute("rel")){
    var tabinstance=this
    this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
    this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel") //store id of sub content ("rel" attr value)
    this.tabs[i].onclick=function(){
     tabinstance.expandtab(this)
     tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
     return false
    }
    
    /*  SHANE CODE  */
    var defaultTab = this.tabs[0]
    document.getElementById("hptab-default").onclick=function(){
     tabinstance.expandtab(defaultTab)
     tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
     return false
    }         
    
    /*  END SHANE CODE  */
    
    if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
     this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
    }
    if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
     selectedtab=i //Selected tab index, if found
    }
   }
  } //END for loop
  if (selectedtab!=-1) //if a valid default selected tab index is found
   this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
  else //if no valid default selected index found
   this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
  if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
   this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
  }
 } //END int() function
} //END Prototype assignment
/*
    We did not design our first template optimized for future script additions well.  So
    in the attempt to refrain from having to update 50 pages now, we are going to try
    add all scripts to this one repository which will in return update all 50 pages
    at once.
*/
/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, wm, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
 if (!document.getElementById) { return; }
 this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
 this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
 this.params = new Object();
 this.variables = new Object();
 this.attributes = new Array();
 if(swf) { this.setAttribute('swf', swf); }
 if(id) { this.setAttribute('id', id); }
 if(w) { this.setAttribute('width', w); }
 if(h) { this.setAttribute('height', h); }
 if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
 this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
 if(c) { this.addParam('bgcolor', c); }
 var q = quality ? quality : 'high';
 this.addParam('quality', q);
 this.setAttribute('useExpressInstall', useExpressInstall);
 this.setAttribute('doExpressInstall', false);
 var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
 this.setAttribute('xiRedirectUrl', xir);
 this.setAttribute('redirectUrl', '');
 if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
 setAttribute: function(name, value){
  this.attributes[name] = value;
 },
 getAttribute: function(name){
  return this.attributes[name];
 },
 addParam: function(name, value){
  this.params[name] = value;
 },
 getParams: function(){
  return this.params;
 },
 addVariable: function(name, value){
  this.variables[name] = value;
 },
 getVariable: function(name){
  return this.variables[name];
 },
 getVariables: function(){
  return this.variables;
 },
 getVariablePairs: function(){
  var variablePairs = new Array();
  var key;
  var variables = this.getVariables();
  for(key in variables){
   variablePairs.push(key +"="+ variables[key]);
  }
  return variablePairs;
 },
 getSWFHTML: function() {
  var swfNode = "";
  if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
   if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); }
   swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
   swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" wmode="opaque" swliveconnect="true" ';
   var params = this.getParams();
    for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
   var pairs = this.getVariablePairs().join("&");
    if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
   swfNode += '/>';
  } else { // PC IE
   if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
   swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
   swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" /><param name="swliveconnect" value="true" /><param name="wmode" value="opaque" />';
   var params = this.getParams();
   for(var key in params) {
    swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
   }
   var pairs = this.getVariablePairs().join("&");
   if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
   swfNode += "</object>";
  }
  return swfNode;
 },
 write: function(elementId){
  if(this.getAttribute('useExpressInstall')) {
   // check to see if we need to do an express install
   var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
   if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
    this.setAttribute('doExpressInstall', true);
    this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    this.addVariable("MMdoctitle", document.title);
   }
  }
  if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
   var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
   n.innerHTML = this.getSWFHTML();
   return true;
  }else{
   if(this.getAttribute('redirectUrl') != "") {
    document.location.replace(this.getAttribute('redirectUrl'));
   }
  }
  return false;
 }
}
/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
 var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
 if(navigator.plugins && navigator.mimeTypes.length){
  var x = navigator.plugins["Shockwave Flash"];
  if(x && x.description) {
   PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
  }
 }else{
  // do minor version lookup in IE, but avoid fp6 crashing issues
  // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
  try{
   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
  }catch(e){
   try {
    var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
    PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
    axo.AllowScriptAccess = "always"; // throws if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
   } catch(e) {
    if (PlayerVersion.major == 6) {
     return PlayerVersion;
    }
   }
   try {
    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   } catch(e) {}
  }
  if (axo != null) {
   PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
  }
 }
 return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
 this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
 this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
 this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
 if(this.major < fv.major) return false;
 if(this.major > fv.major) return true;
 if(this.minor < fv.minor) return false;
 if(this.minor > fv.minor) return true;
 if(this.rev < fv.rev) return false;
 return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
 getRequestParameter: function(param) {
  var q = document.location.search || document.location.hash;
  if(q) {
   var pairs = q.substring(1).split("&");
   for (var i=0; i < pairs.length; i++) {
    if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
     return pairs[i].substring((pairs[i].indexOf("=")+1));
    }
   }
  }
  return "";
 }
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
 if (window.opera || !document.all) return;
 var objects = document.getElementsByTagName("OBJECT");
 for (var i=0; i < objects.length; i++) {
  objects[i].style.display = 'none';
  for (var x in objects[i]) {
   if (typeof objects[i][x] == 'function') {
    objects[i][x] = function(){};
   }
  }
 }
}
// fixes bug in fp9 see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
deconcept.SWFObjectUtil.prepUnload = function() {
 __flash_unloadHandler = function(){};
 __flash_savedUnloadHandler = function(){};
 if (typeof window.onunload == 'function') {
  var oldUnload = window.onunload;
  window.onunload = function() {
   deconcept.SWFObjectUtil.cleanupSWFs();
   oldUnload();
  }
 } else {
  window.onunload = deconcept.SWFObjectUtil.cleanupSWFs;
 }
}
if (typeof window.onbeforeunload == 'function') {
 var oldBeforeUnload = window.onbeforeunload;
 window.onbeforeunload = function() {
  deconcept.SWFObjectUtil.prepUnload();
  oldBeforeUnload();
 }
} else {
 window.onbeforeunload = deconcept.SWFObjectUtil.prepUnload;
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;
// *** Joost added to restart Flash movie on each tab click
function doFlashThing(FlashID) {
     var flashMovie=getFlashMovieObject(FlashID);
     flashMovie.play();
}
 
function getFlashMovieObject(movieName) {
  if (window.document[movieName]) {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1) {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}
// *** END Joost code
var bw=new cm_bwcheck()
function IEHoverPseudo() {
 var navItems = document.getElementById("mainNav").getElementsByTagName("li");
 
 for (var i=0; i<navItems.length; i++) {
  if(navItems[i].className == "menuparent") {
   navItems[i].onmouseover=function() { 
      this.className += " over"; 
      this.style.zIndex=2000;
      }
   navItems[i].onmouseout=function() { this.className = "menuparent"; }
  }
 }
}
window.onload = IEHoverPseudo;
function write_email(extension, domain, user){
 var domainsub = extension;
 var mail = user + "@" + domain + "." + domainsub;
 document.write("<a href=\"mailto:" + mail + "\">" + mail + "</a>");
}
/*Functions to hide drop down boxes when the menu is moused-over*/
function HideUncoverable() {
  if ( bw.ns4 ) {
    var l;
    for ( var i = 0 ; i < document.layers.length ; i++ ) {
      l = document.layers[i];
      if ( l.id.indexOf("hide") >= 0 ) {
        l.visibility="hide";
      }
    }
  } else if ( bw.ie4 || bw.ie5 || bw.ie6 ) {
    var oSelectLists = document.all.tags("SELECT");
    for ( var i = 0 ; i < oSelectLists.length ; i ++ ) {
      oSelectLists[i].style.visibility="hidden";
    }
  }
}
function UnHideUncoverable() {
  if ( bw.ns4 ) {
    var l;
    for ( var i = 0 ; i < document.layers.length ; i++ ) {
      l = document.layers[i];
      if ( l.id.indexOf("hide") >= 0 ) {
        l.visibility="show";
      }
    }
  } else if ( bw.ie4 || bw.ie5 || bw.ie6 ) {
    var oSelectLists = document.all.tags("SELECT");
    for ( var i = 0 ; i < oSelectLists.length ; i ++ ) {
      oSelectLists[i].style.visibility="visible";
    }
  }
}
/*Browsercheck object*/
function cm_bwcheck(){
 this.ver=navigator.appVersion
 this.agent=navigator.userAgent.toLowerCase()
 this.dom=document.getElementById?1:0
 this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera 
  this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera   
  this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6)
  this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1)
  this.ie6 = (this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6)
 this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6)
  this.ie = (this.ie4 || this.ie5 || this.ie6)
 this.mac=(this.agent.indexOf("mac")>-1)
 this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar)
 this.ns4=(!this.dom && document.layers)?1:0;
 this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6)
  this.usedom= this.ns6//Use dom creation
  this.reuse = this.ie||this.usedom //Reuse layers
  this.px=this.dom&&!this.op5?"px":""
 return this
}
/* ---Fixes flash banner clash with the drop down navigation*/
function RunFlashinsert()
{
    document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" height="264" width="535">\n');
    document.write('<param name="movie" value="/images/hp-flash.swf" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('<param name="wmode" value="opaque" />\n');
    document.write('<param name="menu" value="false" />\n');
    document.write('<embed src="/images/hp-flash.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="opaque" menu="false" height="264" width="535" />\n');
    document.write('</object>\n');
}
/*Pop Up function for WWSL*/
function popUp() {
if (self.location.hostname == "it-ep1-nko" || self.location.hostname == "is-ep1-dotnet1"){
URL = "/WWSL/index.aspx?refsite=" + self.location.hostname + ":" + self.location.port;
}
else{
URL = "/WWSL/index.aspx?refsite=" + self.location.hostname;
}
day = new Date();
id = day.getTime();
var w = 480, h = 340;
if (document.all || document.layers) {
 w = screen.availWidth;
 h = screen.availHeight;
}
var popW = 750, popH = 400;
var leftPos = (w-popW)/2, topPos = (h-popH)/2;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0, location=0, status=1, menubar=0,resizable=1,scrollbars=yes,width=" + popW + ",height=" + 400 + ",left = " + leftPos + ",top = " + topPos + "');");
}
/*Image swap code*/
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_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_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];}
}
/*Contact us functions*/
function changeImages() {
 if (document.images) {
  for (var i=0; i<changeImages.arguments.length; i+=2) {
   document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
  }
 }
}
function popup(sHref,sName,sOptions)
{
 var oWin = window.open(sHref,sName,sOptions);
 oWin.focus();
}
/*Send a page to a friend*/
function mailpage()
{
 mail_str = "mailto:?subject=Ontrack PowerControls Information";
 mail_str += "&body=I thought you might be interested in learning about Ontrack PowerControls, a software solution for searching, recovering and restoring Exchange email";
 mail_str +=". You can view..." + location.href; 
 location.href = mail_str;
}