﻿function subitemon(afbeeldingid){
	document.getElementById(afbeeldingid).src = "../images/subnav_mainitemon.jpg";
}
function subitemoff(afbeeldingid){
	document.getElementById(afbeeldingid).src = "../images/subnav_mainitem.jpg";
}
function subsubitemon(subafbeelding){
	document.getElementById(subafbeelding).src = "../images/subnav_subitemon.jpg";
}
function subsubitemoff(subafbeelding){
	document.getElementById(subafbeelding).src = "../images/subnav_subitem.jpg";
}
function subsubitemoffbrown(subafbeelding){
	document.getElementById(subafbeelding).src = "../images/subnav_subitembrown.jpg";
}
function headmenuon(headafbeelding){
	var originalSource = document.getElementById(headafbeelding).src;
	if (originalSource.indexOf("_on_") <= 0){
		var newSource = originalSource.replace("_eng_","_eng_on_");	
		document.getElementById(headafbeelding).src = newSource;
	}
}
function headmenuoff(headafbeelding){
	if (document.getElementById(headafbeelding).name == "nietaangezet"){
		var originalSource = document.getElementById(headafbeelding).src;
		var newSource = originalSource.replace("_eng_on_","_eng_");	
		document.getElementById(headafbeelding).src = newSource;
	}
}
function ShowAirLayer(divsubject){
	document.getElementById("airlayer").style.display = "block";
	if (divsubject == "social"){
		document.getElementById("tekstdivke").innerHTML = "<table border='0' cellpadding='0' cellspacing='0' width='367'><tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td class='tekst'><p class='themetitle'>Social</p><p style='font-size:12px;'><strong class='smallredtitle'>TOP-25 (pan-European)</strong><br /><strong><img width='145' align='right' vspace='4' hspace='4' height='109' src='../images/breathe/social_1.gif' /></strong>Toyota Motor Europe became one of the funding partners of TOP-25 in 2006, a European non-profit road safety association. TOP-25&rsquo;s aim is to promote  responsible driving among young people by using fun interactive tools like<br />the AlcoKart &ndash; a driving simulator equipped with an on-board computer  simulating the experience of driving under the influence of drugs or alcohol.<br />TOP-25 has organised events  throughout Europe, allowing thousands of  participants to experience the AlcoKart. The dangers to the motorist of driving  under the influence are demonstrated in a very real way. For further details see: <a class='tekst' style='font-size:12px;' href='http://www.top-25.eu' target='_blank'>http://www.top-25.eu</a></p><p><strong class='smallredtitle'>Environment &amp; Innovation: Eco-Schools (pan-European)</strong><br /><img src='../images/breathe/social_2.gif' alt='Foundation Environmental Education' width='102' align='right' height='152' />Toyota Motor Europe (TME) and Eco-Schools  International Programme have launched a new European competition, challenging  schools to come up with creative ideas to reduce energy consumption within  their local communities.&nbsp; National juries  in six European countries will award a total of &euro;120,000 in grants to the most  innovative proposals, giving students the opportunity to turn their ideas into  a working community project.&nbsp; One school  in each country will be crowned the National Winner for the best use of their  grant, and short-listed for the pan-European title.<strong><img width='145' height='136' src='../images/breathe/imagesclip_image002.gif' align='right' vspace='4' hspace='4' /></strong> The competition will target  up to 300,000 students from around 1,800 schools in Italy,  Norway, Finland, Denmark,  Turkey and Portugal.&nbsp; </p><p>The theme of the 2007-2009 competition is Climate  Change &ndash; Let&rsquo;s Save Energy! It is the second time Toyota has hosted a competition as part of  the Eco-Schools&rsquo; Environment and Innovation Project, which encourages students  to identify and tackle environmental problems in partnership with their school  and community.</p><p>The Toyota Fund for Europe  (TFfE) and Eco-Schools, an international programme of the Foundation for  Environmental Education (FEE), have been working together since 2005. The  Environment and Innovation Project was originally launched as a pilot programme  to promote innovative thinking and environmental education in schools across Europe.</p></td></tr></table></td></tr></table>";
	}
	if (divsubject == "economic"){
		document.getElementById("tekstdivke").innerHTML = "<table border='0' cellpadding='0' cellspacing='0' width='367'><tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td class='tekst'><p class='themetitle'>Economic</p><p style='font-size:12px;'><img align='right' vspace='4' hspace='4' width='145' height='80' src='../images/breathe/economic_1.gif' />Toyota first began selling cars in Europe under an official distributor agreement in 1963. Since then, the company has matured into the leading Japanese automaker in this highly competitive market.</p><p><img width='145' vspace='4' hspace='4' height='77' src='../images/breathe/economic_2.gif' align='right' /><strong class='smallredtitle'>Toyota Technical Education Program (T-TEP)</strong><br />High-quality technical education in Europe is of great importance to Toyota. It is also, as expressed by the European Commission, a pressing social need in Europe as a whole. That is why Toyota Motor Europe has been putting even more emphasis on strengthening its relations with technical and vocational schools in Europe. </p><p>The Toyota Technical Education Program (T-TEP) is a worldwide support program through which Toyota promotes and supports technical education by entering into long-term partnerships with technical education institutions.Toyota provides support materials such as simulators, cutaway components, technical documentation and vehicles, as well as providing teachers at these institutions with training in the latest automotive technology and by promoting vehicle technician professions through various activities.</p><p>Theses partnerships are initiated and established at a local level by Toyota&rsquo;s national distributors (NMSC&rsquo;s) in collaboration with local Authorized Repairers (AR&rsquo;s). Students in T-TEP institutions with apprenticeship programs can be placed at local AR&rsquo;s where they receive on-the-job training.<br />Throughout Europe, NMSC&rsquo;s and local dealers in 23 countries continue to support over 220 schools. Seven more schools joined the network in 2007.</p></td></tr></table></td></tr></table>";
	}
	if (divsubject == "environment"){
		document.getElementById("tekstdivke").innerHTML = "<table border='0' cellpadding='0' cellspacing='0' width='367'><tr><td><table border='0' cellpadding='0' cellspacing='0'><tr><td class='tekst'><p class='themetitle'>Environment</p><p style='font-size:12px;'><img align='right' vspace='4' hspace='4' src='../images/breathe/environment_1.gif' alt='1 Toyota, 1 Tree' width='154' height='123' />Forest fires have been increasing in Portugal year by year, a major and recurring national catastrophe. Toyota decided to take action to help. In 2005 Toyota initiated a single plantation of 4,000 trees for most damaged area, launching a new campaign.</p><p><strong>1 Toyota, 1 Tree</strong> is the name of the national reforestation campaign where, for every Toyota sold in Portugal, the National Marketing and Sales Company supports the cost of planting a tree in a Portuguese forest damaged by fires. This initiative saw more than 18,000 trees planted, covering some 40 hectares of forest. The campaign was conducted in partnership with ANEFA, an environmental NGO campaigning for the plantation and preservation of trees in damaged forests.</p><p><img src='../images/breathe/environment_2.gif' alt='Toyota Recycling Vision' width='145' height='100' align='right' hspace='4' vspace='4' />The Toyota Recycling Vision was set up to improve our enviornmental performance in order to realize our vision to become and stay the environmental leader in the automotive industry.</p>Toyota creates a car, then sells it, so it assumed responsibility to see the car through to the end of its life. What happens to it later? This vision sets specific targets for improving vehicle recovery rates, increasing the use of recyclable resources, recycled materials and used parts, and reducing and banning the use of substances of environmental concern. Toyota is on track to achieve a 95% vehicle reuse and recovery target by 2015.</td></tr></table></td></tr></table>";
	}
}
function ChangeFlv(flvcode,flvtext){
		self.location.hash = "#top";
		document.getElementById("listenvideo").innerHTML = flvcode;
		document.getElementById("listentxt").innerHTML = flvtext;
}
//instellen max karakters in een textbox met aftellertje
maxL=128;
function taLimit(taObj) {
	if (taObj.value.length==maxL) return false;
	return true;
}

function taCount(taObj,Cnt) { 
	objCnt=createObject(Cnt);
	objVal=taObj.value;
	if (objVal.length>maxL) objVal=objVal.substring(0,maxL);
	if (objCnt) objCnt.innerText=maxL-objVal.length;
	return true;
}
function createObject(objId) {
	if (document.getElementById) return document.getElementById(objId);
	else if (document.layers) return eval("document." + objId);
	else if (document.all) return eval("document.all." + objId);
	else return eval("document." + objId);
}

function ShowHideAnswerDiv(divID,HideButton){
	if (document.getElementById(divID).style.display == "none"){
		document.getElementById(divID).style.display = "block";
		document.getElementById(HideButton).src = "../images/min.jpg";
	}
	else if (document.getElementById(divID).style.display == "block"){
		document.getElementById(divID).style.display = "none";
		document.getElementById(HideButton).src = "../images/plus.jpg";
	}
}

function ShowCorrectDiagram(ShowDiagram){
	if (ShowDiagram == 0){
		document.getElementById("diagram0").style.display = "block";
		document.getElementById("diagram1").style.display = "none";
		document.getElementById("diagram2").style.display = "none";
		document.getElementById("diagram3").style.display = "none";
	}
	if (ShowDiagram == 1){
		document.getElementById("diagram0").style.display = "none";
		document.getElementById("diagram1").style.display = "block";
		document.getElementById("diagram2").style.display = "none";
		document.getElementById("diagram3").style.display = "none";
	}
	if (ShowDiagram == 2){
		document.getElementById("diagram0").style.display = "none";
		document.getElementById("diagram1").style.display = "none";
		document.getElementById("diagram2").style.display = "block";
		document.getElementById("diagram3").style.display = "none";
	}
	if (ShowDiagram == 3){
		document.getElementById("diagram0").style.display = "none";
		document.getElementById("diagram1").style.display = "none";
		document.getElementById("diagram2").style.display = "none";
		document.getElementById("diagram3").style.display = "block";
	}
}

function preloadImages() {
  var d=document; 
  if(d.images){ 
	if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments;
    for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){
			d.p[j]=new Image;
			d.p[j++].src=a[i];
		}
	}
}