
    function SelText(obj, text)
    {
	if (obj.value == text)
	{
	obj.value = "";
	}
    }

    function unfocus(obj, text){
        
	if (obj.value == "")
	{
	obj.value = text;
	}

    }

    function openWindow(url, width, height){
      var hwin = window.open(url,"win","width=" + width + ",height=" + height + ",resizable=yes,scrollbars=no,toolbar=no");
      hwin.focus();
    }

    function subscribe(){
      var address = document.form1.mail.value;
      if(address == "<Your mail address>"){
        address = "";
      }
      var hwin = window.open("http://www.jamfor.nu/bls/subscribe.php?mail=" + address,"Subscribe","width=400,height=150,resizable=yes,scrollbars=no,toolbar=no");
      hwin.focus();
    }

    function unsubscribe(){
      var hwin = window.open("http://www.jamfor.nu/bls/unsubscribe.php","Unsubscribe","width=400,height=150,resizable=yes,scrollbars=no,toolbar=no");
      hwin.focus();
    }

    function requestdemo(){
      var address = document.form2.mail.value;
      if(address == "<Your mail address>"){
        address = "";
        document.form2.mail.value = "";
      }
      var name = document.form2.name.value;
      if(name == "<Your name>"){
        name = "";
        document.form2.name.value = "";
      }
      var site = document.form2.site.value;
      if(site == "<Your site address>"){
        site = "";
        document.form2.site.value = "";
      }
      var number = document.form2.phone.value;
      if(number == "<Phone number>"){
        number = "";
        document.form2.phone.value = "";
      }
      //var hwin = window.open("http://www.jamfor.nu/bls/requestdemo.php?contact=" + address + "&site=" + site + "&name=" + name + "&phone=" + number,"request","width=400,height=350,resizable=yes,scrollbars=no,toolbar=no");
      //hwin.focus();
    }

    function allowType(ok){
      if(ok == "false"){
        document.form3.line0.disabled=true;
        document.form3.line1.disabled=true;
        document.form3.line2.disabled=true;
        document.form3.line3.disabled=true;
        document.form3.line4.disabled=true;
        document.form3.inPermil.disabled=true;
      }
      else{
        document.form3.line0.disabled=false;
        document.form3.line1.disabled=false;
        document.form3.line2.disabled=false;
        document.form3.line3.disabled=false;
        document.form3.line4.disabled=false;
        document.form3.inPermil.disabled=false;
      }
    }

    function sendMsg(){
      var subject = document.form4.subject.value;
      if(subject == "<enter subject>"){
        subject = "";
      }
      var msg = document.form4.body.value;
      var ok = true;
      var mail = document.form4.mail.value;
      if(mail == "<enter your e-mail address>"){
        mail = "";
      }

        if(subject == "" && msg == ""){
          alert("The message is empty");
        }
        else{
          if(mail == ""){
            var ok = confirm("No mail address specified for reply, send message anyway?");
          }
          if(ok){
            var hwin = window.open("http://www.jamfor.nu/bls/sendmsg.php?subject="+subject+"&msg="+msg+"&mail="+mail,"Message","width=400,height=150,resizable=yes,scrollbars=no,toolbar=no");
            hwin.focus();
          }
        }
      
    }