//:mode=javascript:
//:tabSize=4:indentSize=4:
/*
 * spot-components/CMS
 * Public Frontend
 * Utility Functions (AddBookmark, etc.)
 *
 * {{{ CVS-Info
 *
 * $Id: frontend_tools.js,v 1.3 2005/12/08 14:30:53 hannes Exp $
 *----------------------------------------------------------------------------
 * $Log: frontend_tools.js,v $
 * Revision 1.3  2005/12/08 14:30:53  hannes
 * registrierungs, login, password resen etc. texte geandert
 *
 * Revision 1.2  2005/11/14 16:41:01  paul
 * bookmark jetzt auch für mozilla
 *
 * Revision 1.1.1.1  2005/07/28 14:03:21  soeren
 * initial import
 *
 * Revision 1.1.1.1  2005/07/28 13:23:00  soeren
 * initial import
 *
 * Revision 1.1.1.1  2005/03/30 15:52:49  martins
 * initial import
 *
 * Revision 1.1.1.1  2005/01/14 16:41:07  martins
 *
 *
 * Revision 1.4  2004/12/13 15:42:00  martins
 * - added js-function galleryPopupOpen
 *
 * Revision 1.3  2004/10/04 13:13:03  martins
 * - dos2uinixed
 *
 * Revision 1.2  2004/10/01 15:19:45  marvin
 * HTML korrigiert.
 *
 * Revision 1.1  2004/10/01 08:52:13  hauke
 * - added javascript, images and stylesheet
 *
 * Revision 1.1.1.1  2004/02/13 17:30:08  martins
 * - imported initial revision
 *
 * Revision 1.1  2004/02/04 16:26:33  hauke
 * - public js utilities
 *
 * }}}
 */

// add page to favourites
function addBookmark(title,url) { 
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) { 
		window.external.AddFavorite( url, title); 
	} else if( window.opera && window.print ) { 
		return true; 
	} 
}

function addhomepage(anchorObj) {
	if (document.all) {
		anchorObj.style.behavior = 'url(#default#homepage)';
		anchorObj.setHomePage(document.location.href);
	}
}

function newWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=" + scroll +",resizable";
	win = window.open(mypage, myname, winprops)

	if (parseInt(navigator.appVersion) >= 4) { 
		win.window.focus(); 
	}
}

function galleryPopupOpen(url, w, h ) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	winprops = "height=" + h + ",width=" + w
			+ ", innerHeight=" + h + ", innerWidth=" + w
			+ ",top=" + wint + ",left=" + winl 
			+ ",scrollbars=no, resizable=yes"
			+ ", status=no, toolbar=no, location=no, menubar=no";
	win = window.open(url, 'gallery_popup', winprops)

	if (parseInt(navigator.appVersion) >= 4) { 
		win.window.focus(); 
	}
}

function printArticle(file) {
	win = window.open(file)

	if (parseInt(navigator.appVersion) >= 4) { 
		win.window.focus(); 
	}
}
