/*
	file: helpmouseover.js
	action: displays a layer on the question mark (?)
	copyright: SWIFT scrl
	date: 04 03 11
*/


var name = 'topdeck';
if (document.getElementById)//Mozilla, Explorer 5+, Opera 5+, Konqueror, Safari, iCab, Ice, OmniWeb 4.5
{
	skn = document.getElementById(name).style;
}
else if (document.all)//Explorer 4+, Opera 6+, iCab, Ice, Omniweb 4.2-
{
	skn = document.all[name].style;
}
else if (document.layers)//Netscape 4, Ice, Escape, Omniweb 4.2-
{
	skn = document.layers[name];
}


horizoffset = 0;
verticoffset = 0;

if( document.captureEvents ) {
    //non IE
    if( Event.MOUSEMOVE ) {
        //NS 4, NS 6, Mozilla 0.9.x
        document.captureEvents( Event.MOUSEMOVE );
    }
}
document.onmousemove = get_mouse;





function get_mouse(e) {
	if( !e ) {
		if( window.event ) {
			//DOM
			e = window.event;
		}
		else {
			//TOTAL FAILURE, WE HAVE NO WAY OF REFERENCING THE EVENT
			return;
		}
	}
	if( typeof( e.pageX ) == 'number' ) {
		//NS 4, NS 6+, Mozilla 0.9+
		var xcoord = e.pageX;
		var ycoord = e.pageY;
	}
	else {
		if( typeof( e.clientX ) == 'number' ) {
			//IE, Opera, NS 6+, Mozilla 0.9+
			//except that NS 6+ and Mozilla 0.9+ did pageX ...
			var xcoord = e.clientX;
			var ycoord = e.clientY;
			if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) ) {
				if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
					//IE 4, 5 & 6 (in non-standards compliant mode)
					xcoord += document.body.scrollLeft;
					ycoord += document.body.scrollTop;
				}
				else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
					//IE 6 (in standards compliant mode)
					xcoord += document.documentElement.scrollLeft;
					ycoord += document.documentElement.scrollTop;
				}
			}
		}
		else {
			//TOTAL FAILURE, WE HAVE NO WAY OF OBTAINING THE
			//MOUSE COORDINATES
			return;
		}
	}
	skn.left = xcoord-260+horizoffset;
	skn.top  = ycoord+5+verticoffset;
}


function pop(msg,bak) {
	horizoffset = 0;
	verticoffset = 0;
	var content ="<table cellpadding=1 cellspacing=0 border=0><tr><td class=bluebg><TABLE WIDTH=250 BORDER=0 CELLPADDING=3 CELLSPACING=0 BGCOLOR="+bak+"><TR><td class=code>"+msg+"</TD></TR></TABLE></td></tr></table>";
	if (document.layers) { 
		skn.document.write(content); 
		skn.document.close();
		skn.visibility = "visible";
	} 
	else if (document.all) {
		document.all("topdeck").innerHTML = content;
		skn.visibility = "visible";
	}
	else if (document.getElementById) {
		document.getElementById("topdeck").innerHTML = content;
		skn.visibility = "visible";
	}
}

function popRight(msg,bak) {
	horizoffset = 264;
	verticoffset = 10;
	var content ="<table cellpadding=1 cellspacing=0 border=0><tr><td class=bluebg><TABLE WIDTH=250 BORDER=0 CELLPADDING=3 CELLSPACING=0 BGCOLOR="+bak+"><TR><td class=code>"+msg+"</TD></TR></TABLE></td></tr></table>";
	if (document.layers) { 
		skn.document.write(content); 
		skn.document.close();
		skn.visibility = "visible";
	} 
	else if (document.all) {
		document.all("topdeck").innerHTML = content;
		skn.visibility = "visible";
	}
	else if (document.getElementById) {
		document.getElementById("topdeck").innerHTML = content;
		skn.visibility = "visible";
	}
}

function kill() {
	skn.visibility = "hidden";
}

function clear_form(){
	document.formulaire.BICcode.value = '';
	document.formulaire.InstKey.value = '';
	document.formulaire.CityH.value = '';
	document.formulaire.Country.selectedIndex = 0;
	document.formulaire.Branch.value = '';
	return false;
}
