function plainWin(getFileName,getWidth,getHeight,getLeft,getTop) /** opens a plain pop-up-window
	if no position (getLeft,getTop) is provided, the window will be opened at position left=0, top=0
	if the given width/height does not fit the screen resolution, the window-size will be set to max values */
{
if(getFileName==0)
	return false;
	if(!getHeight) { getHeight=500; }
	if(!getWidth) { getWidth=500; }
	
	if(!getLeft) { getLeft=0; }
	if(!getTop) { getTop=0; }
	
	if(getHeight<100) { getHeight=100; }
	if(getWidth<250) { getWidth=250; }
	
	if(getHeight>screen.height) { getHeight=screen.height; }
	if(getWidth>screen.width) { getWidth=screen.width; }
//change popup windows properties like height,width...

	window.open(getFileName,"","left="+getLeft+", top="+getTop+",width="+getWidth+",height="+getHeight+" status=NO,toolbar=NO,location=NO,directories=NO,menubar=NO,scrollbars=NO,resizable=yes")
}

function cleanUp(input) {/** cleans up a numeric var. 
	if input ist not numeric or negative, function returns 0
	if input is a positive number, this number will be returned */

	var value = input;
	value++;
	if ((value - input) == 1) {
		if (input > 0) {
			return input;
		} else {
			return 0;
		}
	} else {
		return 0;
	}	
}

function higher(obj) { /** increases the value of a given object (object MUST have value-property!) by 1 */
	var getVal = obj.value;
	getVal = cleanUp(getVal);
	getVal++;
	obj.value = getVal;

}

function lower(obj){ /** decreases the value of a given object (object MUST have value-property!) by 1 */
	if(obj.value>0){
		var getVal = obj.value;
		getVal = cleanUp(getVal);
		getVal--;
		obj.value = getVal;
	}
}

function putDate(target){ /** puts the current client-date into a textfield (target) */
	var now = new Date();
	var day, month, year, output;
	if( now.getDate() < 10 ){
		day = "0" + now.getDate();
	}else{
		day = now.getDate();
	}
	if( (now.getMonth()+1) < 10 ){
		month = now.getMonth() + 1;
		month = "0" + month;
	}else{
		month = now.getMonth() + 1;
	}
	year = now.getFullYear();
	output = day + "." + month + "." + year;
	target.value = output;
}

function putTime(target){ /**  puts the current client-time into a textfiel (target) */
	var now = new Date();
	var hours, mins, output;
	if( now.getHours() < 10 ){
		hours = "0" + now.getHours();
	}else{
		hours = now.getHours();
	}
	if( now.getMinutes() < 10 ){
		mins = now.getMinutes();
		mins = "0" + mins;
	}else{
		mins = now.getMinutes();
	}
	output = hours + ":" + mins;
	target.value = output;
}
