<!--
function sdinfo(){
  link=document.uppics.file_puplic.value;
  if(link=="y") {
  document.getElementById('yorno').innerHTML = 'قمت باختيار صورة عامة وسوف تظهر لجميع الزوار';
  }
  if(link=="n") {
  document.getElementById('yorno').innerHTML = 'تم اختيار صورة خاصة ولن تظهر للزوار';
  }
}
function NewWindow(mypage,myname,w,h,scroll,pos){
var win=null;
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
}
function verify ()
{
  formErrors = false;

    if (document.addfile.ZXtitle.value == '') {
    formErrors = "اين عنوان الملف";
    alert(formErrors);
    document.addfile.ZXtitle.focus();
    return false;
    }
    if (document.addfile.cat_id.value == '') {
    formErrors = "حدد القسم المناسب";
    alert(formErrors);
    document.addfile.cat_id.focus();
    return false;
    }
    if (document.addfile.keywords.value == '') {
    formErrors = "اكتب كلمات البحث";
    alert(formErrors);
    document.addfile.keywords.focus();
    return false;
    }
    if (document.addfile.description.value == '') {
    formErrors = "اكتب وصف للملف وما يحتويه";
    alert(formErrors);
    document.addfile.description.focus();
    return false;
    }
    if (document.addfile.filepic.value != '') {
    if (!document.addfile.filepic.value.match(/(\.jpg|\.png|\.gif)$/i) )
    {
    alert("الامتدادات المسموحه  .jpg  .png  .gif  فقط  ");
    document.addfile.filepic.focus();
    return false;
    }
    }
    if (document.addfile.userfile.value == '') {
    formErrors = "ضع رابط الملف ";
    alert(formErrors);
    document.addfile.userfile.focus();
    return false;
    }
    if (!document.addfile.userfile.value.match(/(\.ram|\.3gp|\.avi|\.mp3|\.flv|\.rm|\.wmv)$/i) )
    {
    alert("الامتدادات المسموحه .ram .mp3 .flv .rm .3gp .wmv .avi فقط  ");
    document.addfile.userfile.focus();
    return false;
    }
    document.addfile.send.disabled=true;
    var newWindow = window.open('addfile.php?hat=img','newWindow','scrollbars=0,menubar=0,width=260,height=100,toolbar=0,location=0,status=0');


}
//-->
