function detectSafari(){ 
if (navigator.appVersion.indexOf("Safari") != -1) 
   document.body.className += " safari"; 
} 

if (window.addEventListener) 
   window.addEventListener("load", detectSafari, false);





// v1.7 Copyright (c) 2006 TJKDesign - Thierry Koblentz
// For help, visit http://www.tjkdesign.com/articles/navigation_links_and_current_location.asp
function aetomic_menu(zMenu,defaultPage,classToApply,leaveItAlone){
if (document.getElementById && document.createElement && document.getElementById(zMenu)){
var strLocation = (top.location.pathname.lastIndexOf("/")+1 == top.location.pathname.length) ? top.location.hostname + top.location.pathname+defaultPage : top.location.hostname + top.location.pathname;
	var a = document.getElementById(zMenu).getElementsByTagName("a");
		for (var x=0,i=a.length;x<i;x++){
			var nothingToDo = (a[x] && a[x].className && a[x].className==leaveItAlone) ? true : false;
			if (!nothingToDo && a[x] && a[x].href && a[x].href.lastIndexOf("#")+1!=a[x].href.length){
				if (a[x].href.indexOf(strLocation,0)>0 || a[x].href == top.location.protocol + "//" + top.location.hostname + top.location.pathname){
					if (classToApply==""){
						var objNode = a[x];
						var strLink = objNode.firstChild.data;
						objNode.parentNode.innerHTML="<em>"+strLink+"</em>";
					}else{
						a[x].className += " "+classToApply;
					}
				}
			}
		}
	}
}





function openCompare() {
  popupWin = window.open('calc_compare.html', 'remote1', 'scrollbars,resize,width=550,height=420,left=200,top=50')
}
function openQualify() {
  popupWin = window.open('calc_qualify.html', 'remote2', 'scrollbars,resize,width=540,height=550,left=200,top=50')
}
function openAmort() {
  popupWin = window.open('calc_amort.html', 'remote3', 'scrollbars,resize,width=540,height=485,left=200,top=50')
}
function openpopup1() {
  popupWin = window.open('calc_mini.html', 'remote4', 'scrollbars,resize,width=290,height=300,left=200,top=50')
}



