//<script>

// Set the horizontal and vertical position for the popup
var defaultWidth  = 700;
var defaultHeight = 560;

var PositionX = 100;
var PositionY = 100;

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;
*/

var opt='width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+', resizable=1, 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);
}

function popNewsImage(itemID, path) {
	//var opt = isNN?optNN : (isIE?optIE:'');
	
	if (path == null) path = '';
	window.open(path+'imgviewer.php?set_id=3&item_id='+itemID+'&autoclose='+AutoClose,'',opt);
}

//</script>
