/**
 * @(#)default3/view3_css.js
 *
 * Copyright 1999-2008(c) MijnWinkel B.V.
 *
 * Version 8.5.0 8-jun-2008
 *
 * DEFAULT 8 COMPACT STRAK
 */
/* 
 * Product variations functions
 * 1.6.2#26
 */
function getActiveRow(){return __activeRow}
function setActiveRow(i){__activeRow=i}
function FieldSelection(){
	var me=this,fld=[],fldsel=[];
	me.set=function(col,lst){fld[col]=lst};
	me.setActive=function(col,v){fldsel[col]=v};
	me.get=function(i){return fld[i]};
	me.active=function(i){return fldsel[i]};
}
function Selection(){
	var me=this,ins=[];
	me.has=function(oid,col){return self._fs&&_fs[oid]&&_fs[oid].get(--col)};
	me.get=function(oid,col,first){
		if(first==null)first=false;
		var sel=_fs[oid].get(--col);
		if(first)sel=sel[0];
		else if(sel.length<3&&sel[0].indexOf(';')!=-1){
			sel=sel[0].split(';');
			sel[sel.length]="";
			if(!ins[oid])ins[oid]=[];
			ins[oid][col]=true;
		}
		return sel
	};
	me.active=function(oid,col){return _fs[oid].active(--col)};
	me.enabled=function(oid){return self._fs&&_fs[oid]};
	me.isInlineSelection=function(oid,col){return(ins[oid]&&ins[oid][--col])?ins[oid][col]:false};
	me.reset=function(oid){ins[oid]=[]}; 
}
var selection=new Selection();
function parseDocument(doc,rel){
	function get(c){
		var v="";
		try{v=c.firstChild.nodeValue}
		catch(e){}
		return v
	}
	function getAttr(c,n){
		var v="";
		try{v=c.getAttribute(n)}
		catch(e){}
		return v
	}
	function getCols(r){return r.getElementsByTagName('col')}
	var index=0,rows=doc.getElementsByTagName('row'),type,done=[];
	for(;index<rows.length;index++){
		row=rows[index];
		type=row.getAttribute("type")
	 	if(!done[type]&&type=="catalog"){
	 		done[type]=true;
			var cols=row.getElementsByTagName('col'),s="",v,item=[],l=cols.length,c;
			item[0]=row.getAttribute("number");
			for(var i=0;i<l;i++){
				v=cols[i].firstChild.nodeValue;
				if(v)item[i+1]=v;
				else item[i+1]="";
			}
			setCtlVal("_oid",_i(item[0]+1));
			_d[getActiveRow()]=item;
			__rowData=_d[getActiveRow()];
		}
		else if(!done[type]&&type=="catalog_replace"){
	 		done[type]=true;
			var cols=row.getElementsByTagName('col'),l=cols.length,n,c,i=0;
			for(;i<l;i++){
				c=cols[i];
				n=c.getAttribute("number");
				v=c.firstChild.nodeValue;
				if(v!=null&&v!='*'){
					if(n)setRaw(n,v);
					else{
						n=c.getAttribute("name");
						if(n&&n=="stock")_rel.setStock(v);
					}
				}
			}
		}
		else if(type=="catalog_selection"){
			if(this.selection)selection.reset();
			var cols=row.getElementsByTagName('col'),l=cols.length,col,i=0,opts,optsl,opti,opt,oid=_i(row.getAttribute("number"))+1;
			var info=new FieldSelection();
			_fs[oid]=info;
			for(;i<l;i++){
				col=cols[i];
				colNr=cols[i].getAttribute("number");
				opts=cols[i].getElementsByTagName('option');
				optsl=opts.length;
				var lst=[],sel="";
				for(opti=0;opti<optsl;opti++){
					opt=opts[opti];
					lst[opti]=opt.firstChild.nodeValue;
					if(sel==""&&opt.getAttribute("selected")){
						sel=opt.getAttribute("inline");
						if(sel=="")sel=lst[opti];
					}
				}
				lst[optsl]="";
				info.set(colNr,lst);
				info.setActive(colNr,sel);
			}
		}
		else if(!done[type]&&type=="catalog_localstock"){
	 		done[type]=true;
			var cols=row.getElementsByTagName('col'),l=cols.length,n,c,i=0;
			for(;i<l;i++){
				c=cols[i];
				v=_i(c.firstChild.nodeValue);
				if(v!=null&&v!='*')setRaw(getStockFld(),v);
			}
		}
	}
}
function response(doc){
	if(doc){
		parseDocument(doc,true);
		view.refreshProduct();
	}
}
function _selectProduct(ctl,i,oid,callback,count){
	if(!selection.isInlineSelection(oid,i)){
		var n=(count=="")?"":count+"_";
		for(var f=getData(),c;i<getNrOfFields();i++){
			c=f['_selection'+n+oid+'_'+i];
			if(c!=null)c.selectedIndex=-1;
		}
		setCtlVal("_oid",oid);
		new Remote().request(callback,"catalog_item_data","_oid",oid,"counter",count)
	}
}
function selectProduct(ctl,i,oid,row){
	setActiveRow(row);
	_selectProduct(ctl,i,oid,self.response,"")
}
function orderTriggered(extra,oid,count){
	var f=getData(),s=new SB(),ss=new SB(),sep1='',sep2='',v,l;
	if(f){
		if(!oid)oid=getOID();
		if(selection.enabled(oid)){
			if(count!=null&&count!="")count+="_";
			else count="";
			for(var index=0,c,i=1;i<getNrOfFields();i++){
				if(selection.isInlineSelection(oid,i)){
					c=f['_selection'+count+oid+'_'+(i-1)];
					if(c){
						if(c.selectedIndex!=-1)index=c.selectedIndex;
						v=trim(c.options[index].value);
						l=fieldLabel(i);
						s.append(sep1,l," ",v);
						ss.append(sep2,l,"%3d",v);
						sep1=',';
						sep2=';';
					}
				}
			}
			if(extra){
				extra['_xd']=s.toString();
				extra['_xds']=ss.toString();
			}
		}
		c=f["productcount"];
		if(c&&extra)extra['_xc']=c.value;
	}
}
/*
 * Product variations end
 */
 var view={
	"getFieldValue":function(i){
		var s=new SB();
		if(selection.has(getOID(),i)){
			var list=selection.get(getOID(),i),n=0,len=list.length-1,active=selection.active(getOID(),i);
			if(len>1){
				if(selection.isInlineSelection(getOID(),i))s.append('<input type="hidden" name="_selectionall',getOID(),'_',(i-1),'" value="',selection.get(getOID(),i,true),'">');
				s.append('<a style="text-decoration:none"><select onchange="selectProduct(this,',i,',\''+getOID()+'\',',getActiveRow(),');" name="_selection',getOID(),'_',(i-1),'">');
				for(;n<len;n++)s.append('<option value="',escape(list[n]),'"',((list[n]==active)?' selected ':''),'>',escapeValue(list[n]),'</option>');
				s.append('</select></a>');
			}else s.append(list[0]);
		}else s.append(fieldPlain(i));
		return s.toString();
	},
	"refreshProduct":function(){
		var row='innerbox'+getActiveRow(),c,s=new SB();
		c=getElementOnId(row);
		if(c!=null){
			c.innerHTML=insertProduct(getNrOfFields());
		}
	},
	"closeTable":true,
	"closeDiv":true
}

function closeControl(elm,isClosed) {
	var s=new SB(),activeRow=getActiveRow();
	if(elm=='table'&&!isClosed){
	s.append('</table></div>');
	this.view['closeTable']=true;
	}
	if(elm=='div'&&isClosed){
	s.append('<div id="divBtn'+activeRow+'" class="myshp_list_product_buttons"><table id="btn'+activeRow+'" style="position:relative;margin:0 auto;"><tr>');
	this.view['closeDiv']=false;
	}
	return s.toString();
}

function borderchange(c,b){if(c)c.style.borderColor=(b)?getBAColor():getBColor()}
function pageLoad(){
	var navWidth, colsPerPage=getColsPerPage(),nrOfItems=getNrOfItems(), nrOfRows=nrOfItems/colsPerPage, n=0, c=0, aux=0;
	//-------------------------------------Resize Image  Features Title------->>>
	var maxImgHeight=0;
	for (i=0;i<nrOfRows;i++) {
	  	n+=colsPerPage;
		c=(n-colsPerPage);
		maxImgHeight=0;
		maxFeatHeight=0;
		maxTitleHeight=0;
		maxBtnHeight=0;
		for (aux=c;aux<n;aux++) {//--------------------------------------Determine
			if(document.getElementById('divImg'+aux))var divImg=document.getElementById('divImg'+aux);
			if (divImg&&divImg.offsetHeight>maxImgHeight)maxImgHeight=divImg.offsetHeight;
			if(document.getElementById('divFeat'+aux))var divFeat=document.getElementById('divFeat'+aux);
			if (divFeat&&divFeat.offsetHeight>maxFeatHeight)maxFeatHeight=divFeat.offsetHeight;
			if(document.getElementById('divTitle'+aux))var divTitle=document.getElementById('divTitle'+aux);
			if (divTitle&&divTitle.offsetHeight>maxTitleHeight)maxTitleHeight=divTitle.offsetHeight;
			if(document.getElementById('divBtn'+aux))var divBtn=document.getElementById('divBtn'+aux);
			if (divBtn&&divBtn.offsetHeight>maxBtnHeight)maxBtnHeight=divBtn.offsetHeight;
		}	//-----------------------------------------------End Determine
		for (aux=c; aux < n; aux++) {//------------------------------Assign
			if(document.getElementById('divImg'+aux))var divImg=document.getElementById('divImg'+aux);
			if(divImg) divImg.style.height=(maxImgHeight+'px');
			if(document.getElementById('divFeat'+aux))var divFeat=document.getElementById('divFeat'+aux);
			if(divFeat) divFeat.style.height=(maxFeatHeight+'px');
			if(document.getElementById('divTitle'+aux))var divTitle=document.getElementById('divTitle'+aux);
			if(divTitle) divTitle.style.height=(maxTitleHeight+'px');
			if(document.getElementById('divBtn'+aux))var divBtn=document.getElementById('divBtn'+aux);
			if(divBtn) divBtn.style.height=(maxBtnHeight+'px');
		}//---------------------------------------------------End Assign
	}//-------------------------------------------------------End Resize Image Features Title---------->>>
	//product resize
	var i=0,e;
	var maxWidth=0,listWidth=getProductListPageWidth(),marLef=0,navTop=document.getElementById('navTop'),navBottom=document.getElementById('navBottom');
	var list=document.getElementById('myshp_list'),totalWidth;
	if(list){
		listWidth=list.offsetWidth;
		maxWidth=(listWidth/colsPerPage)-10;
	}
	for(var e=0;e<nrOfItems;e++){
		if (document.getElementById('features'+e))var features=document.getElementById('features'+e);
		if (document.getElementById('img'+e))var images=document.getElementById('img'+e);
		if (document.getElementById('btn'+e))var buttons=document.getElementById('btn'+e);
		if(images&&images.offsetWidth>maxWidth)maxWidth=images.offsetWidth;
			if(features&&features.offsetWidth>maxWidth)maxWidth=features.offsetWidth;
		if (buttons&&(buttons.offsetWidth+10)>maxWidth)maxWidth=buttons.offsetWidth;
	}
	marLef=((maxWidth*colsPerPage<listWidth)?((listWidth-maxWidth*colsPerPage)/(colsPerPage+1)):20);
	totalWidth=(maxWidth+marLef)*colsPerPage;
	for (var e=0;e<nrOfItems;e++){
		var container=document.getElementById(e.toString());
		if(container){
		  	container.style.width=maxWidth+'px';
			container.style.marginLeft=marLef+'px';
		}
	}// end product resize
	navWidth=(maxWidth*colsPerPage+(marLef*(colsPerPage-1))+2*colsPerPage);
	var nblm=document.getElementById('nblm'),nbc=document.getElementById('nbc');
	var ntlm=document.getElementById('ntlm'),ntc=document.getElementById('ntc');
	if(navBottom){
		if(nblm)nblm.style.width=marLef+'px';
		if(nbc)nbc.style.width=navWidth+'px';
	};
	if(navTop){
		if(ntlm)ntlm.style.width=marLef+'px';
		if(ntc)ntc.style.width=navWidth+'px';
	}
	var menuSideTopBar=document.getElementById('myshp_menu_side_topbar'),searchBlock=document.getElementById('myshp_info_search_block');
	if(menuSideTopBar&&searchBlock)searchBlock.style.height=menuSideTopBar.style.height;
	var elm=document.getElementById('0'),elmWidth,elmMarginLeft,rowWidth;
	if(elm){
		elmWidth=elm.offsetWidth;
		elmMarginLeft=parseInt(elm.style.marginLeft.replace('px',''),10);
	}
	rowWidth=(elmWidth*colsPerPage+(elmMarginLeft*(colsPerPage+1))+2*colsPerPage);
	if(document.all&&colsPerPage<=1)rowWidth-=5; 
	for(var e=0;e<nrOfItems;e+=colsPerPage){
		var row=document.getElementById('myshp_list_product_row'+e);
		if(row)row.style.width=rowWidth+'px';
	}
}

function getStockVal(count,oid){
	var v=-1,n=(oid==null)?__rowData[0]:(_i(oid)-1);
	if(self._stc&&_stc[n]!=null)v=_stc[n];
	if(v==-1)v=fieldRaw(getStockFld());
	v-=getBasketInfo().getProductQuantity(oid,getCID());
	return parseFloat(v=="*")?-1:v;
}
function pageNavigatorStart(){
	var s=new SB();
	s.append('<div id="myshp_list" style="width:auto;">');
	if (getPage()>0 && (getNrOfItems()/getColsPerPage())>2)s.append('<div style="padding-top:30px;">',writeNavTopDiv(),'</div>');
	s.append('<div class="clear"></div>');
	return s.toString();
}
function rowStart(){
	return '<div class="myshp_list_product_row" id="myshp_list_product_row'+getActiveRow()+'">';
}
function buildBlock(columns){
	var colsPerPage=getColsPerPage(), s=new SB(),styleHeader, blockWidth, headerHeight,txtAlignment=getTxtAlignment(), activeRow=getActiveRow();
	styleHeader=makeStyle("background",getFGColor());
	blockSpacing=(colsPerPage!=1)?"2%":"0";
	blockWidth=(colsPerPage!=1)?(((100-(2*colsPerPage))/colsPerPage)-1)+'%':'99%';
	headerHeight=((empty(fieldTitle()))?'13px':'auto');
	s.append('<div id="'+activeRow+'" class="myshp_list_product" style="margin-left:'+blockSpacing+';width:'+blockWidth+';"><div class="myshp_list_product_header" id="head'+activeRow+'" style="color:'+getFGTColor()+';height:'+headerHeight+';background-color:#'+getFGColor()+';"><div class="myshp_list_top_side"'+styleHeader+'><div class="myshp_list_left_side"><div class="myshp_list_right_side"><div class="myshp_list_topleft_corner"><div class="myshp_list_topright_corner" >');
	s.append((!empty(fieldTitle()))?'<div class="myshp_list_product_title" id="divTitle'+activeRow+'" style="text-align:'+txtAlignment+';">'+fieldTitle()+'</div>':'<div class="myshp_list_product_title"></div><div class="clear"></div>'); 
	s.append('</div></div></div></div></div></div><div class="myshp_list_left_side"><div class="clear"></div><div class="myshp_list_right_side"><div id="innerbox'+activeRow+'" class="myshp_list_product_box" style="text-align:',txtAlignment,';">',insertProduct(columns),'<div class="clear"></div></div><div class="clear"></div><div class="myshp_list_bottom_side" ><div class="myshp_list_bottomleft_corner"><div class="myshp_list_bottomright_corner"><div class="clear"></div></div></div></div></div><div class="clear"></div></div></div>');
	return s.toString();    
}

function insertProduct(columns){
	var s=new SB(),noRows=(getFieldPresentation()==2),sep='', noRowsFeatOpened=false,moreInfo=false,getFieldValue=view.getFieldValue;
	var p=getPictureIndex(),t=getTitleIndex(),priceshow=false,q=getPrice(),blockWidth=getBlockWidth(),txtAlignment=getTxtAlignment(), activeRow=getActiveRow();
	this.view['closeTable']=true;
	this.view['closeDiv']=true;
	if(txtAlignment=='center')s.append('<div id="text'+activeRow+'" style="height:auto;border:solid #ccc 0px;text-align:center;font-family:'+getFontName()+',Helvetica,sans-serif;font-size:'+getFontSize()+'pt;position:relative;">');
	else {
		var leftSpace = 0;
		if ((blockWidth - getImgWidth()) < 10)leftSpace = 15;
		s.append('<div id="text'+activeRow+'" style="border:solid #ccc 0px;margin:0 auto;text-align:center;font-family:'+getFontName()+',Helvetica,sans-serif;font-size:'+getFontSize()+'pt;position:relative;">');
	}
	if(p!=null)s.append('<div class="myshp_list_product_image" id="divImg'+activeRow+'">',((hasInfo())?('<a style="text-decoration:none;" href="javascript:void(0);" onclick="javascript:return info('+ getOID()+ '),false;">'):('')),getPicture(p, 'style="position:relative" id="img' + activeRow + '"', false),((hasInfo())?'</a>':''),'</div>');
	
	s.append('<div class="myshp_list_product_features" id="divFeat'+activeRow+'"><table id="features',activeRow,'" border="0" style="text-align:left;position:relative;">');
	this.view['closeTable']=false;
	for(var val, i=1; i<columns; i++){
		if(getColShow(i)){
			if(i==q)priceshow=true;
			if(i!=p&&i!=t&&i!=q){
				if(noRows){
					if(!noRowsFeatOpened){
						s.append('<tr><td valign="top" class="myshp_list_product_value" colspan="2">');
						noRowsFeatOpened=true;
					}
					val=fieldRaw(i);
					if(val!=null && val!=''){
						s.append(sep);
						if(isImage(i))s.append('<div class="myshp_list_product_image" style="padding:3px'+((blockWidth)/5.5)+'">'+getPicture(i)+'</div>');
						else{
							if(getFieldPresentation()!=1)s.append(getFieldValue(i));
							else s.append(fieldPlain(i));
						}
						sep= ', ';
					}
					
				}else{
					val=fieldRaw(i);
					if(val!=null && val!=''){
						if(getFieldPresentation()!=1)s.append('<tr><td valign="top" class="myshp_list_product_label">'+fieldLabel(i)+'</td><td class="myshp_list_product_value">'+getFieldValue(i)+'</td></tr>');
						else s.append('<tr><td valign="top" class="myshp_list_product_label" style="display:none;">'+fieldLabel(i)+'</td><td class="myshp_list_product_value">'+getFieldValue(i)+'</td></tr>');
					}
				}
			}
		}
	}
	if(noRowsFeatOpened)s.append('<br /><br /></td></tr>');
	
	if (priceshow){ 
		if(getFieldPresentation()!=1)s.append('<tr><td class="myshp_list_product_label myshp_list_product_price_label">'+fieldLabel(q)+'</td><td class="myshp_list_product_value myshp_list_product_value_price">'+getFieldValue(getPrice())+'</td></tr>');
		else s.append('<tr><td style="display:none;">&nbsp;</td><td class="myshp_list_product_value_price">'+getFieldValue(getPrice())+'</td></tr>');
	}
	var outOfStock=(checkStock()&&getStockVal(null,getOID())<1);
	if (hasOrderLink()) {
		if (outOfStock)s.append('');
		else {
			if (getQFType()==1) {
					s.append('<tr><td valign="top" class="myshp_list_product_label myshp_list_product_quantity_label" style="'+((getFieldPresentation()=="1")?'display:none;':'')+'">'+getQFLabel()+'</td><td class="myshp_list_product_value">'+((getFieldPresentation()=="1")?('<b>'+getQFLabel()+'&nbsp;</b>'):'')+'<input name="quantity'+getOID()+'" type="text" onclick="javascript:return false;" value="'+getInfoQuantity("quantity"+getOID())+'" maxlength="6" size="4" onkeypress="javascript:return keyPress(arguments[0],this,'+getOID()+');" onkeyup="javascript:return keyUp(this);"/>');
					this.view['closeTable']=true;
				if (self.getMetric&&getMetric()!=null)s.append('&nbsp;'+getMetric());
				s.append('</td></tr></table></div>');
				s.append(closeControl('table',this.view['closeTable']));
				s.append(closeControl('div',this.view['closeDiv']));
				s.append('<td><a class="myshp_list_product_order_button myshp_list_product_order_button_'+getLanguage()+'" href="JavaScript:placeOrder(null,'+getOID()+',\'quantity'+getOID() + '\');">'+m('order.lowercase')+'</a></td>');
				moreInfo=true;
			} else {
	        s.append(closeControl('table',this.view['closeTable']));
				s.append(closeControl('div',this.view['closeDiv']));
						s.append('<td><a class="myshp_list_product_order_button myshp_list_product_order_button_'+getLanguage()+'" href="JavaScript:order('+getOID()+');">'+m('order.lowercase')+'</a></td>');
						moreInfo=true;
	 		}
		}
	} else {
		s.append(closeControl('table',this.view['closeTable']));
		s.append(closeControl('div',this.view['closeDiv']));
	}
	s.append(closeControl('table',this.view['closeTable']));
	s.append(closeControl('div',this.view['closeDiv']));
	if(hasQuotationLink()){  
		if (getQFType()==1){
			if (!hasOrderLink()){
				s.append(getQFLabel()+':&nbsp;');
				s.append(closeControl('table',this.view['closeTable']));
				s.append(closeControl('div',this.view['closeDiv']));
				s.append('<td><input class="myshp_list_product_quotation_button myshp_list_product_quotation_button_',getLanguage(),'" name="quantity',getOID(),'" type="text" onclick="javascript:return false;" value="',getInfoQuantity("quantity", getOID()),'" maxlength="6" size="4" onkeypress="javascript:return keyPress(arguments[0],this,', getOID(), ');" onkeyup="javascript:return keyUp(this);" /></td>');
				moreInfo=true;
				if (self.getMetric&&getMetric()!=null)s.append('&nbsp;'+getMetric());
				s.append('<br/>');
			}
			s.append(closeControl('table',this.view['closeTable']));
			s.append(closeControl('div',this.view['closeDiv']));
			s.append('<td><a class="myshp_list_product_quotation_button myshp_list_product_quotation_button_'+getLanguage()+'" href="javascript:placeOrder(null,'+getOID()+',\'quantity\');">'+m('quotation.long')+'</a></td>');
			moreInfo=true;
		}else {
			s.append(closeControl('table',this.view['closeTable']));
			s.append(closeControl('div',this.view['closeDiv']));
			s.append('<td><a class="myshp_list_product_quotation_button myshp_list_product_quotation_button_'+getLanguage()+'" href="javascript:order('+getOID()+');">'+m('quotation.long')+'</a></td>');
			moreInfo=true;
		}		
	} else {
		s.append(closeControl('table',this.view['closeTable']));
		s.append(closeControl('div',this.view['closeDiv']));	
	}
	if(hasInfo()){
		s.append(closeControl('table',this.view['closeTable']));
		s.append(closeControl('div',this.view['closeDiv']));
		s.append('<td><a class="myshp_list_product_moreinfo_button myshp_list_product_moreinfo_button_' + getLanguage() + '" href="javascript:info(' + getOID() + ');">' + m('moreinfo') + '</a></td>');
	}
	s.append(closeControl('table',this.view['closeTable']));
	s.append(closeControl('div',this.view['closeDiv']));
	if(!this.view['closeDiv']){
		s.append('</tr></table><div class="clear"></div></div>')
		this.view['closeDiv']=true;
	}
	s.append('</div>');
	return s.toString();
}

function rowEnd(){
	return '<div class="clear"></div></div>';
}
function colSpawning(nrOfCols){return ''}
function pageNavigatorEnd(){
	var s=new SB();
	if(hasResult())s.append(writeNavBottomDiv());
	else s.append(getLabel('noresult'));
	s.append('<div style="float:left;clear:left;">&#160;</br></br></div><div class="clear"></div></div>');
	return s.toString();
}
function writeNavTopDiv() {
	var s=new SB(),elm=document.getElementById("0"),colsPerPage=getColsPerPage(),blockWidth=getBlockWidth(),navMar,tableAlign,divAlign,tableAlign;
	var w,c=document.getElementById('myshp_content');
	w=(colsPerPage>1)?'100%':'99%';
	divAlign=(colsPerPage<=1)?'text-align:center;':'text-align:left;';
	tableAlign=(colsPerPage<=1)?'margin:0 auto;':'margin:0;';
	blockWidth=w;
	navMar=(colsPerPage<=1)?'':((elm&&elm.style.marginLeft)?((elm.style.marginLeft).replace('px','')):'0');
	s.append('<div style="text-align_left;width:100%;float:left;clear:both;"><table cellpadding="0" cellspacing="0" border="0"><tr><td id="ntlm"></td><td id="ntc" style="text-align:left;">')
	s.append('<div class="myshp_list_navigation" id="navTop">');
	if((getShopState()!=2)&&(getShopState()!=6)&&getSponsorLevel()>3)s.append('<div style="float:left;text-align:left;width:200px;padding:0 0 0 3px;">powered by <a href="http://www.mijnwinkel.nl/?pow=sb'+getVID()+'" target="_blank">mijnWinkel</a></div>');
	s.append('<div style="text-align:right;padding-right:3px;">');
	if(hasPrev())s.append('<div class="myshp_list_navigation_button_prev"><a href="javascript:doPrev();">&#171;'+m('prev')+'</a>&#160;|&#160;</div>');
	if((hasPrev() && hasNext()))s.append(__n,((getPage()*getMaxItemsPerPage())+1),'-',((getPage()*getMaxItemsPerPage())+getNrOfItems()));
	if(hasNext())s.append('<div class="myshp_list_navigation_button_next">&#160;|&#160;<a href="javascript:doNext();">' + m('next') + '&#160;&#187;</a></div>');
	s.append('</div></div></td></tr></table></div>');
	return s.toString();
}

function writeNavBottomDiv(){
	var s=new SB(),blockWidth,elm=document.getElementById("0"),colsPerPage=getColsPerPage(),navMar,divAlign,tableAlign;
	var productListPageWidth=getProductListPageWidth(),blockWidth=getBlockWidth(),w,c=document.getElementById('myshp_content');
	w=(colsPerPage>1)?'100%':'99%';
	blockWidth=w;
	navMar=(colsPerPage<=1)?'':((elm&&elm.style.marginLeft)?((elm.style.marginLeft).replace('px','')):'0');
	s.append('<div style="text-align:left;width:100%;float:left;clear:both;"><table cellpadding="0" cellspacing="0" border="0"><tr><td id="nblm" width="',navMar,'"></td><td id="nbc" style="text-align:left;">')
	s.append('<div class="clear"></div><div class="myshp_list_navigation" id="navBottom">');
	s.append('<div style="text-align:center;float:left;clear:both;width:100%;margin-bottom:-12px;">');
	if(!(hasPrev()&&hasNext()))s.append(m('results'),__n);
	s.append(((getPage()*getMaxItemsPerPage())+1),'-',((getPage()*getMaxItemsPerPage())+getNrOfItems())); 
	s.append('</div>'); 
	s.append('<div style="float:left;text-align:left;width:auto;">');
	if(getSponsorLevel()>3){
		s.append('&#160;');
		if(getLanguage()=="nl")s.append('<span>powered by </span><a href="http://www.mijnwinkel.nl/?pow=sb',getVID(),'" target="_blank">mijnwinkel.nl</a>');
		else s.append('<span>powered by </span><a href="http://www.mijnwinkel.nl/?powen=sb',getVID(),'" target="_blank">mijnwinkel.nl</a>');
	}
	 s.append('&#160;</div>')
	 s.append('<div style="text-align:right;float:right;">');
	 if(hasPrev())s.append('<a href="JavaScript:doPrev();">&#171;',m('prev'),'</a>&#160;&#160;');
	 if(hasNext())s.append('&#160;&#160;<a href="JavaScript:doNext();">',m('next'),'&#160;&#187;</a>');
	 s.append('&#160;</div></div>');
	 s.append('<div style="text-align:center;float:left;clear:both;width',blockWidth,'px;">');
	 if(self.__statistic)s.append(__statistic.getCounter());
	 else{
		function pair(n,v){return "&"+n+"="+escape(v)}
		var st=getStatType(true),id=getStatValue(true);
		if(st=="nedstatpro")s.append('<img src="',id,'" border="0" width="1" height="1">');
		if((st=="onestatbasic")||(st=="onestatpremium")||(st=="onestatebusiness")){
			var osp_URL="",osp_Title="";
			if(st=="onestatbasic"){
				osp_URL="http://www.mijnwinkel.nl/shop"+getVID()+"/productlist"+getCID();
				osp_Title=osp_URL;
			}
			if((st=="onestatpremium")||(st=="onestatebusiness")){
				osp_URL="productlist"+getCID()+"("+getName().substring(0,18)+")";
				osp_Title=osp_URL;
			}
			var CONTENTSECTION="",CUSTOMDATA="",osp_ACTION="",osp_TRANSACTION="",osp_AMOUNT="",osp_PRODUCTCODE="",osp_PRODUCTGROUP="",osp_ADCAMPAIGN="";
			var t=new Date(),p="http"+(document.URL.indexOf('https:')==0?'s':'')+"://stat.onestat.com/stat.aspx?tagver=2&sid="+id;
			p+=pair("url",osp_URL);
			p+=pair("ti",osp_Title);
			p+=pair("section",CONTENTSECTION);
			p+=pair("custom",CUSTOMDATA);
			p+=pair("cma",osp_ACTION);
			p+=pair("cmt",osp_TRANSACTION);
			p+=pair("cmm",osp_AMOUNT);
			p+=pair("cmp",osp_PRODUCTCODE);
			p+=pair("cmg",osp_PRODUCTGROUP);
			p+=pair("cmad",osp_ADCAMPAIGN);
			p+=pair("rf",window.document.referrer);
			p+=pair("tz",t.getTimezoneOffset());
			p+=pair("ch=",t.getHours());
			p+=pair("js","1");
			p+=pair("ul",(navigator.appName=="Netscape")?navigator.language:navigator.userLanguage);
			if(typeof(screen)=="object"){
			   p+="&sr="+screen.width+"x"+screen.height;p+="&cd="+screen.colorDepth;
			   p+="&jo="+(navigator.javaEnabled()?"Yes":"No");
			}
			if(st=="onestatbasic")s.append('<a href="http://www.onestat.com/aspx/login.aspx?sid=',id,'" target=_blank><img id="ONESTAT_TAG" border="0" SRC="',p,'" alt="This site tracked by OneStat.com. Get your own free website counter."></A>');
			if((st=="onestatpremium")||(st=="onestatebusiness"))s.append('<img id="ONESTAT_TAG" border="0" width="1" height="1" src="',p,'" />');
		}
	 }
	 s.append('<div class="clear"></div></div><div class="clear"></div></td></tr></table></div>');
	 return s.toString()
}