		// =========================================================		
		// 
		// JavaScript Routinen SuissePromotion Homepage
		//
		// Version 2.0 / 13.11.2008
		//
		// Copyright SuissePromotion Immobilien AG 
		//
		// Webmaster: Thomas Hanhart, t.hanhart@suissepromotion.ch
		//
		// =========================================================
		
		// == FUNKTIONEN FUER AUFRUFE AUS FLASH ====================

		// ---------------------------------------------------------	
		
			function convertUML( vString ) {
			
				// Spezialfunktion: bereinigt Javascript Aufrufe aus Flash bzw. deren String-Parameter mit Umlauten 
				// Problem: z.B. wird das Zeichen Ÿ nicht wie Ÿblich mit &uuml; codiert sondern &amp;uuml; also das & wird
				// von der getURL-Methode in Flash fŠlschlicherweise auch codiert
					  
				while( vString.search( "&amp;auml;" ) != -1 ) { 
			  		vString = vString.replace( "&amp;auml;", "&auml;" );
			  	}
			  	
			  	while( vString.search( "&amp;Auml;" ) != -1 ) { 			  	
			  		vString = vString.replace( "&amp;Auml;", "&Auml;" );
			  	}
			  	
			  	while( vString.search( "&amp;ouml;" ) != -1 ) { 		  
			  		vString = vString.replace( "&amp;ouml;", "&ouml;" );
			  	}
			  
			 	 while( vString.search( "&amp;Ouml;" ) != -1 ) { 
			 	 	vString = vString.replace( "&amp;Ouml;", "&Ouml;" );
			 	 }
			  
			 	 while( vString.search( "&amp;uuml;" ) != -1 ) { 
			 	 	vString = vString.replace( "&amp;uuml;", "&uuml;" );
			  	}
			  
			 	 while( vString.search( "&amp;Uuml;" ) != -1 ) { 
			 	 	vString = vString.replace( "&amp;Uuml;", "&Uuml;" );
			 	 }
			
			  	return( vString );
			
			}
		
		
		// ---------------------------------------------------------				
				
			function openPopInfo( vPopURL, vPopName, vPopOptions, vPopX, vPopY ) {

			// Oeffne PopUp
			    vPopWin = window.open( vPopURL, vPopName, vPopOptions );
      	  		vPopWin.moveTo( vPopX, vPopY );
     	  		vPopWin.focus();
     	  	}
     	  	
     	  	
     	// ---------------------------------------------------------		



		
		// == FUNKTIONEN FUER AUFRUFE AUS HTML SEITEN ==============
		
	
			function CheckMacSystem() {

			// Pruefen ob Mac Plattform verwendet wird
			    return ( navigator.platform == "MacPPC" );
			}

		// ---------------------------------------------------------
		
			function CheckBrowserIE() {

			// Pruefen ob Internet-Explorer verwendet wird
			    return( ( navigator.appName.indexOf( "Internet Explorer" ) !== -1 ) );
			}
			
		// ---------------------------------------------------------
		
			function CheckWindowOpen() {
			// Pruefen ob PopUps aktiviert oder deaktiviert sind

				vBol = false;
				// Testfenster šffnen
				vTestWin = window.open("test.html","","height=1,width=1");

				// Pruefen ob Testfenster erfolgreich gešffnet (auf IE Browser)
				if ( CheckBrowserIE() ) {
					if ( vTestWin !== 0 ) {
						vBol = true; 
						vTestWin.close();
					} 				
				}
				
				// Pruefen ob Testfenster erfolgreich gešffnet (auf allen anderen Browsern)
				else {
					if ( vTestWin !== undefined ) {
						vBol = true; 
						vTestWin.close();
					}
				}	 
 			 	return( vBol );	
 			}

		// ---------------------------------------------------------

			function LoadFlashPopUp() {
			// Flash-PopUp laden

     	  		vFlashWin = window.open( "sp_homepage.html","Flash","height=704,width=1004,scrollbars=no" );
     	  		vFlashWin.moveTo( 1, 1);
     	  		vFlashWin.focus();
     	  		// self.close();
			}
						
		// ---------------------------------------------------------
					
			function CheckSystem( vLang ) {
		    // Wenn Pop-Up Option ausgeschaltet
			    
			    if ( !CheckWindowOpen() ) {
			    // Auf Macintosh-Systemen
			  		if ( CheckMacSystem() ) {
			      	// HTML-Seite mit Fehlermeldung
				    	window.location.href = "00/00_startscreens/00_safari_popup.html";
				  	}
					// Auf PC und anderen Systemen
				  	else {
			      	// Flash in HTML-Seite aufrufen
				    	window.location.href = "sp_homepage.html";
			      	}
			    }
			    else {
			    // Flash in PopUp aufrufen
           			LoadFlashPopUp();		          		
   		        }
   		    }			    

						  			  
		// ---------------------------------------------------------
		
		