function img_blank (link, title, x, y)
{
	width0=667;
	height0=500;
	
	str='width='+width0+', height='+height0+', left='+x+', top='+y+',dependent=1,resizable=0,menubar=0,toolbar=0,location=0,scrollbars=0,status=0';
	win = window.open('','', str); 
	f=win.document;
	f.open();
	f.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>");
	f.write("<title>"+title+"</title></head>");
	f.write("<body marginwidth='0' marginheight='0' topmargin='0' bottommargin='0' leftmargin='0' rightmargin='0'>");
	f.write("<img id='image' name='image' src='"+link+"' onLoad='self.resizeTo(document.image.width,document.image.height);'></body></html>");
}

function img_blank_v (link, title, x, y)
{
	width0=460;
	height0=700;
	
	str='width='+width0+', height='+height0+', left='+x+', top='+y+',dependent=1,resizable=0,menubar=0,toolbar=0,location=0,scrollbars=0,status=0';
	win = window.open('','', str); 
	f=win.document;
	f.open();
	f.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>");
	f.write("<title>"+title+"</title></head>");
	f.write("<body marginwidth='0' marginheight='0' topmargin='0' bottommargin='0' leftmargin='0' rightmargin='0'>");
	f.write("<img id='image' name='image' src='"+link+"' onLoad='self.resizeTo(document.image.width,document.image.height);'></body></html>");
}

function img (link, title, x, y)
{
	width0=700;
	height0=500;
	
	str='width='+width0+', height='+height0+', left='+x+', top='+y+',dependent=1,resizable=0,menubar=0,toolbar=0,location=0,scrollbars=0,status=0';
	win = window.open('','', str); 
	f=win.document;
	f.open();
	f.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>");
	f.write("<title>"+title+"</title></head>");
	f.write("<body marginwidth='0' marginheight='0' topmargin='0' bottommargin='0' leftmargin='0' rightmargin='0'>");
	f.write("<img id='image' name='image' src='"+link+"' onLoad='self.resizeTo(document.image.width,document.image.height);'></body></html>");
}

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus)
{
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

