

//popup function mit print


function openPopup(source, winwidth, winheight, scrollbars) {

    var prefs = "toolbar=no,status=no,menubar=no,location=no,resizable=no,scrollbars=no,width=" + winwidth + ",height=" + winheight + ",screenX=150,screenY=150";
    if (scrollbars == 1) {
        prefs = "toolbar=no,status=no,menubar=no,location=no,resizable=no,scrollbars=yes,width=" + winwidth + ",height=" + winheight + ",screenX=150,screenY=150";
    }
    win = window.open(source, "OrderReference", prefs);
    win.moveTo((screen.width - winwidth) / 2, (screen.height - winheight) / 2);


    if (window.screen){
    setTimeout('win.print()', 2000);
	win.focus();
	}


}


//popup order

function launchLex(url, name, width, height, scrollbars) {
var str = "height=" + height + ",innerHeight=" + height;
str += ",width=" + width + ",innerWidth=" + width + ",scrollbars=" + scrollbars;

if (window.screen) {
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
var xc = (aw - width) / 2;
var yc = (ah - height) / 2;
str += ",left=" + xc + ",screenX=" + xc;
str += ",top=" + yc + ",screenY=" + yc;
}
return window.open(url, 'remote', str);
remote.moveTo(0,0);
remote.document.opener=self;
if (navigator.appVersion.substring(1,0)>="3") {
remote.focus(); }
}






/*

	a =window.document.createElement('link');
 	a.setAttribute('rel','stylesheet');
 	a.setAttribute('type','text/css');
 	a.setAttribute('href','/grt-bel/css/layout/print.css');
 	window.document.getElementsByTagName('head')[0].appendChild(a)

 	;





 */










