	
	function showAGB(id){
				
		$j('#shopAGB'+id).show(); 
		$j('#shopActivate'+id).hide();
	}
			
			
			
	function successConfirm(id){
				
		$j('#shop'+id).hide();
		alert('Sie wurden erfolgreich für den Shop freigeschaltet.');
	}
	
	function toogleAnswer(i){
					
					try{
						if(($('answer'+i).style.display=='none')||($('answer'+i).style.display=='')){
							$j('.faqAnswer').hide();
							$('answer'+i).style.display='block';
						}else{
							$('answer'+i).style.display='none';
						}
					}catch(e){}
	}

	function openRecommendBox(type){

		if(type==0){ //shop
			$j(document).ready(function () {
					$j('#recommendBox').show();
					
					$j('#recommendProductHeader').hide();
					$j('#recommendShopHeader').show();
					$j('#recommendProductTextPre').hide();
					$j('#recommendShopTextPre').show();
					
					$j('#recommendType').val(0);
			});	
		}else{
			$j(document).ready(function () {
					$j('#recommendBox').show();
					
					$j('#recommendShopHeader').hide();
					$j('#recommendProductHeader').show();
					$j('#recommendShopTextPre').hide();
					$j('#recommendProductTextPre').show();
					
					$j('#recommendType').val(1);
			});	
		}
	}
	
	function getText(xml, name){
				
				if((xml==null)||(xml.length==0)||(xml.indexOf(name)==-1)){
					return "";
				}
				
				var start=xml.indexOf("<"+name+">");
				var end=xml.indexOf("</"+name+">");
				
				return xml.substring(start+name.length+2,end);
	}
	
	function doBid(id){

				var query="doBid=&item="+id+"&securityValidation="+securityLink+"&ajax=true";
				
				if(doBidPortal){
					query = query+"&portal=true";
				}
				
				$j.ajax({
					dataType: 'html',
					url: doBidUrl,
					data: query,
					success: function (xml) {
		
						if(getText(xml,"errorMsg").length>0){
							$j('#ajaxResponse').html(getText(xml,"errorMsg"));
						}else{
							$j('#ajaxResponse').html('&nbsp;');
						}
						
						if(getText(xml,"forward").length>0){
							location.href="/S="+doBidSessionId+"/"+getText(xml,"forward");
							return;
						}
		
						securityLink = getText(xml,"securityLink");
						
						$j('.loginLine').html(getText(xml,"credits"));
						
						var id=getText(xml,"id");
						
						try{
							$j('#product'+id).replaceWith(getText(xml,"code"));
						}catch(e){}
						
						if($j('#productList'+id).length==0){
							
							if($j('#myProductContent_dealer'+getText(xml,"dealerId")).length==0){
								$j('#myProductContentHead').show();
								$j('.myProductContent').prepend('<div><br /><h1>'+getText(xml,"dealerName")+'</h1></div><div id="myProductContent_dealer'+getText(xml,"dealerId")+'"></div>');
							}
							
							$j('#myProductContent_dealer'+getText(xml,"dealerId")).prepend(getText(xml,"codeList"));
							
						}else{

							try{
								$j('#productList'+id).replaceWith(getText(xml,"codeList"));
							}catch(e){}
						}
		
						$j('.myPrice'+id).effect('pulsate',null,null,function(){ $j(this).css('filter','none'); });

		
					}
				});	
			}
			
			
