// JavaScript

// All scripts named "OM_": Copyright Oswald und Martin Werbeagentur, Berlin 2009


// Drucken ---------------------------------------------------------------------------------------
function OM_print() {
	if (window.print) {
		window.print();
	} else {
		if (vLanguage == 0) { // Deutsch
			window.alert("Zum Ausdrucken der Seite drücken Sie bitte Strg+P oder wählen Sie «Datei>Drucken» im Menü Ihres Browsers!");
		} else { // English
			window.alert("To print this page, please press Strg+P or select «Document>Print» in your browser’s menue-bar!");
		}
	}
}


// Bilder Vorausladen ---------------------------------------------------------------------------------------
function OM_preloadImages() {
	MM_preloadImages("images/buttons/dot_blue.gif","images/buttons/b_back_a.gif","images/buttons/b_close_a.gif","images/buttons/b_link_a.gif","images/buttons/b_top_a.gif", "images/logos/logo_sr_20px.gif", "images/bkgr/bkgr_head_print.gif", "images/bkgr/bkgr_head_print_ie.gif", "images/bkgr/bkgr_list_print.gif", "images/bkgr/bkgr_list_print_ie.gif")
}


// Mitarbeiter Popup-Link generieren ---------------------------------------------------------------------------------------
function OM_linkEmployee(vName) {
	if (vLanguage == 0) {var vLanguageTxt = "d";} else {var vLanguageTxt = "e";}
	var vlinkEmployee = "pu_02_1_"+vLanguageTxt+"_"+vName;
	OM_openPopup(vlinkEmployee);
}


// Impressum Popup-Link generieren ---------------------------------------------------------------------------------------
function OM_linkImprint() {
	
	if (vLanguage == 0) {
		var vJSLink = "<a href='javascript:OM_openPopup(\"pu_d_impressum\",550)' onClick='this.blur()'>Impressum</a>";
	} else {
		var vJSLink = "<a href='javascript:OM_openPopup(\"pu_e_imprint\",550)' onClick='this.blur()'>Imprint</a>";
	}
	
	if (document.getElementById("imprint")) {
		document.getElementById("imprint").innerHTML = vJSLink;
	} else if (document.all.imprint) { // IE
		document.all.imprint.innerHTML = vJSLink;
	}
	
}


// Popup-öffnen ---------------------------------------------------------------------------------------
function OM_openPopup(vName, vWidth) {
	
	if (!vWidth) {vWidth=625;}
	
	// Parameter zu öffnendes Fenster festlegen
	var vParameters = "directories=no,location=no,menubar=no,personalbar=no,resizable=no,status=yes,titlebar=no,toolbar=no,scrollbars=no,width=200,height=200,left=0,screenX=0,screenY=0,top=0";
	
	// Fenster öffnen
	popup = window.open("popups/"+vName+".htm?"+vWidth,"Popup",vParameters);
	popup.focus();
	
}


// beim Laden der Seite vorbereiten ---------------------------------------------------------------------------------------
function OM_init () {
	
	OM_linkImprint(); // Impressum-JS-Link genereieren
	OM_preloadImages(); // Bilder vorausladen
	
	// nicht JavaScript-Links ausblenden
	for (var i = 0; i < document.getElementsByName("noJS").length; i++) {
		document.getElementsByName("noJS")[i].style.display = "none";
	}
	
}


// Cookies ---------------------------------------------------------------------------------------

function setCookie(name, wert, domain, expires, path, secure){
	var cook = name + "=" + unescape(wert)
	cook += (domain) ? "; domain="+ domain : ""
	cook += (expires) ? "; expires="+expires : ""
	cook += (path) ? "; path="+path : ""
	cook += (secure) ? "; secure" : ""
	document.cookie = cook
}


function getCookie(name){
	var i=0  //Suchposition im Cookie
	var suche = name+"="
	while (i<document.cookie.length){
		if (document.cookie.substring(i, i+suche.length)==suche){
			var ende = document.cookie.indexOf(";", i+suche.length)
			ende = (ende>-1) ? ende : document.cookie.length
			var cook = document.cookie.substring(i+suche.length, ende)
			return unescape(cook)
		}
		i++
	}
	return ""
}


// Zufallszahlengenerator ---------------------------------------------------------------------------------------
function zufallszahl(n) {
	zahl = Math.floor(Math.random() * (n + 1));
	return zahl;
}


// Zitate austauschen ---------------------------------------------------------------------------------------
function OM_swapQuotes () {
	
	var vQuotes = new Array();
	
	if (vLanguage == 0) { // Deutsche Zitate
		vQuotes[0] = "<strong>&laquo;Der pers&ouml;nliche Service der<br />F&uuml;hrung / Empfehlungen an meinem neuen Wohnort waren sehr hilfreich. Die &lsaquo;Professionelle Haltung&rsaquo; ist nicht ein blo&szlig;es Lippenbekenntnis (wie<br />leider zu oft), sondern wird auch ge-<br />lebt. Um nur ein Beispiel zu nennen:<br />die ma&szlig;geschneiderten Informatio-<br />nen, die ich von den Relocation Consultants bei Wohnungs&uuml;bergabe erhalten habe, waren ein absolut professioneller Service.&raquo; </strong><br />Gerhard Moersdorf, Baxter Healthcare AG<br />(September 2009)";
		vQuotes[1] = "<strong>&laquo;Hervorragende Leistung und Beratung w&auml;hrend einer fordernden Zeit des Wohnortwechsels.&raquo;</strong><br />Rob de With, Baxter Healthcare AG<br />(Oktober 2009)";
		vQuotes[2] = "<strong>&laquo;Der Service von Schweizer Relocation folgt der Schweizer Tradition &ndash; Dienstleistung h&ouml;chster Qualit&auml;t!&raquo;</strong><br />Antonio da Silva,<br />Sika Informationssysteme AG<br />(November 2009)";
		vQuotes[3] = "<strong>&laquo;Schweizer Relocation hat uns eine stressfreie &Uuml;bersiedlung von London erm&ouml;glicht. Wir sind begeistert von der absolut fantastischen Wohnung und dem professionellen Service von Schweizer Relocation.&raquo;</strong><br />Daniel Cusworth, Baxter Healthcare SA<br />(Dezember 2009)";
		vQuotes[4] = "<strong>&laquo;Der Service von Schweizer Relocation ist exzellent. Von gr&ouml;sstem Wert war die pers&ouml;nliche Betreuung, die uns mit Sicherheit zu einem guten Einstieg in der Schweiz verholfen hat.&raquo;</strong><br />Yves Torbeyns, SAP (Schweiz) AG<br />(Januar 2010)";
		vQuotes[5] = "<strong>&laquo;Im Namen meiner Familie danke ich Schweizer Relocation f&uuml;r die tolle Unterst&uuml;tzung und die perfekten Leistungen.&raquo;</strong><br />Naveen Nair, SIKA Services AG<br />(Februar 2010)";
		vQuotes[6] = "<strong>&laquo;Aussergew&ouml;hnlich! Diese Professio-<br />nalit&auml;t und Freundlichkeit wurden<br />sehr von uns gesch&auml;tzt. Schweizer Relocation hat den internationalen Umzug zu einem freudigen Ereignis<br />und einer stressfreien Zeit werden lassen. Danke!&raquo;</strong><br />Ellen und Mazhar Wani, Ernst &amp; Young AG<br />(Januar 2010)";
		vQuotes[7] = "<strong>&laquo;Dank Schweizer Relocation verlief mein Umzug in die Schweiz schneller und einfacher als erwartet. Die Unter-<br />st&uuml;tzung und auch die Verpflichtung zum Unternehmen und zum Kunden sind beeindruckend. Ich w&uuml;rde wieder Schweizer Relocation w&auml;hlen!&raquo;</strong><br />Cristina Ghetti, Sika Services AG<br />(Februar 2010)";
		vQuotes[8] = "<strong>&laquo;Sehr gut und extrem professionell; f&uuml;r mich sehr hilfreich und eine sehr gute Unterst&uuml;tzung, da ich die Wohnungen ohne meinen Partner angeschaut habe. Rund-um-Sorglos Paket!&raquo;</strong><br />Nicole Titze, SAP (Schweiz) AG<br />(Oktober 2009)";
		vQuotes[9] = "<strong>&laquo;Toller Service und eine grosse Er-<br />leichterung bei den ersten Schritten in der neuen Heimat.&raquo;</strong><br />Marcel Redinger, SAP (Schweiz) AG<br />(September 2009)";
		vQuotes[10] = "<strong>&laquo;Toller Job vom ganzen Team, die uns beim Umzug in die Schweiz geholfen haben.&raquo;</strong><br />Eric Haynor, Ecolab Europe GmbH<br />(November 2009)";
		vQuotes[11] = "<strong>&laquo;Schweizer Relocation hat tolle Arbeit geleistet. Der Consultant wusste bestens Bescheid, gab gerne Aus-<br />kunft&nbsp;&ndash; eine sehr gute Zusammen-<br />arbeit. Es war sehr hilfreich, dass unser Consultant in Amerika gelebt hat und wusste woher wir kommen und was unsere Erwartungen sind. Wir k&ouml;nnen Schweizer Relocation bestens weiterempfehlen.&raquo;</strong><br />Girish &amp; Catherine Nadkarni,<br />ABB Schweiz AG<br />(Oktober 2009)";
		vQuotes[12] = "<strong>&laquo;Obwohl ich das erste Mal mit einem Relocation Service umgezogen bin, kann ich mir nicht vorstellen, dass es eine bessere Betreuung als jene von Schweizer Relocation gibt.&raquo;</strong><br />Tomasz Romanowski, Alstom Schweiz AG<br />(September 2009)";
		vQuotes[13] = "<strong>&laquo;Ich bin mehr als zufrieden mit der Unterst&uuml;tzung von Schweizer Relocation, die w&auml;hrend meiner Ver-<br />setzung nach Z&uuml;rich geboten wurde. Diese exzellente Unterst&uuml;tzung hat meinen Umzug nahtlos und p&uuml;nktlich stattfinden lassen.&raquo;</strong><br />Ciprian FLOREA, Ecolab Europe GmbH<br />(Februar 2010)";
	} else { // Englishe Zitate
		vQuotes[0] = "<strong>&laquo;Schweizer Relocation have made our move to Z&uuml;rich extremely easy.&nbsp; They have made the impossible happen and we had a care free relocation without any signs of stress. This truly is a company that provides a FIVE star service.&nbsp; We would have no hesitation in recommending them to anyone wishing to relocate.&raquo;</strong><br />Aziza Johnson, Vifor&nbsp;Pharma AG<br />(September 2009)";
		vQuotes[1] = "<strong>&laquo;Excellent service. I have tried to do<br />all things by myself before using Schweizer Relocation and couldn't get the end of it. Their professionalism and great connections with the city of Zurich gotten a favourable outcome for my complex case with the work permit as well as they found me an awesome apartment that I can't wait to live in.&raquo;</strong><br />Ioannis Misopoulos,<br />International Probiotics Association<br />(October 2009)";
		vQuotes[2] = "<strong>&laquo;Overall, I was very happy with the service provided by Schweizer representatives. They are professional, flexible and responsive. The communication and attention to detail is excellent. I would recommend to my friends. (Let&rsquo;s face it&nbsp;&ndash; it&rsquo;s not the easiest job to meet client&rsquo;s demands, constantly changing needs and expectations). Good Job Schweizer Relocation Team.&raquo;</strong><br />Michael Costello, Baxter Healthcare SA<br />(November 2009)";
		vQuotes[3] = "<strong>&laquo;We were highly impressed with the organization, kindness and reliability of our relocation agent. Our overall experience was very positive thanks to Schweizer Relocation experience and knowledge.&raquo;</strong><br />Stephanie &amp; Regis Massolin,<br />Baxter Healthcare SA<br />(December 2009)";
		vQuotes[4] = "<strong>&laquo;It was not the first time, when I moved with a relocation company, but it was the best. The consultant of the company was nice and well prepared. I received a lot of useful information.&raquo;</strong><br />Istvan Szabo und Gabrielly Seregely,<br />Baxter Healthcare SA<br />(January 2010)";
		vQuotes[5] = "<strong>&laquo;Although I am faced with relocation for the first time I cannot imagine a better support than I got from Schweizer Relocation.&raquo;</strong><br />Tomasz Romanowski, Alstom Schweiz AG<br />(September 2009)";
		vQuotes[6] = "<strong>&laquo;Schweizer Relocation did an excellent job. The consultant was very knowledgeable and responsive and was also very pleasant to work with. It also helped that our consultant had lived in the US and so knew where we were coming from and what our expectations would be. I would have no hesitation in recommending Schweizer Relocation.&raquo;</strong><br />Girish &amp; Catherine Nadkarni,<br />ABB Schweiz AG<br />(October 2009)";
		vQuotes[7] = "<strong>&laquo;Very professional service, while being warm and sensitivies of expat needs.&raquo;</strong><br />Tadeu Nardocci, Novelis SA<br />(October 2009)";
		vQuotes[8] = "<strong>&laquo;Great job by the whole team that supported us in our move.&raquo;</strong><br />Eric Haynor, Ecolab Europe GmbH<br />(November 2009)";
		vQuotes[9] = "<strong>&laquo;Commentary: your experience in a nutshell&raquo;</strong><br />Kyle Smith, SR Technics Switzerland AG<br />(November 2009)";
		vQuotes[10] = "<strong>&laquo;Very easy, very pro-active and very inclusive of my wife within the process. All in all&nbsp;&hellip; very good.&raquo;</strong><br />Tim Robinson, Baxter Healthcare SA<br />(January 2010)";
		vQuotes[11] = "<strong>&laquo;I have been more than happy to be supported by Schweizer Relcoation during this transition to Zurich. Given this excellent support my move to Zurich was on time and flawless.&raquo;</strong><br />Ciprian FLOREA, Ecolab Europe GmbH<br />(Februar 2010)";
	}
	
	// Checken, ob Cookies zugelassen und schon gesetzt,
	// wenn nicht, Zufallszahl ermitteln und versuchen, ein Cookie zu schreiben
	if (!getCookie("srQuotes")) { // Keine Cookies oder Seite noch nicht besucht: Zitat wird per Zufallszahl ermittelt!
		
		var vQuoteNr = zufallszahl(vQuotes.length - 1); // Zufallszahl generieren
		
		// Cookie setzten (gilt 1 Tag)
		var vAblauf = new Date();
		var vTag = vAblauf.getTime() + (24 * 60 * 60 * 1000);
		vAblauf.setTime(vTag);
		var vExpires = vAblauf.toGMTString();
		
		setCookie("srQuotes", vQuoteNr+"?", null, vExpires);
		
	} else if (getCookie("srQuotes")) { // Cookie vorhanden
		
		var vCookieText = getCookie("srQuotes");
		
		while (!vQuoteNr) {
			
			var vQuoteNrTest = zufallszahl(vQuotes.length - 1); // Zufallszahl generieren
			
			if (vCookieText.indexOf(vQuoteNrTest+"?") != -1) { // Zahl bereits vorhanden
			} else { // Zahl noch nicht vorhanden
				vQuoteNr = vQuoteNrTest;
			}
			
		}
		
		var vQuotesLength = (vCookieText.length); // Anzahl der bereits im Cookie gespeicherten Zitate (x2 enspricht Stringlänge) ermitteln
		
		// Bei mehr als 5 gespeicherten Zitaten String kürzen
		if (vQuotesLength > 10) {
			vCookieText = vCookieText.substring(vQuotesLength-10, vQuotesLength);
		}
		
		// Cookie setzten (gilt 1 Tag)
		var vAblauf = new Date();
		var vTag = vAblauf.getTime() + (24 * 60 * 60 * 1000);
		vAblauf.setTime(vTag);
		var vExpires = vAblauf.toGMTString();
		
		setCookie("srQuotes", vCookieText+""+vQuoteNr+"?", null, vExpires);
		
	}
	
	var vZitat = vQuotes[vQuoteNr];
	
	if (document.getElementById("zitat")) {
		document.getElementById("zitat").innerHTML = vZitat;
	} else if (document.all.zitat) { // IE
		document.all.zitat.innerHTML = vZitat;
	}
	
}



// Macromedia-Scripts -----------------------------------------------------------------------------------------------------------------

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

