function AddToBasket(aUrlParams1,aUrlParams2,axId,axArticleName,aType,aListCategory) {
var axType = aType;
var axListCategory = aListCategory;
var axArticle = 'article';
var axNumber = 'number';
var axURLNumber = '&number=';
var axURLInline = '&inline=yes';
var axArticleNameIntern = axArticleName;
var axAmp = /&/g;
var axAmpText = '&';
var axURL = new String("../../../../../OOMS/bin/cgikassa.exe/AddTo"+axType+"?");
var axURL2 = axURL.concat(aUrlParams1);
var axURL2b = aUrlParams2;
		axURL2b = axURL2b.replace( axAmp ,"%26" );
		axURL2b = axAmpText.concat(axURL2b);
var axURL2c = axURL2.concat(axURL2b);
		axURL2c = axURL2c.concat(axURLInline);
var axIdf = axId;
var axArticleName = axArticle.concat(axId);
var axNumbername = axNumber.concat(axId);
var axNumber2 = 1;
var axArticleList = document.getElementById('Article' + aType);

var axIdArray = 1;
var myArray = [];
var myArray2 = [];
				
if (axNumber2 != ''){
		
		}else
	{
		axNumber2 = 1;	
	}

var axURLnumber2 = axURLNumber.concat(axNumber2);
var axURL3 = axURL2c.concat(axURLnumber2);

axArticleList.innerHTML = '';
axArticleList.innerHTML = axArticleList.innerHTML  +  axNumber2 + 'x' + ' ' +axArticleNameIntern+' <br />';

if (axNumber2 != '0'){

	showdeadcenterdiv(400,200,'SmallBasketaub');
	showdeadcenterdiv(400,200,'Small'+aType);
	
	javascript:hideMe2();
  
	if (axType == 'List'){
  	if (document.all||!document.all&&document.getElementById) document.getElementById("SmallList").style.visibility="hidden";
  		else if (document.layers) document.SmallType.visibility="hide";
	}
	else
	{
  	if (document.all||!document.all&&document.getElementById) document.getElementById("SmallBasket").style.visibility="hidden";
  		else if (document.layers) document.SmallType.visibility="hide";			
	};
		
	javascript:showMe2();

	var checkobj  = document.getElementById('AddToBaseketCode');

	axURL = axURL+'id'+axIdArray+'='+axId+'&number'+axIdArray+'='+axNumber2;	

	
	if (axType == 'List'){
		axURL = axURL + '&ListCat='+axListCategory;	
	};
  
  axIdArray = axIdArray + 1;
			
		if (document.all||document.getElementById){
				for (i=0;i<checkobj.form.length;i++){ 
				var tempobj=checkobj.form.elements[i]
										
					var axIdArticleAccesoires =  axId + 'accesoire';	
						
					if(tempobj.type.toLowerCase() == "checkbox"){
												
						if(tempobj.name.toLowerCase() == axIdArticleAccesoires){	
									
								if (tempobj.checked) {
										
									
									axURL = axURL+'&id'+axIdArray+'='+tempobj.value+'&number'+axIdArray+'=1';
									var axArticleNameAcc = axId + 'articlename' + tempobj.value;
									axArticleList.innerHTML = axArticleList.innerHTML  +  '1' + 'x' + ' ' + document.getElementById(axArticleNameAcc).value + ' <br />';
									axIdArray = axIdArray + 1;						
											
							}
						}
   	 		 }
			}				
	
		}		
		
		
		var xmlHttp = null;//new XMLHttpRequest(); 
		xmlhttp = makexmlhttp();
	//	xmlhttp.name = 'test';
		xmlhttp.open("GET",axURL,true);

		xmlhttp.onreadystatechange = function OnStateChangeACC() {					
	
				if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				
					if (axType == 'List'){
						setTimeout("showMe('List')", 200);
					}
					else
					{
						setTimeout("showMe('Basket')", 200);	
					};				

					javascript:hideMe2();
				
				
				xmlhttp = null;
				}	
			}
		xmlhttp.send('');			

			
		}
	//	javascript:hideMe2();		
		


}

function hideMe(){
  if (document.all||!document.all&&document.getElementById) document.getElementById("SmallBasket").style.visibility="hidden";
  else if (document.layers) document.SmallBasket.visibility="hide";
		
	location.reload(true);

  	
}

function showMe(axTypeList){
	if (axTypeList == 'List') {
  	if (document.all||!document.all&&document.getElementById) document.getElementById("SmallList").style.visibility="visible";
  	else if (document.layers) document.SmallList.visibility="show";		
	}
	else
	{
  	if (document.all||!document.all&&document.getElementById) document.getElementById("SmallBasket").style.visibility="visible";
  	else if (document.layers) document.SmallBasket.visibility="show";
	}	
}

function hideMe2(){
  if (document.all||!document.all&&document.getElementById) document.getElementById("SmallBasketaub").style.visibility="hidden";
  else if (document.layers) document.SmallBasketaub.visibility="hide";
}

function showMe2(){
  if (document.all||!document.all&&document.getElementById) document.getElementById("SmallBasketaub").style.visibility="visible";
  else if (document.layers) document.SmallBasketaub.visibility="show";
}

function InlineDisplayBasket() {
		var axDisplayURL = '../../../../../OOMS/bin/cgikassa.exe/DisplayBasket?TPLExt=inline';
		
		var xmlhttp = null;//new XMLHttpRequest(); 
		xmlhttp = makexmlhttp();
		//xmlhttp.name = 'test-iBasket';
		xmlhttp.open("GET",axDisplayURL,true);

		xmlhttp.onreadystatechange = function OnStateChangeACC() {					
	
				if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				
					document.getElementById('iBasket').innerHTML = xmlhttp.responseText;	
				
				xmlhttp = null;
				}	
			}
		xmlhttp.send('');
		
}




function showdeadcenterdiv(Xwidth,Yheight,divid) { 
// First, determine how much the visitor has scrolled 

var scrolledX, scrolledY; 
if( self.pageYOffset ) { 
scrolledX = self.pageXOffset; 
scrolledY = self.pageYOffset; 
} else if( document.documentElement && document.documentElement.scrollTop ) { 
scrolledX = document.documentElement.scrollLeft; 
scrolledY = document.documentElement.scrollTop; 
} else if( document.body ) { 
scrolledX = document.body.scrollLeft; 
scrolledY = document.body.scrollTop; 
} 

// Next, determine the coordinates of the center of browser's window 

var centerX, centerY; 
if( self.innerHeight ) { 
centerX = self.innerWidth; 
centerY = self.innerHeight; 
} else if( document.documentElement && document.documentElement.clientHeight ) { 
centerX = document.documentElement.clientWidth; 
centerY = document.documentElement.clientHeight; 
} else if( document.body ) { 
centerX = document.body.clientWidth; 
centerY = document.body.clientHeight; 
} 

// Xwidth is the width of the div, Yheight is the height of the 
// div passed as arguments to the function: 
var leftOffset = scrolledX + (centerX - Xwidth) / 2; 
var topOffset = scrolledY + (centerY - Yheight) / 2; 
// The initial width and height of the div can be set in the 
// style sheet with display:none; divid is passed as an argument to // the function 
var o=document.getElementById(divid); 
var r=o.style; 
r.position='absolute'; 
r.top = topOffset + 'px'; 
r.left = leftOffset + 'px'; 
r.display = "block"; 
} 

function makexmlhttp(){
	  var xmlhttp = null;
	  if(window.XMLHttpRequest){
	  	xmlhttp = new XMLHttpRequest();
	  }else{
		   try{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		   }catch(e){
				window.alert("Uw browser ondersteunt het XMLHttpRequest object niet!");
		   }
	  }
	  
	  return xmlhttp;
 }

var xmlhttp
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
  try {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp=false;
  }
 }
@else
 xmlhttp=false
 @end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}


