function PopUp(win, pxw, pxy) {
  fenster = window.open('', win, 'resizable,scrollbars=yes,width=' + pxw + ',height=' + pxy + ',dependent=no');
  fenster.focus();
}


function rowActiv(row,counter,colorId,variantid){
	for(var i=1;i<=counter;i++){
		if(row=="row"+i){
		 document.getElementById("row"+i).style.borderColor = "#ff8d02";
		 document.getElementById("colorNumber").value = colorId;
		 document.getElementById("colorNumber").style.color='#000';
		 document.getElementById("azChoosenArticleId").value = variantid;
		}
		else{
			document.getElementById("row"+i).style.borderColor = "#fff";
			}
		}
	}

	function zipperActiv(zipper,counter,colorId){
	for(var i=1;i<=counter;i++){
		if(zipper=="zipper"+i){
		 document.getElementById("zipper"+i).style.borderColor = "#ff8d02"; 
		 document.getElementById("zippernumber").value = colorId;
		 document.getElementById("zippernumber").style.color='#000';
		}
		else{
			document.getElementById("zipper"+i).style.borderColor = "#fff"; 
			}
		}
	}
function Blur(target)
{
	if(target.value==''){
target.value=target.defaultValue; 
target.style.color='#cdcd89';
	}
}
function Blur2(target)
{
	if(target.value==''){
target.value=target.defaultValue; 
target.style.color='#666';
	}
}
function Focus(target)
{
if(target.value!=target.defaultValue){
	target.value=target.value;
	target.style.color='#000'
	}
	else{
target.value=''; 
target.style.color='#000';
	}
	
}
function Change1(target)
{
	document.getElementById("colorError").style.display='none';
}
function Change2(target)
{
	document.getElementById("mengeError").style.display='none';
}

function fadeInOut(target,btn)
{
	if(btn.value=='rechnungsadresse'){
	document.getElementById(target).style.display='none';
	}
	if(btn.value=='lieferadresse'){
	document.getElementById(target).style.display='';
	}
		
}
function clearDefaultTxt(){
	for (i=0;i<document.order.elements.length;i++) {
 if (document.order.elements[i].type == 'text') {
   if(document.order.elements[i].value==document.adresse.elements[i].defaultValue){
	   document.order.elements[i].value="";
	   }
 }
}
	}
	
	
	
function wechsel(box){ 
var box1=document.getElementById('agb1');
var box2=document.getElementById('agb2');
var box3=document.getElementById('agb3');
if(box.checked)
 {
box1.checked = true;
box2.checked = true;
box3.checked = true;
 }
else
 {
box1.checked = false;
box2.checked = false;
box3.checked = false;
 } 
}
//++++++++++++++++++++++++++++++++++++
// NEU FUER MERKZETTEL AUF DETAILSEITE
//++++++++++++++++++++++++++++++++++++



function removeFromWishList(myObject){
	var theId=$(myObject).parent().parent().attr('id');
	$('#item'+theId).find('.img div, .img img').animate({opacity:'1'},200); //ausgewählte Farbe wieder auf normal
	$('#item'+theId).find('.inWishlist').remove();//lösche haken
	$(myObject).parent().parent().css('filter','');

	$(myObject).parent().parent().fadeOut('fast', function() {																 
		$(this).remove();
		variantInBasketCount--;
		if($(".wishListRow").length==0) {
			$('#theInfoText').css({display:'block'});
			$('#wishListInBasket').find('button').removeClass('full');
			$('#wishListInBasket').find('button').removeAttr('onclick');
		}										
	});
}



