
<!---

	function newwnd(page,_width,_height)
	{
		zufall=Math.random();
		zufall*=16;
		zufall=Math.ceil(zufall);
		
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2-25;
		var newwindow = window.open(page, 'detail' + zufall, 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
		newwindow.focus();
	}

	function newwnd_noscroll(page,_width,_height)
	{
		zufall=Math.random();
		zufall*=16;
		zufall=Math.ceil(zufall);
		
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2-25;
		var newwindow = window.open(page, 'detail' + zufall, 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
		newwindow.focus();
	}

	function newwnd_fullscreen(page,_width,_height)
	{
		zufall=Math.random();
		zufall*=16;
		zufall=Math.ceil(zufall);
		
		var newwindow = window.open(page, 'detail' + zufall, 'top=5,left=5,width='+(screen.width-10)+',height='+(screen.height-30)+',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
		newwindow.focus();
	}

	function confirm(link)
	{
		_width = 350;
		_height = 230;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(link, 'confirm', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function fileman(link)
	{
		_width = 550;
		_height = 180;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(link, 'fileman', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function showwnd(change)
	{
		var newwindow = window.open(change, 'wnd', 'top=10,left=10,width=1000,height=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
		newwindow.focus();
	}

	function sizeEditDiv() {

		// gr&ouml;sse des con_ver_edit Div's anpassen
		if (window.innerHeight) hoehe = window.innerHeight;
		else if (document.body && document.body.offsetHeight) hoehe = document.body.offsetHeight;
		if (window.innerWidth) breite = window.innerWidth;
		else if (document.body && document.body.offsetWidth) breite = document.body.offsetWidth;
		
		document.getElementById(sizeEditDiv_div_name).style.height = hoehe-sizeEditDiv_margin_top; 
		document.getElementById(sizeEditDiv_div_name).style.width = breite-sizeEditDiv_margin_left; 
	}

	function chimg(ID_Content, Field, neu)
	{
		if(!img_openNode)
		var img_openNode = 0;
		change = '/verwaltung/bilder/frame.php?site=' + ID_Content + '&field=' + Field + '&new=' + neu + '&img_openNode=' + img_openNode;
		window.open(change, 'bildpool', 'top=10,left=10,width=1000,height=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function chswf(ID_Content, Field, neu)
	{
		change = '/verwaltung/flash/frame.php?site=' + ID_Content + '&field=' + Field + '&new=' + neu;
		window.open(change, 'flashpool', 'top=10,left=10,width=1000,height=700,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');
	}
	
	function delimg(Field)
	{
		bild = document.getElementById(Field);
		bild.value='';
		imgbild = document.getElementById('img_'+Field);
		imgbild.src='';
	}

	function chkicker(ID_Content, Field, neu)
	{
		change = '/verwaltung/kicker/index.php?site=' + ID_Content + '&field=' + Field + '&new=' + neu;
		window.open(change, 'kickerpool', 'top=10,left=10,width=800,height=600,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}

	function delkicker(Field)
	{
		document.getElementById(Field).value = '';  
	}

	function createLink(Field, selText)
	{
		change = '/verwaltung/content/index.php?field=' + Field + '&selText=' + selText;
		window.open(change, 'linkpool', 'top=10,left=10,width=800,height=600,toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes');
	}

	function showimg_db(img_nr, size)
	{
		bildname = '/data/imgwnd.php?ID=' + img_nr + '&View='+ size;

		_width=50;
		_height=50;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(bildname, 'bild_gal', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}

	function showimg_file(img_name)
	{
		bildname = '/data/imgwnd.php?bild=' + img_name;

		_width=50;
		_height=50;
		_left=(screen.width-_width)/2;
		_top=(screen.height-_height)/2;
		window.open(bildname, 'bild_gal', 'top=' + _top + ',left=' + _left + ',width=' + _width + ',height=' + _height + ',toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no');
	}
	
// Inputfield Filter DropDown
var inputid_sav = -1;
function closeChooseNULL(inputid, objid) {
	choosediv = document.getElementById(objid);

	if (inputid_sav == inputid) { 
		choosediv.style.visibility = "hidden";
		inputid_sav = -1;
		return ;
	}
}

function openChooseNULL_old(inputid, button) {
//	openChooseNULL(inputid, 'choose_NULL', button, 'bottom');
		choosediv = document.getElementById('choose_NULL');
	
		if (inputid_sav == inputid) { 
			choosediv.style.visibility = "hidden";
			inputid_sav = -1;
			return ;
		}
	
		if (document.getElementById(inputid)) {
			inputfield = document.getElementById(inputid);
			
			choosediv.style.visibility = "visible";
			choosediv.style.width = inputfield.offsetWidth + button.offsetWidth;
			

			_offsetLeft = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetLeft += el.offsetLeft; el = el.offsetParent; }

			choosediv.style.left = _offsetLeft;

			_offsetTop = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetTop += el.offsetTop; el = el.offsetParent; }

			choosediv.style.top = _offsetTop + inputfield.offsetHeight + 1;
	
			inputid_sav = inputid;
		}
	}

function openChooseNULL(inputid, objid, button, position) {
	choosediv = document.getElementById(objid);

	if (inputid_sav == inputid) { 
		choosediv.style.visibility = "hidden";
		inputid_sav = -1;
		return ;
	}

	if (document.getElementById(inputid)) {
		inputfield = document.getElementById(inputid);
		
		choosediv.style.visibility = "visible";
//		choosediv.style.width = inputfield.offsetWidth + button.offsetWidth;

		_offsetLeft = 0;
		el = inputfield;
		while ((el.offsetParent) ) { _offsetLeft += el.offsetLeft; el = el.offsetParent; } // && (el.tagName != 'DIV')

		choosediv.style.left = _offsetLeft - 19 + 'px';
		_offsetTop = 0;
		el = inputfield;
		while ((el.offsetParent) ) { _offsetTop += el.offsetTop; el = el.offsetParent; } // && (el.tagName != 'DIV')

		//alert (_offsetTop + ' / ' + _offsetLeft);

		if (position=='bottom') {
			choosediv.style.top = _offsetTop + 'px'; // inputfield.offsetHeight + 10 +
		} else if (position=='top') {
			choosediv.style.top = _offsetTop - choosediv.offsetHeight + 'px';
		} else {
		}

		inputid_sav = inputid;
	}
}

	
	
	// openDivFrame PopUp
	var openDivFrame_sav = -1;
	function closeDivFrame(inputid, divObj) {
		choosediv = window.parent.document.getElementById(divObj);
	
		choosediv.style.visibility = "hidden";
		openDivFrame_sav = -1;
		return ;
	}
	function openDivFrame(inputid, divObj) {
		choosediv = document.getElementById(divObj);
/*	
		if (openDivFrame_sav == inputid) { 
			choosediv.style.visibility = "hidden";
			openDivFrame_sav = -1;
			return ;
		}
*/	
		if (document.getElementById(inputid)) {
			inputfield = document.getElementById(inputid);
			
			choosediv.style.visibility = "visible";
//			choosediv.style.width = inputfield.offsetWidth;
			

			_offsetLeft = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetLeft += el.offsetLeft; el = el.offsetParent; }

			choosediv.style.left = _offsetLeft ;//- (inputfield.offsetWidth-choosediv.style.width);

			_offsetTop = 0;
			el = inputfield;
			while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetTop += el.offsetTop; el = el.offsetParent; }

			choosediv.style.top = _offsetTop + inputfield.offsetHeight;
	
			openDivFrame_sav = inputid;
		}
	}

	function searchDivFrame(txt, iFrameObj) {
		
		iFrame = document.getElementById(iFrameObj);
		locationStr = iFrame.src;
		if ((ipos = iFrame.src.indexOf('searchStr='))> -1) {
			locationStr = iFrame.src.substring(0, ipos);
		}
		
		iFrame.src =  locationStr + '&searchStr=' + txt;
		
	}	
	
var monate = Array ()
monate[1] = 'Januar';
monate[2] = 'Februar';
monate[3] = 'März';
monate[4] = 'April';
monate[5] = 'Mai';
monate[6] = 'Juni';
monate[7] = 'Juli';
monate[8] = 'August';
monate[9] = 'September';
monate[10] = 'Oktober';
monate[11] = 'November';
monate[12] = 'Dezember';

/*
function createCalenderDropDown (objid, inputid, zindex,this_year,this_month,this_day,funccall,tabindex) {
	document.write('<div id="'+objid+'" align="center" class="cal" style="position:absolute; visibility:hidden; z-index:'+zindex+';"></div>');
	document.write('<input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'"><input type="image" src="/verwaltung/img/navi_img/dropdown.jpg" tabindex="999'+tabindex+'"onClick="openCalender(\''+inputid+'\', \''+objid+'\', this, \'bottom\');return false;" align="absmiddle">');
	createCalender (objid, inputid, this_year,this_month,this_day,funccall);
}
*/
function createCalenderDropDown (objid, inputid, zindex,this_year,this_month,this_day,funccall,tabindex,empty,readonly,popposition,classx) {

	if (popposition=='') {popposition='bottom';} 
	if (classx=='') {classx='';} 
	document.write('<div id="'+objid+'" align="center" class="cal" style="position:absolute; visibility:hidden; z-index:'+zindex+';"></div>');
	if (readonly)
		document.write('<input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'" class="'+classx+'" readonly="true">');
	else
		document.write('<input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'" class="'+classx+'" onblur="'+funccall+'"><input type="image" src="/verwaltung/img/navi_img/dropdown.jpg" tabindex="999'+tabindex+'"onClick="openCalender(\''+inputid+'\', \''+objid+'\', this, \''+popposition+'\');return false;" align="absmiddle">');
	createCalender (objid, inputid, this_year,this_month,this_day,funccall,empty);
}

function createCalenderDropDownInner (objid, inputid, zindex,this_year,this_month,this_day,funccall,tabindex,empty,readonly,popposition, formid) {
	if (popposition=='') {popposition='bottom';} 
	
	document.getElementById(formid).innerHTML = '<div id="'+objid+'" align="center" class="cal" style="position:absolute; visibility:hidden; z-index:'+zindex+';"></div><input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'"><input type="image" src="/verwaltung/img/navi_img/dropdown.jpg" tabindex="999'+tabindex+'"onClick="openCalender(\''+inputid+'\', \''+objid+'\', this, \'bottom\');return false;" align="absmiddle">';
	createCalender (objid, inputid, this_year,this_month,this_day,funccall,empty);
}

function createCalender (objid, inputid, this_year,this_month,this_day,funccall,empty) {

	this_year = this_year*1;
	this_month = this_month*1;
	this_day = this_day*1;
	
	this_Date = new Date(this_year,(this_month-1),this_day);

	this_year = this_Date.getFullYear()
	this_month = this_Date.getMonth()+1;
	this_day = this_Date.getDate();

	start_Date = new Date(this_year,(this_month-1),1);
	start_tag = start_Date.getDay();
	if (start_tag==0) start_tag=7;

	var max_tag = 31;
	if(this_month==4 ||this_month==6 || this_month==9 || this_month==11 ) --max_tag;
	if(this_month==2)
	{
		max_tag-=3;
		if(this_year%4==0) max_tag++;
		if(this_year%100==0) max_tag--;
		if(this_year%400==0) max_tag++;
	}
	var max_coll = 42;
	var akttag = 1;

	var bgcolor='ffffff';
	var cal_str = '';
	
			cal_str += '<a href="#" class="cal_link" onClick="createCalender(\''+objid+'\', \''+inputid+'\', \''+(this_year-1)+'\',\''+(this_month)+'\',\''+this_day+'\')">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;&nbsp;'+
				'<a href="#" class="cal_link" onClick="createCalender(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month-1)+'\',\''+this_day+'\')">&lt;</a>&nbsp;&nbsp;'+	
				'<strong>' + monate[this_month] + '&nbsp;'+this_year+'</strong>&nbsp;&nbsp;'+
				'<a href="#" class="cal_link" onClick="createCalender(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month+1)+'\',\''+this_day+'\')">&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;' +
				'<a href="#" class="cal_link" onClick="createCalender(\''+objid+'\', \''+inputid+'\', \''+(this_year+1)+'\',\''+(this_month)+'\',\''+this_day+'\')">&gt;&gt;</a>';
			cal_str += '<table cellpadding="2" cellspacing="0" class="cal" style="border: 1px solid black;" width="160">';
			cal_str += '<tr class="cal_headline"><td>M</td><td>D</td><td>M</td><td>D</td><td>F</td><td>S</td><td>S</td></tr>';
			cal_str += '<tr>';			
			
				for (i_tab=1;i_tab<=max_coll;i_tab++) {
					if ((i_tab>=start_tag)&&(i_tab<(max_tag+start_tag))) {
//						if (q_days[akttag-1]['color']!='') bgcolor = q_days[akttag-1]['color']; else bgcolor='ffffff';
						cal_str += '<td bgcolor="#'+bgcolor+'">';
						if (inputid!='') { 
							cal_str += '<a href=# class="';
							if (akttag==this_day) cal_str += 'active_date_link'; else cal_str += 'date_link';
							cal_str += '" onClick="openCalender(\''+inputid+'\', \''+objid+'\');createCalender(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month)+'\',\''+akttag+'\');'+funccall+';">'; 
						}
						cal_str += akttag;
						if (inputid!='') { cal_str += '</a>'; }
						akttag++;
					} else cal_str += '<td>&nbsp;';
					cal_str += '</td>';
					if ((i_tab%7)==0) cal_str += '</tr><tr>';
				}
			
			cal_str += '</tr>';
			cal_str += '</table>';
/*
// Debug
			cal_str += '<br>';
			cal_str += this_year+'<br>';
			cal_str += this_month+'<br>';
			cal_str += this_day+'<br>';
			cal_str += this_Date+'<br>';
			cal_str += this_Date.getFullYear()+'<br>';
			cal_str += this_Date.getMonth()+'<br>';
			cal_str += this_Date.getDate()+'<br>';
*/
	
	document.getElementById(objid).innerHTML = cal_str;
	if ((inputid!='')&&(!empty)) setInputDate(inputid, objid, this_year,this_month,this_day);
}

function setInputDate(inputid, objid, this_year,this_month,this_day) {
	if (this_day<10) this_day_str = "0" + this_day; else this_day_str = this_day;
	if (this_month<10) this_month_str = "0" + this_month; else this_month_str = this_month;
	document.getElementById(inputid).value = this_year+'-'+this_month_str+'-'+this_day_str;
}

// Inputfield Filter DropDown
var inputid_sav = -1;
function openCalender(inputid, objid, button, position) {
	choosediv = document.getElementById(objid);

	if (inputid_sav == inputid) { 
		choosediv.style.visibility = "hidden";
		inputid_sav = -1;
		return false;
	}

	if (document.getElementById(inputid)) {
		inputfield = document.getElementById(inputid);
		
		choosediv.style.visibility = "visible";
//		choosediv.style.width = inputfield.offsetWidth + button.offsetWidth;

		_offsetLeft = 0;
		el = inputfield;
		while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetLeft += el.offsetLeft; el = el.offsetParent; }

		choosediv.style.left = _offsetLeft;
//alert(choosediv.style.left);
		_offsetTop = 0;
		el = inputfield;
		while ((el.offsetParent) && (el.tagName != 'DIV')) { _offsetTop += el.offsetTop; el = el.offsetParent; }

		if (position=='bottom') {
			choosediv.style.top = _offsetTop + inputfield.offsetHeight + 20;
		} else if (position=='top') {
			choosediv.style.top = _offsetTop - choosediv.offsetHeight - 5;
		} else {
		}

		inputid_sav = inputid;
	}
		return false;
}


function change_radio_state(name, fieldprefix, count, input_err, path, attr) {
	hidden_radio_button = document.getElementById(fieldprefix+""+name+""+count);
	radio_images = document.getElementById("img"+fieldprefix+""+name+""+count);
			
	//all_radio_buttons = document.getElementsByName(fieldprefix+name);
	all_radio_buttons = getElementsByAttribute(document, '*', attr)
	all_radio_images = document.getElementsByName("img"+fieldprefix+name);

	if (input_err == 'input_err') {
		var error = '_'+input_err
	} else {
		var error = '';
	}

	for (i=0; i<all_radio_buttons.length; i++) {
		if (all_radio_buttons[i].id != fieldprefix+name+count) {
			all_radio_buttons[i].value = count;
			all_radio_images[i].src = path+'radio_inactive'+error+'.gif';
		}
	}
	
	radio_images.src = path+'radio_active'+error+'.gif';
	hidden_radio_button.value = count;
}

/*
	Copyright Robert Nyman, http://www.robertnyman.com
	Free to use if this text is included
*/
function getElementsByAttribute(oElm, strTagName, strAttributeName, strAttributeValue){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	var oAttributeValue = (typeof strAttributeValue != "undefined")? new RegExp("(^|\\s)" + strAttributeValue + "(\\s|$)") : null;
	var oCurrent;
	var oAttribute;
	for(var i=0; i<arrElements.length; i++){
		oCurrent = arrElements[i];
		oAttribute = oCurrent.getAttribute && oCurrent.getAttribute(strAttributeName);
		if(typeof oAttribute == "string" && oAttribute.length > 0){
			if(typeof strAttributeValue == "undefined" || (oAttributeValue && oAttributeValue.test(oAttribute))){
				arrReturnElements.push(oCurrent);
			}
		}
	}
	return arrReturnElements;
}


function createCalenderDropDown_v2 (objid, inputid, zindex,this_year,this_month,this_day,funccall,tabindex,empty,readonly,popposition,classx) {

	if (popposition=='') {popposition='bottom';} 
	if (classx=='') {classx='';} 
	document.write('<div id="'+objid+'" align="center" class="cal" style="position:absolute; visibility:hidden; z-index:'+zindex+';"></div>');
	if (readonly)
		document.write('<input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'" class="'+classx+'" readonly="true">');
	else
		document.write('<input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'" class="'+classx+'" onblur="'+funccall+'"><input type="image" src="/verwaltung/img/navi_img/dropdown.jpg" tabindex="999'+tabindex+'"onClick="openCalender(\''+inputid+'\', \''+objid+'\', this, \''+popposition+'\');return false;" align="absmiddle">');
	createCalender_v2 (objid, inputid, this_year,this_month,this_day,funccall,empty);
}

function createInnerHtmlCalenderDropDown_v2 (objid, inputid, zindex,this_year,this_month,this_day,funccall,tabindex,empty,readonly,popposition,formid,classx) {

	if (popposition=='') {popposition='bottom';} 
	if (classx=='') {classx='';} 	
	document.getElementById(formid).innerHTML = '<div id="'+objid+'" align="center" class="cal" style="position:absolute; visibility:hidden; z-index:'+zindex+';"></div><input id="'+inputid+'" name="'+inputid+'" type="text" tabindex="'+tabindex+'" class="'+classx+'" onblur="'+funccall+'"><input type="image" src="/verwaltung/img/navi_img/dropdown.jpg" tabindex="999'+tabindex+'"onClick="openCalender(\''+inputid+'\', \''+objid+'\', this, \''+popposition+'\');return false;" align="absmiddle">';
	createCalender_v2 (objid, inputid, this_year,this_month,this_day,funccall,empty);
}

function createCalender_v2 (objid, inputid, this_year,this_month,this_day,funccall,empty,showMonth) {

	this_year = this_year*1;
	this_month = this_month*1;
	this_day = this_day*1;
	
	this_Date = new Date(this_year,(this_month-1),this_day);

	this_year = this_Date.getFullYear()
	this_month = this_Date.getMonth()+1;
	this_day = this_Date.getDate();

	start_Date = new Date(this_year,(this_month-1),1);
	start_tag = start_Date.getDay();
	if (start_tag==0) start_tag=7;

	var max_tag = 31;
	if(this_month==4 ||this_month==6 || this_month==9 || this_month==11 ) --max_tag;
	if(this_month==2)
	{
		max_tag-=3;
		if(this_year%4==0) max_tag++;
		if(this_year%100==0) max_tag--;
		if(this_year%400==0) max_tag++;
	}
	var max_coll = 42;
	var akttag = 1;

	var bgcolor='ffffff';
	var cal_str = '';
	
			cal_str += '<div style="float: left; width: 15px;"><a class="cal_link" onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+(this_year-1)+'\',\''+(this_month)+'\',\''+this_day+'\', \''+funccall+'\')">&lt;&lt;</a></div>'+
				'<div style="float: left; width: 15px;"><a class="cal_link" onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month-1)+'\',\''+this_day+'\', \''+funccall+'\')">&lt;</a></div>'+	
				'<div style="float: left; width: 60px; font-weight: bold;"><a onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month)+'\',\''+this_day+'\', \''+funccall+'\', \'\', \'1\')" style="cursor: pointer;">' + monate[this_month] + '</a></div>'+
				'<div style="float: left; width: 30px; font-weight: bold;"><a onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month)+'\',\''+this_day+'\', \''+funccall+'\', \'\', \'2\')" style="cursor: pointer;">'+this_year+'</a></div>'+
				'<div style="float: left; width: 15px;"><a class="cal_link" onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month+1)+'\',\''+this_day+'\', \''+funccall+'\')">&gt;</a></div>' +
				'<div style="float: left; width: 15px;"><a class="cal_link" onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+(this_year+1)+'\',\''+(this_month)+'\',\''+this_day+'\', \''+funccall+'\')">&gt;&gt;</a></div>';
			cal_str += '<div style="clear: both;"></div>';
			if (showMonth==1) {
				cal_str += '<table cellpadding="2" cellspacing="0" class="cal" style="border: 1px solid black;" width="160" height="133">';
				cal_str += '<tr class="cal_headline">';
				for (var mon=0; mon<12; mon++) {
					if (mon%3==0)
						cal_str += '</tr><tr>';
					
					cal_str += '<td>&nbsp;<a onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(mon+1)+'\',\''+this_day+'\', \''+funccall+'\')" style="cursor: pointer;">'+monate[mon+1]+'</a>&nbsp;</td>';
				}
				cal_str += '</tr></table>';
			} else if (showMonth==2) { // Zeige Jahre
				cal_str += '<table cellpadding="2" cellspacing="0" class="cal" style="border: 1px solid black;" width="160" height="133">';
				cal_str += '<tr class="cal_headline">';
				
				var jetzt = new Date();
				var aktJahr = this_year; //jetzt.getFullYear();
				var countYear = 0;
				for (var yea=14; yea>-16; yea--) {
					if (countYear%5==0)
						cal_str += '</tr><tr>';
					
					cal_str += '<td>&nbsp;<a onClick="createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+(aktJahr-yea)+'\',\''+this_month+'\',\''+this_day+'\', \''+funccall+'\')" style="cursor: pointer;">'+(aktJahr-yea)+'</a>&nbsp;</td>';
					countYear++;
				}
				cal_str += '</tr></table>';
			} else {
				cal_str += '<table cellpadding="2" cellspacing="0" class="cal" style="border: 1px solid black;" width="160">';
				cal_str += '<tr class="cal_headline"><td>M</td><td>D</td><td>M</td><td>D</td><td>F</td><td>S</td><td>S</td></tr>';
				cal_str += '<tr>';			
			
				
				for (i_tab=1;i_tab<=max_coll;i_tab++) {
					if ((i_tab>=start_tag)&&(i_tab<(max_tag+start_tag))) {
						// if (q_days[akttag-1]['color']!='') bgcolor = q_days[akttag-1]['color']; else bgcolor='ffffff';
						cal_str += '<td bgcolor="#'+bgcolor+'">';
						if (inputid!='') { 
							cal_str += '<a  class="';
							if (akttag==this_day) cal_str += 'active_date_link'; else cal_str += 'date_link';
							cal_str += '" onClick="openCalender(\''+inputid+'\', \''+objid+'\');createCalender_v2(\''+objid+'\', \''+inputid+'\', \''+this_year+'\',\''+(this_month)+'\',\''+akttag+'\', \''+funccall+'\');'+funccall+';">'; 
						}
						cal_str += akttag;
						if (inputid!='') { cal_str += '</a>'; }
						akttag++;
					} else cal_str += '<td>&nbsp;';
					cal_str += '</td>';
					if ((i_tab%7)==0) cal_str += '</tr><tr>';
				}
			
				cal_str += '</tr>';
				cal_str += '</table>';
			}
			cal_str += '<div style="text-align: right;"><a onClick="openCalender(\''+inputid+'\', \''+objid+'\');" style="cursor: pointer;">Schlie&szlig;en</a></div>';
		
	document.getElementById(objid).innerHTML = cal_str;
	if ((inputid!='')&&(!empty)) setInputDate_v2(inputid, objid, this_year,this_month,this_day);
}

function setInputDate_v2(inputid, objid, this_year,this_month,this_day) {
	if (this_day<10) this_day_str = "0" + this_day; else this_day_str = this_day;
	if (this_month<10) this_month_str = "0" + this_month; else this_month_str = this_month;
	document.getElementById(inputid).value = this_day_str+'.'+this_month_str+'.'+this_year;
}

	var cs_int = 1;
	
	function c_sup(obj)
	{
		cs_int = 1;
		c = document.getElementById(obj);
		doscroll(c, -5);
//		c.scrollTop = c.scrollTop - 10;
	}
	function c_sdown(obj)
	{
		cs_int = 1;
		c = document.getElementById(obj);
		doscroll(c, 5);
//		c.scrollTop = c.scrollTop + 10;
	}
	function c_sstop()
	{ cs_int = 0 }
	function doscroll(obj, speed)
	{
		if (((obj.scrollTop+obj.clientHeight-2)< obj.scrollHeight) && cs_int)
		{
			obj.scrollTop = c.scrollTop + speed;
			o = obj;
			s = speed;
			setTimeout("doscroll(o, s)", 200);	
		}
	}
	

	function checkOverflow(contentdivName, scrolldivName) {
		contentdiv = document.getElementById(contentdivName);
		scrolldiv = document.getElementById(scrolldivName);
		
		if (contentdiv) {
			
			if (!(contentdiv.scrollHeight-10 > contentdiv.clientHeight)) {
				scrolldiv.style.visibility = "hidden";
			}
			
		}
	} 

	function agentIs( check )
	{
		return ( window.navigator.userAgent.toLowerCase().indexOf(check.toLowerCase()) != -1 ) ? true : false;
	}

//-->
