/* <![CDATA[ */
  // decrypt helper function
function decryptCharcode(n,start,end,offset) {
	n = n + offset;
	if (offset > 0 && n > end)	{
		n = start + (n - end - 1);
	} else if (offset < 0 && n < start)	{
		n = end - (start - n - 1);
	}
	return String.fromCharCode(n);
}
  // decrypt string
function decryptString(enc,offset) {
	var dec = "";
	var len = enc.length;
	for(var i=0; i < len; i++)	{
		var n = enc.charCodeAt(i);
		if (n >= 0x2B && n <= 0x3A)	{
			dec += decryptCharcode(n,0x2B,0x3A,offset);	// 0-9 . , - + / :
		} else if (n >= 0x40 && n <= 0x5A)	{
			dec += decryptCharcode(n,0x40,0x5A,offset);	// A-Z @
		} else if (n >= 0x61 && n <= 0x7A)	{
			dec += decryptCharcode(n,0x61,0x7A,offset);	// a-z
		} else {
			dec += enc.charAt(i);
		}
	}
	return dec;
}
  // decrypt spam-protected emails
function linkTo_UnCryptMailto(s)	{
	location.href = decryptString(s,-3);
}
function openWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function openImpressumWindow() {
  window.open('impressum.html', '', 'width=500,height=400');
}

function openKontaktWindow() {
  window.open('basis-cgi/kontakt/', '', 'width=500,height=430');
}

function menue_ausgabe(sprache, auswahl) {
  menue = new Object();
  if (sprache == 'cn')
  {
    menue["imprint.html"] = "&#29256;&#26412;&#35828;&#26126;";
  }
  else
  {
    menue["imprint.html"] = "Imprint";
//  menue["contact.html"] = "Contact";
  }

  document.writeln('<div id="navigation"><table><tr>');
  for (var seite in menue) {
    document.write('<td><a class="navi');
    if (seite == auswahl) document.write('_self');
    document.write('" href="' + seite + '">' + menue[seite] + '</a></td>');
  }
  document.writeln('</tr></table></div>');
}

function rahmen_ausgabe(sprache) {
  if (sprache == 'cn') {
    document.writeln('<div id="logo"><a href="http://tq-electronic.cn"><img name="logo" src="style/Logo TQE Web_klein.gif" alt="" border="0" /></a></div>');
    document.writeln('<div id="sprache"><a href="http://tq-electronic.com"><img name="sprache" src="style/fahne_uk_kl.gif" alt="" border="0" /></a></div>');
  } else {
    document.writeln('<div id="logo"><a href="http://tq-electronic.com"><img name="logo" src="style/Logo TQE Web_klein.gif" alt="" border="0" /></a></div>');
    document.writeln('<div id="sprache"><a href="http://tq-electronic.cn"><img name="sprache" src="style/fahne_china_kl.gif" alt="" border="0" /></a></div>');
  }

  document.writeln('<div id="rahmen_oben0">');
  document.writeln('  <img name="rahmen_oben0" src="style/background_white.gif" alt="" border="0" height="76px" width="100%" /></div>');
  document.writeln('<div id="rahmen_oben1"></div>');
  document.writeln('<div id="rahmen_oben2">');
  document.writeln('  <img name="rahmen_oben2" src="style/search.gif" alt="" border="0" /></div>');
  document.writeln('<div id="rahmen_oben3">');
  document.writeln('  <img name="rahmen_oben3" src="style/background_grayEB.gif" alt="" border="0" height="26px" width="100%" /></div>');
  document.writeln('<div id="rahmen_oben4">');
  document.writeln('  <img name="rahmen_oben4" src="style/rahmen_oben4.gif" alt="" border="0" height="19px" width="100%" /></div>');
  document.writeln('<div id="rahmen_ecke1">');
  document.writeln('  <img name="rahmen_ecke1" src="style/groupkvleft.jpg" alt="" border="0" /></div>');
  document.writeln('<div id="rahmen_ecke2">');
  document.writeln('  <img name="rahmen_ecke2" src="style/groupkvright.jpg" alt="" border="0" /></div>');
  document.writeln('<div id="rahmen_links1">');
  document.writeln('  <img name="rahmen_links1" src="style/background.jpg" alt="" border="0" /></div>');
  document.writeln('<div id="rahmen_links2">');
  document.writeln('  <img name="rahmen_links2" src="style/background2.jpg" alt="" border="0" /></div>');
  document.writeln('<div id="rahmen_links3">');
  document.writeln('  <img name="rahmen_links3" src="style/background_grayBD.gif" alt="" border="0" height="100%" width="163px" /></div>');
  document.writeln('<div id="rahmen_links4">');
  document.writeln('  <img name="rahmen_links4" src="style/rahmen_links4.gif" alt="" border="0" height="100%" width="61px" /></div>');
}
/* ]]> */
