var lang= "en";
var panel= "login";

function getElement(id) {
	if(document.getElementById(id)) return document.getElementById(id);
   else return 'undefined'; //alert("Error: " + id + " not found");
}

function tooglePanels(button) {
	var login= getElement('img_login');
	var imgdb= getElement('img_imagedb');
	var panel1= getElement('panel1');
	var panel2= getElement('panel2');
	var panel3= getElement('panel3');
	var login_headline = getElement('login_headline');
	var login_subheadline = getElement('login_subheadline');
	panel= button;
		
	if(button.match('login')) {
		login.src= '/UserAuthority/Images/tab_login_' + lang + '_on.gif';
		imgdb.src= '/UserAuthority/Images/tab_imgdb_' + lang + '_off.gif';
		panel1.style.display= "block";
		panel2.style.display= "none";
		panel3.style.display= "none";
		login_headline.src = '/UserAuthority/Images/silhouette_b2b_login_' + lang + '.jpg';
      if(lang=='en') login_subheadline.innerHTML = "Silhouette International Schmied AG B2B portal for customers, sales partners and employees.";
      if(lang=='de') login_subheadline.innerHTML = "Silhouette International Schmied AG B2B Portal f&uuml;r Konsumenten, Verkaufspartner und Mitarbeiter.";
	} else if(button.match('imgdb')) {
		login.src= '/UserAuthority/Images/tab_login_' + lang + '_off.gif';
		imgdb.src= '/UserAuthority/Images/tab_imgdb_' + lang + '_on.gif';
		panel1.style.display= "none";
		panel2.style.display= "block";
		panel3.style.display= "none";
		login_headline.src = '/UserAuthority/Images/silhouette_b2b_imagedb_' + lang + '.jpg';
		if(lang=='en') login_subheadline.innerHTML = "A download area for Silhouette International Schmied AG customers. Here, image and document collections can be used by means of the appropriate PIN code.";
        if(lang=='de') login_subheadline.innerHTML = "Download Bereich f&uuml;r Kunden der Silhouette International Schmied AG. Bild- und Dokumentensammlungen k&ouml;nnen hier mit den entsprechenden PIN-Codes genutzt werden.";
	} else if(button.match('password')) {
		login.src= '/UserAuthority/Images/tab_login_' + lang + '_off.gif';
		imgdb.src= '/UserAuthority/Images/tab_imgdb_' + lang + '_off.gif';
		panel1.style.display= "none";
		panel2.style.display= "none";
		panel3.style.display= "block";
	}
}

function showImprint() {
	var fullpage= getElement('fullpage');
	var imprint= getElement('imprint');
	imprint.style.display= 'block';
	fullpage.style.display= 'block';
}

function hideImprint() {
	var fullpage= getElement('fullpage');
	var imprint= getElement('imprint');
	imprint.style.display= 'none';
	fullpage.style.display= 'none';
}

function showLangDropDown() {
   var langdropdown= getElement('langdropdown');
   langdropdown.style.display= 'block';
}

function hideLangDropDown() {
   var langdropdown= getElement('langdropdown');
   langdropdown.style.display= 'none';
}

function switchEn() {
    lang= "en";
    hideLangDropDown();
    getElement('imprintcontent').innerHTML='<div class="element"><img id="imprintheadline" src="/UserAuthority/Images/imprint_en.jpg" alt="Imprint" /></div><div class="clear" style="height: 10px;"></div><div class="spacer"></div><div class="element"><b>Silhouette International Schmied AG</b></div><div class="clear"></div><div class="spacer"></div><div class="element">Postfach 538<br />Ellbognerstraße 24<br />A-4021 Linz  <br /></div><div class="element">Telefon +43 (0) 732 3848-0<br />Telefax +43 (0) 732 3848-422<br />Firmenbuch: FN 78436y<br />UID-Nummer: ATU36926403<br />Firmenbuchgericht: Landesgericht Linz<br /></div><div class="clear"></div><div class="spacer" style="height: 30px;"></div><div class="element"><b>Copyright</b><br />In keeping with the specific behaviour of Internet users, Silhouette views its Internet presentation as an accompanying communication activity. The global orientation and unlimited usability of the Internet make it necessary that our homepage design, contents and implementation should remain an exclusive competence of Silhouette International in Linz. The contents and structure are protected by copyright.<br />Copyrights are considered very strong rights devolving to the individual and therefore cannot be assigned to third parties.<br />All that may be sold is the use of these rights for a specific or indeterminate period. Silhouette always tries its utmost to protect these rights and to exploit them in accordance with the law. Any use of these data requires express written consent, unless the information is used for personal, non-commercial purposes. It must be expressly indicated that only pictures provided for the homepage may be used on the Internet.<br /></div><div class="element"><b>Data protection</b><br />First basic rule: Whoever uses the silhouette.com homepage agrees to the capturing, processing and use of his or her data. This is international standard practice. However, the data captured are depersonalised and recorded solely for the purposes of market research, advertising activities and website design.<br />In using these data, Silhouette does not enter into any obligation to inform the persons concerned. In any case, however, Silhouette guarantees that it will not pass personal data on to third parties.<br /></div><div class="element"><b>Links</b><br />On the Internet, too, recognition and recognizability of the Silhouette brand are the prime objectives; as a result, our corporate design must also be adhered to in the virtual world. In accordance with this principle, there may be only one Silhouette homepage on the Web. For this purpose, optical practitioners and other partners will find it most useful to provide a link that takes visitors interested in Silhouette from their own homepage to the Silhouette website.<br />The link banner comprises a visual motif similar to the ad motif, the logo and text(slogan). For the links, Silhouette offers a selection of different motifs. These motifs are regularly updated and adapted to the current advertising presentations. To upload one or more motifs, it is necessary to log in first with Silhouette International. </div><div class="clear"></div>';
    if (panel=='login') {
        getElement('login_subheadline').innerHTML= 'Silhouette International Schmied AG B2B portal for business partners and employees.';
    } else {
        getElement('login_subheadline').innerHTML= 'A download area for Silhouette International Schmied AG business partners. Here, image and document collections can be used by means of the appropriate PIN codes.';
    }
    if (getElement('button_password') != 'undefined') {
    	getElement('button_password').innerHTML= 'Forgot your password?';
    }
    getElement('bottom_imprint').innerHTML= 'Imprint';
    switchLang(lang);
}

function switchDe() {
    lang= "de";
    hideLangDropDown();
    getElement('imprintcontent').innerHTML='<div class="element"><img id="imprintheadline" src="/UserAuthority/Images/imprint_en.jpg" alt="Imprint" /></div><div class="clear" style="height: 10px;"></div><div class="spacer"></div><div class="element"><b>Silhouette International Schmied AG</b></div><div class="clear"></div><div class="spacer"></div><div class="element">Postfach 538<br />Ellbognerstraße 24<br />A-4021 Linz  <br /></div><div class="element">Telefon +43 (0) 732 3848-0<br />Telefax +43 (0) 732 3848-422<br />Firmenbuch: FN 78436y<br />UID-Nummer: ATU36926403<br />Firmenbuchgericht: Landesgericht Linz<br /></div><div class="clear"></div><div class="spacer" style="height: 30px;"></div><div class="element"><b>Copyright</b><br />Entsprechend des spezifischen Nutzerverhaltens der Internet-User versteht Silhouette den Internet Auftritt als flankierende Kommunikationsma&szlig;nahme. Die globale Ausrichtung und Nutzbarkeit des Internets macht es erforderlich, dass die Gestaltung, die Inhalte und die Umsetzung ausschlie&szlig;lich Silhouette International in Linz obliegt. Der Inhalt und die Struktur sind urheberrechtlich gesch&uuml;tzt.Urheberrechte gelten als extrem starke Pers&ouml;nlichkeitsrechte, die daher auch nicht &uuml;bertragen werden k&ouml;nnen.Lediglich die Nutzung kann auf bestimmte oder unbestimmte Zeitr&aumlume ver&aumlu&szlig;ert werden. Silhouette ist hier stets bem&uuml;ht, diese Rechte zu wahren und ordnungsgem&auml&szlig; zu nutzen. Jede Nutzung der Daten bedarf einer ausdr&uuml;cklichen schriftlichen Zustimmung, es sei denn, die Informationen dienen dem pers&ouml;nlichen und nichtgewerblichen Bedarf. Ausdr&uuml;cklich muss darauf hingewiesen werden, dass nur auf der Homepage zur Verf&uuml;gung gestelltes Bildmaterial im Internet verwendet werden darf.</div><div class="element"><b>Datenschutz</b><br />Grunds&aumltzlich gilt: Wer immer den silhouette.com-Auftritt n&uuml;tzt, erkl&aumlrt sich mit der Erhebung, Verarbeitung, Nutzung der Daten einverstanden. Dies ist international &uuml;blicher Standard. Die erhobenen Daten werden allerdings unpersonalisiert wie auch ausschlie&szlig;lich zum Zwecke der Marktforschung, zur Werbung und zur Gestaltung der Seite erhoben.<br /><br />Silhouette geht bei der Nutzung keinerlei Informationspflicht ein. Silhouette garantiert jedenfalls keine pers&ouml;nlichen Daten an Dritte weiterzugeben.<br /></div><div class="element"><b>Links</b><br />Auch im Internet ist die Wiedererkennung und Selbst&aumlhnlichkeit der Marke Silhouette oberstes Gebot, was auch in der virtuellen Welt eine Einhaltung des Corporate Designs erfordert. Diesem Grundsatz folgend soll es im Internet nur eine Silhouette-Homepage geben. Zu diesem Zweck ist es f&uuml;r Augenoptiker und andere Partner am zweckdienlichsten Silhouette interessierte Surfer von der eigenen Homepage auf die Silhouette-Site via Link weiterzuleiten.<br /><br />Das Motiv f&uuml;r den Link in Form eines Banners besteht aus einem optischen Motiv, &aumlhnlich dem Anzeigensujet, dem Logo als auch Text (Slogan). Zur Erstellung des Links stellt Silhouette einige unterschiedliche Sujets zur Auswahl. Diese Sujets werden in regelm&auml&szlig;igen Abst&aumlnden aufgefrischt und an den aktuellen Auftritt angepasst. Voraussetzung f&uuml;r den Upload eines oder mehrerer Sujets ist eine Anmeldung bei Silhouette International.</div><div class="clear"></div>';
    if (panel=='login') {
        getElement('login_subheadline').innerHTML= 'B2B Portal der Silhouette International Schmied AG für Geschäftspartner und Mitarbeiter.';
    } else if (panel == 'imgdb') {
        getElement('login_subheadline').innerHTML= 'Download Bereich für Geschäftspartner der Silhouette International Schmied AG. Bild- und Dokumentensammlungen können hier mit den entsprechenden PIN-Codes genutzt werden.';
    }
    if (getElement('button_password') != 'undefined') {
    	getElement('button_password').innerHTML= 'Passwort vergessen?';
    }
    getElement('bottom_imprint').innerHTML= 'Impressum';
    switchLang(lang);
}


function switchLang(lang) {
    
    if (panel == 'login') {
        getElement('login_headline').src= '/UserAuthority/Images/silhouette_b2b_login_' + lang + '.jpg';
        getElement('img_login').src='/UserAuthority/Images/tab_login_' + lang + '_on.gif';
        getElement('img_imagedb').src= '/UserAuthority/Images/tab_imgdb_' + lang + '_off.gif';
    } else if (panel == 'imgdb') {
        getElement('login_headline').src= '/UserAuthority/Images/silhouette_b2b_imagedb_' + lang + '.jpg';
        getElement('img_login').src='/UserAuthority/Images/tab_login_' + lang + '_off.gif';
        getElement('img_imagedb').src= '/UserAuthority/Images/tab_imgdb_db_' + lang + '_on.gif';
    }
    
    getElement('langstatus').src='/UserAuthority/Images/lang_' + lang + '.png';
    getElement('langlabel').src= '/UserAuthority/Images/changelang_' + lang + '.png';
    getElement('label_username').src= '/UserAuthority/Images/username_' + lang + '.gif';
    getElement('label_password').src= '/UserAuthority/Images/password_' + lang + '.gif';
    getElement('button_loginenter').src= '/UserAuthority/Images/enter_' + lang + '.jpg';
    getElement('label_pincode').src= '/UserAuthority/Images/pincode_' + lang + '.gif';
    getElement('button_pincodeenter').src= '/UserAuthority/Images/enter_' + lang + '.jpg';
    getElement('label_email').src= '/UserAuthority/Images/email_' + lang + '.jpg';
    getElement('button_sendpass').src= '/UserAuthority/Images/send_password_' + lang + '.jpg';
    getElement('imprintheadline').src= '/UserAuthority/Images/imprint_' + lang + '.jpg';
}
