function visInvert(id)
{
    if (document.getElementById(id).style.display=="none")
        document.getElementById(id).style.display = "block";
    else
        document.getElementById(id).style.display = "none";
}
function visChange(ctrl, c)
{
if (c==1)
 ctrl.className='';
else
 ctrl.className='hide';
}
function ShowEdit(ctrl, c)
{
if (c==1)
 ctrl.className='';
else
 ctrl.className='hide';
}

function test(ctrl)
{
	alert(ctrl);
}

function Zoom()
{

if (document.body && document.body.style && typeof document.body.style.zoom != 'undefined') {
	if (document.body.style.zoom == '200%') {
		document.body.style.zoom = '100%';
		document.all.zoom.src = 'images/zoomin.png';
		document.all.zoom.alt = 'Zoom in';
	} else {
		document.body.style.zoom = '200%';
		document.all.zoom.src = 'images/zoomout.png';
		document.all.zoom.alt = 'Zoom out';
	}
}

}

function show_question_info(qid, aid)
{
var x = 0;
while(true)
{
  x++;
  var iid = qid+'i'+ x;
  var el = document.getElementById(iid);
  if (el == null) break;
  if (x == aid)
    el.className='';
  else
    el.className='hide';
}
}

function str2numd(str)
{
     str=str.replace(",",".");
     var i,s1,s,s0;
     var sep;
     sep=0;
     snum="0123456789.";
     s="";
     for (i=0 ;i<str.length; i++) {
               s1=str.substr(i,1);
               if (s1==".") sep++;
               if (sep>1) break;
               if (snum.indexOf(s1)>-1) s+=s1;
               else break;
               }
     if (s=="") return 0;
     else return eval(s);
}

function show_question_info(qid, aid)
{
var x = 0;
while(true)
{
  x++;
  var iid = qid+'i'+ x;
  var el = document.getElementById(iid);
  if (el == null) break;
  if (x == aid)
    el.className='';
  else
    el.className='hide';
}
}
