function changeClass(obj, clas) {
	obj.className = clas;
}


function vraag(vraag) {
	vraag = document.getElementById(vraag);
	if (vraag.style.display == 'block') {
		vraag.style.display = 'none';
	} else {
		vraag.style.display = 'block';
	}
}
		


function verwijder(bericht,xurl) {
	if(confirm(bericht)) location.href = xurl;
} 


function favorieten(){
	var bookmarkurl ="http://www.ministreetrace.nl/";
	var bookmarktitel ="MiniStreetRace.nl - het coolste online multiplayer racespel!";
	if (document.all) {
		window.external.AddFavorite(bookmarkurl,bookmarktitel);
	}
}


var bestand = "http://www.ministreetrace.nl/kampioenschap.php"; 		
function showKampioenschap() {
	var cid = document.formkamp.club.options[document.formkamp.club.selectedIndex].value;
	window.location = bestand + "?club=" + cid ;	
}



function breakout_of_frame()
{
  if (top.location != location) {
    top.location.href = document.location.href ;
  }
}


	
		
		
function tuning(prop, num) {
	if (document.getElementById) {
		obj1 = document.getElementById(prop);
		numpercent = num + '%';
		obj1.style.width = numpercent;
	}	
}



var movieName = "optictuning";
function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  } else {
    return document[movieName]
  }
}


function setWheels(wsize, wtype) {
	thisMovie(movieName).SetVariable("_root.wheelsize", wsize);
	thisMovie(movieName).SetVariable("_root.wheel", wtype); 
  	thisMovie(movieName).TCallLabel("/actionsjava", "wheels");
	//
	document.getElementById("formSubmit").wheelsize.value = wsize;
	document.getElementById("formSubmit").wheel.value = wtype; 
}


function setLower(low) {
	thisMovie(movieName).SetVariable("_root.lower", low); 
  	thisMovie(movieName).TCallLabel("/actionsjava", "lower");
	//
	document.getElementById("formSubmit").lower.value = low;
}


function setPaintjob(kleur) {
	thisMovie(movieName).SetVariable("_root.kleur", kleur); 
  	thisMovie(movieName).TCallLabel("/actionsjava", "kleur");
	//
	document.getElementById("formSubmit").kleur.value = kleur;
}


 function setsmilie(which){ 
          document.form.profiel.value = document.form.profiel.value + which;
			 document.form.profiel.focus(); 
 } 




var menui = 27;
var menuminheight = 27;
var menumaxheight = 113;
var inthide;
var intshow;
var intwait;
var intwait2;
var speed = 2;

function showmenu() {
	clearInterval(intwait2);
	clearInterval(intwait);
		intwait=setInterval("showmenu2()",150)
		
	
}
function hidemenu() {
		clearInterval(intwait2);
	clearInterval(intwait);
		intwait2=setInterval("hidemenu2()",300)
	
}

function showmenu2() {
	clearInterval(intwait);
	clearInterval(intwait2);
	clearInterval(inthide);
	clearInterval(intshow);
	intshow=setInterval("show()",10)
}
function hidemenu2() {
	clearInterval(intshow);
	clearInterval(intwait);
	clearInterval(intwait2);
	clearInterval(inthide);
	inthide=setInterval("hide()",10);
}

function show() {
	if (menui<menumaxheight-1) {
		menui = menui + (menumaxheight - menui) / speed;
		// menuI = menuI +speed;
		document.getElementById('javamenu').style.height=menui+'px';
	} else {
		clearInterval(intshow);
		clearInterval(inthide);
		document.getElementById('javamenu').style.height=menumaxheight+'px';
		menui = menumaxheight;
	}
}
function hide() {
	if (menui>menuminheight + 1)	{
		menui = menui + (menuminheight - menui) / speed;
		// menuI = menuI - speed;
		document.getElementById('javamenu').style.height= menui+'px';
	}else {
		clearInterval(inthide);
		clearInterval(intshow);
		document.getElementById('javamenu').style.height=menuminheight+'px';
		menui = menuminheight;
	}
}







var mousehover = false;

function ratehover(liid)
{
	mousehover = true;
	
 	element = document.getElementById("rate");
	currentval = document.ratingform.curval.value;
	
	element.className = 'sterbalkhover';
 	valz = liid * 24 + "px";
   	element.style.width = valz;
}

function ratemouseout()
{
	mousehover = false;
    setTimeout("reloadratings();", 200);
}

function reloadratings() {
	if (mousehover == false) {
		element = document.getElementById("rate");
		currentval = document.ratingform.curval.value;
		val = currentval + "px";
		element.style.width = val;
		element.className = 'sterbalk';
	}	
}





/* Submit the Message */
function rateclick(c, r){
	rating = r;
	circuit = c;
	this.location.href = "rating.php?r=" + rating + "&c=" + circuit;
}





  
  
  
  
  


















// window.onload = breakout_of_frame();



