// Mondo Shop 2 2.6.0.5 200406201132
function Shop(){this.objectRegistry=new Array();this.objectFactory=new ObjectFactory();this.oF=this.objectFactory;this.config=new Config();this.frameSetup=new FrameSetupList();this.window=window;this.shopTexts=new ShopTexts();this.shopMails=null;this.orderTerms=null;this.existsPasswdFile=null;this.entryDateTime=new Date();this.countries=new CountryList();this.zones=new ZoneList();this.zoneDeliveryMethods=new DynDMList();this.zonePaymentMethods=new DynPMList();this.cpaConfig=new Array();this.cpaValue=null;this.cpaValues=new CPAValueList();this.lcpaValue=new Stack();this.useSearchPHP=false;this.checkOutState=0;this.termsAdviceAccepted=false;this.differingDeliveryAddress=false;this.backupPA=new Config();this.backupDA=new Config();this.backupDD=false;this.backupCA=false;this.colors=new ColorList();this.fonts=new FontList();this.designImages=new ImageList();this.linkDesigns=new LinkDesignList();this.treeDesigns=new TreeDesignList();this.shopImages=new ImageList();
this.searchItem=null;this.lSearchItem=new Stack();this.language=null;this.lLanguage=new Stack();this.languages=new LanguageList();this.article=null;this.lArticle=new Stack();this.lVariantIndex=new Stack();this.article=null;this.cat=null;this.lCat=new Stack();this.customItemAttr=null;this.lCustomItemAttr=new Stack();this.customItemAttrValue=null;this.lCustomItemAttrValue=new Stack();this.customAttr=null;this.lCustomAttr=new Stack();this.customAttrValue=null;this.lCustomAttrValue=new Stack();this.selAttr=null;this.lSelAttr=new Stack();this.selAttrValue=null;this.lSelAttrValue=new Stack();this.field=null;this.lField=new Stack();this.forms=null;this.form=null;this.lForm=new Stack();this.price=null;this.lPrice=new Stack();this.image=null;this.lImage=new Stack();this.linkList=null;this.lLinkList=new Stack();this.linkTree=null;this.lLinkTree=new Stack();this.link=null;this.lLink=new Stack();this.font=null;this.lFont=new Stack();this.color=null;this.lColor=new Stack();this.paymentMethod=null;this.lPaymentMethod=new Stack();
this.deliveryMethod=null;this.lDeliveryMethod=new Stack();this.channel=null;this.lChannel=new Stack();this.artStat=null;this.lArtStat=new Stack();this.catStat=null;this.lCatStat=new Stack();this.VATType=null;this.lVATType=new Stack();this.crossRef=null;this.lCrossRef=new Stack();this.staggerClasses=null;this.lStaggerClass=new Stack();this.staggerClass=null;this.staggerEntry=null;this.lStaggerEntry=new Stack();this.discClassRels=null;this.artPersDiscClasses=null;this.persArtDiscClasses=null;this.fixedArtDiscs=null;this.segment=null;this.lSegment=new Stack();this.VATList=null;this.user=new UserData();this.users=null;this.usercode=null;this.currList=null;this.baseCurrUnit=null;this.compCurrUnit=null;this.quantityUnitList=null;this.basket=null;this.paymentAddress=new Config();this.deliveryAddress=new Config();this.links=new LinkList();this.linkTrees=new LinkTreeList();this.linkLists=new LinkListList();this.paymentMethods=null;this.deliveryMethods=null;this.channels=null;
this.salutations=null;this.letterSalutations=null;this.payment=new Payment();this.delivery=new Delivery();this.message='';this.catList=new CatalogList();this.searchEngine=null;this.searchLetters=null;this.searchWord='';this.artStats=new ArtStatList();this.catStats=new CatStatList();this.shopID=shopID;this.voucher=new Voucher();this.onlineDiscount=null;this.voucherType=null;this.channel=null;this.clickNode=null;this.findFrame=findFrame;this.registerObject=Shop_registerObject;this.retrieveObject=Shop_retrieveObject;this.unregisterObject=Shop_unregisterObject;this.isObjectRegistered=Shop_isObjectRegistered;this.notifyBasketChange=Shop_notifyBasketChange;this.decideShowBasket=Shop_decideShowBasket;this.showFunction=showFunction;this.insertCategoryLinks=insertCategoryLinks;this.doSearch=doSearch;this.showArticleList=showArticleList;this.showCatalogPage=showCatalogPage;this.showArticle=showArticle;this.goHome=goHome;this.applySearchInput=applySearchInput;
this.hasAddressChanged=hasAddressChanged;this.hasDifferingDeliveryAddress=hasDifferingDeliveryAddress;this.needsPaymentData=needsPaymentData;this.logout=logout;this.catIsAllowed=catIsAllowed;this.changeAddress=false;this.setLanguage=setLanguage;this.tellAFriendWindow=null;function setLanguage(w,l){var s=w.location.protocol+'//'+w.location.hostname;if(w.location.port!="")s+=":"+w.location.port;s+=w.location.pathname;if(window.location.search==""){s+="?lang="+l;}else{s+=window.location.search+"&lang="+l;}w.location.href=s;}function logout(){this.user.clear();}function hasAddressChanged(){return this.changeAddress;}function hasDifferingDeliveryAddress(){return this.differingDeliveryAddress;}function needsPaymentData(){if(this.payment.getPaymentMethod()&&(this.voucherType==130))return(this.payment.getPaymentMethod().type==0)?false:true;else return false;}function applySearchInput(wnd){var f=wnd.document.searchForm;if(f){this.searchWord=f.expression.value;}}function showFunction(name){
var fr=this.frameSetup.getFunctionByName(name);if(fr!=null)fr.call();}function doSearch(name){var fr=this.frameSetup.getFunctionByName('SN_Search');if(fr!=null){var fro=findFrame(fr.frameName);if(fro!=null&&fr.templateFile!=null){fro.location.href=fr.templateFile+'?searchStartCat=0&searchStartArt=0&searchWord='+mmescape(shop.searchWord);}}}function goHome(){for(var i=0;i<this.frameSetup.startPages.length;i++){var sp=this.frameSetup.startPages[i];eval('if(window.'+sp.frameName+')window.'+sp.frameName+'.location.href=\''+sp.templateFile+'\';');}}function catIsAllowed(){return((this.config.readBool('CatRegUsers')&&this.user.loggedOn)||!this.config.readBool('CatRegUsers'));}function showCatalogPage(catNo,frame,templ){if(this.catIsAllowed()){var frName='';var temName='';var cat=this.catList.getByName(catNo);var func=this.frameSetup.getFunctionByName('SN_Catalog');if(frame)frName=frame;else{if(func){frName=func.frameName;}else{alert("Welchen Frame soll ich nehmen?");return;}
}if(templ)temName=templ;else{if(cat&&cat.catTemplateFileName)temName=cat.catTemplateFileName;else if(func){temName=func.templateFile;}else{alert("Welches Template soll ich nehmen?");return;}}var f=this.findFrame(frName);f.location.href=temName+'?cat='+mmescape(catNo);}else{alert(toText(this.shopTexts.getText('SN_CatRegUsersOnly')));this.showFunction('SN_Login');}}function showArticleList(catNo,frame,templ){if(this.catIsAllowed()){var frName='';var temName='';var cat=this.catList.getByName(catNo);var func=this.frameSetup.getFunctionByName('SN_ArticleList');if(frame)frName=frame;else{if(func){frName=func.frameName;}else{alert("Welchen Frame soll ich nehmen?");return;}}if(templ)temName=templ;else{if(cat&&cat.alTemplateFileName)temName=cat.alTemplateFileName;else if(func){temName=func.templateFile;}else{alert("Welches Template soll ich nehmen?");return;}}var f=this.findFrame(frName);f.location.href=temName+'?cat='+mmescape(catNo);}else{
alert(toText(this.shopTexts.getText('SN_CatRegUsersOnly')));this.showFunction('SN_Login');}}function showArticle(catNo,artNo,frame,templ){if(this.catIsAllowed()){var frName='';var temName='';var cat=this.catList.getByName(catNo);var func=this.frameSetup.getFunctionByName('SN_Article');if(frame)frName=frame;else{if(func){frName=func.frameName;}else{alert("Welchen Frame soll ich nehmen?");return;}}var art=shop.retrieveObject('CAT'+catNo+'ART'+artNo);if(templ)temName=templ;else{if(art&&art.def.templateFileName)temName=art.def.templateFileName;else if(cat&&cat.artTemplateFileName)temName=cat.artTemplateFileName;else if(func){temName=func.templateFile;}else{alert("Welches Template soll ich nehmen?");return;}}var f=this.findFrame(frName);f.location.href=temName+'?cat='+mmescape(catNo)+'&art='+mmescape(artNo);}else{alert(toText(this.shopTexts.getText('SN_CatRegUsersOnly')));this.showFunction('SN_Login');}}function insertCategoryLinks(parentNode,link){
var hideFirstLevel=this.config.readBool('HideRootCatalog');var design=null;var cat=null;if(link){design=link.design;}parentNode.getRoot().catTreeDesign=design;cat=this.catList.getByName('0');if(cat){if(hideFirstLevel){for(var i=0;i < cat.getSubCatCount();i++){traverseNode(cat.getSubCat(i),parentNode,design);}}else{traverseNode(cat,parentNode,design);}}}}function UserData(){this.password='';this.userName='';this.eMail='';this.loggedOn=false;this.no='';this.discount=0;this.type=1;this.VATID=null;this.deliveryStop=false;this.payVAT=true;this.personDiscountClass=null;this.channel=null;this.sameDeliveryAddress=true;this.calcShippingCosts=true;this.customValues=new Array();for(var i=0;i<10;i++)this.customValues[i]=null;this.clear=clear;this.hasDiscount=hasDiscount;function clear(){this.password='';this.userName='';this.eMail='';this.loggedOn=false;this.no='';this.discount=0;this.type=1;this.VATID=null;this.deliveryStop=false;this.payVAT=true;this.personDiscountClass=null;this.sameDeliveryAddress=true;
this.calcShippingCosts=true;shop.paymentAddress=new Config();shop.deliveryAddress=new Config();this.customValues=new Array();for(var i=0;i<10;i++)this.customValues[i]=null;shop.paymentAddress.writeInt('SN_Salutation',0);shop.paymentAddress.writeInt('SN_LetterSalutation',0);shop.deliveryAddress.writeInt('SN_Salutation',0);shop.deliveryAddress.writeInt('SN_LetterSalutation',0);shop.paymentAddress.writeInt('SN_Country',shop.countries.stdCountry);shop.deliveryAddress.writeInt('SN_Country',shop.countries.stdCountry);shop.notifyBasketChange();}function hasDiscount(){if(this.loggedOn&&this.discount>0)return true;else return false;}}function Shop_registerObject(name,object){this.objectRegistry[name]=object;}function Shop_retrieveObject(name){return this.objectRegistry[name];}function Shop_unregisterObject(name){this.objectRegistry[name]=null;}function Shop_isObjectRegistered(name){return this.objectRegistry[name]!=null;}function Shop_notifyBasketChange(){this.basket.setModified();for(var i=0;i<this.frameSetup.startPages.length;i++){
if(this.frameSetup.startPages[i].autoReload){var f=this.findFrame(this.frameSetup.startPages[i].frameName);reloadFrame(f);}}}function Shop_decideShowBasket(){if(this.config.readBool('AutoShowBasketAfterConfirm')){if(window.confirm(toText(this.shopTexts.getText('SN_AskShowBasket')))){return true;}}else if(this.config.readBool('AutoShowBasket')){return true;}return false;}function ColorList(){this.entries=new Array();this.add=NList_add;this.getByName=NList_getByName;}function Font(){this.color=null;this.face=null;this.size=null;this.CssSizeUnit=null;this.style=0;this.getBegin=getBegin;this.getEnd=getEnd;this.getCSSSize=getCSSSize;this.getCSSStyle=getCSSStyle;function getCSSSize(){var sizes=new Array('xx-small','x-small','small','medium','large','x-large','xx-large');if(this.size!=null)if((this.size>0)&&(this.size<8))return sizes[this.size-1];return'';}function getCSSStyle(){var s='font-weight:normal;font-style:normal;';switch(this.style){case 1:s='font-weight:bold;font-style:normal;';break;
case 2:s='font-weight:normal;font-style:italic;';break;case 3:s='font-weight:bold;font-style:italic;';break;}return s;}function getBegin(){var s='';switch(this.style){case 1:s+='<b>';break;case 2:s+='<i>';break;case 3:s+='<b><i>';break;}if((this.color!=null)||(this.size!=null)||(this.face!=null)){s+='<font ';if(this.color!=null)s+='color="'+this.color+'" ';if(this.size!=null)s+='size='+this.size;if(this.face!=null)s+=' face="'+this.face+'"';s+='>';}return s;}function getEnd(){var s='';if((this.color!=null)||(this.size!=null)||(this.face!=null))s+='<\/font>';switch(this.style){case 1:s+='<\/b>';break;case 2:s+='<\/i>';break;case 3:s+='<\/b><\/i>';break;}return s;}}function FontList(){this.entries=new Array();this.add=add;this.getByName=NList_getByName;function add(name){return this.entries[name]=new Font();}}function LinkImage(src,srcOn,width,height){this.src=src;this.srcOn=srcOn;this.width=width;this.height=height;this.getHtml=getHtml;
function getHtml(name){var s='<img name="'+name+'" src="'+this.src+'" height="'+this.height+'" width="'+this.width+'" border="0">';return s;}}function LinkDesign(name){this.name=null;this.designN=null;this.designS=null;this.designW=null;}function LinkDesignElement(){this.hasText=null;this.hasLabImage=null;this.hasIcon=null;this.hasImage=null;this.state='N';this.icon=null;this.image=null;this.textBgImage=null;this.textBgColor=null;this.textFont=null;this.cssClass=null;this.getFontBegin=getFontBegin;this.getFontEnd=getFontEnd;this.getTextCellBegin=getTextCellBegin;this.getMouseOver=getMouseOver;this.getIcon=getIcon;this.getImage=getImage;this.getImgSrc=getImgSrc;this.getCSSClassTag=getCSSClassTag;function getCSSClassTag(){if(this.cssClass!=null)return'class='+this.cssClass;else return'';}function getFontBegin(){if(this.textFont!=null)return this.textFont.getBegin();else return'';}function getFontEnd(){if(this.textFont!=null)return this.textFont.getEnd();
else return'';}function getTextCellBegin(){var s='';s+='<td ';if(this.textBgImage!=null)s+='background="'+this.textBgImage+'" ';if(this.textBgColor!=null)s+='bgColor="'+this.textBgColor+'"';s+='>';return s;}function getMouseOver(linkName){var s=' ';var chIcon=(this.hasIcon&&this.icon.srcOn!=null);var chImage=(this.hasImage&&this.image.srcOn!=null);if(chIcon||chImage){s+=' onMouseOver=\"';if(chIcon){s+='chgPic(\'lblIcon'+linkName+'\', \'LinkIconOn'+linkName+'\');';}if(chImage){s+='chgPic(\'lblImage'+linkName+'\', \'LinkImageOn'+linkName+'\');';}s+='\" onMouseOut=\"';if(chIcon){s+='chgPic(\'lblIcon'+linkName+'\', \'LinkIcon'+linkName+'\');';}if(chImage){s+='chgPic(\'lblImage'+linkName+'\', \'LinkImage'+linkName+'\');';}s+='\" ';}return s;}function getIcon(iconName){return this.icon.getHtml(iconName);}function getImgSrc(link,mo){var src;if(mo)src=this.image.srcOn;else src=this.image.src;var n='L'+link.name;if(link.catName)n='C'+link.catName;
if(this.hasLabImage){var state=this.state;if(mo)state=state+'O';return'Media/'+shopLang+'/LabelledImages/'+n+'-'+link.design.name+'-'+state+src;}else return src;}function getImage(imageName,link,mo){var s='<img name="'+imageName+'" src="'+this.getImgSrc(link,mo)+'" height="'+this.image.height+'" alt="'+link.text+'" width="'+this.image.width+'" border="0">';return s;}}function LinkDesignList(){this.entries=new Array();this.add=NList_add;this.getByName=NList_getByName;}function TreeDesign(){this.navIconE=null;this.navIconLN=null;this.navIconLS=null;this.navIconLW=null;this.navIconN=null;this.navIconS=null;this.navIconW=null;this.navIconVL=null;this.navIconWidth=null;this.navIconHeight=null;this.useNavIcons=null;this.closeOther=null;this.autoReload=null;}function TreeDesignList(){this.entries=new Array();this.add=NList_add;this.getByName=NList_getByName;}function Salutation(){this.id=null;this.text=null;}function SalutationList(){this.entries=new Array();
this.add=add;this.getByID=getByID;this.count=CList_count;this.getByNo=CList_getByNo;this.getText=getText;function getText(id){var s=this.getByID(id);return s!=null?s.text:'';}function add(id,text){var s=new Salutation();s.id=id; s.text=text;this.entries[this.entries.length]=s;}function getByID(id){for(var i=0;i<this.entries.length;i++)if(this.entries[i].id==id) return this.entries[i];return null;}}
jsl=true;
