function showscores(game) {
$.post('/test/ratingscores.php', {
    sentgame: game
}, function (data) { 	
	document.getElementById('love-wording').innerHTML = '';
	document.getElementById('destination').innerHTML = '';
  document.getElementById('destination').innerHTML = data;
})};

function showscoresa(game) {
$.post('/test/ratingscores.php', {
    sentgame: game
}, function (data) { 	
	//document.getElementById('love-wording').innerHTML = '';
	document.getElementById('destinationa').innerHTML = '';
  document.getElementById('destinationa').innerHTML = data;
})};

function loveclick(score,game) {
$.post('/test/rating.php', {
    sentscore: score,
    sentgame: game
}, function() {
	showscores(game);
    jQuery.noticeAdd({
        text: 'Your rating has been saved<small>thanks for letting us know your love (or hate)</small>',
        stay: false,
        type: 'notice',
        stayTime: 3000
});
});
}

function loveclicka(score,game) {
$.post('/test/rating.php', {
    sentscore: score,
    sentgame: game
}, function() {
	showscoresa(game);
    jQuery.noticeAdd({
        text: 'Your rating has been saved<small>thanks for letting us know your love (or hate)</small>',
        stay: false,
        type: 'notice',
        stayTime: 3000
});
});
}

lovewords = Array('Hate it','Its awful','Its bad','Its not good','Its okay','Its not bad','Its good','Like it','Love it','My Perfect game');

function lovehover(slide) {
lovecount = 1;
offcount = slide;
testsrc = document.getElementById(slide).className;
if (testsrc == 'love-on') {
while (offcount <= 11) {
	document.getElementById(offcount).className = 'love-of';
	document.getElementById('love-wording').innerHTML = lovewords[slide-1];
	offcount++;
}
} else {
while (lovecount <= slide) {
	document.getElementById(lovecount).className = 'love-on';
	document.getElementById('love-wording').innerHTML = lovewords[slide-1];
	lovecount++;
}
}
}

function lovehoverAjax(slide) {
lovecount = 1;
offcount = slide;
testsrc = document.getElementById(slide+'a').className;
if (testsrc == 'love-on') {
while (offcount <= 11) {
	var newid = offcount+'a';
	document.getElementById(newid).className = 'love-of';
	//document.getElementById('love-wordinga').innerHTML = lovewords[slide-1];
	offcount++;
}
} else {
while (lovecount <= slide) {
	var newida = lovecount+'a';
	document.getElementById(newida).className = 'love-on';
	//document.getElementById('love-wordinga').innerHTML = lovewords[slide-1];
	lovecount++;
}
}
}



