<!--
function openwin(url,w,h,s,r) {
    var scrl; var resze;
    if (s) { scrl="scrollbars=yes,"; w = w+16;} 
		else { scrl="scrollbars=no,"; }
		if (r) { resze = "resizable=yes,"; }
		else { resze="resizable=no,"; }
    if (!w) w = 449;
    if (!h) h = 270;
		fenster = window.open(url,"_blank",scrl+resze+"width="+w+",height="+h+",screenX=200,screenY=50");
    fenster.focus();
}

// open a window. Use when SiteAndCentre() is called on the window. Dependent means the window will close when the parent closes
function Popup(url) {
	fenster = window.open(url,"_blank","scrollbars=yes,dependent=yes,height=300,width=400");
    fenster.focus();
}

function SiteAndCenter() {
	var availableHeight = parseInt(window.screen.availHeight);
	var availableWidth = parseInt(window.screen.availWidth);
	var TitleBarHeight = 0; // 16 estimate: the system does not give out the height of ie's titlebar
	var LocationBarHeight = 0; // 16 estimate: the system does not give out the height of ie's titlebar
	if (!window.opener) return;
	var PosHeight = TitleBarHeight + LocationBarHeight + 0
		+ parseInt(document.body.clientTop)
		+ parseInt(document.body.topMargin) 
		+ parseInt(document.body.scrollHeight)
		+ parseInt(document.body.bottomMargin)
		+ 20;
	var PosWidth = 0
		+ parseInt(document.body.leftMargin)
		+ parseInt(document.body.scrollWidth) + parseInt(document.body.rightMargin)
		+ 20;
		

	if (PosHeight > availableHeight) {
		PosHeight = availableHeight;
	}
	if (PosWidth > availableWidth) {
		PosWidth =  availableWidth;
	}
		
	var PosTop = 
		(parseInt(availableHeight) - parseInt(PosHeight)) * 0.5;
	var PosLeft = 
		(parseInt(availableWidth) - parseInt(PosWidth)) * 0.5;
	window.resizeTo(PosWidth,PosHeight);
	window.moveTo(PosLeft,PosTop);
	window.focus();
}

function MailAnchorSpamFree( displayName, emailUser) {
var hostname = "syngenta.com";
var atsign = "&#64;";
document.write( 
    "<" + "a" + " " + "href=m" + "ail" + "to:" + emailUser + atsign + hostname + ">" +
    displayName +
    "<\/a>");
}


/*
Floating Menu script-  Roy Whittle (http://www.javascript-fx.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
function FloatTopDiv(divId)
{
	//Enter "frombottom" or "fromtop"
	var verticalpos="frombottom"
	var startX = 3,
	startY = 25;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	function ml(id)
	{
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.left=x;this.style.top=y;};
		el.x = startX;
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		el.y -= startY;
		}
		return el;
	}
	window.stayTopLeft=function()
	{
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : document.body.scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/1;
		}
		else{
		var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		ftlObj.y += (pY - startY - ftlObj.y)/1;
		}
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml(divId);
	stayTopLeft();
}

//-->

