/*///////////////////////////////////////////////////////////////////
// -----------------------------------------------------------------
// <void> = popup(file, n, w, h, x, y, extra)
// -----------------------------------------------------------------
// description: 
//		opens a new browser window as popup window, displaying the
//		html/php,etc. page 'file'. 
//
//		The name, width, height and offset of the popup window are 
//		passed to this function.
//
//		By default, the window is resizable and has scrollbars enabled.
//
//		Other additional properties can be switched on, by using the 
//		'extra' string-parameter. Refer to the description of the 
//		JS-standard 'open()'-function to learn how to assemble the
//		'extra' string.
//	
// input:
//		file (string): URI of the file to be displayed.
//		n (string): name of the window.
//		w (string): width (in px) of the window (excl. window frame)
//		h (string): height (in px) of the window (excl. window frame)
//		x (string): window-offset (in px) from the left screen border
//		y (string): window-offset (in px) from the upper screen border
//		extra (string): additional properties (adress-bar, etc.) 
//										passed to the JS open()-function
//
// output: --
///////////////////////////////////////////////////////////////////*/
function popup(file, n, w, h, x, y, extra) {

var width = w ? w : 700;
var height = h ? h : 500;
var name = n ? n : 'popup';
var strLeft = x ? ',left=' + x : ',left=0';
var strTop = y ? ',top=' + y : ',top=0';
var strExtra = extra ? ',' + extra : '';

 infoWin = window.open(file, name, "width=" + width + ",height=" + height + ",scrollbars=yes,resizable=yes" + strExtra + strLeft + strTop);
 infoWin.resizeTo(width, height);
 infoWin.moveTo(x, y);
 infoWin.focus();
	
}

function helloWorld(s, k) {
	var n = 0;
	var r = "";
	for(var i=0; i < s.length; i++) {
		n = s.charCodeAt(i);
		if (n >= 8364) {n = 128;}
		r += String.fromCharCode(n-(k));
	}
	return r;
}
function linkTo_helloWorld(s, k) {
	location.href = helloWorld(s, k);
} 


