function tmail()
{
	document.getElementById("form1").submit()
}
function cle(el){
	if(el=="undefined") return
	if (typeof(el.mark) == 'undefined') {
		if(el.name!="text") el.value='' 
		else el.innerHTML=''
		el.mark=1;
	}
}

function imgopen(imgf,tit){

rand_id='image'+(Math.round(Math.random()*1000));
outf="<html>"
  +"<head>"
  +"<title>"+tit+"</title>"
  +"<style>body{margin:0px}</style>"
  +"</head>"
  +"<"+"body"+" leftmargin=0 topmargin=0>"
  +"<img src=\""+imgf+"\">";

iopen="iwin = self.open('"+imgf+"', '"+rand_id+"', 'width='+(img1.width)+',height='+(img1.height)+',top=0,left=0');"
    +"iwin.document.write('"+outf+"');"
    +"iwin.focus();";

img1=new Image();
img1.src=imgf;

if(img1.width!=0) eval(iopen);

else{
iwin = self.open('about:blank', 'f'+rand_id, 'width=100,height=100,top=0,left=0');
iwin.document.write("<html>"
+"<"+"body"+">Загрузка...<br>"
  +"<"+"script>"
    +"function imo(img1){"+iopen
    +"self.close();"
  +"}<"+"/script>"
  +"<img src='"+imgf+"' onload='imo(this);'>");
  }
}

var wall
var size
var num

function openWin(wall,tit) {
img1=new Image();
img1.src=wall;

myWin= open("", "displayWindow", 
  "width=1000,height=700,status=yes,toolbar=no,menubar=no,scrollbars=yes");

myWin.document.open();
myWin.document.write("<html><head><title>"+tit);
myWin.document.write("</title></head><body bgcolor=adb7cd leftmargin=0 topmargin=0>");
myWin.document.write("<center><font color=red size=-1>");
myWin.document.write("<img src=" +wall+ " width="+img1.width+" height="+img1.height+">");
myWin.document.write("</body></html>");
myWin.document.close(); 
}


