//<script>

// Set the horizontal and vertical position for the popup
var PositionX = 100;
var PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

var defaultWidth  = 660;
var defaultHeight = 500;

var AutoClose = 1; 

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;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;

function popImage(itemID,langIndex, path) {
	var opt = isNN?optNN : (isIE?optIE:'');
	
	if (path == null) path = '';
	window.open(path+'imgviewer.php?lang='+langIndex+'&item_id='+itemID+'&autoclose='+AutoClose,'',opt);
}

function popImageByUrl(imageUrl, path) {
	var opt = isNN?optNN : (isIE?optIE:'');
	
	if (path == null) path = '';
	window.open(path+'imgviewer.php?picfile='+imageUrl+'&autoclose='+AutoClose,'',opt);
	return false; // just to use it within A tag onclick event
}

function popGImage(itemID, path) {
	var opt = isNN?optNN : (isIE?optIE:'');
	
	if (path == null) path = '';
	window.open(path+'imgviewer.php?set_id=2&item_id='+itemID+'&autoclose='+AutoClose,'',opt);
}

//</script>
