function ChNodeBg(id, node_src)
	{
	if(node_id=document.getElementById(id))
		{node_id.style.background="url("+node_src+")";
		}
	}

function ChNodeSrc(id, nodeSrc)
	{
	if(node=getNode(id))
		{node.src=nodeSrc;}
	}

function chNodeSrc(id, nodeSrc)
	{
	if(node=getNode(id))
		{node.src=nodeSrc;}
	}

function chNodeHref(id, nodeSrc)
	{
	if(node=getNode(id))
		{node.href=nodeSrc;}
	}

function chNodeHeight(id, nodeHeight)
	{
	if(node=getNode(id))
		{node.height=nodeHeight;}
	}

function chNodeDisplay(id)
	{
	if(node=getNode(id))
		{
		if(node.style.display=="block")
			{node.style.display="none";}
		else
			{node.style.display="block";}
		}
	}







function hideFlash()
	{
	if(node=getNode("flash"))
		{node.style.display="none";}
	if(node=getNode("flash_open"))
		{node.style.display="block";}
	if(node=getNode("flash_close"))
		{node.style.display="none";}
	document.cookie="stfl=hide;path=/";
	}
function showFlash()
	{
	if(node=getNode("flash"))
		{node.style.display="block";}
	if(node=getNode("flash_open"))
		{node.style.display="none";}
	if(node=getNode("flash_close"))
		{node.style.display="block";}
	document.cookie="stfl=;path=/";
	}


function selAuto(idStr)
	{
	deselAutoCell(document.defoult_auto.cellname.value)

	selAutoCell(idStr);
	}

function deselAuto(idStr)
	{
	deselAutoCell(idStr)
	selAutoCell(document.defoult_auto.cellname.value)
	}


function selAutoCell(idStr)
	{
	var tId;
	if(tId=getNode("text_"+idStr))
		{tId.className="auto-menu-a";}
	if(tId=getNode("cell_"+idStr))
		{tId.className="auto-menu-ca";}
	ChNodeSrc("left_"+idStr,	url_img+"face/content/for_menu_active_left.gif");
	ChNodeSrc("right_"+idStr,	url_img+"face/content/for_menu_active_right.gif");
	}

function deselAutoCell(idStr)
	{
	var tId;
	if(tId=getNode("text_"+idStr))
		{tId.className="auto-menu-u";}
	if(tId=getNode("cell_"+idStr))
		{tId.className="auto-menu-cu";}
	ChNodeSrc("left_"+idStr,	url_img+"spacer.gif");
	ChNodeSrc("right_"+idStr,	url_img+"spacer.gif");
	}

function selLeftAutoCell(idStr)
	{
	ChNodeSrc("auto_menu_left_"+document.defoult_auto.cellname.value, url_img+"spacer.gif");
	ChNodeSrc("auto_menu_left_"+idStr, url_img+"face/content/s_menu_active.gif");
	}

function deselLeftAutoCell(idStr)
	{
	ChNodeSrc("auto_menu_left_"+idStr, url_img+"spacer.gif");
	ChNodeSrc("auto_menu_left_"+document.defoult_auto.cellname.value, url_img+"face/content/s_menu_active.gif");
	}

function selLeftMenu(idStr)
	{
	ChNodeSrc("auto_menu_left_"+document.defoult_auto.leftcellname.value, url_img+"spacer.gif");
	ChNodeSrc("auto_menu_left_"+idStr, url_img+"face/content/s_menu_active.gif");
	}

function deselLeftMenu(idStr)
	{
	ChNodeSrc("auto_menu_left_"+idStr, url_img+"spacer.gif");
	ChNodeSrc("auto_menu_left_"+document.defoult_auto.leftcellname.value, url_img+"face/content/s_menu_active.gif");
	}




function activate_color_text(current)
	{
	setTimeout("activateTimeOut_color_text('color_text_"+defoult_color+"', 'color_text_"+current+"');", 70);
	}

function deactivate_color_text(current)
	{
	setTimeout("deactivateTimeOut_color_text('color_text_"+defoult_color+"', 'color_text_"+current+"');", 70);
	}

function activateTimeOut_color_text(defoult, current)
	{
	if(nodeDeff=getNode(defoult))
		{nodeDeff.style.display="none";}

	if(nodeCurr=getNode(current))
		{nodeCurr.style.display="block";}
	}

function deactivateTimeOut_color_text(defoult, current)
	{
	if(nodeCurr=getNode(current))
		{nodeCurr.style.display="none";}

	if(nodeDeff=getNode(defoult))
		{nodeDeff.style.display="block";}
	}

function setDefoultColor(id)
	{
	defoult_color=id;
	ChNodeSrc("big_auto", url_img+"images/automobiles/"+id+"_skin.jpg");
	}


function changePhotogalleryBigPhoto(srcId)
	{
	var node;
	if(node=getNode(srcId))
		{
		var smallPath=node.src;
		var temp=smallPath.substr((smallPath.length-25), smallPath.length);
		var sqlId=temp.substr(0, 10);

		ChNodeSrc("photogallery_big_photo", url_img+'images/automobiles/'+sqlId+'_size500x300.jpg');
		if(node=getNode("photogallery_big_path"))
			{node.href=url_img+'images/automobiles/'+sqlId+'_size1200x720.jpg';}
		}
	}

function setBooklet(nom)
	{
	var nodeText, nodeImg;
	if(nodeText=getNode("booklet-text-"+nom))
		{
		nodeText.className="active-booklet";
		ChNodeSrc("booklet-img-"+nom, url_img+"content/automobiles/download_booklet.jpg");
		}
	}

function unsetBooklet(nom)
	{
	var nodeText, nodeImg;
	if(nodeText=getNode("booklet-text-"+nom))
		{
		nodeText.className="deactive-booklet";
		ChNodeSrc("booklet-img-"+nom, url_img+"spacer.gif");
		}
	}

function resizeAutoCellHigh(preId)
	{
	chNodeHeight('heightt_'+preId, '3');
	chNodeHeight('heightm_'+preId, '2');
	chNodeHeight('heightb_'+preId, '3');
	}

function resizeAutoCellLow(preId)
	{
	chNodeHeight('heightt_'+preId, '2');
	chNodeHeight('heightm_'+preId, '4');
	chNodeHeight('heightb_'+preId, '2');
	}


function changeConfiguratorAttribute(id)
	{
	if(nodeChecbox=getNode("idnom_"+id))
		{
		if(nodeChecbox.checked==true)
			{nodeChecbox.checked=false;}
		else
			{nodeChecbox.checked=true;}

		if(nodeImage=getNode("conf_image_"+id))
			{
			if(nodeChecbox.checked)
				{nodeImage.src=url_img+"content/configurator/set_active.gif";}
			else
				{nodeImage.src=url_img+"content/configurator/unset_active.gif";}
			}
		countConfigPrice();
		}
	}

function setConfImgSrc(id)
	{
	if(nodeForm=getNode("idnom_"+id))
		{
		if(nodeForm.checked)
			{nodeType="set";}
		else
			{nodeType="unset";}

		if(nodeType=="set")
			{ChNodeSrc("conf_image_"+id, url_img+"content/configurator/set_active.gif");}
		else if(nodeType=="unset")
			{ChNodeSrc("conf_image_"+id, url_img+"content/configurator/unset_active.gif");}
		}
	}

function unsetConfImgSrc(id)
	{
	if(nodeForm=getNode("idnom_"+id))
		{
		if(nodeForm.checked)
			{nodeType="set";}
		else
			{nodeType="unset";}

		if(nodeType=="set")
			{ChNodeSrc("conf_image_"+id, url_img+"content/configurator/set.gif");}
		else if(nodeType=="unset")
			{ChNodeSrc("conf_image_"+id, url_img+"content/configurator/unset.gif");}
		}
	}

function activate_sitemap(id)
	{
	ChNodeSrc("sitemap_left_"+id, url_img+'content/sitemap/left.jpg');
	ChNodeSrc("sitemap_right_"+id, url_img+'content/sitemap/right.jpg');
	if(node=getNode("sitemap_ext_"+id))
		{node.style.background='url('+url_img+'content/sitemap/ext.jpg) repeat-x';}
	if(node=getNode("sitemap_text_"+id))
		{node.className='active-sitemap';}
	}
function deactivate_sitemap(id)
	{
	ChNodeSrc("sitemap_left_"+id, url_img+'spacer.gif');
	ChNodeSrc("sitemap_right_"+id, url_img+'spacer.gif');
	if(node=getNode("sitemap_ext_"+id))
		{node.style.background='url('+url_img+'spacer.gif)';}
	if(node=getNode("sitemap_text_"+id))
		{node.className='deactive-sitemap';}
	}

function activate_auto_menu(id)
	{
	if(node=getNode("automobiles_"+defoult_auto_menu))
		{node.src=url_img+"face/content/automobiles/"+defoult_auto_menu+"_unactive.gif"}
	if(node=getNode("automobiles_"+id))
		{node.src=url_img+"face/content/automobiles/"+id+"_active.gif"}
	}

function deactivate_auto_menu(id)
	{
	if(node=getNode("automobiles_"+id))
		{node.src=url_img+"face/content/automobiles/"+id+"_unactive.gif"}
	if(node=getNode("automobiles_"+defoult_auto_menu))
		{node.src=url_img+"face/content/automobiles/"+defoult_auto_menu+"_active.gif"}
	}
