<!--
function disableMenu(menuItem, disimg, enimg) {
	var f = parent.parent.frames["contents"];
	var d=f.document;
	if (d) {
		m=d.getElementById(menuItem); // Load image element for this menu item then replace with greyed out image
		m.src="images/design%20elements/side%20panel%20slices/images/" + disimg;
		m.$rsrc = "images/design%20elements/side%20panel%20slices/images/"+ enimg; // save old image to restore
		m.$r_onmousedown=m.onmousedown; // save old event handlers
		m.$r_onmouseover=m.onmouseover;
		m.$r_onmouseout=m.onmouseout;
		m.$r_onmouseup=m.onmouseup;
		m.onmousedown=""; // cancel event handlers, so button no longer responds to mouse events
		m.onmouseover="";
		m.onmouseout="";
		m.onmouseup="";
		m.style.cursor="default";
		m.$disabled=true; // flag menu item as disabled
		}
}

function restoreMenu(){
	var f = parent.parent.frames["contents"];
	var d=f.document;

	if (d) {
		var i;
		// restore the previously disabled menu item - if any.
		for (i=0; img = d.images[i]; i++) {
			if (img.$disabled){
				img.src=img.$rsrc;
				img.onmousedown=img.$r_onmousedown;
				img.onmouseover=img.$r_onmouseover;
				img.onmouseout=img.$r_onmouseout;
				img.onmouseup=img.$r_onmouseup;
				img.style.cursor="auto"
				img.$disabled = false;
			}
		}
	}
}
function getPageName(URL) {
	var p=URL.substring(URL.lastIndexOf("/")+1,500);
	return p;
}


function getInnerText(el){ 
    return el.innerHTML.replace(/<[\/\!]*?[^<>]*­?>/g,""); 
} 
    
var formPos=0;
var timerID=0;

function showFbForm(show){
	var d = document;
	var el= d.getElementById("feedback");
	if (el){
			if (show){
				timerID=setTimeout("animateFbForm()",1);
			} else {
				el.style.visibility="hidden";
				formPos=0;
			}
		}
	setName();
	}
		

function animateFbForm(){
	formPos -= 3;
	//debugOut(formPos);
	if (formPos > -170)	{
		var el= document.getElementById("feedback");
		if (el){
			if (isIE()){
				el.style.posTop=formPos;
			} else {
				el.style.top=formPos;
			}
			if (el.style.visibility="hidden") el.style.visibility="visible";
			setTimeout("animateFbForm()",1);
		}
		} else {
		clearTimeout(timerID);
	}
}

function debugOut(txt){
	el=document.getElementById("debug");
	el.innerHTML=el.innerHTML+txt;
}
	
function setToWelcome(){
	setToPage("welcome_right_panel.htm");
}

function setToMap(){ //sets the right frame to docmap. If docmap already loaded, reloads in order to fire onload event to trigger writeDocMap()
	var l="docmap.htm";
	var f=parent.parent.frames["map"]
	if (!isIE()) {
		if (getPageName(f.location.href) != l) f.location.href = l; else f.location.reload();
	} else {
		if (getPageName(f.document.location.href) != l) f.document.location.href = l; else f.document.location.reload();
	}
}

function setToPage(l){
	f=parent.parent.frames["map"]
	if (!isIE()) {
		/* alert(l+"----"+f.location.href);*/
		if (getPageName(f.location.href) != l) f.location.href = l; 
	} else {
		if (getPageName(f.document.location.href) != l) f.document.location.href = l; 
	}
}

function getPageName(URL) {
	var p=URL.substring(URL.lastIndexOf("/")+1,500);
	return p;
}

function writeDocMap() {
	var sf=top.frames["main"];
	var d,sd;
	d=document;
	sd=sf.document;

	var anchorStr; 
	var mapHTML = "<h2>Page contents</h2><div onmouseover='reColor(\"dm_top\")' onmouseout='restoreColor(\"dm_top\")' id= 'dm_top' class = 'outline1'>" +
					"<a style='text-decoration:none; color: #0054B6;' href = '" + sd.location.href + "#top' target = 'main'> Top</a></div>";
	if (d) {
		var map = d.getElementById("mapblock");
		for (count=0; myAnchor=sd.anchors[count]; count++) { //loop through all anchors in the document
			anchorStr = myAnchor.innerHTML;
			anchorStr = anchorStr.toLowerCase();
			if (anchorStr.length!=0){
				if (anchorStr.indexOf ("<h3")>-1){  // if this is a major header
					var styleText="class= 'outline1'"
					} else {
					var styleText="class='outline2'"
				}
				var linkText = myAnchor.innerText
				if (!linkText){ //Netscape browser
					linkText = getInnerText(myAnchor);
				}
				var tag = "<div onmouseover='reColor(\"dm_" + count + "\")' onmouseout='restoreColor(\"dm_" + count + "\")' id= dm_" + count + " " + styleText +">" +
						 "<a style='text-decoration:none; color: #0054B6;' href = '" + sd.location + "#" + myAnchor.name + "'  target= 'main' >" + linkText + "</a></div>";
				mapHTML += tag;
			}
		}
		map.innerHTML = mapHTML;
	}
}

function getInnerText(el){ 
            return el.innerHTML.replace(/<[\/\!]*?[^<>]*­?>/g,""); 
} 
    
function reColor(id){
	var el=document.getElementById(id);
	el.$oldbg=el.style.backgroundColor;
	el.$oldcl=el.firstChild.style.color;
	el.style.backgroundColor = "#910048";
	//alert("node name="+el.firstChild.nodeName);
	//alert ("color="+el.firstChild.style.color);	
	el.firstChild.style.color="white";
	//alert ("color="+el.firstChild.style.color);
}
function restoreColor(id){
	var el=document.getElementById(id);
	el.style.backgroundColor = el.$oldbg;
	el.firstChild.style.color=el.$oldcl;
}
		
	
function setName(){
	var el=document.getElementById("pagename");
	if(el){
		el.value=document.title;
	}
}

function isNav() {
return (navigator.appName == "Netscape" && !isOpera() && !isSafari());
}
function isIE() {
return (navigator.appName == "Microsoft Internet Explorer");
}
function isOpera() {
return (navigator.userAgent.indexOf("Opera") != -1);
}
function isSafari() {
return (navigator.userAgent.indexOf("Safari") != -1);
}
//-->
	