function goArt(aid){
	nw=window.open("pg_win_article.php?aid="+aid,"news","width=480,height=654,scrollbars=yes,resizable=no,");
	nw.focus();
}
function goArtikel(aid){
	goArt(aid);
}
function goPage(wh){
	nw=window.open("http://"+wh,"_blank","width=600,height=500,menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
	makeRequest("pg_mailprog_dr_func.php?action=linkread&link="+wh,nalert);
}
function tellafriend(epos){
	if(epos=="Aktuell e-postadress"){alert("Fyll i din e-postadress");return(0);}
	nw=window.open("pg_win_friend.php?epos="+epos,"tell","width=390,height=360,scrollbars=yes,resizable=no,");
}
function tellafriendwin(lid,aid){
	nw=window.open("pg_win_friend.php?aid="+aid+"&lid="+lid,"tell","width=390,height=360,scrollbars=yes,resizable=no,");
}
function printIt(){
	print();
}
function printAll(nid){
	nw=window.open("pg_win_article.php?all=1&aid="+nid,"news","width=480,height=636,scrollbars=yes,resizable=no,");
}
function thisUnderline(obj){
	obj.style.color="#999999";
}
function thisUnderlineNot(obj){
	obj.style.color="#000000";
}
function regunreg(){
	var addr=document.getElementById("regaddress").value;
	if(addr=="din adress"){alert("Du me fylla i en e-postadress!");}
	else{
		makeRequest("pg_mailprog_dr_func.php?action=regunreg&epos="+addr,alert);
	}
}
function regunreg2(){
	var addr=document.getElementById("regaddress").value;
	if(addr=="din adress"){alert("Du me fylla i en e-postadress!");}
	else{
		makeRequest("pg_mailprog_dr_func.php?action=regunreg&epos="+addr,alert_rur);
		document.getElementById("waiter").style.display="block";
	}
}
function checkAll(whL,fon){
	for(var n=0;n<whL.length;n++){
		if(document[fon][whL[n]].value==""){
			alert("Du me fylla i alla f!");
			return(0);
		}
	}
	document[fon].submit();
}
function checkArtikel(){
	if(document.fon.artikel.value!=""){
		goArt(document.fon.artikel.value);
	}
}
function nalert(wh){
	//suppressed error or ok
}
function alert_rur(wh){
	alert(wh);
	document.getElementById("waiter").style.display="none";
}