//toplist2

function toplist(){
	nw=window.open('?ac=toplist','','width=400,height=600,scrollbars=yes');
}
function toplist_km(){
	nw=window.open('?ac=toplist&sub=km','','width=400,height=600,scrollbars=yes');
}
function toplist_dgr(){
	nw=window.open('?ac=toplist&sub=dgr','','width=400,height=600,scrollbars=yes');
}

//tipsa

function tipsaf(){
	if(document.fo.tipsa.value=="E-post"||document.fo.tipsa.value.indexOf("@")<1){
		alert("Du måste fylla i en korrekt E-postadress!");
		return(-1);
	}
	nw=window.open('?ac=tipsa&usern='+document.fo.usern2.value+"&tipsa="+document.fo.tipsa.value+"&er=0",'','width=400,height=200');
}

//other

function visaintresse(){
		var o=GOS("intresse");
		o.display="block";
}

function sendintresse(){
	if(document.fo.epos.value.lenght<4){alert("Fyll i E-post!");return(0);}
	document.fo.ac.value="sendintresse";
	subm();
}
function sendintresse2(){
	if(document.fo.epos.value.lenght<4){alert("Fyll i E-post!");return(0);}
	document.fo.ac.value="sendintresse2";
	subm();
}
function sendintresse3(){
	if(document.fo.epos.value.lenght<4){alert("Fyll i E-post!");return(0);}
	document.fo.ac.value="sendintresse3";
	subm();
}
function regcode(){
	document.fo.ac.value="reg_code";
	subm();
}

function login(){
	document.fo.ac.value="try";
	subm();
}

function regnew(){
	if(document.fo.nam.value==""||document.fo.mob.value==""||document.fo.usern.value==""||document.fo.passw.value==""||document.fo.pnum_hem.value==""||document.fo.pnum_fore.value==""){
		alert("Du måste fylla i alla fält!");
		return(-1);
	}
	if(document.fo.usern.value.length<4){
		alert("Du måste fylla i en korrekt E-postadress!");
		return(-1);
	}
	if(document.fo.passw.value!=document.fo.passw2.value){
		alert("Löenorden stämmer inte överens!");
		return(-1);
	}	
	if(document.fo.avtal.checked==false){
		alert("Du måste godkänna användaravtalet!");
		return(-1);
	}
	document.fo.ac.value="reg_save";
	subm();
}

function regdata(){
	document.fo.ac.value="reg_data";
	subm();
}

function reg_change(){
	var v1=document.fo.stracka.value;
	var v2=document.fo.fore.value;
	var v3=document.fo.pnum.value;
	
	var c1=document.fo.usern.value;
	var c2=document.fo.chsum.value;
	
	nw=window.open('?ac=reg_change&v1='+v1+'&v2='+v2+'&v3='+v3+'&c1='+c1+'&c2='+c2,'','width=300,height=200');
	
	GOS("installningar").display="none";
	
}

function sendpass(){
	document.fo.ac.value="sendpass";
	subm();
}

function showAvtal(){
	nw=window.open("avtal.htm",'','width=800,height=600');
}
function showSlogan(){
	nw=window.open('?ac=omlotteri','','width=900,height=600');
}

function pageLogin(){
	document.fo.ac.value="login";
	subm();
}

function pageone(){
	document.fo.ac.value="";
	subm();
}

function subm(){
	document.fo.submit();
}



function GO(wh){
	return(document.getElementById(wh));
}

function GOS(wh){
	return(document.getElementById(wh).style);
}
