function MM_preloadImages() { //v3.0
  var d=document;t=null;
  if(d.images){if(!d.MM_p) d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
  for(i=0; i<a.length; i++) {if (a[i].indexOf("#")!=0) {d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

isMSIE = (navigator.appName == "Microsoft Internet Explorer");
isMSIE5 = isMSIE && (navigator.userAgent.indexOf('MSIE 5') != -1);
isMSIE5_0 = isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1);

if (navigator.userAgent.indexOf('Opera') != -1)
{
    isMSIE = false;
}

function IEAlphaInit (obj)
{
    if (isMSIE && !obj.IEswapped) { obj.IEswapped = true; obj.src = 'images/trans.gif'; }
}

function IEAlphaApply (obj, img)
{
    if (isMSIE) { obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img+"');" } else { obj.src=img; }
}

//showPrice
function showPrice(page, infld, inval) {
    if ( infld == 'auflage') auflage = inval;
    if ( infld == 'format') format = inval;
    if ( infld == 'farben') farben = inval;
    if ( infld == 'papier') papier = inval;
    var url = "makeprice.php?page=" + page + "&auflage=" + auflage + "&format=" + format + "&farben=" + farben + "&papier=" + papier;
    showPrice_raw(url);
}//end function

// showPrice_raw
function showPrice_raw(url) {
    url += "&ajax=1";    
    ajax_doRequest(url);
}//end function

//showClickmenu_noajax(url)
function showPrice_noajax(url) {
    
}//end function

function ajax_doRequest(url) {  
    var x;
    x = ajax_initObject();
    if(!x) {
        showPrice_noajax(url);
    }//end if
    x.open("GET", url, true);
    x.onreadystatechange = function() {
        if (x.readyState != 4)    {
            return;
        }//end if
        //alert(x.responseText);
        var xmldoc = x.responseXML;
        var aclsee = xmldoc.getElementsByTagName("aclsee")[0];
        showPrice_ajax(aclsee);
    }//end function
    x.send("");
    delete x;
}//end function

//ajax_initObject()
function ajax_initObject()    {
    var A;
    try {
        A=new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            A=new ActiveXObject("Microsoft.XMLHTTP");
        } catch (oc) {
            A=null;
        }//end try
    }//end try
    if (!A && typeof XMLHttpRequest != "undefined") {
        A = new XMLHttpRequest();
    }//end if
    return A;
}//end function

// set the price, is called from ajax_doRequest
function showPrice_ajax(inObj)    {
  if (inObj.getElementsByTagName("data")[0])    {
    var price = inObj.getElementsByTagName("data")[0].getElementsByTagName("price")[0];
    var tableData = price.getElementsByTagName("value")[0].firstChild.data;
    var cmlevel = price.getElementsByTagName("cmlevel")[0].firstChild.data;
    setLayerObj(tableData,cmlevel);
  }//end if
}//end function

// setLayerObj(html,level)
function setLayerObj(html,level) {
    var tempLayerObj = GL_getObj("fldPrice");
    tempLayerObj.el.innerHTML = html;
}

// GL_getObj(obj)
function GL_getObj(obj){
  nest="";
  this.el= (bw.ie4||bw.op7)?document.all[obj]:bw.ns4?eval(nest+"document."+obj):document.getElementById(obj);
  this.css= bw.ns4?this.el:this.el.style;
  this.ref= bw.ns4?this.el.document:document;
  this.x= (bw.ns4||bw.op)?this.css.left:this.el.offsetLeft;
  this.y= (bw.ns4||bw.op)?this.css.top:this.el.offsetTop;
  this.height= (bw.ie4||bw.dom)?this.el.offsetHeight:bw.ns4?this.ref.height:0;
  this.width= (bw.ie4||bw.dom)?this.el.offsetWidth:bw.ns4?this.ref.width:0;
  return this;
}//end fucntion

//browsercheck...
function GL_checkBrowser(){    //
  this.dom= (document.getElementById);
  this.op=  (navigator.userAgent.indexOf("Opera")>-1);
  this.op7=  this.op && (navigator.appVersion.indexOf("7")>-1);  // check for Opera version 7
  this.konq=  (navigator.userAgent.indexOf("Konq")>-1);
  this.ie4= (document.all && !this.dom && !this.op && !this.konq);
  this.ie5= (document.all && this.dom && !this.op && !this.konq);
  this.ns4= (document.layers && !this.dom && !this.konq);
  this.ns5= (!document.all && this.dom && !this.op && !this.konq);
  this.ns6= (this.ns5);
  this.bw=  (this.ie4 || this.ie5 || this.ns4 || this.ns6 || this.op || this.konq);
  return this;
}//end function
  
// initLayer()
function initLayer(){    //
  layerObj = GL_getObj("fldPrice");
}//end function

var layerObj=new Array();
bw= new GL_checkBrowser();
auflage = 1;
format = 1;
farben = 1;
papier = 1;
