<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function OpenPic(picName) {

	MM_openBrWindow('getimg.php?img='+picName,'pic','width=100,height=100,top=10,left=10');
}


function DoMap() {

	parent.document.all.ffr.cols='520,*';
	location='static_imap.php';
}

function DoMenu() {

	parent.document.all.ffr.cols='328,*';
	location='static_menu.php?mm=0';
}

function SetCookie(sName, sValue)
{
  date=new Date();
  date.setFullYear(date.getFullYear()+1);
  document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
}

function GetCookie(sName)
{
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }
  return null;
}


function photoShow(id,wd,hg,pr){
 if(id>0){
  wd=wd*1;
  hg=hg*1;
  if(wd<200) wd=200;
  wd+=50;
  if(wd>screen.width)
   wd=screen.width-10;
  if(hg<100) hg=100;
  if(pr!=1) hg+=150;
  else hg+=50;
//alert("hg="+hg+", scr="+screen.height);
  if(hg>(screen.height-50)) hg=screen.height-80;
//alert("hg="+hg);
  var lV=(screen.width - wd) / 2;
  var tV=(screen.height - hg) / 2;
  ph=window.open("photo_show"+(pr==1?'_arc':'')+".php?id="+id,"","status=no,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,width="+wd+",height="+hg+",left="+lV+",top="+tV);
  ph.focus();
 }
}

function checkMail(f){
 var txt=document.getElementById(f).value;
 if(txt==""){
  alert("Укажите свой e-mail");
  document.getElementById(f).focus();
  return false;
 }else{
  if(txt.indexOf(".")<0 || (txt.indexOf("@")<1 || (txt.indexOf("@")> txt.length - 5))){
   alert("Неправильно введен e-mail");
   document.getElementById(f).focus();
   return false;
  }
 }
 if(document.getElementById("Fcode").value==""){
  alert("Введите код, указанный на картинке");
  document.getElementById("Fcode").focus();
  return false;
 }

 return true;
}

function checkForm(){
 var txt=document.getElementById("Vmail").value;
 if(txt==""){
  alert("Укажите свой e-mail");
  document.getElementById("Vmail").focus();
  return false;
 }else{
  if(txt.indexOf(".")<0 || (txt.indexOf("@")<1 || (txt.indexOf("@")> txt.length - 5))){
   alert("Неправильно введен e-mail");
   document.getElementById("Vmail").focus();
   return false;
  }
 }
 if(document.getElementById("Vpass").value==""){
  alert("Введите пароль");
  document.getElementById("Vpass").focus();
  return false;
 }

 return true;
}

//-->

