﻿// Pirms dzēšanas pārjautā...
function deleteItemAlert(txt) {
		if (confirm(txt) ) {
			return true;
		} else {
			return false;
		}
}

function OpenPopup (url, w, h) {
window.open(url,'_blank', 'width=' + w +',height=' + h +',scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=50,top=50');
return true;
}



// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 0;
PositionY = 0;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 1044;
defaultHeight = 768;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4) {
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY+',resizable=yes';
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY+',resizable=yes';

function popImage(imageURL,imageTitle) {
	if (isNN){imgWin=window.open('about:blank','',optNN);}
	if (isIE){imgWin=window.open('about:blank','',optIE);}

	with (imgWin.document){
		var imgHTML = '';
		imgHTML += '<html><head><title>Loading...</title><style>body{margin:0px;}</style>';
		imgHTML += '<script>';
		imgHTML += '	var isNN,isIE;';
		imgHTML += '	if (parseInt(navigator.appVersion.charAt(0))>=4){';
		imgHTML += '		isNN=(navigator.appName=="Netscape")?1:0;';
		imgHTML += '		isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}';
		imgHTML += '	function reSizeToImage(){';
		imgHTML += '		if (isIE){';
		imgHTML += '			window.resizeTo(100,100);';
		imgHTML += '			width=100-(document.body.clientWidth-document.images[0].width);';
		imgHTML += '			height=100-(document.body.clientHeight-document.images[0].height);';
		imgHTML += '			window.resizeTo(width,height);}';
		imgHTML += '		if (isNN){';
		imgHTML += '			window.innerWidth=document.images["George"].width;';
		imgHTML += '			window.innerHeight=document.images["George"].height;}}';
		imgHTML += '	function doTitle(){document.title="'+imageTitle+'";}';
		imgHTML += '</script>';
		if (!AutoClose)
			imgHTML += '</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">';
		else
			imgHTML += '</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">';

		imgHTML += '<img name="George" src='+imageURL+' style="display:block" onClick="self.close()"></body></html>';
		writeln(imgHTML);
		close();
	}
}
// END Script Source: CodeLifter.com

