﻿/*
    Westpac - DOI
*/

// opens the educational version for the specific chapter
function openWin(myUrl) {
    myWin = window.open(myUrl, "myWin", "width=960,height=650,scrollbars=yes,resizeable=no,statusbar=no,menubar=no");
    if (!myWin) {
        return false;
    } else {
        myWin.focus();
        return true;
    }
}

// closes the window
function closeWin() {
    window.close();
}

// opens the print dialog
function printPage() {
    window.print();
}

// bookmarks / adds to favourite (current page)
function bookmarkPage() {
    var title = document.title;
    var url = location.href;

    if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url, "");
    } else if (window.external) { // IE Favorite
	    window.external.AddFavorite(url, title); 
	} else if(window.opera && window.print) { // Opera Hotlist
	    return true; 
	}
}





