function updateprice1() {
	//Kills Firefox
	//int= (window.document.forms[0].intervall.options[window.document.forms[0].intervall.selectedIndex].value);
	//pai= (window.document.forms[0].pairs.options[window.document.forms[0].pairs.selectedIndex].value);
	//document.all["pbox"].innerHTML=int*pai*15;
}


function updateprice2() {
	//Kills Firefox
	//int= (window.document.forms[1].intervall.options[window.document.forms[0].intervall.selectedIndex].value);
	//pai= (window.document.forms[1].pairs.options[window.document.forms[0].pairs.selectedIndex].value);
	//document.all["pbox"].innerHTML=int*pai*8;
}


function updateprice3(ref) {
	// needs to be called via onChange="change(this)
	p1= (ref.options[window.document.forms[0].elements[0].selectedIndex].value);
	p2= (ref.options[window.document.forms[0].elements[1].selectedIndex].value);
	document.all["pbox"].innerHTML=p1*p2*15;
}

function update() {
	updateprice1();
	//updateprice2();
}

function reload() {
	//document.location.reload();
	window.location.reload();
}

function printPage() {
	 print(document); 
}


function showParent(url) {
	
	 window.opener.location=url;
 
}

function toggleDisplay(ref) {

 element = document.getElementById(ref).style;
 if (element.display=='none') {
 	element.display='block';
 }
 else {element.display='none';
 }
	
}


function showElement(ref) {
	
	value = ref.options.value;
	
	obj = document.getElementsByTagName("select");
	for (var i=0;i<obj.length;i++)
	{
			if (ref != obj[i]) {
			obj[i].selectedIndex='0';
		}
	}

	
	
	obj = document.getElementsByTagName("div");

	for (var i=0;i<obj.length;i++)
	{
			obj[i].style.display = 'none';
	}
	

	
	
	
  
    
	obj[value].style.display = "block";
}


function showElementBox(ref) {
	
	document.getElementById('productsearch').style.display = 'none';
	document.getElementById('directbuy').style.display = 'none';
	document.getElementById('customerlogin').style.display = 'none';
		
    mydiv = document.getElementById(ref);
    mydiv.style.display = mydiv.style.display="block";
  
}


function popUpWindow(url,winname,width,height,left,top) {

  	popUpWin = window.open(url, winname, 'width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+',scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=yes');
  	popUpWin.focus();
  	//This allows to specify a full url in href and works even withou JS activated, otherwise both windows will be openend
  	if (popUpWin) return false;
	else return true;

}