function ValidateEmail(email)
{
 var re=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\].,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1.3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
 if (!email.match(re))
  {
   return (false);
  }
  return (true);
}

function Show_Picture(file_name,img_text,sx,sy,status_text)
{
 nwnd=open('','',"width="+sx+",height="+sy+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=yes");
 nwnd.window.document.writeln("<Html>");
 nwnd.window.document.writeln("<Head>");
 nwnd.window.document.writeln("<Title>"+img_text+"</Title>");
 nwnd.window.document.writeln("</Head>");
 nwnd.window.document.writeln("<Body bgcolor='#454545' style='margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0;'>");
 nwnd.window.document.writeln("<Table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>");
 nwnd.window.document.writeln("<Tr>");
 nwnd.window.document.writeln("<Td align=center valign=middle>");
 nwnd.window.document.writeln("<img src="+file_name+" border=0 style='margin:0px;padding:0px;border: 5px solid #E3E3E3;'>");
 nwnd.window.document.writeln("</Td>");
 nwnd.window.document.writeln("</Tr>");
 nwnd.window.document.writeln("</Table>");
 nwnd.window.document.writeln("</Body>");
 nwnd.window.document.writeln("</Html>");
 nwnd.window.document.close();
 nwnd.window.status=status_text;
}
function Show_Viwer(path,file,multy)
{
 nwnd=open('','',"width=800px,height=700px,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no,left=100,top=30");
 nwnd.window.location.href="photo_viewer.htm?ph="+path+"&fn="+file+"&m="+multy;
}

function goto_url(site_url)
{
 nwnd=open();
 nwnd.window.location.href=site_url;
}
function ValidateEmail(email)
{
 var re=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\].,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1.3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
 if (!email.match(re))
  {
   return (false);
  }
  return (true);
}

function CheckForm(Forma)
{
 var flag=true;
 err='';
 if ( Forma.Name.value.length<2  ) {flag=false;err+="Incorrect 'Name'";}
 if ( Forma.Tema.value.length<4  ) {if(err!="")err+="\n";flag=false;err+="Incorrect 'Sbject'";}
 if ( !ValidateEmail(Forma.Email.value) ) {if(err!="")err+="\n";flag=false;err+="Incorrect 'Email'";}
 if ( Forma.Mess.value.length<4  ) {if(err!="")err+="\n";flag=false;err+="Incorrect 'Message'";}
 if ( !flag ) {alert(""+err+"")};/**/
 return flag;
}
function Page_Size()
{
  width=600;
  height=300;
}
