function checkOpinion()
{
    var name=document.getElementById('username');
    var nameVal=name.value;
    nameVal=nameVal.replace(/ /g, '');
    if(nameVal.length==0)
    {
        alert('يرجى كتابة الاسم');
        name.focus();
        return false;
    }
    
    var email = document.getElementById('useremail');
    var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if (!filter.test(email.value)) {
        alert('يرجى كتابة البريد الالكتروني بشكل صحيح');
        email.focus();
        return false;
    }
    var commenttitle=document.getElementById('commenttitle');
    var commenttitleVal=commenttitle.value;
    commenttitleVal=commenttitleVal.replace(/ /g, '');
    if(commenttitleVal.length==0)
    {
        alert('يرجى كتابة عنوان التعليق');
        commenttitle.focus();
        return false;
    }
    var comment=document.getElementById('comment');
    var commentVal=comment.value;
    commentVal=commenttitleVal.replace(/ /g, '');
    if(commentVal.length==0)
    {
        alert('يرجى كتابة التعليق');
        comment.focus();
        return false;
    }
    return true;
}
function checkRate()
{
    var check=0;
    var radios=document.rateform.getElementsByTagName('input');
    for(i=0;i<radios.length;i++)
    {
        if(radios[i].type=='radio')
        {
            if(radios[i].checked)
                check=1;
        }
    }
    if(check==0)
    {
        alert('يرجى اختيار قيمة');
        return false;
    }
    return true;
}