function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function CheckForm(UserForm)
{
    var is_ok = true;
	var s=document.contact.email.value.indexOf("@");
	var d=document.contact.email.value.length;
	x=d-s-1;

    if (UserForm.message.value == '')
    {
    	is_ok = false;
    	alert("Необходимо указать вопрос");
    	UserForm.message.focus();
	}
	
    if (UserForm.email.value == '')
    {
    	is_ok = false;
    	alert("Необходимо указать e-mail, чтобы с Вам могли связаться.");
    	UserForm.email.focus();
	}
	
	if (x<5 || s<1)
	{
    	is_ok = false;
		alert('Указан кекорректный e-mail.');
    	UserForm.email.focus();
	}
	
return is_ok;
}

function openWindow() {
  
  win = window.open('', '', config='width=1003, height=599');
  
}

function view_large_pictures(value) {
  
  var bg_color="#FFFFFF";
  var pictures_folder="pictures/picunda_1/";
  var w_screen=900;
  var h_screen=700;
  
  large_pictures = new Image(); large_pictures.src=pictures_folder+value+"_big.jpg";
  
  generation_window=open("","displayWindow","width="+w_screen+",height="+h_screen+",status=yes,toolbar=no,menubar=no");
  generation_window.document.open();
  generation_window.document.write("<html><head><title>Просмотр увеличенного изображения!</title></head>");
  generation_window.document.write("<body bgcolor='"+bg_color+"'>");
  generation_window.document.write("<div id='' style='position:absolute; left:0px; top:0px; width:100%; height:100%; z-index:1'>");
  generation_window.document.write("<table width='100%' height='100%'  border='0' cellpadding='0' cellspacing='0'>");
  generation_window.document.write("<tr>");
  generation_window.document.write("<td valign='middle'><div align='center'><img scr='' name='masha' id='masha'></div></td>");
  generation_window.document.write("</tr>");
  generation_window.document.write("</table>");
  generation_window.document.write("</div>");
  generation_window.document.write("</body>");
  generation_window.document.write("</html>");
  generation_window.document.masha.src=eval("large_pictures.src");
  generation_window.document.close();
  
}
