<!--

////---------------------------disco(damien@bmcmedia.com);--------------------------------------

var alll =   "";		//// Used for cross-browser coding.
var stylel = "";		//// Used for cross-browser coding.
var recorded = "n";		//// defines whether the impression has been recorded
var gate = "y"			//// Variable indicating whether the window is able to show the button.
var leftPosition = 5;		//// Controls how far the button is in from the left hand side of the screen.
var topPosition = 130;		//// Controls how far the button is down from the top of the screen.

function initial() {
	if (navigator.appVersion.charAt(0) >= "4") {
   		if (navigator.appVersion.indexOf("MSIE") != -1) {
			alll = ".all";
			stylel = ".style";
			document.all.Layer1.style.posTop = 500;
    		}
		else{		
			document.Layer1.top = 500;
		}
tester();
}
}

////---------------------------disco(damien@bmcmedia.com);--------------------------------------
	//// Function tests for window space availablility and shows / hides the button accordingly
		//// Function will also stop all sliding if the window does not have the space

function tester() {

if(gate=="y"){
	if(navigator.appVersion.indexOf("MSIE") != -1){
		if(document.body.clientWidth>=500){
			showLayer('Layer1');
			if (recorded=="n"){
				recordImpr();
				recorded="y";
			}
		MoveDest('Layer1');
		}
		else{
			hideLayer('Layer1');
			gate=="n";
			document.all.Layer1.style.posLeft=1;
		}
	}
	else{
		if(window.innerWidth>=500){
			showLayer('Layer1');
			if (recorded=="n"){
				recordImpr();
				recorded="y";
			}
		MoveDest('Layer1');
		}
		else{
			hideLayer('Layer1');
			gate=="n";
			document.Layer1.posLeft=1;
		}
	}
}
}

////---------------------------disco(damien@bmcmedia.com);--------------------------------------
	//// Function controls the sliding of the button
		//// It will continue sliding only while the window has the needed space


function MoveDest(layerName) {
	
	if (navigator.appVersion.indexOf("MSIE") != -1) {
		var x = leftPosition; //document.body.clientWidth-leftPosition;
		var diff = (document.body.scrollTop+topPosition - document.all.Layer1.style.posTop)*.90;
		var y = document.body.scrollTop+topPosition-diff;

		eval("document.all." + layerName + ".style.posTop =  y");
		eval("document.all." + layerName + ".style.posLeft = x");
	}
	else {
		var x = leftPosition; //window.innerWidth-leftPosition;
		var diff = ((self.pageYOffset+topPosition) - document.Layer1.top)*.95;
		var y = self.pageYOffset+topPosition-diff;

		eval("document." + layerName + ".moveTo (x, y)");
    	}
	if(gate=="y"){	
		setTimeout("tester();", 5);
	}
}


////---------------------------disco(damien@bmcmedia.com);--------------------------------------

function hideLayer(layerName){
	eval("document" + alll  + "." + layerName + stylel + ".visibility = 'hidden'");
}

////---------------------------disco(damien@bmcmedia.com);--------------------------------------

function showLayer(layerName){
	eval("document" + alll  + "." + layerName + stylel + ".visibility = 'visible'");
}

////---------------------------disco(damien@bmcmedia.com);--------------------------------------

function recordImpr() {
      eval("document" + alll + ".recorder.src   = ''");
}

////---------------------------disco(damien@bmcmedia.com);--------------------------------------

//-->