
function changeStar(objImg,valor,hidden){var estrelas=document.getElementById(hidden);if(objImg.aceso=="0"){ApagarStar("star1");ApagarStar("star2");ApagarStar("star3");ApagarStar("star4");ApagarStar("star5");if(objImg.id=="star1"){if(parseInt(estrelas.value)==0&&objImg.id=="star1"){AcenderStar("star1");}}
else if(objImg.id=="star2"){AcenderStar("star1");AcenderStar("star2");}
else if(objImg.id=="star3"){AcenderStar("star1");AcenderStar("star2");AcenderStar("star3");}
else if(objImg.id=="star4"){AcenderStar("star1");AcenderStar("star2");AcenderStar("star3");AcenderStar("star4");}
else if(objImg.id=="star5"){AcenderStar("star1");AcenderStar("star2");AcenderStar("star3");AcenderStar("star4");AcenderStar("star5");}}
else if(objImg.aceso=="1"){AcenderStar("star1");AcenderStar("star2");AcenderStar("star3");AcenderStar("star4");AcenderStar("star5");if(objImg.id=="star1"){if(parseInt(estrelas.value)==1&&objImg.id=="star1"){ApagarStar("star1");valor=0;}ApagarStar("star2");ApagarStar("star3");ApagarStar("star4");ApagarStar("star5");}
else if(objImg.id=="star2"){ApagarStar("star3");ApagarStar("star4");ApagarStar("star5");}
else if(objImg.id=="star3"){ApagarStar("star4");ApagarStar("star5");}
else if(objImg.id=="star4"){ApagarStar("star5");}}
estrelas.value=valor;}
function AcenderStar(imagem){objImg=eval("document.getElementById('"+imagem+"')");objImg.src="imagens/icones/estrela1.gif";objImg.aceso="1";}
function ApagarStar(imagem){objImg=eval("document.getElementById('"+imagem+"')");objImg.src="imagens/icones/estrela2.gif";objImg.aceso="0";}