var counter=0;
function nothing(){
	return;
}
// browser checks are done in browsercheck.js

// rollover images
// use preload function in head to preload images to swap with
function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}

function changeImage(layer,imgName,imgObj) {
	if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src');
	else document.images[imgName].src = eval(imgObj+".src");
}

// popup tooltips
var count = 0; 
var hand = 0;
var skin;

function initPopup(){
	if (is_nav4) skin = document.tooltip;
	if (is_ie && !is_opera5)  skin = tooltip.style;
	if (is_nav5up) {
		skin =document.getElementById("tooltip").style;
		document.addEventListener("mousemove",sustain,false); 
	}
	if (is_opera5) {
		skin =document.getElementById("tooltip").style;
	}
	document.onmousemove = sustain;
	if (is_nav4) document.captureEvents(Event.MOUSEMOVE);
}

function pop(orientation,msg) 
{
var content=msg;

if (is_nav4) 
	{
		var canvas = document.tooltip.document; 
		canvas.write(content); 
		canvas.close();
		//skin.visibility = "show";
	}
else if (is_ie && !is_opera5) 
	{
		document.all("tooltip").innerHTML = content;
		//skin.visibility = "visible";
	}  
else if (is_nav5up) 
	{
		document.getElementById("tooltip").innerHTML = content;
		//skin.visibility = "visible";
	}  
else if (is_opera5) 
	{
		document.getElementById("tooltip").innerHTML = content;
		window.status= msg;
		//skin.visibility = "visible";
	}  
hand = orientation;
}

function showSkin(){
	if (is_nav4) 
		{skin.visibility = "show";}
	else if (is_ie || is_nav5up || is_opera5) 
		{skin.visibility = "visible";}  
}

function sustain(e) 
{
	if (is_nav4)
	{
		x=e.pageX;
		y=e.pageY;
	}
	else if (is_ie && !is_opera5)
	{
		if(is_ie6up){
			x= event.clientX + document.body.parentNode.scrollLeft;
			y = event.clientY + document.body.parentNode.scrollTop;
		} else	{
			x= event.clientX + document.body.scrollLeft;
			y = event.clientY + document.body.scrollTop;
		}
	}
	else if (is_nav5up)
	{
		x = e.pageX;
		y = e.pageY;
	}
	else if (is_opera5)
	{
		x= event.clientX;
		y = event.clientY;
	}
	//y = (ie5) ? y+100:y;
	switch(hand) 
	{
		case 0 : kill(); break;
		case 1 : skin.left = x+10+"px";  skin.top = y+10+"px"; showSkin(); break;
		case 2 : skin.left = x-35+"px";  skin.top = y+20+"px"; showSkin(); break;
		case 3 : skin.left = x-85+"px"; skin.top = y+10+"px"; showSkin(); break;
		default: skin.left = x+10+"px";  skin.top = y+10+"px"; showSkin(); break;
	}
}

function kill() 
{
	if (count >= 1 ) var always=true;
	
	if (always == true) 
	{
		hand = 0; 
		skin.visibility = (is_nav4) ? "hide" : "hidden";
	} 
	else count++;
}


