
var hochPrintWidth = 595;
var querPrintWidth = 820;
var defaultPrintHeight = 710;

var defaultCartWidth = 810;
var defaultCartHeight = 520;

var defaultHistorieWidth = 785;
var defaultHistorieHeight = 410;

var defaultFwdWidth = 620;
var defaultFwdHeight = 450;

var defaultTsWidth = 880;
var defaultTsHeight = 710;

var defaultAuszugWidth = 700;
var defaultAuszugHeight = 650;

function openAuszugWindow(url){
    openPopup(url, "gkfaauszug", defaultAuszugWidth, defaultAuszugHeight, true);
    return false;
}

function openHochPrintWindow(url){
    openPrintWindow(url, "druckversion", hochPrintWidth, defaultPrintHeight, true);
    return false;
}

function openQuerPrintWindow(url){
    openPrintWindow(url, "druckversion", querPrintWidth, defaultPrintHeight, true);
    return false;
}

function openCartWindow(url){
    openPrintWindow(url, "warenkorb", defaultCartWidth, defaultCartHeight, true);
    return false;
}

function openHistorieWindow(url){
    openPopup(url, "historie", defaultHistorieWidth, defaultHistorieHeight, true);
    return false;
}

function openFwdWindow(url){
    openPopup(url, "weiterempfehlung", defaultFwdWidth, defaultFwdHeight, true);
    return false;
}

function openTsWindow(url){
    openPopup(url, "themenschaufenster", defaultTsWidth, defaultTsHeight, true);
    return false;
}

function openPopup(url, name, width, height, scroll) {
    if(scroll == true){
        scroll = "1";
    }
    else{
        scroll = "0";
    }
    var description = "width=" + width + ",height=" + height + ",scrollbars=" + scroll + ",status=no,menubar=no,locationbar=no,dependent=no,resizable=yes,screenX=30,screenY=30";
    var w = open (url, name, description);
    w.focus();
    return w;
}

function tt_Popup(url, name, width, height, scroll) {
    if(scroll == true){
        scroll = "1";
    }
    else{
        scroll = "0";
    }
    var description = "width=" + width + ",height=" + height + ",scrollbars=" + scroll + ",status=no,menubar=no,locationbar=no,dependent=no,resizable=yes,top=300,left=300";
    var w = open (url, name, description);
}

function openPrintWindow(url, name, width, height, scroll) {
    if(scroll == true){
        scroll = "1";
    }
    else{
        scroll = "0";
    }
    var description = "width=" + width + ",height=" + height + ",scrollbars=" + scroll + ",menubar=yes,locationbar=no,dependent=no,resizable=yes,screenX=30,screenY=30";
    var w = open (url, name, description);
    w.focus();
    return w;
}

function callQuickfinder(quick) {
    var quickhref = quick.options[quick.selectedIndex].value;
    if(quickhref.length > 0){
        location.href = quickhref;
    }
}

function resetTerminForm(){
	var thisForm = document.terminform;
	thisForm._muster.value="";
	thisForm._ort.value="";
	thisForm._plz.selectedIndex = 0;
}

function resetProfiForm(){
	var thisForm = document.profiform;
	thisForm._autor.value="";
	thisForm._titel.value="";
	thisForm._isbn.value="";
	thisForm._volltext.value="";
	thisForm._verlag.selectedIndex = 0;
	thisForm._sparte.selectedIndex = 0;
}

