// printview-styleswitch
var url = document.location.href;
var params = url.match(/\?[^\?]*$/);
var is_printview = ( params && url.match(/printview=true/) ) ? true : false;

if ( is_printview ) {
	document.write('<link rel="stylesheet" type="text/css" href="/isroot/ovs/css/print.css" />');
}

// printview
function printview(url) {
	var param = (is_printview) ? '' : 'printview=true';
	var param = (params) ? '&' + param : '?' + param;
	openWin(document.location.href+param, 'print');
}

// window-opener
function openWin(url, typ) {

    switch (typ) {

		case 'artikelempfehlung':
		var w = 339; var h = 470;
		var t = (screen.height/2)-(h/2);
		var l = (screen.width/2)-(w/2);
		window.open(url, typ, 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=0');
		break;

		case 'lieferbedingungen':
		var w = 339; var h = 470;
		var t = (screen.height/2)-(h/2);
		var l = (screen.width/2)-(w/2);
		window.open(url, typ, 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0');
		break;

		case 'print':
		var w = 550; var h = 600;
		var t = (screen.height/2)-(h/2);
		var l = (screen.width/2)-(w/2);
		window.open(url, typ, 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0');
		break;

		case 'agb_seminare':
		var w = 339; var h = 470;
		var t = (screen.height/2)-(h/2);
		var l = (screen.width/2)-(w/2);
		window.open(url, typ, 'width='+w+',height='+h+',top='+t+',left='+l+',toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0');
		break;

    }

}

// selectbox-jumper
function jumpMenu(elm) {
	document.location.href=elm.options[elm.selectedIndex].value;
}

