/*----------------artofweb - sitecontrol 3rd breathing-------------------------------
js

EgAr 2008.06.05
------------------------------------------------------------------------------------*/
//Функция всплывющего окна с картинкой
//Пример использования 
//<a href="#" onClick="AOW_OpenImageWindow('".$GLOBALS['AOW_working_server_name']."','width=600,height=449','imglib/My_pic_large.jpg')"><img border="0" src="My_pic.jpg" ALT="Это картинка"></a>
//features - параметры большой картинки
//file - адрес картинки
function AOW_OpenImageWindow(server,features,file,window_name) 
 { 
  var OpenWindow=window.open("", window_name,features);
  OpenWindow.document.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>");
  OpenWindow.document.write("<html>");
  OpenWindow.document.write("<head>");
  OpenWindow.document.write("<title>");
  OpenWindow.document.write(server);
  OpenWindow.document.write("</title><meta http-equiv='Content-Type' content='text/html; Charset=Windows-1251'>");
  OpenWindow.document.write("<meta name='author' content='Петуховский Егор Email: EgAr@tut.by'>");
  OpenWindow.document.write("</head>");
  OpenWindow.document.write("<body style=\"background:#FFFFFF;\" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>");
  OpenWindow.document.write("<table cellspacing=0 cellPadding=0>");
  OpenWindow.document.write("  <tr>");
  OpenWindow.document.write("<td><a href=''onClick='self.close()'><img style=\"border:0px;\" src='");
  OpenWindow.document.write(file);
  OpenWindow.document.write("'></a></td>");
  OpenWindow.document.write("</tr></table></body></html>");
  self.name="main window";
 }
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
//Выводит или меняет текст в любом из объектов
function AOW_ShowLabel(i,the_word)
{
 var d=(ns||ie)?'document.':'document.getElementById("';
 var a=(ns||n6)?'':'all.';
 var n6r=(n6)?'")':'';
 var p=eval(d+a+'TextOut'+i+n6r);
 p.innerHTML=the_word;
}

//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
function submit_fnc(field,form,value)
{
 field.value=value;
 form.submit();
}


function submit_action_fnc(action,field,form,value)
{
 field.value=value;
 form.action=action;
 form.submit();
}


function submit_confdelete_fnc(field,form,value)
 {
  if (confirm("Вы уверены, что хотите удалить '"+value+"' ?"))
   {
    field.value=value;
    form.submit();
   }
   else
   {
	alert("'"+value+"' не был удален(а).");
   }
 }

