var isSurvey= true;

function wsCountChecked0()
    {
    alert( "Stray checksome!" );
    }

function wsCheckVisible( box, nextid )
    {
    var on_off= box.checked;
    var nextelem= document.getElementById( nextid );

    if  ( on_off )
	{ nextelem.style.display= "";		} // IE refuses "table-row"
    else{ nextelem.style.display= "none";	}

    return true;
    }

function wsCheckVisibleOnload( boxname, nextid )
    {
    return wsCheckVisible( document.getElementsByName( boxname )[0], nextid );
    }

function wsCheckVisibleOnloadRep( hiddenname, nextid )
    {
    var hidden= document.getElementsByName( hiddenname )[0];
    var nextelem= document.getElementById( nextid );

    if  ( hidden.value == "D" )
	{ nextelem.style.display= "";		} // IE refuses "table-row"
    else{ nextelem.style.display= "none";	}

    return true;
    }

////
//// Run on load:
//// Curse IE
//// Praise JavaScript Definitive Guide p 434
////

function wsRunOnLoad( f )
    {
    if  ( wsRunOnLoad.loaded )
	{ f();				}
    else{ wsRunOnLoad.funcs.push( f );	}
    }

wsRunOnLoad.funcs= [];
wsRunOnLoad.loaded= false;

wsRunOnLoad.run= function()
    {
    if  ( wsRunOnLoad.loaded )
	{ return;	}

    for ( var i= 0; i < wsRunOnLoad.funcs.length; i++ )
	{ try{ wsRunOnLoad.funcs[i](); } catch( e ) { }	}

    wsRunOnLoad.loaded= true;
    delete wsRunOnLoad.funcs;
    delete wsRunOnLoad.run;
    }

if  ( window.addEventListener )
    { window.addEventListener( "load", wsRunOnLoad.run, false ); }
else{
    if  ( window.attachEvent )
	{ window.attachEvent( "onload", wsRunOnLoad.run );	}
    else{ window.onload= wsRunOnLoad.run;			}
    }

////
//// End onload
////
