function validateString(str,valid){
	var res=0;
	for(var n=0;n<str.length;n++){ res+=(valid.indexOf(str.substring(n,n+1))<0)?1:0; }
	return (res>0) ? false:true;
}


function validate_search()
	{
		if(document.search.q.value == "" || document.search.q.value == "Sök...")
			{
				alert("Ange sökord.");
				document.search.q.focus();
				return false;
 	 		}
 	 }
 	 
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}