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("name") == "external") 
			anchor.target = "_blank"; 
		} 
	} 
	
window.onload = externalLinks;

var slider, move, leftposition, slideTimer;
var opened = false;
var peek = false;

function moveSlide(status) {
	
	slider = document.getElementById('slider');
	leftposition = parseInt(getStyle('slider','left'));			

	if(status == "show")
	{

		document.getElementById('tab_open').style.display = "none";
		document.getElementById('tab_close').style.display = "block";
		
		if(leftposition < -10) 
		{
			leftposition += (-10 - leftposition)/10;
			slider.style.left = leftposition + "px";
			if(move == null) {
				move = setInterval('moveSlide("show")', 20);
			}
		} 
		else 
		{
			slider.style.left = -10+"px";
			clearInterval(move);			
			clearTimeout(slideTimer);
			move = null;
		}
	
	} else if(status == "peek") {

		if(peek == false) 
		{

			document.getElementById('tab_close').style.display = "none";
			document.getElementById('tab_open').style.display = "block";

			if(leftposition < -350) {
				leftposition += (-350 - leftposition)/10;
				slider.style.left = leftposition + "px";
				if(move == null) {
					move = setInterval('moveSlide("peek")', 20);
				}
			} else {
				slider.style.left = -350+"px";
				clearInterval(move);			
				move = null;
				peek = true;
				slideTimer = setTimeout('moveSlide("hide")', 5000);
			}
	
		}

	} else {

		if(leftposition > -367) {		
			leftposition += (-380 - leftposition)/10;
			slider.style.left = leftposition + "px";
			if(move == null) {
				move = setInterval('moveSlide("hide")', 20);
			}
		} else {
			slider.style.left = -370+"px";
			clearInterval(move);
			move = null;	
			peek = false;
		}
	
	}
}



function getStyle(el,styleProp) 
{  
	var x = document.getElementById(el);  
	if (x.currentStyle)  
		var y = x.currentStyle[styleProp]; 
	else if (window.getComputedStyle)  
		var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp); 
	return y; 
}	


function getHeight() {
	return (window.frames['monIframe'].returnHeight())+20;	
}

function setHeight() {
	var docHeight=getHeight();
	document.getElementById('monIframe').style.height = docHeight+'px';
	document.getElementById('iframe').style.height = docHeight+'px';
}

function showIframe() 
{
	
	document.getElementById('fogall').style.height = document.body.parentNode.scrollHeight+'px';
	document.getElementById('fogall').style.display = 'block';
	document.getElementById('iframe').style.display = 'block';	
	//setHeight();	
}



function hideIframe() 
{
	parent.document.getElementById('fogall').style.display='none';
	parent.document.getElementById('iframe').style.display='none';			
}


// BrowserCheck Object
function BrowserCheck() {
  // note: this basic function was altered by d.owen to overcome ns4 bug on config page;
  // notes below were added along with changes on 52201.

  var b = navigator.appName
  if (b=="Netscape") this.b = "ns"
  else if (b=="Microsoft Internet Explorer") this.b = "ie"
  else this.b = b
  this.version = navigator.appVersion
  this.v = parseInt(this.version)
  this.ns = (this.b=="ns" && this.v>=4)
  this.ns4 = (this.b=="ns" && this.v==4)
  this.ns5 = (this.b=="ns" && this.v==5)
  this.ie = (this.b=="ie" && this.v>=4)
  this.ie4 = (this.version.indexOf('MSIE 4')>0)
  this.ie5 = (this.version.indexOf('MSIE 5')>0)
  this.min = (this.ns||this.ie)
  this.pc = (this.version.indexOf('Win')>0)
  this.mac = (this.version.indexOf('PPC')>0)

  // next line added by d.owen on 52201
  this.ns408=(parseFloat(this.version)==4.08);
}
var is = new BrowserCheck()




// Function that pops up a window of a specific size on all target browsers
//    Pass the window URL, the width and the height
function popWindow(urlVal,windowName,widthVal,heightVal,scrollBars,menuBar,reSizeable) {
  var paraString
  var wt
  var ht
  
  if ((is.ie) && (is.mac)) {
      wt = widthVal - 16;
      ht = heightVal - 16;
    } else if (is.ns){
      wt = widthVal;
      ht = heightVal + 2;
    } else {
      wt = widthVal;
      ht = heightVal;
    }
  paraString = "width=" + wt + ",height=" + ht;
  if (scrollBars == 1) {
    paraString = paraString + ",scrollbars=yes";
    } else {
    paraString = paraString + ",scrollbars=no";
    }
  if (menuBar == 1) {
    paraString = paraString + ",menubar=yes";
    } else {
    paraString = paraString + ",menubar=no";
    }

  paraString = paraString + ",resizable=yes";
  paraString = paraString + ",screenX=100,top=100";
  poppedWindow = window.open(urlVal,windowName,paraString);
  poppedWindow.focus();
 
 }
 
 
