// =================
// Auto-Sizing Image Popup Window
// Browsers: NS6-7 & IE4 and later
// =================
PositionX = PositionY = 100;
dfWidth = dfHeight = 500;

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 optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
var optNN='scrollbars=no,width='+dfWidth+',height='+dfHeight+',left='+PositionX+',top='+PositionY;

function popImage(imageURL,imageTitle){
	var html = "<html><head><title>"+imageTitle+"</title>" +  "</head><body style='margin:  0px 0; text-align:center;' >" +   "<IMG src='" + imageURL + "'    BORDER=0 NAME=image " +  "onload='window.resizeTo(document.image.width,(document.image.height*1.3))'>;"  +  "</body></html>";
	popup=window.open('','image','toolbar=0,location=0,  directories=0,menuBar=0, scrollbars=0,resizable=1');
	popup.document.open();
	popup.document.write(html);
	popup.document.focus();
	popup.document.close();
}

// popup window
function openWin(url, name, width, height) {
	return window.open(url, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+width+',height='+height);
	
}

function openDlg(url, obj, width, height) {
	return showModalDialog(url, editdoc, "resizable:no; help:no; status:no; scroll:no; toolbar:no; location:no; menubar:no; width:"+width+"; height:"+height);
}
