function openResizableWindow(page) {
	window.open(page, "featureWindowResizable", "width=646,innerwidth=646,height=480,innerheight=480,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openBigResizableWindow(page) {
	window.open(page, "featureBigWindowResizable", "width=796,innerwidth=796,height=480,innerheight=480,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openNonResizableWindow(page) {
	window.open(page, "featureWindowNonResizable", "width=610,innerwidth=610,height=460,innerheight=460,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function openSmallNonResizableWindow(page) {
	window.open(page, "featureSmallWindowNonResizable", "width=400,innerwidth=400,height=200,innerheight=200,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=no,resizable=no");
}

function openAutoSizeWindow(page) {
	window.open(page, "featureWindowAutoResizable", "width=646,innerwidth=646,height=480,innerheight=480,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openDetailWindow(page) {
	window.open(page, "featureWindowDetail", "width=616,innerwidth=616,height=430,innerheight=430,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openAutoResizingWindow(page) {
	window.open(page, "featureAutoResizingWindow", "width=620,innerwidth=620,height=450,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

function openEmailFormWindow(page) {
	window.open(page, "featureAutoResizingWindow", "width=620,innerwidth=620,height=570,innerheight=450,toolbar=no,titlebar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}

var isNav, isIE;

if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
	isNav = (navigator.appName == "Netscape") ? 1 : 0;
	isIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}

//IE Max
IEMaxH = 553; //530
IEMaxW = 630; //612

//Nav Max
NavMaxH = 548;
NavMaxW = 608;

function fitWindowSize_old() {
if (isNav) {
	}

if (isIE) {
	var screen_width = screen.width;
	var screen_height = screen.height;

	width = 630;

	// if screen is 648x480 - don't resize
	if (screen_height > 480) { height = 600; } // screen is 800x600
	if (screen_height > 600) { height = 768; } // screen is 1024x768
	if (screen_height > 768) { height = 870; } // screen is 1152x870
	if (screen_height > 870) { height = 1024; } // screen is 1280x1024
	if (screen_height > 1024) { height = 1200; } // screen is 1600x1200

	window.resizeTo(width, height);
	}
}

function fitWindowSize() {
	if (isNav) {
		height = document['imgPreview'].height + 100;  //100 to compensate for window title bar and footer height
		width = document['imgPreview'].width;

		if (height<NavMaxH) {
		    height = NavMaxH;
		}

		if (width<NavMaxW) {
		    width = NavMaxW;
		}

		window.outerHeight = height;
		window.outerWidth = width;
	}
 
	if (isIE) {
		window.resizeTo(IEMaxH, IEMaxW);

		height = document.images['imgPreview'].height + 80; //80 to compensate for window title bar and footer height
		width = document.images['imgPreview'].width + 12; //12 to compensate for left and right window border width

		if (height<IEMaxH) {
		    height = IEMaxH;
		}

		if (width<IEMaxW) {
		    width = IEMaxW;
		}
	
		window.resizeTo(width, height);
    }
}

function fitBigWindowSize() {
if (isNav) {
	}

if (isIE) {
	var screen_width = screen.width;
	var screen_height = screen.height;

	width = 630;
	// if screen is 640x480 - don't resize
	if (screen_width > 640) { width = 800; } // screen is 800x600
	if (screen_width > 800) { width = 816; } // screen is 1024x768

	// if screen is 640x480 - don't resize
	if (screen_height > 480) { height = 600; } // screen is 800x600
	if (screen_height > 600) { height = 768; } // screen is 1024x768
	if (screen_height > 768) { height = 870; } // screen is 1152x870
	if (screen_height > 870) { height = 1024; } // screen is 1280x1024
	if (screen_height > 1024) { height = 1200; } // screen is 1600x1200

	window.resizeTo(width, height);
	}
}




function MM_preloadImages() { //v3.0
	var d = document;
	if(d.images) {
		if(!d.MM_p) {
			d.MM_p=new Array();
		}
	}

	var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
	for (i = 0; i < a.length; i++) {
		if (a[i].indexOf("#") != 0) {
			d.MM_p[j] = new Image; d.MM_p[j++].src = a[i];
		}
	}
}



