
function pfoto1(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + (WIDTH+50) + ",height=" + (HEIGHT+50);
text = "<html><head><title>Ôîòî1</title></head><body bgcolor='white'";
text += "><center><img src='" + URL + "'>";
text += "</center></body></html>";
preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
//preview.document.close();
}
function pfoto(URL, WIDTH, HEIGHT) {
//URL='big/'+URL;
//alert(URL);
windowprops = "left=50,top=50,width=" + (WIDTH+150) + ",height=" + (HEIGHT+150);
text = "<html><head><title>Ôîòî</title></head><body bgcolor='white'";
text += "><center><img src='" + URL + "'>";

text += "</center></body></html>";
preview = window.open("", "preview", windowprops);
preview.document.open();
preview.document.write(text);
preview.document.close();
}

function pfoto2(WIDTH, HEIGHT,url) {
		var a;
		windowp = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=yes,resizable=yes,status=yes";
        WIDTH += 150;
        HEIGHT += 50
        windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=yes,resizable=yes,status=yes, toolbar=yes";
     	text = "<html><head><title>Ôîòî</title></head><body bgcolor='white'><center><table><tr>";
        for( i = url.length-1; i >=0; i-- )
        {                       
				text += '<td><A target="_blank" onclick="javascript: t=window.open(\''+url[i]+'\');"><img src="' + url[i] + '" width=200 height=200></a></td>\n';
    	a=i%3;    
		if(a==0) text+='<br></tr><tr>';
		}               
		text +="</tr></table>";
        wind = window.open("", "wind", windowprops);
        wind.document.write(text);
		wind.document.close();
		if(t)
		{
			t.document.close();
		}
}

function pfoto2_s(WIDTH, HEIGHT,url,dir) {
		var a;
		windowp = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=yes,resizable=yes,status=yes";
        WIDTH += 150;
        HEIGHT += 50
        windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=yes,resizable=yes,status=yes, toolbar=yes";
     	text = "<html><head><title>Ôîòî</title></head><body bgcolor='white'><center><table><tr>";
        for( i = url.length-1; i >=0; i-- )
        {                       
				text += '<td><A target="_blank" onclick="javascript: t=window.open(\''+dir+url[i]+'\');"><img src="'+dir+'s_' + url[i] + '" width=200></a></td>\n';
    	a=i%3;    
		if(a==0 && i!=0) text+='<br></tr><tr>';
		}               
		text +="</tr></table>";
        wind = window.open("", "wind", windowprops);
        wind.document.write(text);
		wind.document.close();
		if(t)
		{
			t.document.close();
		}
}

function pfoto4_s(WIDTH, HEIGHT,url) {
		var a;
		windowp = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=yes,resizable=yes,status=yes";
       WIDTH1=WIDTH;
	    WIDTH += WIDTH;
        HEIGHT += 50
        windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + ", scrollbars=yes,resizable=yes,status=yes, toolbar=yes";
     	text = "<html><head><title>Ôîòî</title></head><body bgcolor='white'><center><table><tr>";
		for( i = url.length-1; i >=0; i-- )
        {                       
				text += '<td><A target="_blank" onclick="javascript: window.open(\''+url[i]+'\');"><img src="s_' + url[i] + '" width="'+WIDTH1+'"></a></td>\n';
    	a=i%3;    
		if(a==0) text+='<br></tr><tr>';        
		}     
		text +="</tr></table>";
		
		
        wind = window.open("", "wind", windowprops);
        wind.document.write(text);
		wind.document.close();
		if(t)
		{
			t.document.close();
		}
}


