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.0
  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 && document.getElementById) x=document.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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);








function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}


function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}

var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);







// Sets a client-side cookie. Only first 2 parameters are required.
// If no 'expires' value is set the cookie is a session cookie.
function setCookie(name, value, expires, path, domain, secure) {
  document.cookie = escape(name) + '=' + escape(value) +
    (expires ? '; EXPIRES=' + expires.toGMTString() : '') +
    (path ? '; PATH=' + path : '') +
    (domain ? '; DOMAIN=' + domain : '') +
    (secure ? '; SECURE' : '');
}
// Read & return the value of the specified cookie
function getCookie(name) {
  var value = null;
  if (document.cookie) {
    var arr = document.cookie.split((escape(name) + '='));
    if (2 <= arr.length) {
      var arr2 = arr[1].split(';');
      value = unescape(arr2[0]);
    }
  }
  return value;
}
// Deletes the cookie with the specified name by expiring it
function deleteCookie(name) {
  var tmp = getCookie(name);
	if (tmp)
	  setCookie(name,tmp,(new Date(1)));
}


function setDefaultMode()
{
        window.deleteCookie('textonly');
	history.go(0);
}

function setTextOnly()
{
        window.setCookie('textonly', true);
	history.go(0);
}







// Global variables
var currentTab,currentLink;

// Change if you want to use another class for highlighting
var tabHighlightClass='tabon'; 

function initTabs()
{
// change if you have another main navigation ids for tabbed or normal element id
	var navElement='mainnav';
	var navElementTabbedId='mainnavtabbed';
	
// pattern to check against to identify "back to menu" links
	var backToMenu=/#top/;

	var n,as,id,i,linklength,lastlink;
	if(document.getElementById && document.createTextNode)
	{
		var n=document.getElementById(navElement);
		n.id=navElementTabbedId;
		n=document.getElementById(navElementTabbedId)
		var as=n.getElementsByTagName('a');
		for (var i=0;i<as.length;i++)
		{
			as[i].onclick=function(){showTab(this);return false}
			//as[i].onkeypress=function(){showTab(this);return false}
			var id=as[i].href.match(/#(\w.+)/)[1];
			if(i==0)
			{
				currentTab=id;
				currentLink=as[i];
			}
			if(document.getElementById(id))
			{
				linklength=document.getElementById(id).getElementsByTagName('a').length;
				if(linklength>0)
				{
					lastlink=document.getElementById(id).getElementsByTagName('a')[linklength-1]
					if(backToMenu.test(lastlink.href))
					{
						lastlink.parentNode.removeChild(lastlink);
					}
				}
				document.getElementById(id).style.display='none';
			}
		}		
		if(document.getElementById(currentTab))
		{
			document.getElementById(currentTab).style.display='block';
		}
		currentLink.className=currentLink.className+' '+tabHighlightClass
	}
}  
function showTab(o)
{
	var id;
	if(currentTab)
	{
		if(document.getElementById(currentTab))
		{
			document.getElementById(currentTab).style.display='none';
		}
		currentLink.className=currentLink.className.replace(' '+tabHighlightClass,'')
	}
	var id=o.href.match(/#(\w.+)/)[1];
	currentTab=id;
	currentLink=o;
	if(document.getElementById(id))
	{
		document.getElementById(id).style.display='block';
	}
	o.className=o.className+' '+tabHighlightClass
}










// Search Form

function submitForm()
{

if(window.formSearch.searchText.value != "")
{
document.formSearch.submit();
}
else
{
alert("Please enter some text");
}

}



function openWin(name)
{
var newstory = name;
winll  = window.open(newstory,'intWindow','toolbar=0,status=0,scrollbars=0,resizable=1,width=450,height=400');
winll.focus();
}



function open3d(name){
var newstory = name;
winll  = window.open(newstory,'intWindow','toolbar=0,status=0,scrollbars=0,resizable=1,width=380,height=360');
winll.focus();

}



function openWindow(url)	
{

	var leftpos=50;
	var toppos=50;			
	var ls_isNetscape="YES";
	var ls_navName=navigator.appName.toLowerCase();
	var ls_url;

	if(screen) 
	{
		leftpos=(screen.width/2)-230;
		toppos=(screen.height/2)-200;
	}

	if(ls_navName.indexOf("netscape") == -1) 
	{
		ls_isNetscape="NO";
	}

	winll  = window.open(url, "thePopUp", "width=450,height=400,left=" + leftpos + ",top=" + toppos + ",toolbar=no,location=no,status=no,menubar=no,resizable=yes,scrollbars=yes");
	winll.focus();
}








function doLinks(url,action)
{
	if (action == "default")
	{
		winll  = window.open(url,'intWindow','toolbar=0,status=0,scrollbars=1,resizable=1,width=520,height=600');
		winll.focus();
	}
	else if (action == "close")
	{
		self.close();
	}
	else if (action == "mail")
	{
		top.location.href='mailto:chrysc@gusco.com?subject=GUS%20Money%20Purchase%20Pension%20Plan%20Feedback';
	}
	else if (action == "print")
	{
		window.print();
	}
	else if (action == "getacrobat")
	{
		winll  = window.open('http://www.adobe.com/products/acrobat/readstep2.html','intWindow','toolbar=1,status=1,scrollbars=1,resizable=1,width=780,height=600');
		winll.focus();
	}
	else if (action == "mainbody")
	{
		parent.location.href=url;
	}
	else if (action == "addfavorite")
	{
		bookmarkurl="http://sonycms"
		bookmarktitle="GUS Money Purchase Pension Plan";
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
	}
	else
	{
	    top.location.href=url;
	}
}

// this function gets the cookie, if it exists
function Get_downloadCookie( name ) {
	
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}

