//:mode=javascript:
//:tabSize=4:indentSize=4:
/*
 * spot-components/CMS
 * Public Frontend
 * Utility Functions (AddBookmark, etc.)
 *
 * {{{ CVS-Info
 *
 * $Id: frontend_tools.js,v 1.16 2005/09/20 11:11:25 hauke Exp $
 *----------------------------------------------------------------------------
 * $Log: frontend_tools.js,v $
 * Revision 1.16  2005/09/20 11:11:25  hauke
 * - moved octopus function into octopus.js
 * - added octopus.js for bbmagicshop and extendshop
 *
 * Revision 1.15  2005/05/17 14:52:18  hauke
 * - may has 31 days
 *
 * Revision 1.14  2005/05/11 15:37:10  hauke
 * - removed &
 *
 * Revision 1.13  2005/04/29 13:56:34  hauke
 * - Entry.jsp doesn't work, try HotelLink again
 *
 * Revision 1.12  2005/04/29 13:41:20  hauke
 * - changed URL back to octopus live site
 *
 * Revision 1.11  2005/04/27 17:19:21  hauke
 * - URLRoot now points to octopus test site
 *
 * Revision 1.10  2005/04/27 17:11:54  hauke
 * - added checkin date message
 *
 * Revision 1.9  2005/04/13 09:07:51  hauke
 * - added octopus siteid: rcinm
 *
 * Revision 1.8  2005/04/11 15:00:23  hauke
 * - make country parameter configurable
 *
 * Revision 1.7  2005/04/08 11:20:34  hauke
 * - quick fix: DGE() needs .value
 *
 * Revision 1.6  2005/04/08 11:16:58  hauke
 * - javascript foo retrieved language and currency through getSelectedValue()
 * - now that language and currency are hidden fields, getSelectedValue() doesn't
 *   work anymore
 * - fixed
 *
 * Revision 1.5  2005/03/23 16:16:11  hauke
 * - build checkin from beg_day/beg_month
 *
 * Revision 1.4  2005/03/22 17:10:38  koch
 * hotelsuche javascript hinzugefuegt
 *
 * Revision 1.3  2005/02/14 15:34:26  koch
 * bookmark angepasst
 *
 * Revision 1.2  2005/02/10 13:08:41  koch
 * sterne und preise komponente eingefuegt, text abstand
 *
 * 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
 *
 * }}}
 */

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(); 
	}
}


