function go(URL) {
  topPos=(screen.availHeight/2)-270
  leftPos=(screen.availWidth/2)-337
    if (navigator.appName=="Netscape") {
      window.open(URL,"Detalj","screenY="+topPos+",screenX="+leftPos+",width=600, height=450,resizable=no,scrollbars=yes,toolbar=no,statusbar=no");
      }
    else {
      window.open(URL,"Detalj","top="+topPos+",left="+leftPos+",width=600, height=450,resizable=no,scrollbars=yes,toolbar=no,statusbar=no");
      }
}

function nytt(URL,width,height) {
  unik=new Date();
  unik=unik.getSeconds()+"_"+unik.getMinutes()+"_"+unik.getHours();
  yPos=(screen.availHeight/2)-(height/2);
  xPos=(screen.availWidth/2)-(width/2);

  if (navigator.appName=="Netscape") {
    window.open(URL,unik,"screenY="+yPos+",screenX="+xPos+",width="+width+",height="+height+",resizable=yes,scrollbars=yes,toolbar=no,status=no");
    }
    else {
      window.open(URL,unik,"top="+yPos+",left="+xPos+",width="+width+",height="+height+",resizable=yes,scrollbars=yes,toolbar=no,status=no");
      }
}

function SendElements() {
		var i,j;
		for (i=0; i < document.forms[0].elements.length-1; i++)
			switch (String(document.forms[0].elements[i].name).substring(0,3))
			{
				case "chk":
					if (document.forms[0].elements[i].checked)
						document.forms[0].elements[i].value = "Ja";
					else {
						document.forms[0].elements[i].checked = false;
						document.forms[0].elements[i].value = "Nej";
					}
					break;
			}
}

function chThisWin(url) {
	if (url.length > 0) {
//		alert(url);
		window.location.href = url;
	}
}

function ValidateForm(theForm) {
	if (theForm.Rubrik.value == "") {
		alert("Fyll i fältet \"rubrik\"!");
		theForm.Rubrik.focus();
		return (false);
		}
	if (theForm.ShowDate.value == "") {
		alert("Fyll i fältet \"datum\"!");
		theForm.ShowDate.focus();
		return (false);
		}
	return (true);
	}

function ValidateKontakt(theForm) {
	if (theForm.txtNamn.value == "") {
		alert("Inget namn? Fyll i fältet \"Namn\"!");
		theForm.txtNamn.focus();
		return (false);
		}
	if (theForm.txtMeddelande.value == "") {
		alert("Inget meddelande? Fyll i fältet \"meddelande\"!");
		theForm.txtMeddelande.focus();
		return (false);
		}
	return (true);
	}

function wEpost(user) {
  site = "lyckseletravet.com";
  document.write('<a href=\"mailto:' + user + '@' + site + '\">'); 
  document.write(user + '@' + site + '</a>');
}

