function site_OpenWindow(p_name, p_url, p_width, p_height, p_scrollbars) { var wleft, wtop; if (window.screen != null) { wleft = Math.ceil(eval((screen.width-p_width)/2)); wtop = Math.ceil(eval((screen.height-p_height)/2)); } else { wleft = 150; wtop = 150; } newWindow = window.open(p_url, p_name, 'resizable=no,toolbar=no,scrollbars='+p_scrollbars+',menubar=no,status=no,width='+p_width+',height='+p_height+',top='+wtop+',left='+wleft); } 

// begin removed 2009-02-20 fmaesen
//function BLNSL_trim(p_obj) {strIn=p_obj.value;while(cChar=strIn.charAt(0),(cChar=="\n")||(cChar=="\r")||(cChar=="\t")||(cChar==" ")) strIn=strIn.substring(1,strIn.length-1);while(cChar=strIn.charAt(strIn.length-1),(cChar=="\n")||(cChar=="\r")||(cChar=="\t")||(cChar==" ")) strIn=strIn.substring(0,strIn.length-2);p_obj.value=strIn; }
//function BLNSL_checkField(p_form,p_name) {ret=true,objIn=eval('document.forms[\''+p_form+'\'].'+p_name);if(objIn.type=='text'){BLNSL_trim(objIn);if(objIn.value=='')ret=false;}if(objIn.type=='textarea'){if(objIn.value=='')ret=false;}if(objIn.type=='checkbox'){ret=objIn.checked;}if(objIn.type=='select-one'){ret=(objIn.selectedIndex>0);}return(ret);}
//function BLNSL_formSubmitTest(p_name,p_text) {var retVal=true,strMsg='';if(p_name=='contact'&&BLNSL_checkField(p_name,'firstname')==false){retVal=false;strMsg+='* Voornaam\n';};if(p_name=='contact'&&BLNSL_checkField(p_name,'lastname')==false){retVal=false;strMsg+='* Naam\n';};if(p_name=='contact'&&BLNSL_checkField(p_name,'email')==false){retVal=false;strMsg+='* E-mail\n';};if(retVal==false)alert(p_text+'\n\n'+strMsg+'\n');return(retVal);}
function iframeTop() { if(parent.window.scrollTo!=null) parent.window.scrollTo(0,0); }
function iframeHeight(p_height) { parent.document.getElementById('checkoutframe').style.height=p_height; }


/*-------------------------*/
function twoCols(src, type)
	{
	var origList = src;
	var leftList = document.createElement(type);
	var rightList = document.createElement(type);
	var container = document.createElement('div');
	
	var items = origList.getElementsByTagName('LI');
	
	var itemsLength = items.length/2;
	for (i = 0; i < itemsLength; i++)
		{
		leftList.appendChild(items[0]);
		}
		
	itemsLength = items.length;
	for (i = 0; i < itemsLength; i++)
		{
		rightList.appendChild(items[0]);
		}
	container.appendChild(leftList);
	container.appendChild(rightList);
	
	leftList.setAttribute('class', 'left');
	rightList.setAttribute('class', 'right');
	if (type == 'ol')
		{
		rightList.setAttribute('start', leftList.getElementsByTagName('LI').length + 1 );
		}
	container.setAttribute('class','twocol');
	if (document.all)
		{
		// ugly hack for ie win
		leftList.setAttribute('className', 'left');
		rightList.setAttribute('className', 'right');
		container.setAttribute('className','twocol');
		}
	origList.parentNode.replaceChild(container, origList);
	}
function allTwoCols (whichclass, type)
	{
	var uls = document.getElementsByTagName(type);
	for (var i=0; i< uls.length; i++)
		{
		if (uls[i].getAttribute('class') == whichclass || uls[i].getAttribute('className') == whichclass)
			{
			twoCols(uls[i], type.toLowerCase());
			}
		}
	}
/*-------------------------*/
