function showLightWindow(top,left,width,height){ var scrollPos = document.body.scrollTop; if(scrollPos==0)scrollPos=document.documentElement.scrollTop; var offerDiv = document.getElementById("LightWindow"); if(top>0){ scrollPos +=top; }else{ scrollPos+=100; } offerDiv.style.top=scrollPos+"px"; if(left<=0){ if(window.innerWidth)left = ((window.innerWidth-width)/2); else left = ((document.body.clientWidth -width)/2); } offerDiv.style.left=left+"px"; offerDiv.style.width=width+"px"; if(height>0)offerDiv.style.height=height+"px"; setBgBlack("BlackBackground"); showDiv('LightWindow'); } function showLightWindow2(top,left,width,height,divName){ var scrollPos = document.body.scrollTop; if(scrollPos==0)scrollPos=document.documentElement.scrollTop; var offerDiv = document.getElementById(divName); if(top>0){ scrollPos +=top; }else{ scrollPos+=100; } offerDiv.style.top=scrollPos+"px"; if(left<=0){ if(window.innerWidth)left = ((window.innerWidth-width)/2); else left = ((document.body.clientWidth -width)/2); } offerDiv.style.left=left+"px"; offerDiv.style.width=width+"px"; if(height>0)offerDiv.style.height=height+"px"; setBgBlack("BlackBackground"); showDiv(divName); } function closeWindow(){ hideDiv("BlackBackground"); hideDiv("LightWindow"); } function closeForm(){ hideDiv("CustomerRemovalFormDiv"); hideDiv("BlackBackground"); } function sendAsEmail(removal_id){ var url="AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=sendAsEmail&removal_oid="+removal_id; AJAXloadHTMLinTarget(url,"CustomerRemovalFormDiv",null,null); } function cancelRemoval(removal_id){ var url="AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=cancel&removal_oid="+removal_id; AJAXloadHTMLinTarget(url,"LightWindow",null,null); } function setBgBlack(divName){ var bodyhight=document.getElementsByTagName('body')[0].scrollHeight; var bodywidth=document.getElementsByTagName('body')[0].scrollWidth; document.getElementById(divName).style.width=bodywidth+'px'; document.getElementById(divName).style.height=bodyhight+'px'; showDiv(divName); } function showRemoval(id,name){ setBgBlack("BlackBackground"); var url= "AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=showRemoval&removal_oid="+id; AJAXloadHTMLinTarget(url,"CustomerRemovalFormDiv",null,null); showLightWindow2(10,0,560,0,"CustomerRemovalFormDiv"); } function showInterest(id){ setBgBlack("BlackBackground"); var url= "AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=showInterest&removalinterest_oid="+id; AJAXloadHTMLinTarget(url,"LightWindow",null,null); showLightWindow(100,0,820,0); } function rejectInterest(id){ var url= "AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=rejectInterest&removalinterest_oid="+id; AJAXloadHTMLinTarget(url,"LightWindow",null,null); } function acceptInterest(id){ var url= "AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=acceptInterest&removalinterest_oid="+id; AJAXloadHTMLinTarget(url,"LightWindow",null,null); } function editRemoval(id,name){ //setBgBlack("BlackBackground"); var url= "AjaxRequest.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=editRemoval&removal_oid="+id; AJAXloadHTMLinTarget(url,"LightWindow",null,null); showLightWindow(100,0,820,0); //showDiv("CustomerRemovalFormDiv"); } function setInteresse(removal_id,max_volumen){ var price = parseFloat(document.getElementById("price_offer").value); var url="ProcessFormRemoval.jsp;jsessionid=abcWaizXr7N1E8CkRiNwt?action=setInteresse&removal_oid="+removal_id; if(price==0 || isNaN(price)){ alert("Bitte geben Sie ein Preisangebot an."); return; } url +="&price="+price; if(max_volumen!=null){ var volumen = parseFloat(document.getElementById("volumen_offer").value); if(volumen==0 || isNaN(volumen)){ alert("Bitte geben Sie das benötige Volumen an."); return; }else if(max_volumen'; document.body.appendChild(d); var i = document.getElementById(n); if (c && typeof(c.onComplete) == 'function') { i.onComplete = c.onComplete; } return n; }, form : function(f, name) { f.setAttribute('target', name); }, submit : function(f, c) { AIM.form(f, AIM.frame(c)); if (c && typeof(c.onStart) == 'function') { return c.onStart(); } else { return true; } }, loaded : function(id) { var i = document.getElementById(id); if (i.contentDocument) { var d = i.contentDocument; } else if (i.contentWindow) { var d = i.contentWindow.document; } else { var d = window.frames[id].document; } if (d.location.href == "about:blank") { return; } if (typeof(i.onComplete) == 'function') { i.onComplete(d.body.innerHTML); } } }