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+',toolbar=no,status=no,resizable=yes'
win = window.open(mypage,myname,settings)
if(win.window.focus){win.window.focus();}
}


function checknum( field ) {
    var tmpString ="";
    var seperator = false;
    for (i=0;i<=field.value.length;i++){
        c=field.value.charAt(i);
        if ((c=="1")|(c=="2")|(c=="3")|(c=="4")|(c=="5")|(c=="6")|(c=="7")|(c=="8")|(c=="9")|(c=="0"))
            tmpString+=c;
        else if ((c==",")|(c=="."))
            if (!seperator){
                tmpString+=".";
                seperator=true;
            }
    }

    if (tmpString != field.value)
       field.value=tmpString;
}




function chkformrec()
{


if(document.recommentform.name.value==""||document.recommentform.name.value=="Ditt namn")
{ document.recommentform.name.value= "Ditt namn";
  document.recommentform.name.focus();
  document.recommentform.name.select();
  return false;
}


if(document.recommentform.email.value==""||document.recommentform.email.value.indexOf('@')==-1||document.recommentform.email.value=="Ditt e-postadress")
{ document.recommentform.email.value= "Ditt e-postadress";
  document.recommentform.email.focus();
  document.recommentform.email.select();
  return false;
}


if(document.recommentform.rname.value==""||document.recommentform.rname.value=="Mottagarens namn")
{ document.recommentform.rname.value= "Mottagarens namn";
  document.recommentform.rname.focus();
  document.recommentform.rname.select();
  return false;
}


if(document.recommentform.remail.value==""||document.recommentform.remail.value.indexOf('@')==-1||document.recommentform.remail.value=="Mottagarens e-postadress")
{ document.recommentform.remail.value= "Mottagarens e-postadress";
  document.recommentform.remail.focus();
  document.recommentform.remail.select();
  return false;
}

document.recommentform.submit();

}