/*************************************************************************************************************************
		COMMENTS FROM VISHAL: 	Add print functionality to the print icons on the bottom of the pages on all sites
**************************************************************************************************************************/

function print_div()
{
	var a = window.open('', '', 'location=0, status=0, scrollbars=1, resizable=1, outerWidth=500, width=500, height=450');
	a.document.open('text/html');
	a.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="da" dir="ltr"><head><link rel="stylesheet" href="/css/print_order_div.css" /></head><body>');
    a.document.write(document.getElementById('seopage').innerHTML);
	a.document.write('</body></html>');
	a.document.close();
	a.print();
}

/*************************************************************************************************************************
		COMMENTS FROM VISHAL: 	Display and hide the contents on levering page. Used in Whiteaway
**************************************************************************************************************************/

function toggle(el,toggle)
{
	var div1 = document.getElementById(el)
	if (div1.style.display == 'block')
	{
		div1.style.display = 'none'
		try { getMultiElement(toggle).innerHTML = "+"; } catch (err) {}
	}
	else
	{
		div1.style.display = 'block'
		try { getMultiElement(toggle).innerHTML = "&ndash;"; } catch (err) {}
	}
}

/*************************************************************************************************************************
		COMMENTS FROM VISHAL: Display Hide the content on FAQ page. Used in Loebeshop
**************************************************************************************************************************/

function showSeoText(selected) {
	part = getElementsByClass('seotext-part');
	for(var i = 0; i < part.length; i++) {
		part[i].style.display = 'none';
	}

	if (selected != null) {
		document.getElementById('seotext-n-' + selected).style.display = '';
	}
}



function getElementsByClass(searchClass, node, tag) {
	var classElements = new Array();
	if (node == null) node = document;
	if (tag == null) tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\b)"+searchClass+"(\b|$)");
	for (var i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}
