

//////////////////
// browser check for NN6
//
//
var browser;
var version;
//var pixwidth;
//var pixheight;
var NN6=false;

function BrowserCheck()
{
if(navigator.appName=="Netscape")
	{
	browser="Netscape";
	version=(parseInt(navigator.appVersion));
	//pixwidth=screen.width;
	//pixheight=screen.height;
	//alert("Browser:"+browser+version);
	//alert("Upplösning:"+pixwidth+"*"+pixheight)
	}
if(browser=="Netscape"&&version==5)
	NN6=true; // Netscape 6
	else
	NN6=false;
//alert("NN6="+NN6)

}
////////////END\\\\\\\\\\\\\\\\\\

// xScroll 1.0
// Needs BrowserCheck to work properly
var xScrollLayerName; // your layer
var xScrollLayerPx; // your position
var temppx;
function xScroll(xScrollLayerName,xScrollLayerPx)
{

// Internet Explorer 4.0-6.0
if (document.all&&NN6==false)
	{
	temppx = document.all[xScrollLayerName].style.pixelTop;
	temppx = (temppx-(-(-xScrollLayerPx)));
	if(temppx<20)
	document.all[xScrollLayerName].style.top=temppx;
	}

// Netscape 4.0
if (!document.all&&NN6==false)
	{
	temppx = document.layers[xScrollLayerName].pageY;
	temppx = temppx-(-(-(xScrollLayerPx)));
	if(temppx<20)
	document.layers[xScrollLayerName].pageY=temppx;
	}

// Netscape 5.0-6.0
if (NN6==true)
	{
	var xNN6temp;
	xNN6temp = document.getElementById('visa') //xScrollLayerName)
	temppx = temppx-(-(-(xScrollLayerPx)));
	if(temppx<20)
	xNN6temp.style.top=temppx;
	else
	temppx=0;
		
	//temppx = temppx-(-(-(xScrollLayerPx)));
	//LayerNn6temp.style.pixelTop=temppx;
	
	}

}


/////////////////////////////////
//	Layer 1.0 layercontrol copmpatible with IE4-6 NN4.5-6.1
//  needs BrowserCheck() to work properly
//  interface looks like, Layer(LayerName, LayerAction)
//  nameOfTheLayer = String (the layers ID)
//  action = String (show/hide)
//////////////////////////////////
var LayerName;
var LayerAction;
var LayerNn6temp;

function Layer(LayerName, LayerAction)
{
//	alert("Running Layer...")
BrowserCheck(); // checking up the browser. 
// variables used in this function

if (LayerAction=="show") // show-action
	LayerAction="visible";

if (LayerAction=="hide") // hiding-action
	LayerAction="hidden";

// Internet Explorer 4.0-6.0
if (document.all&&NN6==false)
	{
	//alert("IE")
	document.all[LayerName].style.visibility=LayerAction;
	}

// Netscape 4.0
if (!document.all&&NN6==false)
	{
	//alert("NN4")
	document.layers[LayerName].visibility=LayerAction;
	}

// Netscape 5.0-6.0
if (NN6==true)
	{
	//alert("NN6")
	LayerNn6temp = document.getElementById(LayerName)
	LayerNn6temp.style.visibility=LayerAction;
	}



}
