/*
***** Created at 23.02.10, 09:42:42 by CYBERhouse Import/Update-Script*****
***** Revision: 155
*/


<!-- //

/**
 *	seso media group <www.seso.at>
 *
 *	$URL: http://seso1.unfuddle.com/svn/seso1_webbob/js/env.js $
 *	$Date: 2009-07-10 11:44:59 +0200 (Fr, 10 Jul 2009) $
 *	$Revision: 38 $
 *	$Author: ines $
 */


/*******************************************************************************
  ENVIROMENT
*******************************************************************************/

function env() {

	var self = this;

	this.browser = checkBrowser();
	
	this.isIE = (self.browser.match(/ie/) !== null);

	this.flashVer = checkFlash();
	
	this.os = checkOS();

	
	
	function checkOS() {
		
		var agt = navigator.userAgent.toLowerCase();
		
		if (agt.indexOf("macintosh") != -1) return "mac";
		if (agt.indexOf("windows") != -1) return "win";
		
		return null;
	}


	function checkBrowser() {

		var agt = navigator.userAgent.toLowerCase();
	
		if (agt.indexOf("msie 8.0") != -1) return "ie8";
		if (agt.indexOf("msie 7.0") != -1) return "ie7";
		if (agt.indexOf("msie 6.0") != -1) return "ie6";
		if (agt.indexOf("firefox") != -1) return "firefox";
		if (agt.indexOf("safari/4") != -1) return "safari";
		if (agt.indexOf("safari/5") != -1) return "safari"; 
		if (agt.indexOf("safari") != -1) return "safari"; 
		if ((agt.indexOf("netscape/8") != -1) && (agt.indexOf("msie") != -1)) return "ns8-ie";
		if ((agt.indexOf("netscape/8") != -1) && (agt.indexOf("msie") == -1)) return "ns8-gecko";
		if (agt.indexOf("netscape/7") != -1) return "ns7";
		if (agt.indexOf("opera") != -1) return "opera";
		if (agt.indexOf("camino") != -1) return "camino";
		return null;
	}
	
	
	
	function checkFlash() {

		if (self.browser.match(/ie/) !== null) {
			
			if (typeof window.ActiveXObject != 'UNDEFINED') {

				var v = 0;
				var d = null;
				var a = null;
				var crash = false;
				
				try {
					
					a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
				}
				
				catch(e) {
				
					try { 
						
						a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
						v = [6,0,21];
						a.AllowScriptAccess = "always";
					}
					
					catch(e) {
						
						if (v[0] == 6) crash = true;
					}
					
					if (!crash) {
						
						try {
							
							a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
						}
						
						catch(e) {}
					}
				}
				
				if (!crash && a) { 

					try {
						
						d = a.GetVariable("$version");	
						if (d) return parseInt(d.split(" ")[1].split(",")[0]);
					}
					
					catch(e) {}
				}
			}
		}
		
		
		else {
			
			for (var i=0; i<navigator.plugins.length; i++) {
				
				if (navigator.plugins[i]['name'] == 'Shockwave Flash') {
				
					return navigator.plugins[i]['description'].split('Shockwave Flash ')[1].split('.')[0];
				}
			}
			
		}
	
		return 0;
	}
	

}

var env = new env();



/*******************************************************************************
  ADD STYLESHEETS
*******************************************************************************/

function addStylesheets(path) {

	var s = document.createElement('LINK');
		s.setAttribute("rel", "stylesheet");
		s.setAttribute("href", path+"components_js.css");
		s.setAttribute("type", "text/css");
			
	document.getElementsByTagName('HEAD')[0].appendChild(s);
}



/*******************************************************************************
  REPOSITION
*******************************************************************************/

function reposition() {
	
	if (document.getElementById('mainContainer')) {

		var main = document.getElementById('mainContainer').style;
	
		if (document.body.offsetWidth < 990) {
	
			main.left = main.marginLeft = 0;
		}
			
		else {
		
			main.left = '50%';
			main.marginLeft = '-495px';
		}
	}
}
	
if (env.browser == 'ie6') {
	
	window.onload = reposition;
	window.onresize = reposition;
}


/*******************************************************************************
  BOB DATA
*******************************************************************************/

/*
 * define the data-grid to avoid js-error after util.init
 */

var bobdata = {};

	bobdata.lightBox = [];
	bobdata.lightBox['property'] = {};
	
	bobdata.faqs = [];
	bobdata.geraete = [];




// -->