//****************************************************************************************************//
//** ACA Javascript Bibliothek fr DTSshop 2009
//** 11/2008
//** SNE, NPE, CBU
//**
//**
//****************************************************************************************************//

var gbLayerTimeoutIsActive, gbHoverTimeoutIsActive, gbDisplayTimeoutIsActive, gbDelayedCatLoadIsActive, CarSelectorTimeout, activeProdInfo,DropDownStopper,DropDownStopper2,DropDownStopper3,DropDownStopper4,DropDownStopper5,DropDownStopper6, FlexCarSelector, FlexCarSelectorCloser, CartPicShower, ProductFitsToCars, ProductVeruegbarkeitVar, DropDownStopper7, DropDownStopper8, DropDownStopper9, DropDownStopper10,DropDownStopper11,DropDownStopper12,DropDownStopper13,DropDownStopper14,DropDownStopper15;
var DropDownStopper16, DropDownStopper17, DropDownStopper18, DropDownStopper19, DropDownStopper20, DropDownStopper21, DropDownStopper22, DropDownStopper23, DropDownStopper24, DropDownStopper25, DropDownStopper26, DropDownStopper27, DropDownStopper28, DropDownStopper29, DropDownStopper30;
var globalVarDivID;
var DropDownStopper77787, ProductShowHInfoVar, ProductShowThisImage, ProductShowThisImageCloser;
var npeCheckOpenDiv, npeCheckOpenDivVerfuegbarkeit, npeCheckOpenDivHinweise;
var gbSearchDDTimeoutIsActive;
var cDivScroller = 0;
var giMainCats = 24;
var giMSECLayerTimout = 1000;

var VarOpenCatCarLayerForEg = null;

//** ups... ueble fixe hoehen fuer die kategorienebenen, zur zeit kein anderer weg moeglich..

if (navigator.appName == "Microsoft Internet Explorer") { browser = "true"

var gaCatHeights = new Array (5,117,228,230,    218,320,408,
							  5,81,228,240,303,404,
							  5,171,175,204,294,411,

							  5,81,205,321, 409);

}else {
var gaCatHeights = new Array (5,117,228,230,    218,320,408,
							  5,81,228,240,303,404,
							  5,171,175,204,294,411,

							  5,81,215,321, 409);
}


///SprachVariablen fuer die Alerts

//EN
var sAlertsVars_SelectVariant_EN = "Please select variant!";
var sAlertsVars_SelectSrewHole_EN = "Please select a screw-hole circle!";
var sAlertsVars_SelectWheelOffset_EN = "Please select a wheel offset!";
var sAlertsVars_SelectReifen_EN = "Please select a 'Manufacturer/Profil'!";

//DE
var sAlertsVars_SelectVariant_DE = "Bitte Variante waehlen!";
var sAlertsVars_SelectSrewHole_DE = "Bitte Lochkreis waehlen!";
var sAlertsVars_SelectWheelOffset_DE = "Bitte waehlen Sie eine Einpresstiefe!";

var sAlertsVars_SelectReifen_DE = "Bitte waehlen Sie 'Hersteller / Profil'!";


function JSgreyOutThisSiteMain(){
	
	with(document.getElementById('id_greyOutThisSiteMain').style) { 
		visibility = "visible";
	} 
}

function openCatCarLayerForEg(div){
	
	if(VarOpenCatCarLayerForEg != null){
		closeCatCarLayerForEg(VarOpenCatCarLayerForEg);	
	}
	
	with(document.getElementById('subcatscarcats_'+div).style) { 
		height = "auto";
	} 
	with(document.getElementById('subcatscarcats_'+div).style) { 
		visibility="visible"; 
	} 

	document.getElementById('subcatscarcatsPlusCell_'+div).innerHTML = "<a href = 'javascript:;' onClick = 'closeCatCarLayerForEg("+div+")' style='display:block;' ><img src = '/Templates/09/pics/minus.jpg' border = '0'></a>";
	
	
	//with(document.getElementById('forThisSelCarTreeMainBG_'+div).style) { 
	//	backgroundColor="#FFFFFF"; 
	//}
	with(document.getElementById('forThisSelCarTreeMainBG_'+div).style) { 
		backgroundImage="url(/Templates/09/pics/txt_bg_hover.jpg)"; 
		
	}
	
	VarOpenCatCarLayerForEg = div;
	
}

function closeCatCarLayerForEg(div){

	with(document.getElementById('subcatscarcats_'+div).style) { 
		height = "1px";
	} 
	with(document.getElementById('subcatscarcats_'+div).style) { 
		visibility="hidden"; 
	} 

	document.getElementById('subcatscarcatsPlusCell_'+div).innerHTML = "<a href = 'javascript:;' onClick = 'openCatCarLayerForEg("+div+")' style='display:block;' ><img src = '/Templates/09/pics/plus.jpg' border = '0'></a>";
	
	with(document.getElementById('forThisSelCarTreeMainBG_'+div).style) { 
		backgroundImage="url(/Templates/09/pics/txt_bg.jpg)"; 
		
	}
	
	
}



//****************************************************************************************************//
function DisplaySubCatLayer(i) {

  if(bIsGoodBrowser()==false) { return; }

  // Timeout fr Layer und Hover-Ausblendung lschen, es wird direkt die neue Position angezeigt
	clearTimeout( gbLayerTimeoutIsActive );
  clearTimeout( gbHoverTimeoutIsActive );
	// Falls ein Layer gleich zu Laden beginnen wollte, wird das auch gestoppt..
	clearTimeout( gbDelayedCatLoadIsActive );
	// Der Einfachheit halber alle Hover-States zurcksetzen
	SetAllBtnNormalState();

	// Subkategorien-Ebene auf neuer Position einblenden
	with(document.getElementById('SubCatLayer').style) { 
		visibility="hidden"; 
    if(i<7) { top = '26px'; }
			else if(i<13) { top = '50px'; }
				else if(i<19) { top = '74px'; }
					else if(i<24) { top = '97px'; }
						else { top = '26px'; }
						
						
						
    left=gaCatHeights[i]+'px';
		visibility="visible"; 
	} 

	// Hover-Status fr Button einstellen
	j=i+1;
	hoverurl = "/Templates/09/pics/siteelem/cats/Cat_"+(j<10?'0':'')+j+"_hover.jpg";
	catpicid = 'CatPic'+i; 
	with(document.getElementById(catpicid)) { 
		src=hoverurl;
	} 

	// Ebene mit Subkategorien fllen
	document.getElementById('SubCatLayer').innerHTML = "<div id='InnerSubCatLayer' onMouseOver='clearTimeout(gbLayerTimeoutIsActive);clearTimeout(gbHoverTimeoutIsActive);return true;'><div style='position:absolute;top:45%;left:45%;'><img src='/content/images/bigrotation2.gif'></div></div>";
	gbDelayedCatLoadIsActive = ACA_Delayed_XMLHttpRequest('/content/php-bin/ACA/aca_getCategories1.php?acamcatid='+i,'SubCatLayer',0);
  document.getElementById('InnerSubCatLayer').style.backgroundColor = (i%2==0)?"#e5e5e5":"#f4b484";
}



function DisplaySubCatLayerActive(i) {

  if(bIsGoodBrowser()==false) { return; }

  // Timeout fr Layer und Hover-Ausblendung lschen, es wird direkt die neue Position angezeigt
	clearTimeout( gbLayerTimeoutIsActive );
  	clearTimeout( gbHoverTimeoutIsActive );
	// Falls ein Layer gleich zu Laden beginnen wollte, wird das auch gestoppt..
	clearTimeout( gbDelayedCatLoadIsActive );
	// Der Einfachheit halber alle Hover-States zurcksetzen
	
	
	SetAllBtnNormalState();

	// Subkategorien-Ebene auf neuer Position einblenden
	with(document.getElementById('SubCatLayer').style) { 
		visibility="hidden"; 
    if(i<7) { top = '26px'; }
			else if(i<13) { top = '50px'; }
				else if(i<19) { top = '74px'; }
					else if(i<24) { top = '97px'; }
						else { top = '26px'; }
    	left=gaCatHeights[i]+'px';
		visibility="visible"; 
	} 

	 

	// Ebene mit Subkategorien fllen
	document.getElementById('SubCatLayer').innerHTML = "<div id='InnerSubCatLayer' onMouseOver='clearTimeout(gbLayerTimeoutIsActive);clearTimeout(gbHoverTimeoutIsActive);return true;'><div style='position:absolute;top:45%;left:45%;'><img src='/content/images/bigrotation2.gif'></div></div>";
	gbDelayedCatLoadIsActive = ACA_Delayed_XMLHttpRequest('/content/php-bin/ACA/aca_getCategories1.php?acamcatid='+i,'SubCatLayer',0);
    document.getElementById('InnerSubCatLayer').style.backgroundColor = (i%2==0)?"#e5e5e5":"#f4b484";
}


//****************************************************************************************************//
function SetTimeOutSubCatLayer(i) {
	gbLayerTimeoutIsActive = setTimeout( "HideSubCatLayer("+i+")", giMSECLayerTimout );
}
function SetTimeOutSubCatLayerActiveButton(i) {
	gbLayerTimeoutIsActive = setTimeout( "HideSubCatLayerActiveButton("+i+")", giMSECLayerTimout );
}
//****************************************************************************************************//
function SetTimeOutBtn(i) {
	gbHoverTimeoutIsActive = setTimeout( "SetBtnNormalState("+i+")", giMSECLayerTimout );
}

//****************************************************************************************************//
function SetTimeOutDisplaySubCatLayer(i) {
	clearTimeout(gbDisplayTimeoutIsActive);
	gbDisplayTimeoutIsActive = setTimeout( "DisplaySubCatLayer("+i+")", giMSECLayerTimout );
}

function SetTimeOutDisplaySubCatLayerActive(i) {
	clearTimeout(gbDisplayTimeoutIsActive);
	gbDisplayTimeoutIsActive = setTimeout( "DisplaySubCatLayerActive("+i+")", giMSECLayerTimout );
}

//****************************************************************************************************//
//** Ebene fr Subkategorien sowie den zugehrigen Hover-Status lschen
//****************************************************************************************************//
function HideSubCatLayer() {

	if(bIsGoodBrowser()==false) { return; }

	with(document.getElementById('SubCatLayer').style) { 
		visibility="hidden"; 
	} 
	SetAllBtnNormalState();

}
function HideSubCatLayerActiveButton() {
	//alert("DRIN");
	if(bIsGoodBrowser()==false) { return; }

	with(document.getElementById('SubCatLayer').style) { 
		visibility="hidden"; 
	} 
	/*SetAllBtnNormalState();*/

}
//****************************************************************************************************//
//** Kategorien-Button auf normalen Status setzen
//****************************************************************************************************//
function SetBtnNormalState(i) {
  j=i+1;
	normalurl = "/Templates/09/pics/siteelem/cats/Cat_"+(j<10?'0':'')+j+".jpg";
	catpicid = 'CatPic'+i; 
	with(document.getElementById(catpicid)) { 
		src=normalurl;
	} 
}

//****************************************************************************************************//
//** Alle Kategorien-Buttons auf normalen Status setzen
//****************************************************************************************************//
function SetAllBtnNormalState() {

	if(bIsGoodBrowser()==false) { return; }

  for (i=0; i<giMainCats;i++) {
    j=i+1;
		normalurl = "/Templates/09/pics/siteelem/cats/Cat_"+(j<10?'0':'')+j+".jpg";
		catpicid = 'CatPic'+i; 
		if(document.getElementById(catpicid) != null){
			with(document.getElementById(catpicid)) { 
				src=normalurl;
			} 
		}
	}
	
}

//****************************************************************************************************//
//** Such-DropDown anzeigen
//****************************************************************************************************//
function ShowSearchDrop() {
  if(bIsGoodBrowser()==false) { return; }
	clearTimeout(gbSearchDDTimeoutIsActive);
	with(document.getElementById('SearchDropDown').style) { 
		visibility="visible"; 
	} 
}

//****************************************************************************************************//
function SetTimeOutSearchDrop() {
	gbSearchDDTimeoutIsActive = setTimeout( "HideSearchDropDown()", giMSECLayerTimout );
}

//****************************************************************************************************//
//** Ebene fr Such-DropDown oben lschen
//****************************************************************************************************//
function HideSearchDropDown() {
	if(bIsGoodBrowser()==false) { return; }
	with(document.getElementById('SearchDropDown').style) { 
		visibility="hidden"; 
	} 
}

//****************************************************************************************************//
//** Suchoption setzen
//****************************************************************************************************//
function setSearchOption(i,s) {
	clearTimeout(gbSearchDDTimeoutIsActive);
	HideSearchDropDown();
	document.getElementById("SEARCH_OPTION").value=i;
	document.getElementById("SEARCH_DROP_DOWN").innerHTML='<a href="javascript:;" style="text-decoration:none;color:#a0a0a0">'+s+'</a>';
}








//****************************************************************************************************//
//** Das ganze nochmal fr die Detailsuche
//****************************************************************************************************//



function ShowSearchDrop2() {
  if(bIsGoodBrowser()==false) { return; }
	clearTimeout(gbSearchDDTimeoutIsActive);
	with(document.getElementById('SearchDropDown2').style) { 
		visibility="visible"; 
	} 
}

//****************************************************************************************************//
function SetTimeOutSearchDrop2() {
	gbSearchDDTimeoutIsActive = setTimeout( "HideSearchDropDown2()", giMSECLayerTimout );
}

//****************************************************************************************************//
function HideSearchDropDown2() {
	if(bIsGoodBrowser()==false) { return; }
	with(document.getElementById('SearchDropDown2').style) { 
		visibility="hidden"; 
	} 
}

//****************************************************************************************************//
function setSearchOption2(i,s) {
	clearTimeout(gbSearchDDTimeoutIsActive);
	HideSearchDropDown2();
	document.getElementById("SEARCH_OPTION2").value=i;
	document.getElementById("SEARCH_DROP_DOWN2").innerHTML='<a href="javascript:;" style="text-decoration:none;color:#a0a0a0">'+s+'</a>';
}

//************************************Ende Detail-Suche*************************************************//










//****************************************************************************************************//
//** Finally this is an AJAX - APPLICATION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//****************************************************************************************************//
//** Fhrt die aufgerufene URL (sUrl) asynchron aus und bergibt das Ergebnis in die Ebene (sDiv)
//****************************************************************************************************//

//****************************************************************************************************//
//** Um Ueberforderung des Systems vorzubeugen (z.B. bei schnellem berfahren mehrerer Ebenen) kann 
//** ein Delay eingegeben werden!
//****************************************************************************************************//

function ACA_Delayed_XMLHttpRequest(sUrl,sDiv,iDelay) {
	var hState;
	hState = setTimeout( "ACA_XMLHttpRequest('"+sUrl+"','"+sDiv+"')", iDelay );
  return hState;
}

//** Und jetzt der eigentliche Ajax-Aufruf ***********************************************************//
function ACA_XMLHttpRequest(sUrl,sDiv) {

	var xmlHttp = null;
	
	// Mozilla, Opera, Safari sowie Internet Explorer (ab v7)
	if (typeof XMLHttpRequest != 'undefined') {
			xmlHttp = new XMLHttpRequest();
	}
	if (!xmlHttp) {
			// Internet Explorer 6 und lter
			try {
					xmlHttp  = new gbLayerTimeoutIsActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
					try {
							xmlHttp  = new gbLayerTimeoutIsActiveXObject("Microsoft.XMLHTTP");
					} catch(e) {
							xmlHttp  = null;
					}
			}
	}
	if (xmlHttp) {
			xmlHttp.open('GET', sUrl, true);
			xmlHttp.onreadystatechange = function () {
					if (xmlHttp.readyState == 4) {
						document.getElementById(sDiv).innerHTML = xmlHttp.responseText;
					}
			};
			xmlHttp.send(null);
	}

}

//****************************************************************************************************//

function showMainBody(i) {
  document.getElementById('Layer2MainBody').innerText = "";
  document.getElementById('Layer2MainBody').style.height	   = '0px';
  document.getElementById('Layer2MainBody').style.visibility = 'hidden';
}


function show(i) {
  document.getElementById('Layer2').style.height	   = '0px';
  document.getElementById('Layer2').innerText = "";
  document.getElementById('Layer2').style.visibility = 'hidden';
}

function showNaehe(i) {
  document.getElementById('Layer2Naehe').style.height	   = '0px';
  document.getElementById('Layer2Naehe').innerText = "";
  document.getElementById('Layer2Naehe').style.visibility = 'hidden';
}

function showNormal(i) {
  document.getElementById('Layer2Normal').style.height	   = '0px';
  document.getElementById('Layer2Normal').innerText = "";
  document.getElementById('Layer2Normal').style.visibility = 'hidden';
}

//****************************************************************************************************//
function DisplaySelectCaryType() {
	FlexCarSelector = setTimeout( "DisplaySelectCaryTypeTrue()", 1000 );
	clearTimeout(FlexCarSelectorCloser);
}

function ClearTimeDisplaySelectCaryType(){
	//clearTimeout(FlexCarSelector);
	//clearTimeout(FlexCarSelectorCloser);
}

function DisplaySelectCaryTypeTrue() {
	
	with(document.getElementById('htmlMain').style) { 
		overflow="hidden"; 
	} 
	
	//clearTimeout(FlexCarSelector);
	//alert('oeffnen');
    clearTimeout(FlexCarSelectorCloser);
	with(document.getElementById('CarTypeLayer').style) { 
		visibility="visible"; 
	} 
	with(document.getElementById('CarTypeLayerMain').style) { 
		visibility="visible"; 
	} 

}






//****************************************************************************************************//
function SetTimeOutCarTypeLayer() {
		//clearTimeout(FlexCarSelector);
		//alert('close');
    	clearTimeout(FlexCarSelectorCloser);
		clearTimeout(FlexCarSelector);
		
		FlexCarSelectorCloser = window.setTimeout( "HideCarTypeLayer()", 600 );
}


//****************************************************************************************************//
function HideCarTypeLayer() {
	clearTimeout(FlexCarSelectorCloser);
	with(document.getElementById('htmlMain').style) { 
		overflow="auto"; 
	} 
	//clearTimeout(FlexCarSelector);
	with(document.getElementById('CarTypeLayer').style) { 
		visibility="hidden"; 
	} 
	with(document.getElementById('CarTypeLayerMain').style) { 
		visibility="hidden"; 
	} 

}

//****************************************************************************************************//
//************************************************************************//
// Funktion um den Div-Layer von MyDTS anzuzeigen, wenn man eingeloggt ist//
//************************************************************************//
function DisplayMyDTSAccount() {

  //window.clearTimeout( active );
	with(document.getElementById('Header_navi_myDTS_Login').style) { 
		visibility="visible"; 
	} 


}
//****************************************************************************************************//
function SetTimeOutMyDTS(i) {

	active = window.setTimeout( "HideMyDTS()", 3500 );

}


//****************************************************************************************************//
function HideMyDTS() {

	with(document.getElementById('Header_navi_myDTS_Login').style) { 
		visibility="hidden"; 
	} 
	

}

//************************Ende des MyDTS Div-Layers****************//

//************************************************************************//
// Funktion um Bilder im Warenkorb zu vergrssern//
//************************************************************************//

function higherHeight(){
	cDivScroller = cDivScroller + 1;
	//alert (cDivScroller);
	
}
//****************************************************************************************************//
function DisplayCartPic(ind) {
  //window.clearTimeout( active );
	with(document.getElementById('Cart_picture_'+ind).style) { 
		visibility="visible"; 
	} 
}
//****************************************************************************************************//
function SetTimeOutCartPic(jippi) {
	//alert (jippi);
	 CartPicShower = window.setTimeout( 'DisplayCartPic('+jippi+')', 1000 );

}


//****************************************************************************************************//
function HideCartPic(ind) {
	clearTimeout(CartPicShower);
	with(document.getElementById('Cart_picture_'+ind).style) { 
		visibility="hidden"; 
	} 

}

//************************Ende des Cart_Pic Div-Layers****************//
//************************************************************************//

//************************************************************************//
// Funktion um Layer Login und Adresse anzuzeigen//
//************************************************************************//
function DisplayLoginLayer(cb_layer) {
	with(document.getElementById('htmlMain').style) { 
		overflow="hidden"; 
	} 
  //window.clearTimeout( active );
	with(document.getElementById(cb_layer).style) { 
		visibility="visible";
		//height = document.body.clientHeight+'px';
	}
	if (cb_layer == 'login_layer'){
		//alert(cb_layer);
		with(document.getElementById('login_inner_layer').style) { 
			visibility="visible";
			top = 250+'px';
		}
		document.getElementById("divPositioner").style.visibility = "visible";
	}
	if (cb_layer == 'selectAdress'){
		//alert(cb_layer);
		with(document.getElementById('detailAdressen').style) { 
			visibility="visible";
		}
	}
}

function CloseLogin(cb_layer, closer){

	with(document.getElementById('htmlMain').style) { 
		overflow="auto"; 
	} 

	with(document.getElementById(cb_layer).style) { 
		visibility="hidden";
	}	
	//document.getElementById(cb_layer).style.height=0+"px";

	
	if (closer == '2'){
		with(document.getElementById('change_adress').style) { 
			visibility="hidden";	
			
		}
	}
	
	if (closer == '3'){
		with(document.getElementById('change_MainAdress').style) { 
			visibility="hidden";	
			
		}
	}	
	
	if (closer == '1'){
		
		with(document.getElementById('selectAdress').style) { 
			visibility="visible";	
			
		}
		with(document.getElementById('change_adress').style) { 
			visibility="hidden";	
			
		}
		
	}
	if (closer == '4'){
		with(document.getElementById('detailAdressen').style) { 
			visibility="hidden";	
			
		}
	}
	if (closer == '5'){
		with(document.getElementById('login_inner_layer').style) { 
			visibility="hidden";	
			
		}
	}	
	document.getElementById("divPositioner").style.visibility = "hidden";
}
 //************************Ende Funktion um Layer Login und Adresse anzuzeigen//****************//
//*********************************************************************************************//

//************************************************************************//
// Funktionen um Ebene fr AGB, Fernabsatz und Datenschutz anzuzeigen*****//
//**********************************************************************//

function DisplayAGB(cb_inner_layer, cb_layer) {

with(document.getElementById('htmlMain').style) { 
	overflow="hidden"; 
} 

  //window.clearTimeout( active );
	with(document.getElementById(cb_layer).style) { 
		visibility="visible";
		
	}
	
	with(document.getElementById(cb_inner_layer).style) { 
		visibility="visible";
		
	}
	

}


function CloseAGB(cb_layer, cb_inner_layer){

with(document.getElementById('htmlMain').style) { 
	overflow="auto"; 
} 
	
	with(document.getElementById(cb_layer).style) { 
		visibility="hidden";
	}	
	//document.getElementById(cb_layer).style.height=0+"px";
	with(document.getElementById(cb_inner_layer).style) { 
		visibility="hidden";
	}
}
//********Ende Funktionen um Ebene fr AGB, Fernabsatz und Datenschutz anzuzeigen********//
//**************************************************************************************//


function ShowMainNaviLeft() {

	with(document.getElementById('BtnMainNavShowOrHideSub').style) { 
		visibility="visible"; 
	}
	//document.getElementById('Main_navi_naviCategories').style.top=250+"px";
	

}


function HideMainNaviLeft() {

	with(document.getElementById('BtnMainNavShowOrHideSub').style) { 
		visibility="hidden"; 
	} 
	//document.getElementById('Main_navi_naviCategories').style.top=0+"px";
	
}



function ShowProdV(icnt){
	active = window.setTimeout( "activateProdV("+icnt+")", 1000 );
}
function HideProdV(icnt){
	//with(document.getElementById('showProdVerfuegb_'+icnt).style) { 
	//	visibility="hidden"; 
	//} 
	//document.getElementById('showProdVerfuegb_'+icnt).style.height=0+"px";
	active = window.setTimeout( "HideProdVs("+icnt+")", 1000 );
}
function HideProdVs(icnt){
	with(document.getElementById('showProdVerfuegb_'+icnt).style) { 
		visibility="hidden"; 
	} 

}


function activateProdV(icnt2){
	with(document.getElementById('showProdVerfuegb_'+icnt2).style) { 
		visibility="visible"; 
	} 
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}









function ShowAllgInfoProdV(icnt){
	activeProdInfo = icnt;
	active = window.setTimeout( "activateAllgInfoProdV("+icnt+")", 1000 );
}
function HideAllgInfoProdV(icnt){
	with(document.getElementById('showAllgProdInfos_'+icnt).style) { 
		visibility="hidden"; 
	} 
	//document.getElementById('showProdVerfuegb_'+icnt).style.height=0+"px";
	active = window.setTimeout( "HideAllgInfoProdVs("+icnt+")", 305 );
}

function HideAllgInfoProdVs(icnt){
	//alert('DRIN');
	with(document.getElementById('showAllgProdInfos_'+icnt).style) { 
		visibility="hidden"; 
	} 

}

function HideAllgInfoProdVsNow(event){
	icnt = activeProdInfo;
	
	var toElement = event.relatedTarget || event.toElement || false;
	var tableCheck = toElement.id.substr(0,8); // Wenn zb prodinfo
	//alert(tableCheck);
		if(tableCheck != 'prodinfo' && tableCheck != 'showAllg'){
			active = window.setTimeout( "HideAllgInfoProdVsreal("+icnt+")", 1000 );
		}
	
	

}
function HideAllgInfoProdVsreal(idToHide){
		with(document.getElementById('showAllgProdInfos_'+idToHide).style) { 
			visibility="hidden"; 
		} 

}



function activateAllgInfoProdV(icnt2){
	with(document.getElementById('showAllgProdInfos_'+icnt2).style) { 
		visibility="visible"; 
	} 
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}




function ShowSonstInfoProdV(icnt, icnt2){
	active = window.setTimeout( "activateSonstInfoProdV("+icnt+", "+icnt2+")", 1000 );
}

function ShowSonstInfoProdVNOW(icnt, icnt2){
	active = window.setTimeout( "activateSonstInfoProdV("+icnt+", "+icnt2+")", 1 );
	
}
function HideSonstInfoProdV(icnt, icnt2){
	with(document.getElementById('showSonstProdInfos_'+icnt+"_"+icnt2).style) { 
		visibility="hidden"; 
	} 
	//document.getElementById('showProdVerfuegb_'+icnt).style.height=0+"px";
	active = window.setTimeout( "HideSonstInfoProdVs("+icnt+"_"+icnt2+")", 305 );
}

function HideSonstInfoProdVs(icnt, icnt2){
	//alert('DRIN');
	with(document.getElementById('showSonstProdInfos_'+icnt+'_'+icnt2).style) { 
		visibility="hidden"; 
	} 

}
function activateSonstInfoProdV(icnt2,icnt3){
	clearTimeout(active);
	with(document.getElementById('showSonstProdInfos_'+icnt2+'_'+icnt3).style) { 
		visibility="visible"; 
	} 
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}
function HideSonstInfoProdVsNow(event, cnt3,icnt){
	
	var toElement = event.relatedTarget || event.toElement || false;
	var tableCheck = toElement.id.substr(0,8); // Wenn zb prodinfo
	//alert(tableCheck);
		if(tableCheck != 'prodinfo' && tableCheck != 'showSons'){
			active = window.setTimeout( "HideSonstInfoProdVsreal("+icnt+","+cnt3+")", 1000 );
		}
	
	

}
function HideSonstInfoProdVsreal(idToHide, cnt3){
		
		
		with(document.getElementById('showSonstProdInfos_'+idToHide+'_'+cnt3).style) { 
			visibility="hidden"; 
		} 

}



function HideSonstInfoProdVsNowReal(event, cnt3,icnt){
	clearTimeout(active);
	var toElement = event.relatedTarget || event.toElement || false;
	var tableCheck = toElement.id.substr(0,8); // Wenn zb prodinfo
	//alert(tableCheck);
		if(tableCheck != 'prodinfo' && tableCheck != 'showSons'){
			active = window.setTimeout( "HideSonstInfoProdVsreal("+icnt+","+cnt3+")", 1000 );
		}
	
	

}






function ShowProdFitToCar(icnt, icnt2){
	clearTimeout(ProductFitsToCars);
	ProductFitsToCars = window.setTimeout( "ShowProdFitToCarDoIt("+icnt+", "+icnt2+")", 1000 );
}
function ShowProdFitToCar_NOW(icnt, icnt2){
	clearTimeout(ProductFitsToCars);
	ProductFitsToCars = window.setTimeout( "ShowProdFitToCarDoIt("+icnt+", "+icnt2+")", 1 );
}
function ShowProdFitToCarDoIt(icnt2,icnt3){
	clearTimeout(ProductFitsToCars);
	/*
	if(npeCheckOpenDiv != null){
		//alert(npeCheckOpenDiv);
		with(document.getElementById('showSonstProdInfos_'+npeCheckOpenDiv+'_99').style) { 
			visibility="hidden"; 
		} 
	}
	*/
	with(document.getElementById('showInfoSatzCheckNPEBallaBalla_'+icnt2).style) { 
		visibility="visible"; 
	} 
	
	with(document.getElementById('htmlMain').style) { 
			overflow="hidden"; 
	}
	
	
	with(document.getElementById('showAllgProdInfosNPEBallaBalla_'+icnt2).style) { 
			visibility="visible"; 
	}
	
	npeCheckOpenDiv = icnt2;
	
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}

function HideProdFitToCar(icnt, icnt2){
	clearTimeout(ProductFitsToCars);
	ProductFitsToCars = window.setTimeout( "HideProdFitToCarDoIt("+icnt+", "+icnt2+")", 200 );
}
function HideProdFitToCarDoIt(icnt2,icnt3){
	clearTimeout(ProductFitsToCars);
	with(document.getElementById('showInfoSatzCheckNPEBallaBalla_'+icnt2).style) { 
		visibility="hidden"; 
	} 
	
	
	with(document.getElementById('htmlMain').style) { 
			overflow="auto"; 
	}
	
	with(document.getElementById('showAllgProdInfosNPEBallaBalla_'+icnt2).style) { 
			visibility="hidden"; 
	}
	
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}
function HideProdFitToCarNOW(icnt, icnt2){
	clearTimeout(ProductFitsToCars);
	ProductFitsToCars = window.setTimeout( "HideProdFitToCarDoIt("+icnt+", "+icnt2+")", 200 );
}







function ShowProdFitToCarNeu(icnt, icnt2){
	clearTimeout(ProductFitsToCars);
	ProductFitsToCars = window.setTimeout( "ShowProdFitToCarDoIt("+icnt+", "+icnt2+")", 200 );
}
function HideProdFitToCarNOWNeu(icnt, icnt2){
	clearTimeout(ProductFitsToCars);
	ProductFitsToCars = window.setTimeout( "HideProdFitToCarDoIt("+icnt+", "+icnt2+")", 200 );
}








function ShowProdverfuegbar(icnt, icnt2){
	clearTimeout(ProductVeruegbarkeitVar);
	ProductVeruegbarkeitVar = window.setTimeout( "ShowProdverfuegbarDoIt("+icnt+", "+icnt2+")", 1000 );
}
function ShowProdverfuegbar_NOW(icnt, icnt2){
	clearTimeout(ProductVeruegbarkeitVar);
	ProductVeruegbarkeitVar = window.setTimeout( "ShowProdverfuegbarDoIt("+icnt+", "+icnt2+")", 1 );
	
}
function ShowProdverfuegbarDoIt(icnt2,icnt3){
	clearTimeout(ProductVeruegbarkeitVar);
	
	if(npeCheckOpenDivVerfuegbarkeit != null){
		with(document.getElementById('showProdVerfuegb_'+npeCheckOpenDivVerfuegbarkeit).style) { 
			visibility="hidden"; 
		}	
	}
	with(document.getElementById('showProdVerfuegb_'+icnt2).style) { 
		visibility="visible"; 
	}
	with(document.getElementById('showProdVerfuegbPositioner_'+icnt2).style) { 
		visibility="visible"; 
	}	
	with(document.getElementById('htmlMain').style) { 
			overflow="hidden"; 
	}
	
	
	with(document.getElementById('htmlMain').style) { 
			overflow="hidden"; 
	}
	
	/*
	with(document.getElementById('showSonstProdInfosMDiv_'+icnt2+'_99').style) { 
			visibility="visible"; 
	}
	*/
	
	npeCheckOpenDivVerfuegbarkeit = icnt2;
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}

function HideShowProdverfuegbar(icnt, icnt2){
	clearTimeout(ProductVeruegbarkeitVar);
	ProductVeruegbarkeitVar = window.setTimeout( "HideShowProdverfuegbarDoIt("+icnt+", "+icnt2+")", 1000 );
}
function HideShowProdverfuegbarDoIt(icnt2,icnt3){
	clearTimeout(ProductVeruegbarkeitVar);
	with(document.getElementById('showProdVerfuegb_'+icnt2).style) { 
		visibility="hidden"; 
	}
	if(npeCheckOpenDivVerfuegbarkeit != null){
		with(document.getElementById('showProdVerfuegb_'+npeCheckOpenDivVerfuegbarkeit).style) { 
			visibility="hidden"; 
		}	
	}
	
	with(document.getElementById('htmlMain').style) { 
			overflow="auto"; 
	}
	with(document.getElementById('showProdVerfuegbPositioner_'+icnt2).style) { 
			visibility="hidden"; 
	}	
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}
function HideProdverfuegbar_NOW(icnt, icnt2){
	//alert('DRIN');
	clearTimeout(ProductVeruegbarkeitVar);
	ProductVeruegbarkeitVar = window.setTimeout( "HideShowProdverfuegbarDoIt("+icnt+", "+icnt2+")", 200 );
	
	
}

function HideProdverfuegbar_NOWReal(icnt, icnt2){
	//alert('DRIN');
	clearTimeout(ProductVeruegbarkeitVar);
	ProductVeruegbarkeitVar = window.setTimeout( "HideShowProdverfuegbarDoIt("+icnt+", "+icnt2+")", 1 );
}

function ClearProdverfuegbar_Timer(icnt, icnt2){
	clearTimeout(ProductVeruegbarkeitVar);
}







function ShowThisImageDIV(icnt2,icnt3){
	clearTimeout(ProductShowThisImage);
	ProductShowThisImage = window.setTimeout( "ShowThisImageDIVReal("+icnt2+", "+icnt3+")", 1000 );
}


function ShowThisImageDIVReal(icnt2,icnt3){
	
	
	
	with(document.getElementById('htmlMain').style) { 
		overflow="hidden"; 
	} 
	
	with(document.getElementById('pImagePList_'+icnt2).style) { 
		visibility="visible"; 
	} 
	with(document.getElementById('pImagePListMainDiv_'+icnt2).style) { 
		visibility="visible"; 
	}
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}


function CloseThisImageDIV(icnt2,icnt3){
	clearTimeout(ProductShowThisImageCloser);
	ProductShowThisImageCloser = window.setTimeout( "CloseThisImageDIVReal("+icnt2+", "+icnt3+")", 1000 );
}

function CloseThisImageDIVReal(icnt2,icnt3){
	
	with(document.getElementById('htmlMain').style) { 
		overflow="auto"; 
	} 
	
	
	with(document.getElementById('pImagePList_'+icnt2).style) { 
		visibility="hidden"; 
	}
	with(document.getElementById('pImagePListMainDiv_'+icnt2).style) { 
		visibility="hidden"; 
	} 
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}

function ClearThisImageDIVTimer(icnt2,icnt3){
	clearTimeout(ProductShowThisImage);
	//clearTimeout(ProductShowThisImageCloser);
}

function ClearThisImageDIVTimerFULL(icnt2,icnt3){
	clearTimeout(ProductShowThisImage);
	clearTimeout(ProductShowThisImageCloser);
}




function ShowProdHinfo(icnt, icnt2){
	clearTimeout(ProductShowHInfoVar);
	ProductShowHInfoVar = window.setTimeout( "ShowProdHinfoDoIt("+icnt+", "+icnt2+")", 1000 );
}
function ShowProdHinfo_NOW(icnt, icnt2){
	clearTimeout(ProductShowHInfoVar);
	ProductShowHInfoVar = window.setTimeout( "ShowProdHinfoDoIt("+icnt+", "+icnt2+")", 1 );
}
function ShowProdHinfoDoIt(icnt2,icnt3){
	clearTimeout(ProductShowHInfoVar);
	
	if(npeCheckOpenDivHinweise != null){
		with(document.getElementById('showshowInfoSatzDiv_'+npeCheckOpenDivHinweise).style) { 
			visibility="hidden"; 
		} 
	}
	with(document.getElementById('htmlMain').style) { 
			overflow="hidden"; 
	}
	with(document.getElementById('showshowInfoSatzDiv_'+icnt2).style) { 
		visibility="visible"; 
	}
	with(document.getElementById('showInfoSatz_'+icnt2).style) { 
		visibility="visible"; 
	}
	npeCheckOpenDivHinweise = icnt2;
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}

function HideShowProdHinfo(icnt, icnt2){
	clearTimeout(ProductShowHInfoVar);
	ProductShowHInfoVar = window.setTimeout( "HideShowProdHinfoDoIt("+icnt+", "+icnt2+")", 200 );
}
function HideShowProdHinfoDoIt(icnt2,icnt3){
	//alert('DRIN');
	clearTimeout(ProductShowHInfoVar);
	with(document.getElementById('showshowInfoSatzDiv_'+icnt2).style) { 
		visibility="hidden"; 
	} 
	if(npeCheckOpenDivHinweise != null){
		with(document.getElementById('showshowInfoSatzDiv_'+npeCheckOpenDivHinweise).style) { 
			visibility="hidden"; 
		} 
	}
	
	with(document.getElementById('htmlMain').style) { 
			overflow="auto"; 
	}
	
	with(document.getElementById('showInfoSatz_'+icnt2).style) { 
			visibility="hidden"; 
	}
	
	
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}
function HideShowProdHinfo_NOW(icnt, icnt2){
	//alert('DRIN');
	clearTimeout(ProductShowHInfoVar);
	ProductShowHInfoVar = window.setTimeout( "HideShowProdHinfoDoIt("+icnt+", "+icnt2+")", 200 );
	
	
	
}

function HideShowProdHinfo_NOWReal(icnt, icnt2){
	//alert('DRIN');
	clearTimeout(ProductShowHInfoVar);
	ProductShowHInfoVar = window.setTimeout( "HideShowProdHinfoDoIt("+icnt+", "+icnt2+")", 1 );
}

function ClearShowProdHinfo_Timer(icnt, icnt2){
	clearTimeout(ProductShowHInfoVar);
}





function ShowThisVariants(DivID){
	
}

function CloseThisVariants(DivID){
	with(document.getElementById('htmlMain').style) { 
		overflow="auto"; 
	} 
	document.getElementById('ShowVariants_'+DivID).innerHTML = "";
	with(document.getElementById('ShowVariants_'+DivID).style) { 
		visibility="hidden"; 
	} 
}



function showKomplRForThisProd(list_id,prod_id){
	
	
	
	with(document.getElementById('htmlMain').style) { 
		overflow="hidden"; 
	} 
	with(document.getElementById('pDShowKRSubDiv').style) { 
		visibility="visible"; 
	} 
	with(document.getElementById('pDShowKRMainDiv').style) { 
		visibility="visible"; 
	}
	
	
	$('pDShowKRSubDiv').innerHTML = "<center><span class = 'LoadingDivSpanText'><br><br>Loading ... </span><br><br><img id='Layer3' src='/Templates/09/pics/loading2.gif' /></center>";
	
	$('pDShowKRSubDiv').innerHTML = "<center><iframe id='' name = '' src='/content/php-bin/ACA/getKomplR.php?list_id="+list_id+"&prod_id="+prod_id+"' width = '600' height='320' ></iframe></center>";
	
	/*
	var requestUrl = "/content/php-bin/ACA/aca_ajaxfunctions.php";
	try{
		
		var request = new Ajax.Request(
						  requestUrl,
						  {
							 method:'post',
							 parameters: 'func=getKomplRRForThisProd&acampidid='+prod_id+'',
							 onComplete: CreateKomplRRForThisProd
						  }
					  );
	}
	catch(e){
		alert("Fehler: " + e.toString());	
	}
	*/
	
	
}

function getKomplRRForThisProd(response){
	
	try{
		$('pDShowKRSubDiv').innerHTML = response.responseText;
	}
	catch(e){
		alert("Fehler: " + e.toString());	
	}				
	
	
	globalVarDivID = "";
	
}

function HideKomplRRFitToCarNOW(list_id){
	
	if(list_id == null || list_id==""){
		list_id = 0;
	}
	
	with(parent.document.getElementById('htmlMain').style) { 
			overflow="auto"; 
	}
	with(parent.document.getElementById('pDShowKRMainDiv').style) { 
		visibility="hidden"; 
	} 
	with(parent.document.getElementById('pDShowKRSubDiv').style) { 
			visibility="hidden"; 
	}
	
	if( parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettRPrice.value == "" ){
		parent.document.getElementById("subMitProdToCart_"+list_id).rimOrWheelF_.checked = true;
		parent.document.getElementById("subMitProdToCart_"+list_id).rimOrWheelK_.checked = false;
		parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettR.value = "";
		parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettRPrice.value = "";
		parent.document.getElementById("nnKomplRSelection_"+list_id).innerHTML = "";
	}
	//document.getElementById('showProdVerfuegb_'+icnt2).style.height=150+"px";
	//alert('visible');
}



function ShowThisVariantsAjax(DivID, ProdID){
	
	
	with(document.getElementById('htmlMain').style) { 
		overflow="hidden"; 
	} 
	with(document.getElementById('ShowVariants_'+DivID).style) { 
		visibility="visible"; 
	}
	
	
	globalVarDivID = DivID;
	$('ShowVariants_'+DivID).innerHTML = "<center><span class = 'LoadingDivSpanText'><br><br>Loading ... </span><br><br><img id='Layer3' src='/Templates/09/pics/loading2.gif' /></center>";
	var requestUrl = "/content/php-bin/ACA/aca_ajaxfunctions.php";
	try{
		
		var request = new Ajax.Request(
						  requestUrl,
						  {
							 method:'post',
							 parameters: 'func=getVariantsForThisProd&acampidid='+ProdID+'&divID='+DivID,
							 onComplete: CreateVariantsForThisProd
						  }
					  );
	}
	catch(e){
		alert("Fehler: " + e.toString());	
	}
	
	
	
}

function CreateVariantsForThisProd(response){
	
	try{
		$('ShowVariants_'+globalVarDivID).innerHTML = response.responseText;
	}
	catch(e){
		alert("Fehler: " + e.toString());	
	}				
	
	
	globalVarDivID = "";
	
}





function showMyDrop(icnt2){
	if(icnt2 == 1){
	clearTimeout(DropDownStopper);
	}
	if(icnt2 == 2){
	clearTimeout(DropDownStopper2);
	}
	if(icnt2 == 3){
	clearTimeout(DropDownStopper3);
	}
	if(icnt2 == 4){
	clearTimeout(DropDownStopper4);
	}
	if(icnt2 == 5){
	clearTimeout(DropDownStopper5);
	}
	if(icnt2 == 6){
	clearTimeout(DropDownStopper6);
	}
	if(icnt2 == 7){
	clearTimeout(DropDownStopper7);
	}
	if(icnt2 == 8){
	clearTimeout(DropDownStopper8);
	}
	if(icnt2 == 9){
	clearTimeout(DropDownStopper9);
	}
	if(icnt2 == 10){
	clearTimeout(DropDownStopper10);
	}
	if(icnt2 == 11){
	clearTimeout(DropDownStopper11);
	}
	if(icnt2 == 12){
	clearTimeout(DropDownStopper12);
	}
	if(icnt2 == 13){
	clearTimeout(DropDownStopper13);
	}
	if(icnt2 == 14){
	clearTimeout(DropDownStopper14);
	}
	if(icnt2 == 15){
	clearTimeout(DropDownStopper15);
	}
	
	
	if(icnt2 == 16){
	clearTimeout(DropDownStopper16);
	}
	if(icnt2 == 17){
	clearTimeout(DropDownStopper17);
	}
	if(icnt2 == 18){
	clearTimeout(DropDownStopper18);
	}
	if(icnt2 == 19){
	clearTimeout(DropDownStopper19);
	}
	if(icnt2 == 20){
	clearTimeout(DropDownStopper20);
	}
	if(icnt2 == 21){
	clearTimeout(DropDownStopper21);
	}
	if(icnt2 == 22){
	clearTimeout(DropDownStopper22);
	}
	if(icnt2 == 23){
	clearTimeout(DropDownStopper23);
	}
	if(icnt2 == 24){
	clearTimeout(DropDownStopper24);
	}
	if(icnt2 == 25){
	clearTimeout(DropDownStopper25);
	}
	if(icnt2 == 26){
	clearTimeout(DropDownStopper26);
	}
	if(icnt2 == 27){
	clearTimeout(DropDownStopper27);
	}
	if(icnt2 == 28){
	clearTimeout(DropDownStopper28);
	}
	if(icnt2 == 29){
	clearTimeout(DropDownStopper29);
	}
	if(icnt2 == 30){
	clearTimeout(DropDownStopper30);
	}
	
	
	if(icnt2 == 77787){
	clearTimeout(DropDownStopper77787);
	}
	
	
	with(document.getElementById('div_'+icnt2+'_dropdown').style) { 
		visibility="visible"; 
	} 
}
function dropper_point(myebent,icnt2){
	if(icnt2 == 1){
	clearTimeout(DropDownStopper);
	}
	if(icnt2 == 2){
	clearTimeout(DropDownStopper2);
	}
	if(icnt2 == 3){
	clearTimeout(DropDownStopper3);
	}
	if(icnt2 == 4){
	clearTimeout(DropDownStopper4);
	}
	if(icnt2 == 5){
	clearTimeout(DropDownStopper5);
	}
	if(icnt2 == 6){
	clearTimeout(DropDownStopper6);
	}
	if(icnt2 == 7){
	clearTimeout(DropDownStopper7);
	}
	if(icnt2 == 8){
	clearTimeout(DropDownStopper8);
	}
	if(icnt2 == 9){
	clearTimeout(DropDownStopper9);
	}
	if(icnt2 == 10){
	clearTimeout(DropDownStopper10);
	}
	if(icnt2 == 11){
	clearTimeout(DropDownStopper11);
	}
	if(icnt2 == 12){
	clearTimeout(DropDownStopper12);
	}
	if(icnt2 == 13){
	clearTimeout(DropDownStopper13);
	}
	if(icnt2 == 14){
	clearTimeout(DropDownStopper14);
	}
	if(icnt2 == 15){
	clearTimeout(DropDownStopper15);
	}
	
	
	
	if(icnt2 == 16){
	clearTimeout(DropDownStopper16);
	}
	if(icnt2 == 17){
	clearTimeout(DropDownStopper17);
	}
	if(icnt2 == 18){
	clearTimeout(DropDownStopper18);
	}
	if(icnt2 == 19){
	clearTimeout(DropDownStopper19);
	}
	if(icnt2 == 20){
	clearTimeout(DropDownStopper20);
	}
	if(icnt2 == 21){
	clearTimeout(DropDownStopper21);
	}
	if(icnt2 == 22){
	clearTimeout(DropDownStopper22);
	}
	if(icnt2 == 23){
	clearTimeout(DropDownStopper23);
	}
	if(icnt2 == 24){
	clearTimeout(DropDownStopper24);
	}
	if(icnt2 == 25){
	clearTimeout(DropDownStopper25);
	}
	if(icnt2 == 26){
	clearTimeout(DropDownStopper26);
	}
	if(icnt2 == 27){
	clearTimeout(DropDownStopper27);
	}
	if(icnt2 == 28){
	clearTimeout(DropDownStopper28);
	}
	if(icnt2 == 29){
	clearTimeout(DropDownStopper29);
	}
	if(icnt2 == 30){
	clearTimeout(DropDownStopper30);
	}
	
	
	if(icnt2 == 77787){
	clearTimeout(DropDownStopper77787);
	}
	//alert(myebent);
	myebent.style.backgroundColor='#ffffff';
	
	
}
function dropper_pointActive(myebent,icnt2){
	if(icnt2 == 1){
	clearTimeout(DropDownStopper);
	}
	if(icnt2 == 2){
	clearTimeout(DropDownStopper2);
	}
	if(icnt2 == 3){
	clearTimeout(DropDownStopper3);
	}
	if(icnt2 == 4){
	clearTimeout(DropDownStopper4);
	}
	if(icnt2 == 5){
	clearTimeout(DropDownStopper5);
	}
	if(icnt2 == 6){
	clearTimeout(DropDownStopper6);
	}
	if(icnt2 == 7){
	clearTimeout(DropDownStopper7);
	}
	if(icnt2 == 8){
	clearTimeout(DropDownStopper8);
	}
	if(icnt2 == 9){
	clearTimeout(DropDownStopper9);
	}
	if(icnt2 == 10){
	clearTimeout(DropDownStopper10);
	}
	if(icnt2 == 11){
	clearTimeout(DropDownStopper11);
	}
	if(icnt2 == 12){
	clearTimeout(DropDownStopper12);
	}
	if(icnt2 == 13){
	clearTimeout(DropDownStopper13);
	}
	if(icnt2 == 14){
	clearTimeout(DropDownStopper14);
	}
	if(icnt2 == 15){
	clearTimeout(DropDownStopper15);
	}
	
	
	if(icnt2 == 16){
	clearTimeout(DropDownStopper16);
	}
	if(icnt2 == 17){
	clearTimeout(DropDownStopper17);
	}
	if(icnt2 == 18){
	clearTimeout(DropDownStopper18);
	}
	if(icnt2 == 19){
	clearTimeout(DropDownStopper19);
	}
	if(icnt2 == 20){
	clearTimeout(DropDownStopper20);
	}
	if(icnt2 == 21){
	clearTimeout(DropDownStopper21);
	}
	if(icnt2 == 22){
	clearTimeout(DropDownStopper22);
	}
	if(icnt2 == 23){
	clearTimeout(DropDownStopper23);
	}
	if(icnt2 == 24){
	clearTimeout(DropDownStopper24);
	}
	if(icnt2 == 25){
	clearTimeout(DropDownStopper25);
	}
	if(icnt2 == 26){
	clearTimeout(DropDownStopper26);
	}
	if(icnt2 == 27){
	clearTimeout(DropDownStopper27);
	}
	if(icnt2 == 28){
	clearTimeout(DropDownStopper28);
	}
	if(icnt2 == 29){
	clearTimeout(DropDownStopper29);
	}
	if(icnt2 == 30){
	clearTimeout(DropDownStopper30);
	}
	
	
	if(icnt2 == 77787){
	clearTimeout(DropDownStopper77787);
	}
	//alert(myebent);
}
function dropper_pointOut(myebent,icnt2){
	if(icnt2 == 1){
	clearTimeout(DropDownStopper);
	}
	if(icnt2 == 2){
	clearTimeout(DropDownStopper2);
	}
	if(icnt2 == 3){
	clearTimeout(DropDownStopper3);
	}
	if(icnt2 == 4){
	clearTimeout(DropDownStopper4);
	}
	if(icnt2 == 5){
	clearTimeout(DropDownStopper5);
	}
	if(icnt2 == 6){
	clearTimeout(DropDownStopper6);
	}
	if(icnt2 == 7){
	clearTimeout(DropDownStopper7);
	}
	if(icnt2 == 8){
	clearTimeout(DropDownStopper8);
	}
	if(icnt2 == 9){
	clearTimeout(DropDownStopper9);
	}
	if(icnt2 == 10){
	clearTimeout(DropDownStopper10);
	}
	if(icnt2 == 11){
	clearTimeout(DropDownStopper11);
	}
	if(icnt2 == 12){
	clearTimeout(DropDownStopper12);
	}
	if(icnt2 == 13){
	clearTimeout(DropDownStopper13);
	}
	if(icnt2 == 14){
	clearTimeout(DropDownStopper14);
	}
	if(icnt2 == 15){
	clearTimeout(DropDownStopper15);
	}
	
	
	if(icnt2 == 16){
	clearTimeout(DropDownStopper16);
	}
	if(icnt2 == 17){
	clearTimeout(DropDownStopper17);
	}
	if(icnt2 == 18){
	clearTimeout(DropDownStopper18);
	}
	if(icnt2 == 19){
	clearTimeout(DropDownStopper19);
	}
	if(icnt2 == 20){
	clearTimeout(DropDownStopper20);
	}
	if(icnt2 == 21){
	clearTimeout(DropDownStopper21);
	}
	if(icnt2 == 22){
	clearTimeout(DropDownStopper22);
	}
	if(icnt2 == 23){
	clearTimeout(DropDownStopper23);
	}
	if(icnt2 == 24){
	clearTimeout(DropDownStopper24);
	}
	if(icnt2 == 25){
	clearTimeout(DropDownStopper25);
	}
	if(icnt2 == 26){
	clearTimeout(DropDownStopper26);
	}
	if(icnt2 == 27){
	clearTimeout(DropDownStopper27);
	}
	if(icnt2 == 28){
	clearTimeout(DropDownStopper28);
	}
	if(icnt2 == 29){
	clearTimeout(DropDownStopper29);
	}
	if(icnt2 == 30){
	clearTimeout(DropDownStopper30);
	}
	
	
	
	
	if(icnt2 == 77787){
	clearTimeout(DropDownStopper77787);
	}
	//alert(myebent);
	myebent.style.backgroundColor='#e5e5e5';

}

function dropper_stopper(icnt2){
	//alert('DroperStopper')
	if(icnt2 == 1){
	clearTimeout(DropDownStopper);
	}
	if(icnt2 == 2){
	clearTimeout(DropDownStopper2);
	}
	if(icnt2 == 3){
	clearTimeout(DropDownStopper3);
	}
	if(icnt2 == 4){
	clearTimeout(DropDownStopper4);
	}
	if(icnt2 == 5){
	clearTimeout(DropDownStopper5);
	}
	if(icnt2 == 6){
	clearTimeout(DropDownStopper6);
	}
	if(icnt2 == 7){
	clearTimeout(DropDownStopper7);
	}
	if(icnt2 == 8){
	clearTimeout(DropDownStopper8);
	}
	if(icnt2 == 9){
	clearTimeout(DropDownStopper9);
	}
	if(icnt2 == 10){
	clearTimeout(DropDownStopper10);
	}
	if(icnt2 == 11){
	clearTimeout(DropDownStopper11);
	}
	if(icnt2 == 12){
	clearTimeout(DropDownStopper12);
	}
	if(icnt2 == 13){
	clearTimeout(DropDownStopper13);
	}
	if(icnt2 == 14){
	clearTimeout(DropDownStopper14);
	}
	if(icnt2 == 15){
	clearTimeout(DropDownStopper15);
	}
	
	
	
	if(icnt2 == 16){
	clearTimeout(DropDownStopper16);
	}
	if(icnt2 == 17){
	clearTimeout(DropDownStopper17);
	}
	if(icnt2 == 18){
	clearTimeout(DropDownStopper18);
	}
	if(icnt2 == 19){
	clearTimeout(DropDownStopper19);
	}
	if(icnt2 == 20){
	clearTimeout(DropDownStopper20);
	}
	if(icnt2 == 21){
	clearTimeout(DropDownStopper21);
	}
	if(icnt2 == 22){
	clearTimeout(DropDownStopper22);
	}
	if(icnt2 == 23){
	clearTimeout(DropDownStopper23);
	}
	if(icnt2 == 24){
	clearTimeout(DropDownStopper24);
	}
	if(icnt2 == 25){
	clearTimeout(DropDownStopper25);
	}
	if(icnt2 == 26){
	clearTimeout(DropDownStopper26);
	}
	if(icnt2 == 27){
	clearTimeout(DropDownStopper27);
	}
	if(icnt2 == 28){
	clearTimeout(DropDownStopper28);
	}
	if(icnt2 == 29){
	clearTimeout(DropDownStopper29);
	}
	if(icnt2 == 30){
	clearTimeout(DropDownStopper30);
	}
	
	
	
	if(icnt2 == 77787){
	clearTimeout(DropDownStopper77787);
	}
}
function HideMyDrop(icnt2){
	
	if(icnt2 == 1){
	clearTimeout(DropDownStopper);
	DropDownStopper = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 2){
	clearTimeout(DropDownStopper2);
	DropDownStopper2 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 3){
	clearTimeout(DropDownStopper3);
	DropDownStopper3 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 4){
	clearTimeout(DropDownStopper4);
	DropDownStopper4 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 5){
	clearTimeout(DropDownStopper5);
	DropDownStopper5 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 6){
	clearTimeout(DropDownStopper6);
	DropDownStopper6 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 7){
	clearTimeout(DropDownStopper7);
	DropDownStopper7 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 8){
	clearTimeout(DropDownStopper8);
	DropDownStopper8 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 9){
	clearTimeout(DropDownStopper9);
	DropDownStopper9 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 10){
	clearTimeout(DropDownStopper10);
	DropDownStopper10 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 11){
	clearTimeout(DropDownStopper11);
	DropDownStopper11 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 12){
	clearTimeout(DropDownStopper12);
	DropDownStopper12 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 13){
	clearTimeout(DropDownStopper13);
	DropDownStopper13 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 14){
	clearTimeout(DropDownStopper14);
	DropDownStopper14 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 15){
	clearTimeout(DropDownStopper15);
	DropDownStopper15 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	
	
	
	
	if(icnt2 == 16){
	clearTimeout(DropDownStopper16);
	DropDownStopper16 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 17){
	clearTimeout(DropDownStopper17);
	DropDownStopper17 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 18){
	clearTimeout(DropDownStopper18);
	DropDownStopper18 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 19){
	clearTimeout(DropDownStopper19);
	DropDownStopper19 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 20){
	clearTimeout(DropDownStopper20);
	DropDownStopper20 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 21){
	clearTimeout(DropDownStopper21);
	DropDownStopper21 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 22){
	clearTimeout(DropDownStopper22);
	DropDownStopper22 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 23){
	clearTimeout(DropDownStopper23);
	DropDownStopper23 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 24){
	clearTimeout(DropDownStopper24);
	DropDownStopper24 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 25){
	clearTimeout(DropDownStopper25);
	DropDownStopper25 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 26){
	clearTimeout(DropDownStopper26);
	DropDownStopper26 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 27){
	clearTimeout(DropDownStopper27);
	DropDownStopper27 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 28){
	clearTimeout(DropDownStopper28);
	DropDownStopper28 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 29){
	clearTimeout(DropDownStopper29);
	DropDownStopper29 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	if(icnt2 == 30){
	clearTimeout(DropDownStopper30);
	DropDownStopper30 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	
	
	
	if(icnt2 == 77787){
		clearTimeout(DropDownStopper77787);
		DropDownStopper77787 = window.setTimeout( "HideMyDropReal("+icnt2+")", 1000 ); 
	}
	
}
function HideMyDropReal(icnt2){
	with(document.getElementById('div_'+icnt2+'_dropdown').style) { 
		visibility="hidden"; 
	} 
}










//* Abfrage ob aktuelle Browser IE >= 7 und Netscape >= 5 *********************************************//
function bIsGoodBrowser() {

  // Mal davon ausgehen, dass es funktioniert.
	var bIsGood = true;

	// Wenns der Navigator (FireFox,Safari,Chrome,K-Meleon) ist, dann muss mind. Version 5 her
	if (navigator.appName.indexOf ("Netscape") != -1)	{ 
		if (parseInt(navigator.appVersion) < 5) {
		  bIsGood = false;
		}
	} else {
		// Wenns der Opera ist, dann mind. Version 9
		if (navigator.appName.indexOf ("Opera") != -1)	{ 
			if (parseInt(navigator.appVersion) < 9) {
		  	bIsGood = false;
			}
		} else {
			// Wenns der Explorer ist, dann sollte es mind. der 7er sein..
			if (navigator.appName.indexOf ("Explorer") != -1)	{ 
				if (parseInt(navigator.appVersion) > 3) {
					var a = navigator.appVersion.split("MSIE");
				  if (parseInt(a[1])<7) {
				  	bIsGood = false;
				  }
				}
			} // Explorer
		} // Opera
	} // Navigator

	return bIsGood;
}

function validateMailForm() {
	if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
		alert( "Bitte vergewissern Sie sich, dass alles ausgefllt ist." );
		document.emailForm.sendmail.value=0;
	} else {
	document.emailForm.action = "kontakt.php";
	/*document.emailForm.submit();*/
	}
}





/* **** Berechnungen fr den Felgenshopbereich :-) START ***** */

function recalcPriceWithSatz(price, $myObj, CartID, oldPrice){
	var newPrice;
	var newOldPrice;
	var multiplikator = 0;
	price = price.replace(',','.');
	//alert(oldPrice);
	if(oldPrice != null && oldPrice != 0 && oldPrice != ""){
		oldPrice = oldPrice.replace(',','.');
	}
	multiplikator = document.getElementById("subMitProdToCart_"+CartID).PAKET.value;
	if(multiplikator == null || multiplikator == 0 || multiplikator == ""){
		multiplikator = 1;
	}
	
	
	
	if(price != null || price != 0 || price != ""){
		newPrice = 	price*multiplikator;
		newOldPrice = oldPrice*multiplikator;
		
		if(newPrice != null || newPrice != 0 || newPrice != ""){
			
			if(newOldPrice != null && newOldPrice != 0 && newOldPrice != ""){
				document.getElementById("priceSpanOldPrice_"+CartID).innerHTML = _round(newOldPrice);
			}
			
			document.getElementById("priceSpan_"+CartID).innerHTML = _round(newPrice);
			document.getElementById("subMitProdToCart_"+CartID).qty.value = multiplikator;
		}
		
	}
	
}


function _round(x){
var e = Math.pow(10,2);
var k = (Math.round(x*e)/e).toString();
if(k.indexOf('.') == -1) k += '.';
k+=e.toString().substring(1);
return k.substring(0,k.indexOf('.')+3);
}

function calcNewPrice(fRimPrice,sCurrentSelectBox,sPriceTarget,fOrigRabatt,CartID){
	//alert ("DRIN");
    //alert(document.getElementById("wheelSizeList_"+CartID).disabled);
  //if(document.getElementById("wheelSizeList_"+CartID).disabled != true ){
  if( document.getElementById("subMitProdToCart_"+CartID).SelectedWheelnKomplettRPrice.value != "" ){
 	  
	  
		fRimPrice = fRimPrice.replace(',','.');
		//alert(fRimPrice);
		
		//var sTarget = ''+sCurrentSelectBox+'';
		//var sStr = document.getElementById(sTarget).options[document.getElementById(sTarget).selectedIndex].text;
		//sStr = sStr.substring((sStr.indexOf('(')+2),(sStr.indexOf(')')-2)  );
		
		var fNewPrice = _round(parseFloat(document.getElementById("subMitProdToCart_"+CartID).SelectedWheelnKomplettRPrice.value)+parseFloat(fRimPrice));
		
		//alert(fNewPrice);
		document.getElementById(sPriceTarget).innerHTML = fNewPrice;
		
		
		//alert ("OriginalPreis: "+fOrigRabatt);
		//fOrigRabatt = document.getElementById("priceSpanOldPrice_"+CartID).innerHTML;
		//alert("bermittelter RabattPreis"+fOrigRabatt);
		if(fOrigRabatt != 0 && fOrigRabatt != null){
			/*
			var sRabattTarget = sPriceTarget+"_rabatt";
			fOrigRabatt = fOrigRabatt.replace(',','.');
			var fOrigPriceRabatt = _round(parseFloat(fOrigRabatt) + parseFloat(sStr));
			document.getElementById(sRabattTarget).innerHTML = "<strike>"+fOrigPriceRabatt+"</strike>";
			*/
			//alert ("DRIN moduswchsel ....");
			///nIKOS Part
			var newRabattPreis = fOrigRabatt;
			if(newRabattPreis != null && newRabattPreis != 0 && newRabattPreis != ""){
				//alert ("Beginne Rabattpreisberechnung ....");
				newRabattPreis = newRabattPreis.replace(',','.');
				var fOrigPriceRabatt = _round(parseFloat(newRabattPreis) + parseFloat(document.getElementById("subMitProdToCart_"+CartID).SelectedWheelnKomplettRPrice.value));
				//alert ("Rabattpreisberechnung: "+fOrigPriceRabatt);
				document.getElementById("priceSpanOldPrice_"+CartID).innerHTML = fOrigPriceRabatt;
			}
			
			 recalcPriceWithSatz(fNewPrice, '', CartID, fOrigPriceRabatt);
		}else{
		
			recalcPriceWithSatz(fNewPrice, '', CartID, 0);
		
		}
  }

}


function calcNewPriceVariatns(fRimPrice,sCurrentSelectBox,sPriceTarget,fOrigRabatt,CartID){
  //alert(document.getElementById("wheelSizeList_"+CartID).disabled);

		fRimPrice = fRimPrice.replace(',','.');
		var sTarget = ''+sCurrentSelectBox+'';
		var sStr = document.getElementById(sTarget).options[document.getElementById(sTarget).selectedIndex].text;
		
		sStr = sStr.substring((sStr.indexOf('[')+1),(sStr.indexOf(']')-2)  );
		//alert(sStr);
		/*var fNewPrice = _round(parseFloat(sStr)+parseFloat(fRimPrice));*/
		fNewPrice = _round(parseFloat(sStr));
		//alert(fNewPrice);
		if(fNewPrice != "" && fNewPrice != 0 && fNewPrice != null && sStr != "" && sStr != 0 && sStr != null){
		  document.getElementById(sPriceTarget).innerHTML = fNewPrice;
		  document.getElementById("priceSpanMyNewVarPrefix_"+CartID).innerHTML = "";
		}
		
		if(fOrigRabatt != 0 && fOrigRabatt != null){
			//document.getElementById("priceSpanOldPrice_"+CartID).innerHTML = fOrigRabatt;
		}
		
		
}



function calcNewPriceVariatnsDetailPage(fRimPrice,sCurrentSelectBox,sPriceTarget,fOrigRabatt,CartID, art_no, M_art_no){
  //alert(document.getElementById("wheelSizeList_"+CartID).disabled);

		fRimPrice = fRimPrice.replace(',','.');
		var sTarget = ''+sCurrentSelectBox+'';
		var sStr = document.getElementById(sTarget).options[document.getElementById(sTarget).selectedIndex].text;
		var sStrNPEValue = document.getElementById(sTarget).options[document.getElementById(sTarget).selectedIndex].value;
		
		
		
		sStr = sStr.substring((sStr.indexOf('[')+1),(sStr.indexOf(']')-2)  );
		//alert(sStr);
		/*var fNewPrice = _round(parseFloat(sStr)+parseFloat(fRimPrice));*/
		fNewPrice = _round(parseFloat(sStr));
		//alert(fNewPrice);
		if(fNewPrice != "" && fNewPrice != 0 && fNewPrice != null && sStr != "" && sStr != 0 && sStr != null){
		  document.getElementById(sPriceTarget).innerHTML = fNewPrice;
		  document.getElementById("priceSpanMyNewVarPrefix_"+CartID).innerHTML = "";
		}
		
		if(fOrigRabatt != 0 && fOrigRabatt != null){
			//document.getElementById("priceSpanOldPrice_"+CartID).innerHTML = fOrigRabatt;
		}
		
		
		//GetNewArtNos
		
		
		//alert(sStrNPEValue+' / '+art_no+' / '+M_art_no);
		if(sStrNPEValue == ""){
			$('thisdtsartno').innerHTML = art_no;
			$('thisdtsartnoManu').innerHTML = M_art_no;
		}else{
			var requestUrl = "/content/php-bin/ACA/aca_ajaxfunctions.php";
			try{
				
				
				var request = new Ajax.Request(
								
								  requestUrl,
								  {
									
									 method:'post',
									 parameters: 'func=getNewArtNos&varNPE_id='+sStrNPEValue+'&dts_art_no='+art_no+'&m_art_no='+M_art_no,
									 onComplete: changeTheArtNosNow
								  }
							  );
			}
			catch(e){
				alert("Fehler: " + e.toString());	
			}
			
			
			
			
			//GetNewArtNosManu
			var requestUrl = "/content/php-bin/ACA/aca_ajaxfunctions.php";
			try{
				
				
				var request = new Ajax.Request(
								
								  requestUrl,
								  {
									
									 method:'post',
									 parameters: 'func=getNewArtNosManu&varNPE_id='+sStrNPEValue+'&dts_art_no='+art_no+'&m_art_no='+M_art_no,
									 onComplete: changeTheArtNosNowManu
								  }
							  );
			}
			catch(e){
				alert("Fehler: " + e.toString());	
			}
		
		}
}

function changeTheArtNosNow(response){
	
	try{
		$('thisdtsartno').innerHTML = response.responseText;
	}
	catch(e){
		alert("Fehler: " + e.toString());	
	}				
	
}

function changeTheArtNosNowManu(response){
	
	try{
		$('thisdtsartnoManu').innerHTML = response.responseText;
	}
	catch(e){
		alert("Fehler: " + e.toString());	
	}				
	
}





function changeETArtNos(sTarget, iB, artikelnr, m_art_no ){
	
		var sStr = document.getElementById(sTarget).options[document.getElementById(sTarget).selectedIndex].text;
		var sStrNPEValue = document.getElementById(sTarget).options[document.getElementById(sTarget).selectedIndex].value;
		
		
		//GetNewArtNos
		
		var requestUrl = "/content/php-bin/ACA/aca_ajaxfunctions.php";
		try{
			
			
			var request = new Ajax.Request(
							
							  requestUrl,
							  {
								
								 method:'post',
								 parameters: 'func=getNewArtNosETDTS&varNPE_id='+sStrNPEValue+'&artikelnr='+artikelnr+'&m_art_no='+m_art_no,
								 onComplete: changeTheArtNosNow
							  }
						  );
		}
		catch(e){
			alert("Fehler: " + e.toString());	
		}
		
		//GetNewArtNosManu
		var requestUrl = "/content/php-bin/ACA/aca_ajaxfunctions.php";
		try{
			
			
			var request = new Ajax.Request(
							
							  requestUrl,
							  {
								
								 method:'post',
								 parameters: 'func=getNewArtNosETMANU&varNPE_id='+sStrNPEValue+'&artikelnr='+artikelnr+'&m_art_no='+m_art_no,
								 onComplete: changeTheArtNosNowManu
							  }
						  );
		}
		catch(e){
			alert("Fehler: " + e.toString());	
		}
		
	
}





function resetPrice(fOrigPrice,fOrigRabatt,sPriceTarget, CartID){
	document.getElementById(sPriceTarget).innerHTML = fOrigPrice;
	if(fOrigRabatt != 0 && fOrigRabatt != null){
		//alert("DRIN"+ fOrigRabatt);
		//var sRabattTarget = sPriceTarget+"_rabatt";
		document.getElementById("priceSpanOldPrice_"+CartID).innerHTML = fOrigRabatt;
		recalcPriceWithSatz(fOrigPrice, '', CartID, fOrigRabatt);
	}
	recalcPriceWithSatz(fOrigPrice, '', CartID, 0);
}

function getRBValue(sFieldName){
var feld = document.getElementsByName(sFieldName);
for(i=0;i<feld.length;i++) {
if(feld[i].checked == true) {
return feld[i].value;
}}
}

function getSelectedWheelSize(rimOrWheel,wheelSizeList) { 
	var sWheelSize = '';
	var feld = document.getElementsByName(rimOrWheel);
	for(i=0;i<feld.length;i++) {
		if(feld[i].checked == true && feld[i].value == 'Komplettrad') {
			var sWS = document.getElementById(wheelSizeList).options[document.getElementById(wheelSizeList).selectedIndex].text;
			sWS = sWS.substring(0,sWS.indexOf('('));
			sWheelSize=' Reifen: '+sWS+' [sizeid:'+document.getElementById(wheelSizeList).options[document.getElementById(wheelSizeList).selectedIndex].value+']';
			return sWheelSize;
		}
	}
}

/* **** Berechnungen fr den Felgenshopbereich :-) Ende ***** */
			
			
			
function checkMyVariants_EN(CartID){
	
	if( document.getElementById("subMitProdToCart_"+CartID).var_idAid.value == "" ){
		alert(sAlertsVars_SelectVariant_EN);
		return false;
	}else if( document.getElementById("subMitProdToCart_"+CartID).lochkreiss.value == "" ){
		alert(sAlertsVars_SelectSrewHole_EN);
		return false;
	}else if( document.getElementById("subMitProdToCart_"+CartID).etiefe.value == "" ){
		alert(sAlertsVars_SelectWheelOffset_EN);
		return false;
	}else{
		document.getElementById("subMitProdToCart_"+CartID).submit();
		return true;	
	}
}			
			
			
			
function checkMyVariants(CartID){
	if( document.getElementById("subMitProdToCart_"+CartID).var_idAid.value == "" ){
		alert(sAlertsVars_SelectVariant_DE);
		return false;
	}else if( document.getElementById("subMitProdToCart_"+CartID).lochkreiss.value == "" ){
		alert(sAlertsVars_SelectSrewHole_DE);
		return false;
	}else if( document.getElementById("subMitProdToCart_"+CartID).etiefe.value == "" ){
		alert(sAlertsVars_SelectWheelOffset_DE);
		return false;
	}else{
		document.getElementById("subMitProdToCart_"+CartID).submit();
		return true;	
	}
	
}

function SubmitThisVarForm(CartID){
	document.getElementById("subMitProdToCart_"+CartID).submit();
	return true;	
}




function DoFlypageLink (FormID, PID){
	//if( document.getElementById("subMitProdToCart_"+FormID).var_idAid.value != "" && document.getElementById("subMitProdToCart_"+FormID).var_idAid.value != "noVariant" ){
	//	window.location.href = "/product_details.php?pid="+document.getElementById("subMitProdToCart_"+FormID).var_idAid.value;
	//	return false;
	//}else{
		window.location.href = "/product_details.php?pid="+PID;
		return false;
	//}
}



function getnKomplettRadSelection(list_id, prod_id, lang){
	//alert(document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelection.value);
	if( document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelection.value == "" ){
		if(lang=="germanf"){
			alert(sAlertsVars_SelectReifen_DE);
		}else{
			alert(sAlertsVars_SelectReifen_EN);
		}
	}else{
		
		//if( parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettRPrice.value != "" ){
		//	alert(parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettRPrice.value);
		//	resetPrice("fOrigPrice_"+list_id,"127.00","priceSpan_"+list_id, list_id);
		//}
		
		parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettR.value = document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelection.value;
		parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnKomplettRPrice.value = document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelectionPrice.value;
		
		parent.document.getElementById("nnKomplRSelection_"+list_id).innerHTML = document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelectionName.value;
		parent.document.getElementById("subMitProdToCart_"+list_id).rimOrWheelF_.checked = false;
		parent.document.getElementById("subMitProdToCart_"+list_id).rimOrWheelK_.checked = true;
		
		var myNewKomPlNNPrice;
		myNewKomPlNNPrice = parseFloat(parent.document.getElementById("subMitProdToCart_"+list_id).qty.value) * parseFloat(document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelectionPrice.value);
		myNewKomPlNNPrice = parseFloat(myNewKomPlNNPrice) + parseFloat(parent.document.getElementById("priceSpan_"+list_id).innerHTML);
		myNewKomPlNNPrice = _round(myNewKomPlNNPrice);
		parent.document.getElementById("priceSpan_"+list_id).innerHTML = myNewKomPlNNPrice;
		if( parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnOrigPriceOldPrice.value != "" ){
			var myNewKomPlNNPriceOld;
			myNewKomPlNNPriceOld = parseFloat(parent.document.getElementById("subMitProdToCart_"+list_id).qty.value) * parseFloat(document.getElementById("selectnYourKomplettRaD").nkmpl_HProfilSelectionPrice.value);
			myNewKomPlNNPriceOld = parseFloat(myNewKomPlNNPriceOld) + (parseFloat(parent.document.getElementById("subMitProdToCart_"+list_id).SelectedWheelnOrigPriceOldPrice.value)*parseFloat(parent.document.getElementById("subMitProdToCart_"+list_id).qty.value));
			myNewKomPlNNPriceOld = _round(myNewKomPlNNPriceOld);
			parent.document.getElementById("priceSpanOldPrice_"+list_id).innerHTML = myNewKomPlNNPriceOld;
		}
		
		
		with(parent.document.getElementById('htmlMain').style) { 
			overflow="auto"; 
		}
		with(parent.document.getElementById('pDShowKRMainDiv').style) { 
			visibility="hidden"; 
		} 
		with(parent.document.getElementById('pDShowKRSubDiv').style) { 
				visibility="hidden"; 
		}
	}
	
}


function calcAndShowRimmWheelPriceOnBox(list_id, prod_id, price){
	if(price!=""){
		var myNewKomPlNNPriceToShow;
		myNewKomPlNNPriceToShow = parseFloat(parent.document.getElementById("subMitProdToCart_"+list_id).qty.value) * parseFloat(price);
		myNewKomPlNNPriceToShow = _round(myNewKomPlNNPriceToShow);
		document.getElementById("showActualRimmWheelPrice").innerHTML = myNewKomPlNNPriceToShow;
	}
}
