var pixelTop = 50;
var scroll = false;
var atPixel = 0;


function ned(){
	var oHeight = document.all ? document.all.wap.offsetHeight : (document.wap.top+document.wap.document.height);
	if(oHeight >= (atPixel)){
		pixelTop = pixelTop - 10;
		atPixel = atPixel + 10;
		if(document.all){
			if(document.all.home){
				document.all.home.style.visibility='hidden';
			}
			document.all.wap.style.clip='rect('+ atPixel +' 127 '+ eval(atPixel + 95) +' 0)';
			document.all.wap.style.pixelTop = pixelTop;
		}
		else if(document.layers){
				if(document.home){
					document.layers["home"].visibility='hide';
				}
				document.layers["wap"].clip.top = atPixel;
				document.layers["wap"].clip.left = 0;
				document.layers["wap"].clip.bottom = eval(atPixel + 95);
				document.layers["wap"].clip.right = 127;
				document.layers["wap"].top = pixelTop;
		}
	}
}

function opp(){
	if(atPixel > 0){
		pixelTop = pixelTop + 10;
		atPixel = atPixel - 10;
		if(document.all){
			if(document.all.home){
				document.all.home.style.visibility='hidden';
			}
			document.all.wap.style.clip='rect('+ atPixel +' 127 '+ eval(atPixel + 95) +' 0)';
			document.all.wap.style.pixelTop = pixelTop;
		}
		else if(document.layers){
				if(document.home){
					document.layers["home"].visibility='hide';
				}
				document.layers["wap"].clip.top = atPixel;
				document.layers["wap"].clip.left = 0;
				document.layers["wap"].clip.bottom = eval(atPixel + 95);
				document.layers["wap"].clip.right = 127;
				document.layers["wap"].top = pixelTop;
		}
	}
}

function mouseNed(){
	var oHeight = document.all ? document.all.wap.offsetHeight : (document.wap.top+document.wap.document.height);
	if(scroll && (oHeight >= (atPixel+95))){
		pixelTop = pixelTop - 10;
		atPixel = atPixel + 10;
		if(document.all){
			if(document.all.home){
				document.all.home.style.visibility='hidden';
			}
			document.all.wap.style.clip='rect('+ atPixel +' 127 '+ eval(atPixel + 95) +' 0)';
			document.all.wap.style.pixelTop = pixelTop;
		}
		else if(document.layers){
			if(document.layers["home"]){
				document.layers["home"].visibility='hide';
			}
			document.layers["wap"].clip.top = atPixel;
			document.layers["wap"].clip.left = 0;
			document.layers["wap"].clip.bottom = eval(atPixel + 95);
			document.layers["wap"].clip.right = 127;
			document.layers["wap"].top = pixelTop;
		}
		setTimeout('mouseNed()', 50);
	}
}

function mouseOpp(){
	if(scroll && (atPixel > 0)){
		pixelTop = pixelTop + 10;
		atPixel = atPixel - 10;
		if(document.all){
			if(document.all.home){
				document.all.home.style.visibility='hidden';
			}
			document.all.wap.style.clip='rect('+ atPixel +' 200 '+ eval(atPixel + 95) +' 0)';
			document.all.wap.style.pixelTop = pixelTop;
		}
		else if(document.layers){
			if(document.layers["home"]){
				document.layers["home"].visibility='hide';
			}
			document.layers["wap"].clip.top = atPixel;
			document.layers["wap"].clip.left = 0;
			document.layers["wap"].clip.bottom = eval(atPixel + 95);
			document.layers["wap"].clip.right = 127;
			document.layers["wap"].top = pixelTop;
		}
		setTimeout('mouseOpp()', 50);
	}
}

function submitform(url){
	var nyurl,ip,par;
	var delt1,delt2,delt3 = new Array();
	nyurl='';
	delt1 = url.split('?');
	delt2 = delt1[2].split('&');
	var liste = new Array();
	var truffet = false;
	for(var t=0;t<document.forms[0].length;t++){
		liste[t] = document.forms[0].elements[t].name;
	}
	for(i=0;i<delt2.length;i++){ // antall par med verdier
		par = delt2[i].split('=');
		for(var a=0;a<liste.length;a++){

			if(par[1].substring(0,2)=='$('
				&& par[1].indexOf(liste[a]) == 2
				&& par[1].substring(par[1].length-1,par[1].length) == ')' ){
				truffet=true;
				felt = par[1].substring(2,par[1].length-1).split(':');
			}
		}

		ip = eval('document.forms[0].'+felt[0]+'.value');
		nyurl += par[0] + '=' + ip + '&';
	}
	location = delt1[0] + '?' + delt1[1] + '&' + nyurl;
}

function showLinks(){
	if(document.all){
		document.all.linker.style.visibility='visible';
		document.all.wap.style.visibility='hidden';
	}
	else{
		document.linker.visibility='show';
		document.wap.visibility='hide';
	}
}

function hideLinks(){
	if(document.all){
		document.all.linker.style.visibility='hidden';
		document.all.wap.style.visibility='visible';
	}
	else{
		document.linker.visibility='hide';
		document.wap.visibility='show';
	}
}

function loading(){
	if(document.all){
		document.all.loading.style.visibility='visible';
		document.all.wap.style.visibility='hidden';
	}
	else if(document.layers){
		document.layers["loading"].visibility='show';
		document.layers["wap"].visibility='hide';
	}
}

function vm(s){
	window.status = s;
	return false;
}


