if(typeof sIFR == "function"){
	sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"swf/nav.swf", sColor:"#ffffff", sWmode: "transparent", sLinkColor:"#ffffff", sBgColor:"#111111", nPaddingTop:0, nPaddingBottom:0, nPaddingRight:0,sFlashVars:"textalign=center"})); //nav
	sIFR.replaceElement(named({sSelector:"body h2", sFlashSrc:"swf/title.swf", sColor:"#7a7c6e", sWmode: "transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:""})); //title
	sIFR.replaceElement(named({sSelector:"body h3", sFlashSrc:"swf/title.swf", sColor:"#7a7c6e", sWmode: "transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:""})); //ter illustratie
	sIFR.replaceElement(named({sSelector:"body h4", sFlashSrc:"swf/title.swf", sColor:"#d12633", sWmode: "transparent",sLinkColor:"#d12633", sBgColor:"#111111", nPaddingLeft:0,nPaddingTop:0, nPaddingBottom:0, sFlashVars:""})); //auto overzicht
	sIFR.replaceElement(named({sSelector:"body h5", sFlashSrc:"swf/title.swf", sColor:"#7a7c6e", sWmode: "transparent",sLinkColor:"#7a7c6e", sBgColor:"#111111", nPaddingLeft:0,nPaddingTop:0, nPaddingBottom:0, sFlashVars:""})); //autodetail
	sIFR.replaceElement(named({sSelector:"body h6", sFlashSrc:"swf/title.swf", sColor:"#7a7c6e", sWmode: "transparent",sLinkColor:"#7a7c6e", sBgColor:"#111111", nPaddingLeft:0,nPaddingTop:0, nPaddingBottom:0, sFlashVars:""})); //onderdelen overzicht
}

/* Write resolution cookie
 */
function writeCookie() {
	var today = new Date();
	var the_date = new Date("December 31, 2023");
	var the_cookie_date = the_date.toGMTString();
	var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
	var the_cookie = the_cookie + ";expires=" + the_cookie_date;
	document.cookie=the_cookie
}

/* Returns numbers only
 * @param	event
 * @param	formname
 * @return	bool
 */
function numbersonly(e , frmname){

	var unicode=e.charCode? e.charCode : e.keyCode
	
	//Submit on enter
	if (unicode == 13) document.forms[frmname].submit();
	
	if (unicode!=8){ //if the key isn't the backspace key (which we should allow)
		if ( unicode<48||unicode>57)  //if not a number and not a point or comma
			return false //disable key press
	}
}

/* Reset all elements of a form
 * @param	str		formname
 * @return 	void
 */
function resetform(frmname , subm) {
	frm = document.forms[frmname];
	fldArr = new Array('automerkId' , 'autoBrandstof' , 'autoPrijs' , 'autoBouwjaar');
	
	for (var i = 0; i < fldArr.length ; i++) {
		
		var el = frm[fldArr[i]];
		if(el.type) {}
		if (el.type == 'select-one') el.selectedIndex = 0;
		else el.value = '';
	}
	
	if (subm == true) frm.submit();
}

/* Changhe the source of an image
 * @param	str	image name
 * @param	str	value
 * @return	void
 */
function changeImg(arg, arg2){
	if (document.images) {
		document.images[arg].src = arg2;
	}
}

function carswitch(arg,arg2,chref) {
	 changeImg(arg, arg2);
	 document.getElementById('bigpichref').href = chref;
}
