<!--

////----------------------http://www.acelex.cjb.net----------------------------------------------------

var alll =   "";		//// Used for cross-browser coding.
var stylel = "";	
var topMax = 20;		//// 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 = 625;		//// Controls how far the button is in from the left hand side of the screen.
var topPosition = 200;		//// 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();
}
}

////-----------------------http://www.acelex.cjb.net-------------------------------------------------
	//// 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;
		}
	}
}
}

////--------------------http://www.acelex.cjb.net--------------------------------------------------------
	//// 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;
		if(y<topMax){
			y=topMax;
		}

		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;
		if(y<topMax){
			y=topMax;
		}
		eval("document." + layerName + ".moveTo (x, y)");
    	}
	if(gate=="y"){	
		setTimeout("tester();", 10);
	}
}


////----------------------http://www.acelex.cjb.net----------------------------------------------

function hideLayer(layerName){
	eval("document" + alll  + "." + layerName + stylel + ".visibility = 'hidden'");
}

////---------------------http://www.acelex.cjb.net--------------------------------------------

function showLayer(layerName){
	eval("document" + alll  + "." + layerName + stylel + ".visibility = 'visible'");
}

////---------------------http://www.acelex.cjb.net------------------------------------------

function recordImpr() {
      eval("document" + alll + ".recorder.src   = ''");
}

////-----------------------------------------------------------------------------------------

//-->