var pathPrefix = pathPrefix;
if (pathPrefix == null) {
	pathPrefix = "";
}

function sbwin_closed(winVar) {
    var ua = navigator.userAgent;
    if( !winVar ) {
        if( ua.indexOf('MSIE 4')!=-1 && ua.indexOf('Win')!=-1 ) {
            return winVar.closed;
        } else {
        	return typeof winVar.document != 'object';
        }
    } else {
    	return true;
    }
}

//open zoom window with close button.
var x;
function zoomview(imgPath,w,h) {
	if(x) {
		x.close();
	}
	if (!w) {
		w = 500+50;
	} else {
		w = w+50;
	}
	
	if (!h) {
		h = 375+45;
	} else {
		h = h+35;
	}
	
	x = window.open('', 'zoomwin', 'resizable=1,scrollbars=1,menubar=0,status=0,toolbar=0,width='+w+','+'height='+h);
	x.document.open();
	x.document.write('<html><head><title>ZOOM</title></head><body style="background-color:#000000;">');
	x.document.write('<div style="text-align:center; font-size:10pt;">');
	x.document.write('	<a href="javascript:window.close()"><img src="'+imgPath+'" border="0"><br>');
	x.document.write('	<img src="'+pathPrefix+'images/close_bu.gif" border="0"></a>');
	x.document.write('</div>');
	x.document.write('</body>');
	x.focus();
}

function largeView(caller,w,h) {
	if(x) {
		x.close();
	}
	if (!w) {
		w = 500+50;
	} else {
		w = w+50;
	}
	
	if (!h) {
		h = 375+45;
	} else {
		h = h+35;
	}
	
	imgPath = caller.childNodes[0].src;
	imgPath = imgPath.replace("s.jpg",".jpg");
	
	x = window.open('', 'zoomwin', 'resizable=1,scrollbars=1,menubar=0,status=0,toolbar=0,width='+w+','+'height='+h);
	x.document.open();
	x.document.write('<html><head><title>ZOOM</title></head><body style="background-color:#000000;">');
	x.document.write('<div style="text-align:center; font-size:10pt;">');
	x.document.write('	<a href="javascript:window.close()"><img src="'+imgPath+'" border="0"><br>');
	x.document.write('	<img src="'+pathPrefix+'images/close_bu.gif" border="0"></a>');
	x.document.write('</div>');
	x.document.write('</body>');
	x.focus();
}

function popup(file,w,h) {
	window.open(file,"popup","width="+w+",height="+h);
}

