﻿//<!--
function popUp(strURL,strType,strHeight,strWidth) {
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
window.open(strURL, 'newWin', strOptions);
}

function mark(event, edtBox){

       event = event || window.event;
		key=event.keyCode;
		
		if (key==40 || key==38 || key==37  || key==39){
		document.getElementById('skicka_svar').style.display = 'inline';
		//this.onclick = ""
		
		//try{
			if(key==40){ 
			
			var count = edtBox.id;
			var length = count.length;
			count = count.substr(length-1,1);
			count++;
			if(document.getElementById("vote" + count)){
				document.getElementById("vote" + count).focus();
				document.getElementById("vote" + count).checked=true;
			}
			}
			else if(key==38)
			{
			var count = edtBox.id;
			var length = count.length;
			count = count.substr(length-1,1);
			count--;
						if(document.getElementById("vote" + count)){
				document.getElementById("vote" + count).focus();
				document.getElementById("vote" + count).checked=true;
			}
			}
		//}		
		//catch(e){
		//	alert(e);
		//}
		
				//document.getElementById("vote1").onclick="alert('test');";
		return false;
		//alert(key);
	
		}
}
function checkSelected(){
  var retValue = 0;
  for(i=0; i<10; i++) 
  {
  	if(document.getElementById("vote" + i)){
	   if(document.getElementById("vote" + i).checked==true){
	  	retValue = i;
	   }
	 }
  }
	
  return retValue;

}
//-->
