// JavaScript Document

function AjaxRequest(requestType, targetUrl, parameters, resultDiv, startFunc, endFunc, errorFunc, repeatCount){
	if (!repeatCount && repeatCount != 0) repeatCount=2;
	if (startFunc) startFunc();
   $.ajax({
      type: requestType,
      url: targetUrl,
      timeout: 5000, 
      data: parameters,
      contentType: "application/x-www-form-urlencoded",
      dataType: "html",
      success: function(response) {
         $('#'+resultDiv).html(response);
         if (endFunc) endFunc();
      },
			error: function( objAJAXRequest, strError ){
//				if (strError == 'timeout'){
					if (repeatCount < 0){
						if (errorFunc) errorFunc(parameters);
					}else{
						AjaxRequest(requestType, targetUrl, parameters, resultDiv, startFunc, endFunc, errorFunc, --repeatCount);
					}
//				}else{
//					alert(strError);
//				}
			}
   });
 }


function jQueryAjaxPost(targeturl,parameters,resultdiv){
   $.ajax({
      type: "POST",
      url: targeturl,
      data: parameters,
      contentType: "application/x-www-form-urlencoded",
      dataType: "html",
      success: function(response) {
         $('#'+resultdiv).html(response);
      }
   });
}
function jQueryAjaxGet(targeturl,parameters,resultdiv){
   $.ajax({
      type: "GET",
      url: "../code/navigate.php",
      data: parameters,
      contentType: "application/x-www-form-urlencoded",
      dataType: "html",
      success: function(response) {
         $('#'+resultdiv).html(response);
      }
   });
}

function preinit()
 {
 	x=document.location.href;
  if (document.location.search.indexOf("MIT") >0 || document.location.href.indexOf("mit.de") > 0) 
       return true;
 	if (x.indexOf("/marine/") >0 || x.indexOf("/garden/") >0 || x.indexOf("/garten/") >0  || x.indexOf("/industrie/") >0  || x.indexOf("/industry/") >0) 
 	 return false;
 	return true;
}

function init() {
	if (!(self.isLoaded))
	 {
	  is = new getClient();
	  if (preinit()==false)
	   {
		for (var i=0; i<document.images.length; i++) {
   		document.images[i].oncontextmenu = function() {return false;};
		  document.images[i].galleryimg = 'no';
   	}
   }
   	self.isLoaded = true;
   }
}
var is = null;
init();

function getClient() {
  // convert all characters to lowercase to simplify testing
  var agt=navigator.userAgent.toLowerCase()
  var apv=navigator.appVersion.toLowerCase()
  this.major = parseInt(navigator.appVersion)
  this.minor = parseFloat(navigator.appVersion)
  // browserversion
  this.opera = (agt.indexOf('opera')!=-1);
  this.ns  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)))
  this.ns4 = (this.ns && (this.minor >= 4.03) && (this.major < 5))
  this.ns6 = (this.ns && (this.major == 5) || this.opera)
  this.gecko = (this.ns && (this.major >= 5))
  this.ie   = (agt.indexOf("msie") != -1)
  this.ie4  = (this.ie && (this.major == 3))
  this.ie45 = (agt.indexOf('msie 4.5') != -1);
  this.ie5  = (this.ie && (this.major == 4))
  // platform
  this.mac = (apv.indexOf("macintosh")>0);
  this.win = (apv.indexOf("win")>0);	
  // compatible browsers
  this.ie4comp = ((this.ie4 && !this.mac) || this.ie45 || this.ie5)
  this.ns4comp = (this.ns4);
  this.ns6comp = (this.gecko || this.ns6);
  this.comp = (this.ie4comp || this.ns4comp || this.ns6comp);
  return (this)
}

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();
// alert(BrowserDetect.dataBrowser);
var myLocation = self.location.toString().split("?");
if(typeof myLocation[1] != "undefined"){
   myLocation = "shop.php?"+myLocation[1].replace( /#.*$/, "");
   myLocation = myLocation.replace( /&/, "&amp;");
} else {
   myLocation = "";
}
 
var max_page_height = 700;
var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
               && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
               && (agt.indexOf('webtv')==-1));
var is_major = parseInt(navigator.appVersion);
var is_opera = (agt.indexOf("opera") != -1);
var not_nav6 = (is_nav && (is_major < 5));
var isNN=(navigator.appName=="Netscape");

var is_opera7 = (is_opera && agt.indexOf("7.")!=-1);
var is_opera6 = (is_opera && !is_opera7);

if(!document.getElementById){
	if(eval){
	   document.getElementById = eval
	}
}
 
var isIE = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
if(isIE){
   var url = "style/shopIE.css"
   var e = document.createElement("link");
   e.href = url;
   e.rel="stylesheet";
   e.type="text/css";
   document.getElementsByTagName("head")[0].appendChild(e);
}

var my_width;
var my_height;
function initWindow()
{
   detect_width();
   detect_height();
}
 
function detect_width()
{/*   version 1.4.0.00 */
	if(isNN){
		if(not_nav6){
			my_width=window.innerWidth+5;
		}else{
			my_width=window.innerWidth;
		}
	}else if(is_opera){
		my_width=window.innerWidth;
	}else{
		my_width=document.body.clientWidth;
	}
}
function detect_height()
{/*   version 1.4.0.00 */
	if(isNN){
		if(not_nav6){
			my_height=window.innerHeight+5;
		}else{
			my_height=window.innerHeight;
		}
	}else if(is_opera){
		my_height=window.innerHeight;
	}else{
		my_height=document.body.clientHeight;
	}
}

// window.onresize = initWindow();
// window.onerror = handle_error
var msg_array = new Array()
var url_array = new Array()
var lno_array = new Array()

function handle_error(msg,url,lno)
{/*   version 1.4.0.01 */
   msg_array[msg_array.length] = msg
   url_array[url_array.length] = url
   lno_array[lno_array.length] = lno
   pom = "*** Mssg No. : "+msg_array.length
   pom+= (lno_array.length>0) ? " (ln:"+lno_array[0]+")" : ""
   window.status = pom
   return true
}

function ShowHideDetails(what)
{
   myVisibility = document.getElementById(what).style.display;
   if(myVisibility == "none"){
      document.getElementById(what).style.display = "";
   } else {
      document.getElementById(what).style.display = "none";
   }
}

function CatsMenuOver(obj,level){
   var leftPos = "145px";
   if(!level){
      if(BrowserDetect.browser=="Firefox" || BrowserDetect.browser=="Netscape" || BrowserDetect.browser=="Mozilla"){
         leftPos = Math.round((my_width-940)/2+175)+"px";
      }else{
         leftPos = "185px";
      }
   }
   if(obj.getElementsByTagName('table')[0]){
      obj.getElementsByTagName('table')[0].style.left = leftPos;
      obj.getElementsByTagName('table')[0].style.display='block';
   }
//    if(CatsMenuActiveID != CurrActive){
//       document.getElementById('CatsMenu'+MenuID).className = "CatsMenuClassOver";
//    }
}
function CatsMenuOut(obj,level){
//    var leftPos = "180px";
//    if(BrowserDetect.browser=="Firefox" || BrowserDetect.browser=="Netscape" || BrowserDetect.browser=="Mozilla"){
//       if(!level){
//          leftPos = Math.round((my_width-940)/2+180)+"px";
//       }
//    }
   if(obj.getElementsByTagName('table')[0]){
//       obj.getElementsByTagName('table')[0].style.left = leftPos;
      obj.getElementsByTagName('table')[0].style.display='none';
   }
//    if(CurrActive != -1 && CatsMenuActiveID != CurrActive){
//       document.getElementById('CatsMenu'+CurrActive).className = "CatsMenuClass";
//    }
}
function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}

function getOnMouseOverForFlash(movieName){
   var flashMovie=getFlashMovieObject(movieName);
//    alert(flashMovie);
//    alert(flashMovie.cc.onRollOver());
}
// --------------------------------------------------------------------------------------------------
// Get Querystring Parameters

function getQueryStringParams() {
    GetParams = new Array();
    if (document.location.search) {
        QueryString = unescape(document.location.search.substring(1,document.location.search.length));
        KeyValuePairs = QueryString.split("&");
        for (i=0; i< KeyValuePairs.length; i++) {
            Param = KeyValuePairs[i].split("=");
            GetParams[Param[0]] = Param[1];
        }
    }
    return GetParams;
}


// --------------------------------------------------------------------
// Select randomly an Image out of an Array
// and change source of image tag

var currImageArrayIdx = 0;
var MainImageLoaded = false;

function showRandomImage(imageArray, imageId) {
    if (imageArray.length > 1) {
        if (document.getElementById) {
            var idx = Math.ceil(Math.random()*imageArray.length) - 1;
            while (idx == currImageArrayIdx) {
                idx = Math.ceil(Math.random()*imageArray.length) - 1;
            }
            currImageArrayIdx = idx;
        }
     	sn=imageArray[currImageArrayIdx];
    	if(sn.length>0 && sn.indexOf(".swf")<0) {
    		if(document.getElementById(imageId))
         document.getElementById(imageId).src = imageArray[idx];
      }
      else
      	{
      		 showRandomImage(imageArray, imageId);
      	}
    }
}


// --------------------------------------------------------------------
// Set Loading Status of MainImage
var random=1;
function setMainImageLoadState() {
	fname=(random==1) ? "Random":"Next";
    window.setTimeout("show"+fname+"Image(homeImages, 'MainImage')", 4500);
}

// --------------------------------------------------------------------
// Select next Image not Randomized 
function showNextImage(imageArray, imageId) {
    if (imageArray.length > 1) {
    	currImageArrayIdx =(currImageArrayIdx < (imageArray.length-1)) ? currImageArrayIdx+1:0;
    	sn=imageArray[currImageArrayIdx];
    	if(sn.length>0 && sn.indexOf(".swf")<0 ) {
        document.getElementById(imageId).src = imageArray[currImageArrayIdx];
      }
      else {
      	 showNextImage(imageArray, imageId);
      }
    }
}

var http_request = false;
function ReplaceLoadingTable(LoadingDiv,tekst) {
   if(document.getElementById(LoadingDiv)){
      document.getElementById(LoadingDiv).innerHTML = tekst;
      document.getElementById(LoadingDiv).style.display = "block";
   }
}
function makePOSTRequest(url, parameters, resultdiv) {
   http_request = false;
   if (window.XMLHttpRequest) { // Mozilla, Safari,...
      http_request = new XMLHttpRequest();
      if (http_request.overrideMimeType) {
      	// set type accordingly to anticipated content type
         //http_request.overrideMimeType('text/xml');
         http_request.overrideMimeType('text/html');
      }
   } else if (window.ActiveXObject) { // IE
      try {
         http_request = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
         try {
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
         } catch (e) {}
      }
   }
//    alert(http_request);
   if (!http_request) {
      alert('Cannot create XMLHTTP instance');
      return false;
   }
   
   http_request.onreadystatechange = function() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById(resultdiv).innerHTML = result;
         } else {
            alert('There was a problem with the request.');
         }
      }
   }
   http_request.open('POST', url, true);
   http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   http_request.setRequestHeader("Content-length", parameters.length);
   http_request.setRequestHeader("Connection", "close");
   http_request.send(parameters);
}


function openImageZoomWindow(imgURL,imgWidth,imgHeight){
   tmpStr = 'width='+(imgWidth + 30)+',height='+(imgHeight+50);
   tmpStr = 'toolbar=no,location=no,diretories=no,scrollbars=yes,status=no,menubar=no,resizable=yes,'+tmpStr;
   ImageZoomWindow = window.open(imgURL,'ImageZoomWindow',tmpStr);
   ImageZoomWindow.focus();
}
/*


// --------------------------------------------------------------------
// Set/Unset Colorcubes / Accessories Icons

var currentCubeContent = "&nbsp;"

function setCube(id, text) {
    if (document.getElementById) {
        if (document.getElementById("Cube"+id)) {
            currentCubeContent =  document.getElementById("Caption").innerHTML;
            document.getElementById("Caption").innerHTML = text;
        }
    }
}

function unsetCube(id, text) {
    if (document.getElementById) {
        if (document.getElementById("Cube"+id)) {
            document.getElementById("Caption").innerHTML = currentCubeContent;
        }
    }
}

function setThumb() {
    if (document.getElementById) {
        if (document.getElementById("Caption")) {
            document.getElementById("Caption").innerHTML = "";
        }
    }
}

function unsetThumb() {
    if (document.getElementById) {
        if (document.getElementById("Caption")) {
            document.getElementById("Caption").innerHTML = "";
        }
    }
}

// --------------------------------------------------------------------
// Show/Hide Tooltip

function showTooltip(evt, id) {

	var x, y;
	e = evt || window.event;
	if (!e) return null;

	if (webclient.ns4) {
		x = e.pageX;
		y = e.pageY;
	} else if (webclient.op) {
		x = e.clientX;
		y = e.clientY;
	} else if (webclient.ie) {
		x = e.x + document.body.scrollLeft;
		y = e.y + document.body.scrollTop;
	} else if (webclient.moz5) {
		x = e.pageX;
		y = e.pageY;
	}

	obj = MM_findObj(id);
	//status = obj + " at position " + x + "/" + y;
	if (obj) {
		if (webclient.ns4) {
			obj.left = x - obj.document.width - 5;
			obj.top  = y - obj.document.height - 5;
			//obj.style.top = (obj.style.top < 380) ? 380 : obj.style.top;
			obj.visibility = 'visible';
		}  else if (webclient.ie || webclient.moz5) {
			x = x - obj.offsetWidth - 5;
			y = y - obj.offsetHeight - 5;
			//y = (y < 380) ? 380 : y;
			if (webclient.ie && webclient.mac) {
				x = x + 'px';
				y = y + 'px';
			}
			//obj.style.left = x;
			obj.style.top  = y;
			obj.style.visibility = 'visible';
		} else if (webclient.op){
        	//obj.style.left = x - obj.style.pixelWidth - 5;
			obj.style.top  = y - obj.style.pixelHeight - 5;
			//obj.style.top = (obj.style.top < 380) ? 380 : obj.style.top;
			obj.style.visibility = 'visible';
		} else {
			//obj.style.left = x - 220;
			obj.style.top  = 380;
			obj.style.visibility = 'visible';
    	}
	}
}

function hideTooltip(id) {
	MM_showHideLayers(id, '', 'hide');
}


// --------------------------------------------------------------------------------------------------
// Function to open popup window for used motorcycles

function showUsedMCs(destUrl) {

	dUrl =(showUsedMCs.arguments.length >0) ?  destUrl:"/redirs/used_mcs.html";
	FE = window.open(dUrl,"usedMCs","width=665,height=580,screenX=5,screenY=5,locationbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,scrolling=auto");
}



// --------------------------------------------------------------------------------------------------
// Common function to open a popup window

var xwin=null;

function closeWindow() {

  if (xwin.closed==false)
     {
      xwin.close();
      xwin=null;
     };

}

// this function is used by imageshuffle.swf
	function openNewWindow(URLtoOpen,windowName, windowFeatures) {
		newWindow=window.open(URLtoOpen, windowName, windowFeatures);
	}
// end of imageshuffle.swf-window

function openWindow(destination, windowname, xsize, ysize, scrolling,res) {

	if (xwin != null) { closeWindow(); }
	if (res==''  || res==null) {
		res="no";
	}
	 

 	if (webclient.moz5) {
 		res="yes";
 		newx = xsize + 0;
  		newy = ysize + 0;
  	} else {
  		newx = xsize;
  		newy = ysize;
  	}

  	scrollflag = scrolling;

  	if (parseInt(navigator.appVersion) >= 4.0) {
  		POSX = (screen.availWidth-newx)/2;
    	POSY = (screen.availHeight-newy)/2;
 	} else {
  		POSX = 0;
  		POSY = 0;
  	}

	fstring ='toolbar=no,locationbar=no,directories=no,status=no,menubar=no,scrollbars=' + scrollflag + ',resizable='+res+',screenX='+POSX+',screenY='+POSY+',width='+newx + ',height='+newy;
	xwin = window.open(destination,windowname,fstring);

	if (navigator.appName != 'Netscape' && xwin != null ) {
   		xwin.focus();
   		xwin.moveTo((screen.availWidth-newx)/2,(screen.availHeight-newy)/2);
   		//xwin.resizeTo(newx,newy);
   	} else {
   		if (xwin)
   		  xwin.focus();
   	}

	if (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) >= 4.0 && parseInt(navigator.appVersion) < 5.0)
   		if (xwin)
   		  xwin.resizeTo(newx,newy);
	if (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) >= 5.0)
   		if (xwin)
   		  xwin.focus();
}

// --------------------------------------------------------------------------------------------------
// Function to open popup window for automatic generated pdf
function openPrintPDF(newurl)
{
  pdfwin = window.open(newurl,'pdfwin','toolbar=no,locationbar=no,directories=no,status=no,menubar=yes,scrollbars=auto,resizable=yes,width=600,height=400');
}


// --------------------------------------------------------------------------------------------------
// Function to open popup window for a enlarged view on an image

var xwin=null;

function showImage(imgName,newx,newy,ScreenX,ScreenY) {

 	picture = imgName.substring(0,imgName.length-6) + '_l.jpg'

	POSX = 400;
	POSY = 0;

	newx += 20;
	newy += 65;

	if (ScreenX == -1) {
  		if (parseInt(navigator.appVersion) >=4.0) {
    		POSX = (screen.availWidth-newx)/2;
    		POSY = (screen.availHeight-newy)/2;
    	} else {
    		POSX = 0;
    		POSY = 0;
    	}
	} else {
		if ((ScreenX != null) && (ScreenY != null)) {
			POSX = ScreenX;
			POSY = ScreenY;
		}
	}


  	if (xwin != null && navigator.appName !='Netscape') {
  		xwin.close();
  		xwin = null;
  	}

	if (xwin != null  && navigator.appName =='Netscape')
  		if (xwin.closed == false) {
      		xwin.location.href=picture;
      		xwin.resizeTo(newx,newy);
      		xwin.focus();
      		return;
     	}

	fstring ='toolbar=no,locationbar=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,screenX='+POSX +',screenY='+POSY +',width='+newx + ',height='+newy;

	xwin=window.open(picture,'projector',fstring);

	if (navigator.appName !='Netscape' && xwin != null ) {
   		xwin.moveTo(POSX,POSY);
   		xwin.resizeTo(newx,newy);
	} else {
		xwin.focus();
	}

	if (navigator.appName =='Netscape')
   		xwin.resizeTo(newx,newy);
    xwin.focus();
	return;
}

//-----------------------------------------------------------
// functions for servicelinks in upper left box

function productInquiry(targetURL, model) {
    document.location.href = targetURL + "?model=" + escape(model);
}

function getTestdrive() {
    obj=MM_findObj("testdriveform");
	if (obj) {
	  obj.submit();
	 }
}

function getBrochure() {
	obj=MM_findObj("brochureform");
	if (obj) {
	  obj.submit();
	}
}

function getRequest() {
	obj=MM_findObj("contactform");
	if (obj) {
	  obj.submit();
	}
}

// ----------------------------------------------------------
// Call Search for Rent- and Testdrive-Vehicles

function searchDRVehicles(type, model_id) {
    document.RentDemoForm.model_id.value = model_id;
    document.RentDemoForm.type.value = type;
    document.RentDemoForm.submit();
}

// ----------------------------------------------------------
// Open History PopUp

function openHistory() {
    void(window.open('/specials/company/history/index.html','History','width=790,height=500,left=0,top=0'));
}

// ----------------------------------------------------------
// Open FaqMC

function FaqMC(nr) {
	 openWindow('/content/service/mc/'+nr+'.html','faqpopup',510,400,'yes');
}

// ----------------------------------------------------------
// Open FaqCAR

function FaqCAR(nr) {
	 openWindow('/content/service/car/'+nr+'.html','faqpopup',510,400,'yes');
}

// ----------------------------------------------------------
// Open Jobs PopUp

function openJobs() {
    void(window.open('/redirs/jobs.html','Jobs','width=810,height=500,left=0,top=0'));
}

// ----------------------------------------------------------
// Replace Location on Quickfinder change
var executedQuickfinder=false;
function execQuickfinder(dest) {
	executedQuickfinder=true;
    if ((dest != "") && (dest.indexOf("@@") == -1)) {
        document.location.href = dest;
    } else {
        UrlTargetPair = dest.split("@@");
        if (UrlTargetPair.length == 2) {
            if (UrlTargetPair[0] != "") {
                if (UrlTargetPair[1] == "_blank") {
                    window.open(UrlTargetPair[0]);
                } else {
                    document.location.href = UrlTargetPair[0];
                }
            }
        }
    }
}

// --------------------------------------------------------------------------------------------------
// Open Car Special "Civic 2004"




// ----------------------------------------------------------
// capture context menu and forget

 function contMen(E) { 	init();}

 document.oncontextmenu = contMen;


// --------------------------------------------------------------------------------------------------
// Open allgemeines, zentriertes Popup, z.B. KKonfigurator


function popup(URL,popupname,b,h,scrollbars) {
	var PopUpName = popupname || 'PopUp';
	var breite = b || 410;
	var hoehe = h || 450;
	var ScrollBars = scrollbars || 'auto';
	var xPos = (screen.availWidth - breite) / 2
	var yPos = (screen.availHeight - hoehe ) / 2
	window.open(URL,PopUpName,'width='+breite+',height='+hoehe+',scrollbars='+ScrollBars+',toolbar=no,menubar=no,screenX='+xPos+',screenY='+yPos+',left='+xPos+',top='+yPos);
}
*/
