function start() {

//	if (window.name != 'kunzmann_cars' && window.name != 'kunzmann_cars_print_view' && window.name != 'kunzmann_lexikon' && window.name != 'kunzmann_leasing' && window.name != 'kunzmann_finanzierung'  && window.name != 'kunzmann_versicherung' && window.name != 'kunzmann_exportpreis') {
//
//		window.location = 'http://www.kunzmann.de/';
//
//	} else if (window.name != 'kunzmann_lexikon' && window.name != 'kunzmann_leasing' && window.name != 'kunzmann_finanzierung'  && window.name != 'kunzmann_versicherung' && window.name != 'kunzmann_exportpreis') {
//
//		var width = (screen.width<1024) ? 800 : 1024;
//		var height = (screen.height<768) ? 600 : 768;
//		window.resizeTo(width,height);
//
//	}

}

function go(url) {

	window.location.href = url;

}

function absLeft(el) {

	return (el.offsetParent) ? el.offsetLeft+absLeft(el.offsetParent) : el.offsetLeft;

}

function absTop(el) {

	return (el.offsetParent) ? el.offsetTop+absTop(el.offsetParent) : el.offsetTop;

}

function print_view(url) {

	var width = (screen.width<1024) ? 800 : 1024;
	var height = (screen.height<768) ? 600 : 768;
	pv = window.open(url,'kunzmann_cars_print_view','width='+width+',height='+height+',location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');
	if (pv)
		pv.focus();

}
function print_view_garage(url) {

	var width = 750;
	var height = (screen.height<768) ? 600 : 768;
	pvg = window.open(url,'kunzmann_cars_print_view','width='+width+',height='+height+',location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');
	if (pvg)
		pvg.focus();

}
function row_mo(i, mode, style) {

//		for (c = 1; c <= 7; c++)
	c = 1;
	while (document.getElementById('row' + i + '_' + c)) {

		document.getElementById('row' + i + '_' + c).className = (mode == 1) ? 'row_mo' : style;
		c++;

	}

}

function popup (target, name, width, height) {
	var appendix;
		if(target.indexOf('?') > 0) {
			appendix = '&';
		} else {
			appendix = '?';
		}
		if(target.indexOf('#') > 0) {
			target = target.substring(0, target.indexOf('#')) + appendix + 'popup=true' + target.substring(target.indexOf('#'));
		} else {
			target = target + appendix + 'popup=true';
		}
	p = window.open(target, name, 'width=' + width + ', height=' + height + ',scrollbars=yes,status=no,location=no,menubar=no,resizable=no,toolbar=no');
	if (p)
		p.focus();

}
function popup2 (target, name, width, height) {
	var appendix;
		if(target.indexOf('?') > 0) {
			appendix = '&';
		} else {
			appendix = '?';
		}
		if(target.indexOf('#') > 0) {
			target = target.substring(0, target.indexOf('#')) + appendix + 'popup=true' + target.substring(target.indexOf('#'));
		} else {
			target = target + appendix + 'popup=true';
		}
	p = window.open(target, name, 'width=' + width + ', height=' + height + ',scrollbars=no,status=no,location=no,menubar=no,resizable=no,toolbar=no');
	if (p)
		p.focus();

}
function popupRS(url, width, height, name) {
		var appendix;
		if(url.indexOf('?') > 0) {
			appendix = '&';
		} else {
			appendix = '?';
		}
		if(url.indexOf('#') > 0) {
			url = url.substring(0, url.indexOf('#')) + appendix + 'popup=true' + url.substring(url.indexOf('#'));
		} else {
			url = url + appendix + 'popup=true';
		}
        p = window.open(url, name, 'width='+width+',height='+height+',toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1');
		if (p)
			p.focus();
}

function popupLanding (target, name) {

	
	var width = (screen.width<1024) ? 800 : 1024;
	var height = (screen.height<768) ? 600 : 768;
	
	p = window.open(target, name, 'width=' + width + ', height=' + height + ',top=20,left=20,scrollbars=yes,status=no,location=no,menubar=no,resizable=no,toolbar=no');
	if (p)
		p.focus();

}

function pn(el) {

	if (el.parentNode) {

		if (el.parentNode.name == "filter")
			return true;

	} else {

		return false;

	}

}

function resetForm() {

	
	/* reset all select-boxes which members of filter*/
	var i = 0;
	while (document.getElementsByTagName('select')[i]) {

		if ( document.getElementsByTagName('select')[i].name != 'marke'){
			document.getElementsByTagName('select')[i].selectedIndex = 0;
			}
		i++

	}
	/* reset all checkboxes which members of filter */
	var i = 0;
	while (document.getElementsByTagName('input')[i]) {
	if (document.getElementsByTagName('input')[i])
			document.getElementsByTagName('input')[i].checked = false;
		i++

	}

}