
function ajaxManager(){var i;var request;var versions=new Array("MSXML2.XMLHttp.6.0","MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp");if(document.getElementById){if(window.XMLHttpRequest){request=new XMLHttpRequest();}
if(window.ActiveXObject){for(i=0;i<versions.length;i++){try{request=new ActiveXObject(versions[i]);}catch(exception){}}}}
return request;}
function addCronJob(){var url='crontab_edit.php';var myAjax=new Ajax.Request(url,{method:'post',parameters:{action:'add'},onComplete:updateDivCronBox});}
function editCronJob(id){var url='crontab_edit.php';var myAjax=new Ajax.Request(url,{method:'post',parameters:{action:'edit',cronid:id},onComplete:updateDivCronBox});}
function deleteCronJob(id,name){var url='crontab_edit.php';var check=confirm("Soll der Cronjob '"+name+"' (id = "+id+") wirklich geloescht werden?");if(check==true){var myAjax=new Ajax.Request(url,{method:'post',parameters:{action:'del',cronid:id},onComplete:reloadMainBox});}}
function updateDivCronBox(request){var response=request.responseText;var cronBox=$("CronBox");var cronMain=$("cronMain");cronMain.className="cronMainGrau";cronBox.className="aktiv";cronBox.innerHTML=response;}
function closeCronBox(){var cronBox=$("CronBox");var cronMain=$("cronMain");cronMain.className="";cronBox.className="passiv";cronBox.innerHTML="";}
function reloadMainBox(request){var url='crontab_edit.php';var myAjax=new Ajax.Request(url,{method:'post',parameters:{action:'updateMain'},onComplete:updateMainBox});}
function updateMainBox(request){var response=request.responseText;var cronBox=$("CronBox");var cronMain=$("cronMain");cronMain.className="";cronMain.innerHTML=response;cronBox.className="passiv";cronBox.innerHTML="";}
function addNewCronjob(){var url='crontab_edit.php';var myAjax=new Ajax.Request(url,{method:'post',parameters:$('formAddCronjob').serialize(true),onComplete:reloadMainBox});}
function editExistingCronjob(){var url='crontab_edit.php';var myAjax=new Ajax.Request(url,{method:'post',parameters:$('formEditCronjob').serialize(true),onComplete:reloadMainBox});}
function updateMenue(name){hideMenues(name);switch(name){case"servicemenue":document.getElementById("servicemenue").style.visibility="visible";break;case"verbrauchsmaterial":document.getElementById("verbrauchsmenue").style.visibility="visible";break;case"drucker":document.getElementById("druckermenue").style.visibility="visible";break;case"netzwerk":document.getElementById("netzwerkmenue").style.visibility="visible";break;case"hardware":document.getElementById("hardwaremenue").style.visibility="visible";break;case"software":document.getElementById("softwaremenue").style.visibility="visible";break;case"computer":document.getElementById("computermenue").style.visibility="visible";break;default:alert("unbekannter Layer:"+name);break;}}
function hideMenues(name){document.getElementById("servicemenue").style.visibility="hidden";document.getElementById("verbrauchsmenue").style.visibility="hidden";document.getElementById("druckermenue").style.visibility="hidden";document.getElementById("netzwerkmenue").style.visibility="hidden";document.getElementById("hardwaremenue").style.visibility="hidden";document.getElementById("softwaremenue").style.visibility="hidden";document.getElementById("computermenue").style.visibility="hidden";}
var NewsletterAjaxUrl='../shopmin/newsletter_ajax.php';function newsletterExtraText(pid,id){var c=new Element.ClassNames('addZusatzText'+id);c.remove("addZusatzText");Element.show('addZusatzText'+id);}
function newsletterDeleteExtraText(pid,id){var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:'deleteExtraText',product:pid},onComplete:function(){top.inhalt.location.href="/shopmin/index.php?CMD=get_newsletterdata";}});}
function newsletterExtraImg(pid,id){var c=new Element.ClassNames('addZusatzImg'+id);c.remove("addZusatzImg");Element.show('addZusatzImg'+id);}
function newsletterDeleteExtraImg(pid,id){var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:'deleteExtraImg',product:pid},onComplete:function(){top.inhalt.location.href="/shopmin/index.php?CMD=get_newsletterdata";}});}
function newsletterActions(request){switch(request){case"showHTML":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:openPopUpShowNewsletterHTML});break;case"showTEXT":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:openPopUpShowNewsletterTEXT});break;case"showEmpfaenger":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:openPopUpShowEmpfaenger});break;case"reset":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:function(){top.inhalt.location.href="/shopmin/index.php?CMD=get_newsletterdata";}});break;case"sendNOW":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:function(){alert("Newsletter an Testaccount versandt!");}});break;case"sendCRON":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:function(){top.inhalt.location.href="/shopmin/index.php?CMD=get_newsletterdata";}});break;case"sendSTOP":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request},onComplete:function(){top.inhalt.location.href="/shopmin/index.php?CMD=get_newsletterdata";}});break;case"deleteEMAIL":var myAjax=new Ajax.Request(NewsletterAjaxUrl,{method:'post',parameters:{action:request,email:$('emailadresse').value},onComplete:function(){alert("Mailadresse "+$('emailadresse').value+" erfolgreich aus der Datenbank gelöscht");Field.clear('emailadresse');}});break;case"loadPICTURE":var loadPICTURE=window.open("../shopmin/loadPICTURE.php","Produktbild hochladen","width=800,height=400,left=100,top=200,scrollbars=yes");break;}}
function openPopUpShowNewsletterHTML(ajaxRequest){var response=ajaxRequest.responseText;var NewsletterVorschau=window.open("/shopmin/tmp/show_newsletter_html.html","Newsletter Vorschau","width=850,height=1000,left=100,top=200,scrollbars=yes");}
function openPopUpShowNewsletterTEXT(ajaxRequest){var response=ajaxRequest.responseText;var NewsletterVorschau=window.open("/shopmin/tmp/show_newsletter_text.html","Newsletter Vorschau","width=850,height=1000,left=100,top=200,scrollbars=yes");}
function openPopUpShowEmpfaenger(ajaxRequest){var response=ajaxRequest.responseText;var NewsletterVorschau=window.open("/shopmin/tmp/show_empfaenger.html","Newsletter Vorschau","width=400,height=500,left=100,top=200,scrollbars=yes");}
function handleError(){return true;}
function openWindow(theURL,winName,features){win=window.open(theURL,winName,features);if(win){win.moveTo((screen.width/2)-300,(screen.height/2)-250);}}
function inputFocus(tagObjekt){if(!document.layers)tagObjekt.style.background='rgb(240,240,240)';}
function inputBlur(tagObjekt){if(!document.layers)tagObjekt.style.background='rgb(255,255,255)';}
function inputFocus2(tagObjekt){if(!document.layers)tagObjekt.style.background='rgb(210,214,217)';}
function inputBlur2(tagObjekt){if(!document.layers){if(tagObjekt.value==""){tagObjekt.style.background='rgb(240,244,247)';}else{tagObjekt.style.background='rgb(255,255,255)';}}}
function colorOut(tabObject){tabObject.className=oldClassName;}
function colorOver(tabObject){oldClassName=tabObject.className;tabObject.className='n hover';}
function autoTab(input,len,e){function containsElement(arr,ele){var found=false,index=0;while(!found&&index<arr.length){if(arr[index]==ele){found=true;}else{index++;}}
return found;}
function getIndex(input){var index=-1,i=0,found=false;while(i<input.form.length&&index==-1){if(input.form[i]==input){index=i;}else{i++;}}
return index;}
return true;}
function MM_preloadImages(){var d=document;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 init(){status='Garantiert Gut und Günstig';}
onload=init;function openChip(){window.open('http://www.chip.de/me2/ws/?s=YToyOntpOjA7YTo0OntzOjY6InJlZl9pZCI7czoyOiIxMyI7czoyOiJvciI7aTotMTtzOjExOiJoYWVuZGxlcl9pZCI7czoyOiI2NyI7czo1OiJzZWl0ZSI7czoxODoicG9wdXBfaGFlbmRsZXJpbmZvIjt9aToxO3M6MzI6IjE1ZmVkNzExYjZkMTY1ZDFmMjc5NDljYTExYjYzODVlIjt9','windowChip','width=500,scrollbars=1');return false;}
function openTrustedShops(){window.open('https://www.trustedshops.de/tshops/siegel.php3?shop_id=XC8CC6BFD5953B462DBED964308D5EDC0','windowTrustedShops','width=800,scrollbars=1');return false;}
function openBelkin(){window.open('http://www.belkin.com/wizard/netwiz/?vid=1175&cid=12&lid=3&PHPSESSID='+SID,'windowBelkin','width=650,scrollbars=1');return false;}
function hover(objHtml){strOld=objHtml.src;num_beginn=strOld.indexOf("_c")+2;num_ende=strOld.lastIndexOf(".");num_zahl=strOld.substring(num_beginn,num_ende);objHtml.src='/images/navi/b_on_r1_c'+num_zahl+'.gif';}
function zweinachkomma(x){var k=(Math.round(x*100)/100).toString();k+=(k.indexOf('.')==-1)?'.00':'00';return k.substring(0,k.indexOf('.')+3);}
function openFinanzRechner(){var objPreis=zweinachkomma(document.getElementById("preis").value);newwin=window.open('http://www.santander.de/rechenmodule/warenhaendler.asp?kennung=demo&kaufpreis='+objPreis+'&laufzeit=24&zinssatz6=9,9&zinssatz12=9,9&zinssatz24=9,9&zinssatz36=9,9&zinssatz48=9,9&zinssatz60=9,9&zinssatz72=9,9&showAnzahlung=ja','Rechenmodul','toolbar=0,menubar=1,width=470,height=470,location=0,scrollbars=1');}
function openFinanzAbschluss(){var objPreis=zweinachkomma(document.getElementById("preis").value);var objBezeichnung="";if(document.getElementById("bezeichnung").value==""){objBezeichnung="Best. bei computerpool.de";}else{objBezeichnung=document.getElementById("bezeichnung").value;}
newwin=window.open('https://shop.santander.de/webfinanz/deutsch/startWebfinanz.jsp?haendlernummer=3501479900&kaufpreis='+objPreis+'&warenbezeichnung='+objBezeichnung+'','Rechenmodul','toolbar=0,menubar=1,width=780,height=470,location=0,scrollbars=1');}
var customer_type=0;function fn_kunden_daten_eingabe_change_type(objHtml){customer_type=objHtml.selectedIndex;var objFirma=document.getElementById("tr-firma");var objZuatz1=document.getElementById("tr-zusatz-1");var objZuatz2=document.getElementById("tr-zusatz-2");var objEinrichtung=document.getElementById("tr-einrichtung");var objAnprechparner=document.getElementById("label-anprechpartner");var objFirmaL=document.getElementById("tr-firma-l");var objZuatz1L=document.getElementById("tr-zusatz-1-l");var objZuatz2L=document.getElementById("tr-zusatz-2-l");switch(customer_type){case 0:fn_display(objFirma,"none");fn_display(objEinrichtung,"none");fn_display(objZuatz1,"none");fn_display(objZuatz2,"none");objAnprechparner.innerHTML='Name';fn_display(objFirmaL,"");fn_display(objZuatz1L,"");fn_display(objZuatz2L,"");break;case 1:fn_display(objFirma,"none");fn_display(objEinrichtung,"");fn_display(objZuatz1,"");fn_display(objZuatz2,"");objAnprechparner.innerHTML='Anprechpartner';fn_display(objFirmaL,"");fn_display(objZuatz1L,"");fn_display(objZuatz2L,"");break;case 2:fn_display(objFirma,"");fn_display(objEinrichtung,"none");fn_display(objZuatz1,"");fn_display(objZuatz2,"");objAnprechparner.innerHTML='Anprechpartner';fn_display(objFirmaL,"");fn_display(objZuatz1L,"");fn_display(objZuatz2L,"");break;}}
function fn_display(obj,str_display){obj.style.display=str_display;}
function fn_kunden_daten_eingabe_display_lieferadresse(objHtml){var objLieferadresse=document.getElementById("abweichende-lieferadresse");if(objHtml.checked){fn_display(objLieferadresse,"");}else{fn_display(objLieferadresse,"none");}}
var mouseX=0;var mouseY=0;var xMargin=15;var yMargin=15;var ttipDisplayed=false;var ttipId=0;function saveMouseCoords(e)
{if(!e){e=window.event;if(ttipId>0){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){mouseX=e.clientX+document.body.scrollLeft;mouseY=e.clientY+document.body.scrollTop;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){mouseX=e.clientX+document.documentElement.scrollLeft;mouseY=e.clientY+document.documentElement.scrollTop;}else{mouseX=e.clientX;mouseY=e.clientY;}}else{mouseX=e.clientX;mouseY=e.clientY;}}else{mouseX=e.pageX;mouseY=e.pageY;}
if(ttipId!=0){hidden_block();}}
function savePID(pppid){ttipId=pppid;hidden_block();}
function hidden_block(){var elem=document.getElementById("gross_bild_"+ttipId);if(mouseX>0&&mouseY){elem.style.left=(mouseX+xMargin)+"px";elem.style.top=(mouseY+yMargin)+"px";elem.style.display="block";}
ttipDisplayed=true;}
function hidden(pppid){var elem=document.getElementById("gross_bild_"+pppid);elem.style.display="none";ttipId=0;}
if(document.captureEvents){document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove=saveMouseCoords;function installSearchEngine(){if(window.external&&("AddSearchProvider"in window.external)){window.external.AddSearchProvider("http://www.computerpool.de/search.xml");}else{alert("Ihr Browser besitzt keine Unterstützung für Suchanbieter");}}