function checkQuestForm(count)
{
 
 var i=0;
 var x=0;
 var tmp = {};
 //alert(document.sForm.elements[90]);
 while(document.sForm.elements[i])
 {
    
    if(document.sForm.elements[i].checked)
    {
        x=x+1;
    }
    i=i+1;
 } 

 
 //alert(x);
 
 if(x<count)
 {
    //alert('check all fields');
    var div=document.getElementById('qError');
    div.innerHTML='You must fill all questions to proceed.';
    return false;
 }
 else return true;
 
}
var delid=0;
function confirmDelete(id)
{
  delid=id;
 
 var mbox = Ext.MessageBox.show({
           title: 'Confirm delete',
           msg: 'Are you sure you want to delete this test?',
           width:300,
           buttons: Ext.MessageBox.YESNO,
           fn:cDelete
           
       });
  
  var wbox = mbox.getDialog();
  wbox.defaultButton=2;
  wbox.focus();


}

function cDelete(choice)
{
    if(choice=="yes")
    {
        window.location="?page=deletesurvey&delId="+delid;    
    }
    
}


