function makeArray(len) {
    for (var i = 0; i < len; i++) this[i] = null;
this.length = len;
}


function gwneudcwestiwn(cwestiwn, atebcywir) {
var args = gwneudcwestiwn.arguments;
this.cwestiwn = cwestiwn;
this.atebcywir = atebcywir;
this.atebion = null;
this.maengywir = maengywir;
this.dewision = new makeArray(args.length - 2);
   for (var i = 0; i < args.length - 2; i++) { 
   this.dewision[i] = args[i + 2];
   }
}


function maengywir() {
if (this.atebcywir == this.atebion) return true;
else return false;
}



function cywiroprofiad() {
var rheicywir = 0;
dangosAtebionCywir = '<HTML><TITLE>Score</TITLE><BODY  bgcolor="#ffffcc">';
    for (var i = 0; i < profiad.length; i++) {
    if (profiad[
i].maengywir()) rheicywir++;
    }
var pwyntiau = Math.round((rheicywir / profiad.length) * 100);
dangosAtebionCywir += '<font size=+2 color=red>Score: <STRONG>' + pwyntiau + '</STRONG> %</font><p>Close window to return to quiz.</p>';



dangosAtebionCywir += '</TABLE></BODY></HTML>';
ffenestcywir = window.open ('', '');
    if (ffenestcywir.opener == null) ffenestcywir.opener = window;
ffenestcywir.location = 'javascript:opener.dangosAtebionCywir';
}


