function addToFavorites() {
 
  if (window.external) 
	  window.external.AddFavorite(location.href,document.title);
  else  
  if (window.sidebar)
    window.sidebar.addPanel(document.title,location.href, "");
}

function makeCurrentPageStartPage(obj) {
	if (window.external) {
		obj.style.behavior='url(#default#homepage)';
		obj.setHomePage(location.href);
  } else {
		alert("Your browser doesn't support this function.");
  }
}

function openModalPopup(a, w, h){
	if ( !w ) {
		w = 740;
	}
	if ( !h ) {
		h = 600;
	}
	
	if(typeof a=="object" && a.tagName=="A"){
		var href=a.href;
	}else if(typeof a=="string"){
		var href=a;
	}
	var attributes="width="+w+", height="+h+", scrollbars=yes, status=yes";
	var _wpopup_ = window.open(href,"",attributes);
	   
	window.onfocus=function(){if(!_wpopup_.closed) _wpopup_.focus()}
}

function closeModalPopup(windowObject) {
  windowObject.close();
}
