//browser specific functions

var ie7 = false
var ie6 = false

//Adapted from:  http://www.webreference.com/programming/javascript/designing/chap6/1/3.html
var browserName = navigator.appName;
var browserVersion = parseInt(navigator.appVersion);
if (browserName == "Microsoft Internet Explorer" && 
         browserVersion == 4 && 
         navigator.appVersion.indexOf("MSIE 7.") != -1) {
    	ie7=true; // IE 7.x
}
else if (browserName == "Microsoft Internet Explorer" && 
         browserVersion == 4 && 
         navigator.appVersion.indexOf("MSIE 6.") != -1) {
	    ie6=true // IE 6.x
}

//Adjust the height of a popup for IE6. Also include the units (i.e. "px")
function AdjustPopupHeight(ie7Height, units) {
	//original was 29+25+4, but I needed to subtract 3 to get it to display propertly.
	var estimated_total_chrome_elements_height = 29 + 25 + 1; // title + status bar
	if (ie6) {
		return (ie7Height + estimated_total_chrome_elements_height) + units
	} else {
		return (ie7Height) + units
	}
}

//Adjust the width of a popup for IE6. Also include the units (i.e. "px")
function AdjustPopupWidth(ie7Width, units) {
	var estimated_total_chrome_elements_width = 4; // left and right frame edge	
	if (ie6) {
		return (ie7Width + estimated_total_chrome_elements_width) + units
	} else {
		return (ie7Width) + units
	}
}

/*
if (browserName == "Netscape" && browserVersion == 5) {
    browser = "nn6";                                         // Netscape 6
}
else if (browserName == "Netscape" && browserVersion == 4) {
    browser = "nn4";                                         // Navigator 4
}
else if (browserName == "Microsoft Internet Explorer" && 
         browserVersion == 4 && 
         navigator.appVersion.indexOf("MSIE 6.0") != -1) {
    browser = "ie6";                                         // IE 6.0
}
else if (browserName == "Microsoft Internet Explorer" && 
         browserVersion == 4 && 
         navigator.appVersion.indexOf("MSIE 5.5") != -1) {
    browser = "ie55";                                        // IE 5.5
}
else if (browserName == "Microsoft Internet Explorer" && 
         browserVersion == 4 && 
         navigator.appVersion.indexOf("MSIE 5.0") != -1) {
    browser = "ie5";                                         // IE 5.0
}
else if (browserName == "Microsoft Internet Explorer" 
         && browserVersion == 4) {
    browser = "ie4";                                         // IE 4
}

*/