var ctrldown = false;


function tastned(){
//    if (event.keyCode == 17)
//    {
//      ctrldown = true;
//    } else if (event.keyCode == 13 && ctrldown == true)
//    {
//      document.svarindlag.submit();
//    }
}




function tastop(){
//    if (event.keyCode == 17)
//    {
//      ctrldown = false;
//    } 
}




function storeCaret (textEl) {
//    if (textEl.createTextRange) 
//    textEl.caretPos = document.selection.createRange().duplicate();
}




function insertsmilie(smilieface) {
    if (document.svarindlag.f_tekst.createTextRange && document.svarindlag.f_tekst.caretPos)
    {
      var caretPos = document.svarindlag.f_tekst.caretPos;
      caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? smilieface + ' ' : smilieface;
      document.svarindlag.f_tekst.focus();
    } else 
   {
     document.svarindlag.f_tekst.value+=smilieface;
     document.svarindlag.f_tekst.focus();
   }
}




function width_check_lille() {
    for (i = 15; i < document.images.length; i++)
    {
     if (document.images[i].width > 150) {document.images[i].width="150"}
    }
}




function width_check_stor() {
    for (i = 0; i < document.images.length; i++)
    {
      if (document.images[i].width > 400) {document.images[i].width="400"}
    }
}

function popup(type,page)
{
	if (type == "camp2" && page == "oversigt")
	{
		window.open ("http://www.golf2.dk/camp_popup.htm","popup","status=0,toolbar=0, height=100, width=400"); 
	}

	width_check_stor();
}



function check() {
    valgt = "Nej";
    for (i=0; i<document.pollform.R1.length; i++)
    {
      if (document.pollform.R1[i].checked) {valgt = "Ja";}
    }
    if (valgt=="Nej") { alert("Foretag venligst et valg inden du stemmer"); }
    else { window.document.pollform.submit(); }
}
