

	//	navigation
	
		function nav(target,language)
		{
			if ( language == 'se' )
			{
				if ( target == 'hem' )			{ location.href = '../start/start.php'; }
				if ( target == 'bostader' )		{ location.href = '../bostader/start_bostader.php'; }
				if ( target == 'lokaler' )		{ location.href = '../lokaler/start_lokaler.php'; }
				if ( target == 'tjanster' )		{ location.href = '../tjanster/start_tjanster.php'; }
				if ( target == 'omBesqab' )		{ location.href = '../omBesqab/start_omBesqab.php'; }
				if ( target == 'admin' )		{ location.href = '../admin/press_list.php'; }
				if ( target == 'inEnglish' )	{ location.href = ''; }
				if ( target == 'sitemap' )		{ location.href = '../sitemap/sitemap.php'; }
				if ( target == 'contact' )		{ location.href = '../omBesqab/kontakt.php'; }
			}
			if ( language == null ) { location.href = target; }
		}
		

		
	//	area heights

		function areaHeights()
		{
			var areaOne = document.getElementById('area1').offsetHeight;
			var areaTwo = document.getElementById('area2').offsetHeight;
	
			if ( document.getElementById('area3') )
			{
				var areaThree = document.getElementById('area3').offsetHeight;
				
				if ( areaOne >= areaTwo && areaOne >= areaThree ) { document.getElementById('area2').style.height = areaOne+'px'; document.getElementById('area3').style.height = areaOne+'px'; }
				if ( areaTwo >= areaOne && areaTwo >= areaThree ) { document.getElementById('area1').style.height = areaTwo+'px'; document.getElementById('area3').style.height = areaTwo+'px'; }
				if ( areaThree >= areaOne && areaThree >= areaTwo ) { document.getElementById('area1').style.height = areaThree+'px'; document.getElementById('area2').style.height = areaThree+'px'; }
			}
				else
			{
				if ( areaOne < areaTwo ) { document.getElementById('area1').style.height = areaTwo+'px'; }
				if ( areaOne > areaTwo ) { document.getElementById('area2').style.height = areaOne+'px'; }
			}
		}



	//	price list

		function pricelistOver(id,row)
		{
			if ( row == 'head' )
			{
				// color #5
				id.style.backgroundColor = "#445f73";
			}
			else
			{
				// color #2 or #3
				id.style.backgroundColor = "#c4d2db";
			}
		}

		function pricelistOut(id)
		{
			id.style.backgroundColor = "";
		}



	//	listClick
	
		function listClick(e, url, plats) {
	
	//	resolve event object
	
			if (!e) e = window.event;
			src = (e.target == undefined) ? e.srcElement : e.target;
	
	//	cancel event bubbling
	
			e.cancelBubble = true;
			if (e.stopPropagation) e.stopPropagation();
			
			if (plats == 0) { alert('check'); }
			if (plats == 1) { location.href = url + '&house=' + document.getElementById('house').value; }
			else {  }
	}



	//	flaps
	
		function flaps(id,flap)
		
		{
			if ( flap == 1 )
			{
				document.getElementById('flaps'+id+'_1').style.display = ''; document.getElementById('image'+id+'_1').style.display = '';
				document.getElementById('flaps'+id+'_2').style.display = 'none'; document.getElementById('image'+id+'_2').style.display = 'none';
			}
			if ( flap == 2 )
			{
				document.getElementById('flaps'+id+'_1').style.display = 'none'; document.getElementById('image'+id+'_1').style.display = 'none';
				document.getElementById('flaps'+id+'_2').style.display = ''; document.getElementById('image'+id+'_2').style.display = '';
			}			
		}
		

	//	list mode		
		
		function js_list_back()
		{
			if ( document.getElementById('listmode').value == 'list' )
			{
				if ( document.getElementById('house').value == '1' ) { window.location.href='?id=83'; }
				else if ( document.getElementById('house').value == '2' ) { window.location.href='?id=145'; }
				else if ( document.getElementById('house').value == '4' ) { window.location.href='?id=255'; }
				else if ( document.getElementById('house').value == '5' ) { window.location.href='?id=191'; }
				else { window.location.href='?id=83'; }
			}
			else
			{
				if ( document.getElementById('house').value == '1' ) { window.location.href='?id=126'; }
				else if ( document.getElementById('house').value == '2' ) { window.location.href='?id=144'; }
				else if ( document.getElementById('house').value == '4' ) { window.location.href='?id=284'; }
				else if ( document.getElementById('house').value == '5' ) { window.location.href='?id=221'; }
				else { window.location.href='?id=126'; }
			}
		}
		
		function js_stageFlaps(house,mode)
		{
			if ( house == '1' && mode == 'list' )	{ window.location.href='?id=83'; }
			if ( house == '1' && mode == 'map' )	{ window.location.href='?id=126'; }

			if ( house == '2' && mode == 'list' )	{ window.location.href='?id=145'; }
			if ( house == '2' && mode == 'map' )	{ window.location.href='?id=144'; }

			if ( house == '4' && mode == 'list' )	{ window.location.href='?id=255'; }
			if ( house == '4' && mode == 'map' )	{ window.location.href='?id=284'; }

			if ( house == '5' && mode == 'list' )	{ window.location.href='?id=191'; }
			if ( house == '5' && mode == 'map' )	{ window.location.href='?id=221'; }
		}
		
