<!-- Start

// NOTE: If you use a ' add a slash before it like this \'

// FLOATING MENU AREA - SEE NOTE BELOW FOR MOVING THE MENU UP ON THE PAGE


if (!document.layers)
document.write('<div id="Floater" style="position:absolute">')
document.write('<layer id="Floater">');


// START THE IMAGE LINKS COPY ANY ONE OF THESE 3 LINES TO ADD A NEW LINK

//var txt="<a href="../../Sage_floating_menu/feedback_form.htm?" + document.title() + "><img src="../../Sage_floating_menu/float4-feedback.gif" border="0" vspace="1" alt="Send us your feedback"></a><br>";

// Start of Fred'script
// We get the url of the current page
page = ""+document.location+""

// We determine the position of the last slash
lastSlash = page.lastIndexOf("/") + 1

// We determine the end of the url
end = page.length

// We get the document name from the last slash to the end of the url
sagepage = page.substring(lastSlash, end)

// We get the document title
sagetitle = document.title

// If there's no document title, we revert to giving the file name
if (sagetitle == "") {
sagetitle = sagepage;
}

/**
 * Read the JavaScript cookies tutorial at:
 *   http://www.netspade.com/articles/javascript/cookies.xml
 */

/**
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name)
{
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1)
    {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    }
    else
    {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1)
    {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain)
{
    if (getCookie(name))
    {
        document.cookie = name + "=" + 
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}

var LevelBack ="";
PathArray = page.split("/");
var ArraySize = PathArray.length;

for (var i =(ArraySize-2); i > 0; i--) 
{
	var path = new String(PathArray[i]);
	

	if (path.search(/Sage1000v2_1/i) != -1)
	{
	    break;
	}
	LevelBack += "../";

}

var YTop;
ButtonImages = new Array(7);
var BarType = getCookie("BarType")
var OtherBar;
if (BarType == null || BarType == 1){
ButtonImages[0] = LevelBack + "Sage_floating_menu/roof.gif";
ButtonImages[1] = LevelBack + "Sage_floating_menu/Toolbar1.gif";
ButtonImages[2] = LevelBack + "Sage_floating_menu/feedback_23.gif";
ButtonImages[3] = LevelBack + "Sage_floating_menu/forum_23.gif";
ButtonImages[4] = LevelBack + "Sage_floating_menu/docweb_23.gif";
ButtonImages[5] = LevelBack + "Sage_floating_menu/top_23.gif";
ButtonImages[6] = LevelBack + "Sage_floating_menu/roof.gif";
TipText = new String("Change To Text");
YTop = 270;
OtherBar = 2;
}else{
ButtonImages[0] = LevelBack + "Sage_floating_menu/roof.gif";
ButtonImages[1] = LevelBack + "Sage_floating_menu/Toolbar2.gif";
ButtonImages[2] = LevelBack + "Sage_floating_menu/float4-feedback.gif";
ButtonImages[3] = LevelBack + "Sage_floating_menu/Sage_forum.gif";
ButtonImages[4] = LevelBack + "Sage_floating_menu/DocWeb_home.gif";
ButtonImages[5] = LevelBack + "Sage_floating_menu/float4-top2.gif";
ButtonImages[6] = LevelBack + "Sage_floating_menu/roof.gif";
TipText = new String("Change To Icons");
YTop = 450;
OtherBar = 1;
}


//End of Fred's script

document.write('<img src=' + ButtonImages[0] + ' border="0" vspace="1"><br>');

document.write('<a href="#" onclick = "SetAndReload()"><img src=' + ButtonImages[1] + ' border="0" vspace="1" alt=\"' + TipText + '\"></a><br>');

document.write('<a href="#" onClick="window.open(\'http://www.sage.co.uk/Sage1000v2_1/sage_floating_menu/feedback_form.php?page=' + sagepage + '&title=' + sagetitle +'\',\'Feedback\',\'scrollbars=no, toolbar=no,status=yes,width=820,height=507,top=150,left=150\')"><img src=' + ButtonImages[2] + ' border="0" vspace="1" alt="Send Us Your Feedback"></a><br>');

document.write('<a href="http://www.sageenterprisesolutions.com/docweb/files/docweb.asp" target="_blank"><img src=' + ButtonImages[4] + ' border="0" vspace="1" alt="Visit the Documentation Website"></a><br>');

document.write('<a href="http://forums.sage.co.uk/Login.aspx?ReturnUrl=%2fdefault.aspx" target="_blank"><img src=' + ButtonImages[3] + ' border="0" vspace="1" alt="Visit the Sage 1000 Forum"></a><br>');

document.write('<a href="http://www.sage.co.uk" target="_blank"><img src="' + LevelBack + 'Sage_floating_menu/sage_23.gif" border="0" vspace="1" alt="Visit the Sage Website"></a><br>');

document.write('<a href="#" onclick = "window.external.AddFavorite(location.href, document.title);"><img src="' + LevelBack + 'Sage_floating_menu/favs.jpg" border="0" vspace="1" alt="Add to Favourites"></a><br>');

document.write('<a href="#top"><img src=' + ButtonImages[5] + ' border="0" vspace="1" alt="Go to the top of the page"></a><br>');

document.write('<img src=' + ButtonImages[6] + ' border="0" vspace="1"><br>');

document.write('</layer>');




// COPYRIGHT 2007 © Allwebco Design Corporation
// NOTE: If you add links you will need to alter the "placeY" 275 number below


if (!document.layers)
document.write('</div>')


function SetAndReload(){
	var expires = new Date(2100, 1, 1);
	setCookie("BarType", OtherBar, expires, "/", "");
	history.go(0);
}


function FloatMenu()
{
	var Xloc = 0,
	Yloc = YTop;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	function SetMenu(id)
	{
		var GetElements=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
		if(document.layers)GetElements.style=GetElements;
		GetElements.sP=function(x,y){this.style.right=x;this.style.top=y;};
		GetElements.x = Xloc;
		GetElements.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		GetElements.y -= Yloc;
		return GetElements;
	}
	window.LoCate_XY=function()
	{
		var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		ftlObj.y += (pY - Yloc - ftlObj.y)/15;
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("LoCate_XY()", 10);
	}
	ftlObj = SetMenu("Floater");
	LoCate_XY();
}
FloatMenu();


//  End -->

