/*<!--************************************************************************************
DHTML Floating Toolbar Akzo Nobel
Designed for and tested in
IE4.x, IE5.x, IE6.x, NS6.x and Mozilla1.x 
on Intel/Windows95/98/2000/XP.

July 2002, Ben Plat,
Evident Interactive BV,
Utrecht Netherlands
www.evident.nl

++++++++++ CONFIGURATION SECTION ++++++++++++++++++++++++++++++++++++++++++++++++++++++
First, link this script to your HTML, by putting the following line
in your HEAD section:

	<script src="[path to this script/]toolbar_an.js" type="text/javascript"></script>

Next, put the onLoad eventhandler in the bodytag:

	onload="ft_init()"


Set the sliding direction of the toolbar below these comments; 
for top side (folding out down), set toolbarDir = "top"
for bottom side (folding out up), set toolbarDir = "bottom"
************************************************************************************-->*/
var toolBarDir = "top"
/*************************************************************************************
Positioning:
The floating toolbar is designed to behave like any element in the page flow.
So, put the following lines in your HTML where you want the toolbar to appear:

	<div id="floatingToolbar" style="position:relative;">
	<div id="ft_barOff" style="position:absolute;top:0px;left:0px;visibility:hidden;"></div>
	<div id="ft_barOn" style="position:absolute;top:0px;left:0px;visibility:hidden;"></div>
	</div>
	
When you rather want the toolbar to have an absolute position, 
strip off the outer div (id=floatingToolbar) and set
position of toolbar below this comment (pixels, from upper left corner of window)
*************************************************************************************/
var toolbarTop = 0 
var toolbarLeft = 0
/*************************************************************************************
INIT SECTION (fires onLoad):
*************************************************************************************/
ft_aww_off = new Image()
ft_aww_off.src = '/patnetwebset/includes/toolbar/ft_aww_off.gif'
ft_aww_on = new Image()
ft_aww_on.src = '/patnetwebset/includes/toolbar/ft_aww_on.gif'

ft_visit_off = new Image()
ft_visit_off.src = '/PATnetwebset/Picture.aspx?Text=VISIT+AKZONOBEL.INTRA&Backcolor=004E75&Fontcolor=White&linecolor=26688A&Width=200&Align=center&fontheight=8&comp=100'
ft_visit_on = new Image()
ft_visit_on.src = '/PATnetwebset/Picture.aspx?Text=VISIT+AKZONOBEL.INTRA&Backcolor=004E75&Fontcolor=66CCFF&linecolor=26688A&Width=200&Align=center&fontheight=8&comp=100'
					

ft_addresses_off = new Image()
ft_addresses_off.src = '/patnetwebset/includes/toolbar/ft_addresses_off.gif'
ft_addresses_on = new Image()
ft_addresses_on.src = '/patnetwebset/includes/toolbar/ft_addresses_on.gif'

var html_1 = ''
html_1 += '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">'
html_1 += '<tr>'
html_1 += '	<td><a href=\"javascript:ft_toggle()\" onmouseover=\"ft_imageOn(\'ft_aww\');window.status=\'Akzo Nobel Worldwide\';return true\" onmouseout=\"ft_imageOff(\'ft_aww\');window.status=\'\';return true\"><img name=\"ft_aww\" src=\"/patnetwebset/includes/toolbar/ft_aww_off.gif\" width=\"200\" height=\"17\" border=\"0\" alt=\"\"></a></td>'
html_1 += '</tr>'
html_1 += '<tr>'
html_1 += '	<td><img src=\"images/ft_interlace.gif\" width=\"200\" height=\"16\" border=\"0\" alt=\"\"></td>'
html_1 += '</tr>'
html_1 += '</table>'

var html_2 = ''
//html_2 += '<form name=\"ft_searchform\" action=\"http://search.akzonobel.com/cgi-bin\/RS.cgi/\" method=\"post\" target=\"_blank\">'
html_2 += '<input type=\"hidden\" name=\"subdivision\" value=\"interactive_toolbar\">'
html_2 += '<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">'
html_2 += '<tr>'
html_2 += '	<td colspan=\"2\"><a href=\"http://www.akzonobel.com\" target=\"_blank\" onmouseover=\"ft_imageOn(\'ft_visit\');window.status=\'Visit www.akzonobel.com\';return true\" onmouseout=\"ft_imageOff(\'ft_visit\');window.status=\'\';return true\"><img name=\"ft_visit\" src=\"/patnetwebset/includes/toolbar/ft_visit_off.gif\" width=\"200\" height=\"16\" border=\"0\" alt=\"\"></a></td>'
html_2 += '</tr>'
html_2 += '<tr>'
html_2 += '	<td valign=\"middle\" align=\"right\" width=\"145\" height=\"16\" background=\"/patnetwebset/includes/toolbar/ft_search_filler.gif\"><input name=\"Search\" type=\"text\" style=\"width:120px;height:14px;border-style:solid;border-width:0px;font-size:9px;\" value="enter search term here" onFocus=\"this.value=\'\'\"></td>'
html_2 += '	<td><a href=\"javascript:ft_submitSearch()\" onmouseover=\"ft_imageOn(\'ft_search\');window.status=\'Search Akzo Nobel Worldwide\';return true\" onmouseout=\"ft_imageOff(\'ft_search\');window.status=\'\';return true\"><img name=\"ft_search\" src=\"/patnetwebset/includes/toolbar/ft_search_off.gif\" width=\"55\" height=\"16\" border=\"0\" alt=\"\"></a></td>'
html_2 += '</tr>'
html_2 += '<tr>'
html_2 += '	<td colspan=\"2\"><a href=\"http://www.akzonobel.com/home/address.asp\" target=\"_blank\" onmouseover=\"ft_imageOn(\'ft_addresses\');window.status=\'Addresses\';return true\" onmouseout=\"ft_imageOff(\'ft_addresses\');window.status=\'\';return true\"><img name=\"ft_addresses\" src=\"/patnetwebset/includes/toolbar/ft_addresses_off.gif\" width=\"200\" height=\"16\" border=\"0\" alt=\"\"></a></td>'
html_2 += '</tr>'
html_2 += '</table>'
//html_2 += '</form>'

function ft_init(){
if(document.getElementById){
	toolBarDivOff = document.getElementById('ft_barOff')
	toolBarDivOn = document.getElementById('ft_barOn')
	toolBarDivOff.style.top = toolbarTop
	toolBarDivOff.style.left = toolbarLeft
	toolBarDivOn.style.top = toolbarTop + 16
	toolBarDivOn.style.left = toolbarLeft
} else if(document.all){
	toolBarDivOff = document.all('ft_barOff')
	toolBarDivOn = document.all('ft_barOn')
	toolBarDivOff.style.pixelTop = toolbarTop
	toolBarDivOff.style.pixelLeft = toolbarLeft
	toolBarDivOn.style.pixelTop = toolbarTop + 16
	toolBarDivOn.style.pixelLeft = toolbarLeft
} 
toolBarDivOff.innerHTML = html_1
toolBarDivOn.innerHTML = html_2
toolBarDivOff.style.visibility = "visible"
toolBarDivOn.style.visibility = "visible"
}
/*************************************************************************************
FUNCTIONS (invoked by user):
*************************************************************************************/
function ft_toggle(){
	if(document.getElementById){
		toolBarDivOff = document.getElementById('ft_barOff')
		toolBarDivOn = document.getElementById('ft_barOn')
	} else if(document.all){
		toolBarDivOff = document.all('ft_barOff')
		toolBarDivOn = document.all('ft_barOn')
	} 
	if(toolBarDivOn.style.visibility == "hidden"){
		if(toolBarDir == "bottom"){		
			if(document.getElementById){
				toolBarDivOff.style.top = parseInt(toolBarDivOff.style.top)-32
				toolBarDivOn.style.top = parseInt(toolBarDivOn.style.top)-32
			} else if(document.all){
				toolBarDivOff.style.pixelTop -= 32
				toolBarDivOn.style.pixelTop -= 32
			}
		}
		toolBarDivOn.style.visibility = "visible"
		//document.forms['ft_searchform'].Search.focus()
	}else{
		if(toolBarDir == "bottom"){		
			if(document.getElementById){
				toolBarDivOff.style.top = parseInt(toolBarDivOff.style.top)+32
				toolBarDivOn.style.top = parseInt(toolBarDivOn.style.top)+32
			} else if(document.all){
				toolBarDivOff.style.pixelTop += 32
				toolBarDivOn.style.pixelTop += 32
			}
		}
		toolBarDivOn.style.visibility = "hidden"
	}
}
function ft_imageOn(image){
 //s = image.substr(image.lastindexof(":"),image.length-image.lastindexof(":"))
 //alert(image);
	//if (document.images){
		imgOn = eval(image + "_on.src");
		MM_findObj(image).src = imgOn
	//}
}
function ft_imageOff(image){	
		imgOff = eval(image + "_off.src");
		MM_findObj(image).src = imgOff	
}   

/* 
function ft_imageOn(image){
	if (document.images){
		imgOn = eval(image + "_on.src");
		document [image].src = imgOn
	}
}
function ft_imageOff(image){
	if (document.images){
		imgOff = eval(image + "_off.src");
		document [image].src = imgOff
	}
}   
*/
function ft_submitSearch(){
	//document.ft_searchform.submit()
	
	window.open('http://search.akzonobel.com/cgi-bin/RS.cgi?Search='+ document.getElementById('Search').value +'~results_option=sites~spelling=YES~method=All%20my%20words');
	
}  