$(function(){
  $(".lifestyle_module").dialog({
    autoOpen: false,
    dialogClass: 'lifestyle_module',
    modal: true,
    title: "Learn about Insulin Pump Therapy",
    width: 916
  });  
  $(".close a").click(function(){
    $(".ui-dialog-content").dialog("close");
    return false;
  });   
  $(".lifestyle_popup a").click(function(){
    $(".ui-dialog-content").dialog("open");
    return false;
  });
})

function popFlash(file) {
	
	window.open(file,'','scrollbars=no,menubar=no,height=455,width=670,resizable=no,toolbar=no,location=no,status=no');
}

function initPumps() {
	var comp_link = getObject("comp");
	var comp_img = getObject("compimg");
	var demo_link = getObject("demo");
	var demo_img = getObject("demoimg");
	
	comp_link.onclick = function() { popFlash("components.html"); return false; };
	comp_img.onclick = function() { popFlash("components.html"); return false; };
	demo_link.onclick = function() { popFlash("demonstration.html");return false; };
	demo_img.onclick = function() { popFlash("demonstration.html");return false; };
}

addOnload("initPumps()");