/*

javascript functions for ahsr

*/

function openPopper(practiceID, practiceCode)
{
var myurl = "picturepop.php?practiceID=" + practiceID + "&practiceCode=" + practiceCode;
var winny = window.open(myurl, "AHSR", "width=720, height=600");
}

function delconf()
{	
	var delcheck = confirm("Are you sure you would like to permanently remove this item?");
	if(delcheck){
		return true;
	} else {
		return false;	
	}
}

//window.make_throw = function(){throw new Error("abc")}; 
//try { make_throw() } catch(e) { alert(e.message) };

//	function checkIE4Mac()
//	{ 
    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);	
    
    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3 = (is_ie && (is_major < 4));
    var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );        
	
    var is_mac = (agt.indexOf("mac")!=-1); 
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    
    if(is_mac && is_ie5up)
    {
    	 document.location.href = "ie4mac.html";
    }
//	}
