// JavaScript Document

function changePicture(id, imageName){
	
	document.getElementById(id).src = imageName;
	
}

function dmxAdvLayerPopup(sTitle,sURL,sPopupName,sContent,sClass,nPositionLeft,nPositionRight,nWidth,nHeight,nAutoCloseTime,bDragable,bResizable,bOverlay,nOverlayOpacity,sIncomingEffect,sIncomingEffectEasing,nIncomingEffectDuration,bFadeIn,sOutgoingEffect,sOutgoingEffectEasing,nOutgoingEffectDuration,bFadeOut,sSlideEffect,nEffectTime,nSlideTime,bClosable,bWireframe,bgContentColor) { // v1.05
  var aURL, aSlides = sURL.split('|');
  if (aSlides && aSlides.length > 1) {
    aURL = [];
    for (var si=0;si<aSlides.length;si++) {
      var cf=aSlides[si],nW='',nH='',nS='';
      if (cf.substr(cf.length-1,1)==']') {
        var bd=cf.lastIndexOf('[');
        if(bd>0){
          var di=cf.substring(bd+1,cf.length-1);
          var da=di.split('x');
          nW=da[0];nH=da[1];
          if (da.length==3) nS=da[2];
          cf=cf.substring(0,bd)
        }   
      }      
      aURL[si] = new Object();
      aURL[si].src = cf;
      aURL[si].nWidth = (nW!=''?nW:nWidth);
      aURL[si].nHeight = (nH!=''?nH:nHeight);
      aURL[si].nDelay = (nS!=''?nS:nSlideTime);
    }  
  } else aURL = sURL;
  if (!cDMXPopupWindow) {
  	alert('The Advanced Layer Popup script is missing on your website!\nPlease upload the file ScriptLibrary/advLayerPopup.js to your live server.');
  } else {
    if (sClass == 'OS_Look') sClass = (navigator.userAgent.toLowerCase().indexOf('mac')!=-1?'dmxOSX':'dmxXP');  
    cDMXPopupWindow.buildWindow({sTitle: sTitle, sURL: aURL, sPopupName: sPopupName, sContent: sContent, sClass: sClass, aPosition: [nPositionLeft,nPositionRight], aSize: [nWidth,nHeight], nCloseDelay: nAutoCloseTime, bDragable: bDragable, bResizable: bResizable, bOverlay: bOverlay, nOverlayOpacity: nOverlayOpacity, sStartPosition: sIncomingEffect, sStartShowEffect: sIncomingEffectEasing, nIncomingEffectDuration: nIncomingEffectDuration, bFadeIn: bFadeIn, sEndPosition: sOutgoingEffect, sEndShowEffect: sOutgoingEffectEasing, nOutgoingEffectDuration: nOutgoingEffectDuration, bFadeOut: bFadeOut, sSlideEffect: sSlideEffect, nEffectTime: nEffectTime, nSlideTime: nSlideTime, bClosable: bClosable, bWireframe: bWireframe, sContentBgColor: bgContentColor });
  }  
  document.MM_returnValue = false;
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

	function thumbnailsColors(SmallCars){
		
		SmallCars.style.borderColor = '#00ADEF';
		SmallCars.style.borderStyle = 'solid';
		SmallCars.style.borderWidth = '1px';
		SmallCars.style.paddingTop = '2px';
		
	}
	
	function revertThumbnailsColors(SmallCars){
		
		SmallCars.style.borderColor = '';
		SmallCars.style.borderStyle = '';
		SmallCars.style.borderWidth = '';
		SmallCars.style.paddingTop = '2px';
		
	}
	
