
function openPopup(URL,WIDTH,HEIGHT,SCROLLBARS){
	if(!WIDTH) WIDTH=600;
	if(!HEIGHT) HEIGHT=600;
	if(SCROLLBARS == false) SCROLLBARS=false;
	else SCROLLBARS=true;
	popup = window.open(URL,"popup","width="+WIDTH+", height="+HEIGHT+", scrollbars="+SCROLLBARS+"");
}

function printConfig(code, sessionid)
{
alert('ok');
//				var so = new SWFObject("../_flash/konfigurator.swf?sessionid="+sessionid+"&configcode="+code+"&printpage=false", "Konfigurator", "800", "482", "8", "#000000");
//				var so = new SWFObject("../_flash/konfigurator.swf?sessionid=1813698297&configcode=60/DVD-WH-4C-no/DVDB-black/DIN/no/&printpage=true&productid=", "Konfigurator", "800", "482", "8", "#000000");
//				so.addParam("wmode", "transparent");
				so.write("flashcontent");
}

function write_lieferadresse(form, option) 
{
	if(option.checked == true)
	{
		form.shippingname.value = form.invoicename.value;
		form.shippingcompany.value = form.invoicecompany.value;	
		form.shippingaddress.value = form.invoiceaddress.value;
		form.shippingname.value = form.invoicename.value;		
		form.shippingzip.value = form.invoicezip.value;		
		form.shippingcity.value = form.invoicecity.value;		
		form.shippingcountry.value = form.invoicecountry.value;		
	}			
}

function gotoCart() {
	alert('');
}

function getVar(name)
         {
         get_string = document.location.search;         
         return_value = '';
         
         do { //This loop is made to catch all instances of any get variable.
            name_index = get_string.indexOf(name + '=');
            
            if(name_index != -1)
              {
              get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index);
              
              end_of_value = get_string.indexOf('&');
              if(end_of_value != -1)                
                value = get_string.substr(0, end_of_value);                
              else                
                value = get_string;                
                
              if(return_value == '' || value == '')
                 return_value += value;
              else
                 return_value += ', ' + value;
              }
            } while(name_index != -1)
            
         //Restores all the blank spaces.
         space = return_value.indexOf('+');
         while(space != -1)
              { 
              return_value = return_value.substr(0, space) + ' ' + 
              return_value.substr(space + 1, return_value.length);
							 
              space = return_value.indexOf('+');
              }
          
         return(return_value);        
}
				 
function session_url(url) {
	sessionid = getVar('sessionid');
	if(sessionid){
		return url+='&sessionid='+sessionid;
	} else {
		return url;	
	}
}

function suchfeldfocus(){
	window.alert('aie');
}

