//<script="javascript">

if (self.location != top.location) top.location = self.location;


var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

img1 = new Image();
img1.src = "img/menu.png";
img1.src = "img/menuR.png";



var ie = document.all && !window.opera;

function displaywin(winid,leftx,topy){
var dom=document.getElementById
objref=(dom)? document.getElementById(winid) : document.all.winid;
var iebody = (document.compatMode=="CSS1Compat")? document.documentElement : document.body;
var scroll_top=(ie)? iebody.scrollTop : window.pageYOffset;
var docwidth=(ie)? iebody.clientWidth : window.innerWidth
objref.style.left = leftx + (docwidth-770)/2+"px"
objref.style.top = topy + scroll_top+"px"
if (objref.filters){objref.filters[0].Apply(); objref.filters[0].Play();}
objref.style.display="block"
}

function closewin(winid2){
var dom=document.getElementById
objref=(dom)? document.getElementById(winid2) : document.all.winid2;
objref.style.display="none";
}




var ie2 = document.all?true:false;
if (!ie2) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMouseXY;
var openwindow="";

function getMouseXY(e) {
if (startH!=initH) {
  if (ie2) {
    var mouX = event.clientX + document.body.scrollLeft;
    var mouY = event.clientY + document.body.scrollTop;} 
  else { var mouX = e.pageX; var mouY = e.pageY;}
  var docwidth=(ie)? iebody.clientWidth : window.innerWidth;
  if (mouX<(menuleft-10) || mouX>(menuleft+winWidth) || mouY<(rootY+initH-winHeight) || mouY>(rootY+initH)) stopIt();
  }
return true
}





iens6=document.all||document.getElementById
ns4=document.layers

var theobj;
var winHeight = 230;
var winWidth = 138;
var initH=16;
var startH=initH;
var stepH=4;
var framet=6;
var openTimer;


var bottomwin = '<div id="menu" style="width:'+winWidth+'px; height:'+winHeight+'px; background:url(img/menuR.png);"><BR>';
bottomwin+= '<a href="index.html" onclick="stopIt();">Home Page</a><BR>';
bottomwin+= '<a href="testeyes.html" onclick="stopIt();">Cross eye dominance</a><BR>';
bottomwin+= '<a href="middle.html" onclick="stopIt();">Middle vision</a><BR>';
bottomwin+= '<a href="how.html" onclick="stopIt();">How it works</a><BR>';
bottomwin+= '<a href="why.html" onclick="stopIt();">Why it works</a><BR>';
bottomwin+= '<a href="testimonials.html" onclick="stopIt();">Testimonials</a><BR>';
bottomwin+= '<a href="reviews.html" onclick="stopIt();">Reviews</a><BR>';
bottomwin+= '<a href="selector.html" onclick="stopIt();">Local Suppliers</a><BR>';
bottomwin+= '<a href="product.html" onclick="stopIt();">Product details</a><BR>';
bottomwin+= '<a href="aboutus.html" onclick="stopIt();">Who we are</a><BR>';
bottomwin+= '<a href="faq.html" onclick="stopIt();">Questions & answers</a><BR>';
bottomwin+= '<a href="terms.html" onclick="stopIt();">Terms of sale</a><BR>';
bottomwin+= '<a href="links.html" onclick="stopIt();">Links</a><BR>';
bottomwin+= '<form style="display:inline;" target="paypal" name="viewcart" action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="info@easyhit.co.uk"><input type="hidden" name="display" value="1">';
bottomwin+= '<a href="javascript:void(null);" onclick="document.viewcart.submit(); return false;">View Basket</a><BR>';
bottomwin+= '</div>';

//onmouseout="clearTimeout(openTimer);stopIt()"
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function setObj() {
	if(iens6){
	    ctop.style.visibility="hidden";
		thename = "viewer";
		theobj=document.getElementById? document.getElementById(thename):document.all.thename;
		theobj.style.width=winWidth+"px";
			if(iens6&&document.all) {
				theobj.style.top=ietruebody().scrollTop+rootY+"px"
				theobj.innerHTML = ""
				theobj.insertAdjacentHTML("BeforeEnd",bottomwin)
			}
			if(iens6&&!document.all) {
				theobj.style.top=window.pageYOffset+rootY+"px"
				theobj.innerHTML = ""
				theobj.innerHTML = bottomwin; 
			}
	}
	if(ns4){
		ctop.visibility="hidden";
		thename = "nsviewer"
		theobj = eval("document."+thename)
		theobj.moveTo(0,eval(window.pageYOffset+rootY))
		theobj.width=winWidth
		theobj.clip.width=winWidth
		theobj.document.write(bottomwin)
		theobj.document.close()
	}
    var iebody = (document.compatMode=="CSS1Compat")? document.documentElement : document.body;	
	var docwidth = (ie)? iebody.clientWidth : window.innerWidth
    theobj.style.left = menuleft + "px";	
	viewIt();
}

function viewIt() {
	if(startH<=winHeight) {
		if(iens6) {
			theobj.style.visibility="visible"
				if(iens6&&document.all) {
					theobj.style.top=(ietruebody().scrollTop+rootY)-startH+"px"
				}
				if(iens6&&!document.all) {
					theobj.style.top=(window.pageYOffset+rootY)-startH+"px"
				}
			theobj.style.width=winWidth+(ie?10:0)+"px";
			theobj.style.height=startH+"px"
			startH+=stepH;	
			openTimer=setTimeout("viewIt()",framet)
			}
		if(ns4) {
			theobj.visibility = "visible"
			theobj.moveTo(0,(eval(window.pageYOffset+rootY)-startH))
			theobj.height=startH
			theobj.clip.height=(startH)
			startH+=stepH			
			openTimer=setTimeout("viewIt()",framet)
		}
	}else{
		clearTimeout(openTimer)
	}
}

function stopIt() {
	if(iens6) {
		theobj.innerHTML = ""
		theobj.style.visibility="hidden"
	    ctop.style.visibility="visible";
	}
	if(ns4) {
		theobj.document.write("")
		theobj.document.close()
		theobj.visibility="hidden"
		theobj.width=0
		theobj.height=0
		theobj.clip.width=0
		theobj.clip.height=0
	    ctop.visibility="visible";		
	}
    startH=initH;
}

