function check_forum_form(form){
  result=true;
  if ((form.elements['value'].value=="")||(form.elements['author'].value=="")||(form.elements['notes'].value=="")){
    window.alert('Поля "Тема", "Автор" и "Текст" должны быть обязательно заполнены!');
    result=false;
  }
  return result;
}

function change_view(obj){
  if (obj.isVisible()){ 
    obj.hide();
	obj.style.position="absolute";
  }
  else{
    obj.style.position="relative";
    obj.show();
  }
}

// popup window
function show_image_big(img) {
    var url = img.src.replace('.s.jpg', '.b.jpg'); 
    var xy = img.getAttribute('name').split(' ');
    var x = parseInt(xy[0]);
    var y = parseInt(xy[1]);    
    iView(url,x,y,"Большая картинка");
}

 function iView(img,w,h,title) {
    if(w > 740){
        w=740;
    }
    if(h > 640){
        h=640;
    }
    // w=w+20; //h=h+20;
    cx=screen.width/2-(w/2);
    cy=screen.height/2-(h/2);
    param="width="+w+",height="+h+",location=no,menubar=no,scrollbars=no,top="+cy+",left="+cx;
    tw = window.open("","",param);
    tw.document.open();
    tw.document.write("<html><head><title>"+title+"</title></head><body style=\'margin:0;padding:0\'>"+
    "<a href=\'javascript: window.close();\'><img src=\'"+img+"\' border=0 alt=\'Закрыть окно\' title=\'Закрыть окно\'></a></body></html>");
    tw.document.close();
 }
 //////////
