
	//Internal javscript below

	var requiredVersion = 5;   
	var useRedirect = false; 

	// System globals
	var flash2Installed = false;
	var flash3Installed = false;
	var flash4Installed = false;
	var flash5Installed = false;
	var flash6Installed = false;
	var maxVersion = 6;
	var actualVersion = 0;
	var hasRightVersion = false;

	// Netscape Navigator Resize Fix
	var oldHeight;
	var oldWidth;
	oldHeight = window.outerHeight;
	oldWidth = window.outerWidth;

	//detect os
	var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

	//detect browser
	var appVer = navigator.appVersion.toLowerCase();
	var iePos  = appVer.indexOf('msie');
	var isIE = (iePos !=-1) ? true : false
	var isNS =  (navigator.appName == "Netscape") ? true : false
	var strUserAgent =  navigator.userAgent.toLowerCase();
	var operaPos = strUserAgent.indexOf("opera");
	var isOpera = (operaPos !=-1) ? true : false;


	//if IE detect version
	if (isIE) {
		is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
		is_major = parseInt(is_minor);	
	}

	//var isDhtmlNav = (isIE && isWin && (iePos !=-1) && is_minor >= 5) ? true : false
	var isDhtmlNav = (isIE && isWin && (iePos !=-1) && is_minor >= 5 && (isOpera != true)) ? true : false
	var isDynamicTable = (isNS) ? true : false
	var isReloadOnResize = (isNS) ? true : false

	jsVersion = 1.1;

	if(isIE && isWin){
	  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	  document.write('on error resume next \n');
	  document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	  document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	  document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	  document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
	  document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
	  document.write('</SCRIPT\> \n'); 
	}


	if(isDhtmlNav){
		var rowBreakCounter1;
		var rowBreakCounter2;
	
		function createHdrNav(){
			if((typeof(document.body) == "undefined") || (document.body == null)) return;
			for (i=0;i<navArray.length;i++){	
				nr = i+1
				createHdrMenu(eval("HDRMENU_" + nr + "_ID"), parseInt(eval("scania_nav_" + nr + ".style.left")), MENU_WIDTH);
			}
			isHdrNavCreated = true;
		}
	
		function createHdrMenu(menuId, xPos, mWidth){
			currentMenu = null;
			currentMenuArray = eval(MENU_ARRAY_PREFIX + menuId);
			currentMenuTree = { width:mWidth, id:menuId, x:xPos, y:HDR_MENU_HGHT }
			topLevelMenus[topLevelMenus.length] = createHdrMenuObject(menuId);	
		}
	
		function createHdrMenuObject(menuId){
			currentMenuArray = eval(MENU_ARRAY_PREFIX + menuId);
	
			var lyr = document.createElement("DIV");
			lyr.id = MENU_PREFIX + menuId;
			with(lyr.style){
				width = currentMenuTree.width + 0 +"px";
				padding= "0px 0px 0px 1px";
				zIndex = 1001;	
				visibility = "hidden";
				position = "absolute";		
				left = (currentMenuTree.x - 1) + "px";
				top = (currentMenuTree.y + 2) + "px";
			}
	
			navLocation = document.getElementById("hdrNavMenus");
			navLocation.appendChild(lyr);
			if(currentMenu){
				lyr.parentMenu = currentMenu;
				lyr.parentItem = currentMenu.row;
				lyr.parentItem.child = lyr;
				lyr.hasParent = true;
				lyr.level = lyr.parentMenu.level + 1;
			}
			else{
				currentMenuTree.treeParent = currentMenuTree.startChild = lyr;
				lyr.level = 2;		
			}
			currentMenu = lyr;	
			currentMenu.isHdrMenu = true;
			currentMenu.array = currentMenuArray;	
			currentMenu.tree  = currentMenuTree;
			currentMenu.itemCount = 0;
			currentMenu.maxItems = currentMenu.array.length - 1;
			currentMenu.showLinks = showLinks;
		  currentMenu.onmouseover = onMenuOver;
		  currentMenu.onmouseout = onMenuOut;
		  currentMenu.hideTree = hideTree;
		  currentMenu.hideParents = hideParentMenus;
		  currentMenu.hideChildren = hideChildMenus;
		  currentMenu.hideTop = hideTop;
		  currentMenu.hideSelf = hideSelf;
		  currentMenu.hasChildVisible = false;
		  currentMenu.isOn = false;
		  currentMenu.hideTimer = null;
		  currentMenu.currentItem = null;
			currentMenu.hdrElement = document.getElementById(menuId);
			rowBreakCounter1 = 0;
			rowBreakCounter2 = 0;
			while(currentMenu.itemCount < currentMenu.maxItems){
				currentMenu.itemCount++;
				currentMenu.row = createRow(menuId);
			}
	
			for(var i = 0; i < currentMenu.childNodes.length; i++){
				var row = currentMenu.childNodes[i];
				row.style.top = (row.index) ? (parseInt(row.siblingBelow.style.top) + LINE_HEIGHT + 2) + "px" : row.style.top = "0";
			}
	
			currentMenu.style.backgroundColor = DFLT_3_BG;
		
			if(rowBreakCounter1>0) rowBreakCounter1 = rowBreakCounter1*16;
			currentMenu.style.height = ((currentMenu.childNodes.length-rowBreakCounter2)*18 + 1 + rowBreakCounter1) + "px";	//changed 20040113
			//currentMenu.style.height = ((currentMenu.childNodes.length*18) + 1 ) + "px";
		
			currentMenu.style.backgroundColor = "#FFFFFF"
	
			return currentMenu;
		}
	
		function showHdrMenu(navId){
			if(navId == "scania_nav_1"){
				document.scaniahouse.src = '/i/scania_home_white.gif';
			}
			if(!isHdrNavCreated) return;
			var hMenu = document.getElementById(MENU_PREFIX + navId);
			if(!hMenu) return;
			currentMenu = hMenu;
	
			if(!currentMenu.tree.startChild) currentMenu.tree.startChild = currentMenu;
			if(currentMenu.tree.startChild == currentMenu) hideTopLevelMenus(currentMenu);
	  	currentMenu.isOn = true;
	  	mouseOverMenu = true;
	
			with(currentMenu.hdrElement.style){
				backgroundColor = "#474747";
				cursor = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko")) ? "pointer" : "hand";
				color = "#FFFFFF";
			}
	  	if(hMenu.childNodes.length == 0) return;
	
	  	if(currentMenu.hideTimer) clearTimeout(currentMenu.hideTimer);
			showTimer = setTimeout("currentMenu.showLinks(true)", 100);
		}
	
		function hideHdrMenu(navId){
			if(!isHdrNavCreated) return;
	   	this.isOn = false;
	   	mouseOverMenu = false;
			clearTimeout(showTimer);
			showTimer = null;
			clearTimeout(hideTimer);
			hideTimer = null;
			hideTimer = setTimeout("currentMenu.hideTree()", MS_VISIBLE);
			currentMenu.hdrElement.style.color = "#000000";
		
			if(navId == "scania_nav_1"){
				document.scaniahouse.src = '/i/scania_home.gif';
			}
		}
	
		function createRow(menuCount){
			var row = document.createElement("DIV");
			row.id = ROW_PREFIX + menuCount + "_" + currentMenu.itemCount;
			row.menu = currentMenu;
			row.tree = currentMenuTree;
			row.index = currentMenu.itemCount - 1;
			row.isLastItem = (currentMenu.itemCount == currentMenu.maxItems);
			row.array = currentMenu.array[currentMenu.itemCount];
			row.dispText = row.array[0];
			row.linkText = row.array[1];
			row.divider2 = row.array[2];
			row.fontColor = (currentMenu.isHdrMenu) ? "#FFFFFF" : (row.array[2] && row.array[2] != "") ? row.array[2] : eval("DFLT_" + currentMenu.level + "_FONT");
			row.fontColorOver = (currentMenu.isHdrMenu) ? "#FFFFFF" : (row.array[3] && row.array[3] != "") ? row.array[3] : eval("DFLT_" + currentMenu.level + "_FONTOVR");
			row.bgColor = (currentMenu.isHdrMenu) ? DFLT_3_BG : (row.array[4] && row.array[4] != "") ? row.array[4] : eval("DFLT_" + currentMenu.level + "_BG");
			row.bgColorOver = (currentMenu.isHdrMenu) ? DFLT_3_BGOVR : (row.array[5] && row.array[5] != "") ? row.array[5] : eval("DFLT_" + currentMenu.level + "_BGOVR");
			row.hasMore = row.array[9];
			//row.arrowSrc = (currentMenu.isHdrMenu) ? TXT_ARROW_LT : (row.array[7] && row.array[7] != "") ? row.array[7] : (currentMenu.level == 3) ? TXT_ARROW_LT : TXT_ARROW_DRK;
			//row.arrowSrcOver = (row.array[8] && row.array[8] != "") ? row.array[8] : TXT_ARROW_LT;
			row.childID = row.hasMore ? (MENU_PREFIX + menuCount + "_" + currentMenu.itemCount) : null;
			row.child = null;
	    row.onmouseover = rowMouseOver;
	    row.onmouseout = rowMouseOut;
			row.showChild = showChildMenu;
			with(row.style){
				position = "static";
				visibility = "inherit";
				backgroundColor = row.bgColor;
				color = row.fontColor;
				padding = "0px 0px 0px 7px";
				fontFamily = FONT_FAMILY;
				fontSize = FONT_SIZE;
				height = (LINE_HEIGHT + 2) + "px";
				lineHeight = LINE_HEIGHT + "px";
				left = "1px";
				width = (currentMenuTree.width - 2) + "px";
			}
			currentMenu.appendChild(row);
			row.siblingBelow = row.previousSibling;
			if(row.linkText){
				row.onclick = goToLink;
				row.style.cursor = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko")) ? "pointer" : "hand";
			}
		
			if(Math.round(row.dispText.length / 22)>1){
				rowBreakCounter1 = rowBreakCounter1 + Math.round(row.dispText.length / 22);
				rowBreakCounter2 = rowBreakCounter2 +1;
			}
		
			row.innerHTML = row.dispText;
			if(row.divider2){
				row.innerHTML = row.innerHTML + "<br><img src='pics/general/pixel_white.gif' width='" +(MENU_WIDTH - 2) + "' height='2'>";
			}
			
			/*
			if(currentMenu.level != 1){
				var arrow = document.createElement("IMG");
				arrow.src = row.arrowSrc;
				arrow.height = TXT_ARROW_SIZE;
				arrow.width = TXT_ARROW_SIZE;
				with(arrow.style){
					position = "absolute";
					top = "3px";
					left = "6px";
	      	height:"11px";
				}
				row.arrowLayer = arrow;
				row.insertBefore(arrow,row.firstChild);
			}
			return row;
			*/
		}
	
		function onMenuOver(){
			if(!this.tree.startChild) this.tree.startChild = this;
			if(this.tree.startChild == this) hideTopLevelMenus(this)
		    this.isOn = true;
		    mouseOverMenu = true;
		    currentMenu = this;
		    if(this.hideTimer) clearTimeout(this.hideTimer);
		}
	
		function hideTopLevelMenus(callingmenu){
			for(var i = 0; i < topLevelMenus.length; i++){
				var topMenu = topLevelMenus[i].tree.startChild;
				if(topMenu == callingmenu) continue;
				topMenu.isOn = false;
				if(topMenu.hasChildVisible) topMenu.hideChildren();
				topMenu.showLinks(false);
				if(topMenu.isHdrMenu){
					if(topMenu.hdrElement.id != activeHdrMenu){
						topMenu.hdrElement.style.backgroundColor = "";
					}
					else{
						topMenu.hdrElement.style.backgroundColor = "#424242";
					}
				}
			}    
		}
	
		function onMenuOut(){
			this.isOn = false;
	    mouseOverMenu = false;
			clearTimeout(hideTimer);
			hideTimer = null;
			hideTimer = setTimeout("currentMenu.hideTree()", MS_VISIBLE);
		}
	
		function showChildMenu(){
			this.child.style.left = (parseInt((this.menu.style.left) ? this.menu.style.left : this.menu.offsetLeft) + parseInt(this.style.width)) + "px";
			this.child.style.top = (parseInt((this.menu.style.top) ? this.menu.style.top : this.menu.offsetTop) + this.offsetTop) + "px";
			this.menu.hasChildVisible = true;
			this.menu.visibleChild = this.child;
			this.child.showLinks(true);
		}
	
		function rowMouseOver(){
			currentMenu.hdrElement.style.color = "#FFFFFF";
			if(this.menu.currentItem && this.menu.currentItem != this){
				this.menu.currentItem.style.backgroundColor = this.menu.currentItem.bgColor;
				this.menu.currentItem.style.color = this.menu.currentItem.fontColor;
				if(this.menu.currentItem.hasMore) this.menu.currentItem.imageLayer.src = this.menu.currentItem.imageSrc;
				//if(this.menu.level != 1) this.menu.currentItem.arrowLayer.src = this.menu.currentItem.arrowSrc;
			}
			//if(this.menu.level != 1) this.arrowLayer.src = this.arrowSrcOver;
	    this.style.backgroundColor = this.bgColorOver;
	    this.style.color = this.fontColorOver;
			if(this.hasMore)this.imageLayer.src = this.imageSrcOver;
	    this.menu.currentItem = this;
			if(this.menu.hasChildVisible){
				if(this.menu.visibleChild == this.child && this.menu.visibleChild.hasChildVisible) this.menu.visibleChild.hideChildren(this);
				else this.menu.hideChildren(this);
	    }
	    if(this.hasMore) this.showChild();
			status = this.linkText;
		}
	
		function rowMouseOut(){
			currentMenu.hdrElement.style.color = "#000000";
	    if((this.tree.treeParent==this) && !this.menu.hasChildVisible){
				//if(this.menu.level != 1) this.arrowLayer.src = this.arrowSrc;
	      this.style.backgroundColor = this.bgColor;
	      this.style.color = this.fontColor;
				if(this.hasMore)this.imageLayer.src = this.imageSrc;
	    }
		}
	
		function showLinks(on){
			if(!(this.tree.treeParent == this) || this.isHdrMenu) this.style.visibility = (on) ? "visible" : "hidden";
	    if(this.currentItem){
				this.currentItem.style.backgroundColor = this.currentItem.bgColor;
				this.currentItem.style.color = this.currentItem.fontColor;
				if(this.currentItem.hasMore) this.currentItem.imageLayer.src = this.currentItem.imageSrc;
				//if(this.currentItem.menu.level != 1) this.currentItem.arrowLayer.src = this.currentItem.arrowSrc;
	    }
	    this.currentItem = null;
			if(!on && this.isHdrMenu && this.tree.treeParent==this){
				this.hdrElement.style.backgroundColor = "";
			}
		}
	
		function hideTree(){
			hideTimer = null;
	    if(mouseOverMenu) return;
	    if(this.hasChildVisible) this.hideChildren();
	    this.hideParents();
			currentMenu.hdrElement.style.color = "#000000";
		}
	
		function hideTop(){
			menuToHide = this;
	    this.hideTimer = setTimeout("menuToHide.hideSelf()", MS_VISIBLE);
		}
	
		function hideSelf(){
	    this.hideTimer = null;
	    if (!this.isOn && !mouseOverMenu) this.showLinks(false);
		}
	
		function hideParentMenus(){
	    var menu = this;
	    while(menu.hasParent){
				menu.showLinks(false);
				menu.parentMenu.isOn = false;        
				menu = menu.parentMenu;
	    }
			if(!menu.hasParent && menu.isHdrMenu) menu.showLinks(false);
	    menu.hideTop();
		}
	
		function hideChildMenus(caller){
	    var menu = this.visibleChild;
	    while(menu.hasChildVisible){
				menu.visibleChild.showLinks(false);
				menu.hasChildVisible = false;
				menu = menu.visibleChild;
	    }
			if((caller && (!caller.hasMore || this.visibleChild != caller.child)) || (!caller && !this.isOn)){
				this.visibleChild.showLinks(false);
				this.hasChildVisible = false;
	    }
		}
	
		function goToLink(){
	    if(this.linkText.indexOf("javascript:") != -1) eval(this.linkText)
	    else location.href = this.linkText;
		}
	
		var hasHdrNav = true;
	}


	//form_validation
	/* 
	Tridion:
	
	Below is tha javascript array which builds either the toplevel of the standard html version or the dhtmlversion. 
	
	Position 0 is the navigation text
	Position 1 is the link (only used in the standard html version)
	Position 2 is the state of each navigation item. selected/unselected. 
	*/
	
	navArray = [
		["<img src='/i/scania_home.gif' border='0'>","/",0],
		["Our Trucks","trucks/",0],
		["Our Buses","buses/",0],
		["Other Products","other/",0],
		["Services","services/",0],
		["Services Network","network/",0],
		["About Us","about/",0]
	]
	
	function writeDynamicTableTag(){
			if(isDynamicTable){
				document.write("<table width='" + (window.innerWidth-742) + "' border='0' bgcolor='#D8D8D8' cellpadding='0' cellspacing='0'>");
			} else {
				document.write('<table border="0" bgcolor="#D8D8D8" cellpadding="0" cellspacing="0" width="100%">');
			}
	}
	
	// Netscape Navigator Resize Fix
	function NNreloadOnResize(){
		if (oldHeight != window.outerHeight || oldWidth != window.outerWidth){
			document.location.reload();
		}
	}

	// Navigates to the selected value in named dropdown and named form
	function dropdownNav(formName,ddName){
		selValue = eval("document.forms[formName]." + ddName + "[document.forms[formName]." + ddName + ".selectedIndex].value")
		if (selValue != ""){
			window.open(selValue);
			//alert(selValue + "\nTridion: function found on row 70 in file script_common.js");
			//document.location = selValue;
		}
	}
	
	/* Validates any form based on the requiredFields Array
		- The E-mail field name must be passed as the second argument for e-mail validation to work.
		- The requiredFields Array is set above the form in the file that contains the form
	*/
	function validateForm(formName, emailFieldName){
		for (i=0; i<requiredFields.length; i++){
			if (eval("document.forms[formName]."+requiredFields[i]+".value") == null){
				fieldValue = eval("document.forms[formName]."+requiredFields[i]+"[document.forms[formName]."+requiredFields[i]+".selectedIndex].value");
			} else {
				fieldValue = eval("document.forms[formName]."+requiredFields[i]+".value");
			}
			if (fieldValue == ""){
				alert("Please note that fields indicated with an asterisk (*)\nare required to complete this form.\n\nMake sure that the required fields are not empty.");
				eval("document.forms[formName]."+requiredFields[i]+".focus()");
				return;
			}
			if (requiredFields[i] == emailFieldName){
				eml = eval("document.forms[formName]." + emailFieldName + ".value");
				if (!nIsEmail(eml, true)){
					alert("Please check your e-mail formatting.");
					eval("document.forms[formName]." + emailFieldName + ".focus()");
					return;
				}
			}
		}
		document.forms[formName].submit();
			
		function nIsEmail( vEmailAddress, vAllowScandinavian ) {
			var NEC_CHAR_UNDERSCORE = new String("_");
			var NEC_CHAR_AT = new String("@");
			var NEC_CHAR_DOT = new String(".");
			var NEC_CHAR_PUNCTUATION = new String("-_");
			var NEC_CHAR_SCANDINAVIAN = new String("åÅäÄöÖ");
	
			var pAlphaCharacters = new RegExp("[A-Z]|[a-z]|[0-9]");
			var pWasValid;
			var pPunc;
			if( !vAllowScandinavian ) vAllowScandinavian = false;
			vEmailAddress = vEmailAddress.replace( RegExp(/^ */), "" ).replace( RegExp(/ *$/), "" );
	
			if( vEmailAddress.length <6 ) return false;
			if( vEmailAddress.search( NEC_CHAR_AT,"g") == -1  ) return false;
			if( vEmailAddress.charAt(0).search(pAlphaCharacters) == -1 && !vAllowScandinavian  ) return false;
			if( vEmailAddress.lastIndexOf(NEC_CHAR_DOT) < vEmailAddress.indexOf(NEC_CHAR_AT) ) return false;
	
			pPunc = false;
			for( var i=0; i<vEmailAddress.length; i++) {
				if( vEmailAddress.charAt(i).search(pAlphaCharacters) ==-1 ) {
					if( pPunc == false ) {
						if( vEmailAddress.charAt(i)!= NEC_CHAR_AT && vEmailAddress.charAt(i)!= NEC_CHAR_UNDERSCORE && vEmailAddress.charAt(i)!=NEC_CHAR_DOT ) {
							pWasValid = false;
							pPunc = true;
							for( var v=0; v<NEC_CHAR_PUNCTUATION.length; v++) {
								if( NEC_CHAR_PUNCTUATION.charAt(v) == vEmailAddress.charAt(i) ){
									pWasValid = true;
									if( i==0 || i==(vEmailAddress.length-1) ) return false;
								}				
							}
							if( vAllowScandinavian ) {
								for( var v=0; v<NEC_CHAR_SCANDINAVIAN.length; v++) {
									if( NEC_CHAR_SCANDINAVIAN.charAt(v) == vEmailAddress.charAt(i) ) { 
										pWasValid = true;
										pPunc = false;
									}
								}
							}
							if( !pWasValid ) return false;
						} else { 
							if( i==0 || i==(vEmailAddress.length-1) ) return false;
							pPunc = true;
						}
					} else return false;
				} else pPunc = false;
			}
			return true;
		}
	}
	
	//func_flash
	/*
	Tridion
	
	This function embeds an flash if the user has flash or else it shows a gif.
	The function needs to be included on every page that uses flash
	
	*/
	
	function placeFlash(flashFile, alternateFile, fileWidth, fileHeight, alternateLink, altText, loopValue, bgcolor, flashVars){
		
		detectFlash(); //detect Flash version
	
		if(hasRightVersion && flashFile.indexOf("swf")!=-1) {  // if we've detected an acceptable version
		    var oeTags = '<table bgcolor='+bgcolor+' cellpadding=0 cellspacing=0 border=0><tr><td><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
	      
			+ 'codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0,0" '
			+ 'ID=three_tier '
			+ 'WIDTH="' + fileWidth + '" HEIGHT="' + fileHeight + '" >'
			+ '<PARAM NAME="MOVIE" VALUE="' + flashFile + '?' + flashVars + '">'
			+ '<PARAM NAME=quality VALUE=high>'
			+ '<PARAM NAME=bgcolor VALUE=white>'
			+ '<PARAM NAME=menu VALUE=>'
			+ '<PARAM NAME=wmode value=transparent>'
			+ '<PARAM NAME=LOOP VALUE="' + loopValue + '">'
			+ '<EMBED SRC="' + flashFile + '?' + flashVars + '" '
			+ 'swLiveConnect=FALSE '
			+ 'WIDTH="' + fileWidth + '" HEIGHT="' + fileHeight + '" '
			+ 'QUALITY=high '
			+ 'BGCOLOR=white '
			+ 'TYPE="application/x-shockwave-flash" '
			+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
			+ '</EMBED>'
			+ '</OBJECT></td></tr></table>';
			
		    document.write(oeTags); 
		  } 
		  else {
  			if(alternateLink != "" || (flashFile.indexOf("swf")==-1 && alternateLink != "")){
  			  if(alternateFile=="") alternateFile = flashFile;
  			  var alternateContent = '<a href="' + alternateLink + '"><img src="' + alternateFile + '" width="' + fileWidth + '" height="' + fileHeight + '" alt="" border="0"></a>'
  			}
  			else{
  				var alternateContent = '<img src="' + alternateFile + '" width="' + fileWidth + '" height="' + fileHeight + '" alt="" border="0" usemap="#mapmap">'
  			}
  		  document.write(alternateContent); 
		}
	}	
	
	function detectFlash(){  
	  if (navigator.plugins){
	    if (navigator.plugins["Shockwave Flash 2.0"]
	        || navigator.plugins["Shockwave Flash"]){
	
	      var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
	      var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
	      
	      var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
	     
	      flash2Installed = flashVersion == 2;    
	      flash3Installed = flashVersion == 3;
	      flash4Installed = flashVersion == 4;
	      flash5Installed = flashVersion == 5;
	      flash6Installed = flashVersion >= 6;
	    }
	  }
	  
	  for (var i = 2; i <= maxVersion; i++){  
	    if (eval("flash" + i + "Installed") == true) actualVersion = i;
	  }
	  
	  if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 3;  
		
	  if (actualVersion >= requiredVersion){
	    hasRightVersion = true;                
	  }
	}
	
	function sisMoveToNextPage(){
		sida = document.theForm.resultPageSel1.options[document.theForm.resultPageSel1.selectedIndex].value;
		document.location.href=sida;
	}
			
	function sisMoveToNextPage2(){
		sida = document.theForm.resultPageSel2.options[document.theForm.resultPageSel2.selectedIndex].value;
		document.location.href=sida;
	}
	
	function sisDropdownNav(){
		page = document.sisSelectForm.sisDealerSelect.options[document.sisSelectForm.sisDealerSelect.selectedIndex].value;
		document.location.href=page;
	}
	
	function zoek(){
		document.forms.item("search").submit();
	}
	
	function klik(){
		if (document.all.item("divopties").style.display=="none"){
			divopties.style.display="";
		}
		else{
			divopties.style.display="none";
		}
	}
	
	function melding(txt){
		alert(txt);
	}
	
	function GeneralSearchNextPage(){
		sida = document.search.resultPageSel1.options[document.search.resultPageSel1.selectedIndex].value;
		document.location.href=sida;
	}
			
	function GeneralSearchNextPage2(){
		sida = document.search.resultPageSel2.options[document.search.resultPageSel2.selectedIndex].value;
		document.location.href=sida;
	}
	
	function popup(url){
		if (navigator.appName == 'Netscape'){
			window.open(url,'windowName','width=544,height=380,toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes');
		}
		else{
			window.open(url,'Title', 'scrollbars, width=544, height=380, resizable, toolbar');
		}
	}
	
	function sisResellerSelect(){
		page = document.sisSelectForm.sisResellers.options[document.sisSelectForm.sisResellers.selectedIndex].value;
		document.location.href=page;
	}

	// Opens new window without menus, buttons and status fields
	function openNewWin(url, W, H, bScroll){
		var wihi = "&w="+W+"&h="+H;
		if(url.indexOf("?") != -1){
			url = url + wihi
		}
		if (bScroll!=false) {
			bScroll == 0;
		}
		window.open(url, "windowname", "toolbar=no, location=no, directories=no, status=no, menubar=no, resizable=yes, copyhistory=no, scrollbars="+bScroll+", width="+W+", height="+H);
	}
	
	// Opens new window with all menus, buttons and status fields
	function openNewWindow(url, W, H){
		var wihi = "&w="+W+"&h="+H;
		if(url.indexOf("?") != -1){
			url = url + wihi
		}
		window.open(url, "windowname", "toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, resizable=yes, copyhistory=yes, scrollbars=yes, width="+W+", height="+H+", top=100, left=200");
	}
	
	// Removed pHeader from function since it was not used, (function popuplink(pUrl, pTitle, W, H, pHeader, bScroll))
	function popuplink(pUrl, pTitle, W, H, bScroll){
		var newwindow;
		if (bScroll!=false) {
			bScroll == 0;
		}
		if (newwindow && !newwindow.closed){
			newwindow.focus(); newwindow.document.clear()
		}
		else {
			newwindow=window.open('','','width='+W+',height='+H+',resizable=1,scrollbars='+bScroll)
		}
		newwindow.document.writeln('<html> <head>');
		newwindow.document.writeln('<title>' + pTitle + '<\/title> <\/head>');
		newwindow.document.writeln('<frameset rows=\"60,*\" border=\"0\">');
		newwindow.document.writeln('    <frame name=\"top\" src=\"\/inc\/pheader.htm\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" noresize>');
		newwindow.document.writeln('    <frame name=\"linked_page\" src=' + pUrl + ' marginwidth=\"0\" marginheight=\"0\" scrolling=\"auto\" frameborder=\"0\" noresize>');
		newwindow.document.writeln('<\/frameset>');
		newwindow.document.writeln(' <\/html>');
		newwindow.document.close();
		}

	// Release 3.3 (form field focus) - Stefan Väisänen 2005-11-01
	function focusForm(frmName, frmField){
		document.forms[frmName][frmField].focus();
		}

	function fullscreen(url){
		var width, height;
		var agt = navigator.userAgent.toLowerCase();
		var isNetscape = ((agt.indexOf('mozilla')!=-1) &&
			(agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) &&
			(agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) &&
			(agt.indexOf('hotjava')==-1));
		var isMac = (navigator.appVersion.indexOf("Mac") != -1);

		width = (screen.availWidth ? screen.availWidth : 800);
		height = (screen.availHeight ? screen.availHeight : 600);

		var winObj = window.open(url,"fullscreen","left=0,top=0,width=" + width + ",height=" + height + ",fullscreen=no");
		if(winObj && isMac && winObj.moveTo && winObj.resizeTo){
			winObj.moveTo(0, 0);
			winObj.resizeTo(width, height);
			winObj.focus();
		}
	}
	
	/*
  Ola Ljungars 2008-02-05
  */
  function commonOnLoad(){
    
  }



function Show_File(url)
{
  window.open(url, '_new', "width=620,height=650,scrollbars=1");
}





function fr3 (d, t) {
 	d.write(t);
	return false;
}; 


//popup gallery

PositionX = 100;
PositionY = 100;
defaultWidth  = 500;
defaultHeight = 500;
var AutoClose = false;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}

var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function Show_photo(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');
writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');

writeln('window.resizeTo(100,100);');

if (navigator.appVersion.charAt(22)==7) 
writeln('width=250-(document.body.clientWidth-document.images[0].width);')
else 
writeln('width=100-(document.body.clientWidth-document.images[0].width);')

writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["IMAGEs"].width;');writeln('window.innerHeight=document.images["IMAGEs"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="IMAGEs" src='+imageURL+' style="display:block">');


writeln("<img src='http://counter.yadro.ru/hit?t44.1;r"+
escape(document.referrer)+((typeof(screen)=="undefined")?"":
";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
";"+Math.random()+
"' alt='' title='LiveInternet' "+
"border=0 width=31 height=31>");


writeln('</body></html>');
close();		
}};

//end popup
