// Micro WAL Software - www.mws4u.de

var designs = 2;
var imagenr = 0;

var wOldSE = "Ger";

// Random Design  -----------------------------------
function rnddesign() {
  if (document.cookie) {
    var cookieString = document.cookie.split('; ');
    imagenr = cookieString[0].substring(cookieString[0].search("=") + 1, cookieString[0].length) % (designs + 1);

  } else {
    imagenr = Math.round(Math.random() * designs);
    var expires = new Date(new Date().getTime() + 1000*60*60*24);
    document.cookie = "design=" + imagenr + "; expires=" + expires.toGMTString() + ";";
    if (!document.cookie) {imagenr = 0;}
  }
}

// Konstrukt Top  -----------------------------------
function konstrukttop(menuobj) {
  rnddesign();
  
  document.write('<center><table border="0" width="810" cellpadding="0" style="border-collapse: collapse"><tr><td colspan="3" height="20"></td></tr><tr><td colspan="3" height="83"><a href="index.htm"><img border="0" src="images/konstrukttitel'+imagenr+'.jpg" width="810" height="83"></a></td></tr><tr><td width="8" background="images/konstruktlinks.jpg" rowspan="2"></td><td width="794" height="30" background="images/konstruktmenu.jpg"><p class="menu">&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'touch') ? '<b>' : '<a href="touch.htm">') + 'Touch' +
  ((menuobj == 'touch') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
  
  ((menuobj == 'icqreader') ? '<b>' : '<a href="icqreader.htm">') + 'ICQ Reader' +
  ((menuobj == 'icqreader') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'mwsreader') ? '<b>' : '<a href="mwsreader.htm">') + 'MWS Reader' +
  ((menuobj == 'mwsreader') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'onetap') ? '<b>' : '<a href="onetap.htm">') + 'oneTap' +
  ((menuobj == 'onetap') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'kontakt') ? '<b>' : '<a href="kontakt.htm">') + 'Kontakt' +
  ((menuobj == 'kontakt') ? '</b>' : '</a>') + 

  '</p></td><td width="8" background="images/konstruktrechts.jpg" rowspan="2"></td></tr><tr><td width="794" bgcolor="#FFFFFF"><div style="padding: 20px">');
}

// Konstrukt Bottom  -----------------------------------
function konstruktbottom() {
  document.write('</div></td></tr><tr><td colspan="3" height="37"><map name="copyright"><area href="copyright.htm" shape="rect" coords="15, 24, 223, 37"><area href="kontakt.htm" shape="rect" coords="712, 24, 796, 37"></map><img border="0" src="images/konstruktcopyright.jpg" width="810" height="37" usemap="#copyright"></td></tr></table></center>');
}

// Konstrukt Top MSG  -----------------------------------
function konstrukttopmsg(menuobj) {
  rnddesign();
  
  document.write('<center><table border="0" width="810" cellpadding="0" style="border-collapse: collapse"><tr><td colspan="3" height="20"></td></tr><tr><td colspan="3" height="83"><a href="../index.htm"><img border="0" src="../images/konstrukttitel'+imagenr+'.jpg" width="810" height="83"></a></td></tr><tr><td width="8" background="../images/konstruktlinks.jpg" rowspan="2"></td><td width="794" height="30" background="../images/konstruktmenu.jpg"><p class="menu">&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'touch') ? '<b>' : '<a href="../touch.htm">') + 'Touch' +
  ((menuobj == 'touch') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
  
  ((menuobj == 'icqreader') ? '<b>' : '<a href="../icqreader.htm">') + 'ICQ Reader' +
  ((menuobj == 'icqreader') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'mwsreader') ? '<b>' : '<a href="../mwsreader.htm">') + 'MWS Reader' +
  ((menuobj == 'mwsreader') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'onetap') ? '<b>' : '<a href="../onetap.htm">') + 'oneTap' +
  ((menuobj == 'onetap') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'kontakt') ? '<b>' : '<a href="../kontakt.htm">') + 'Kontakt' +
  ((menuobj == 'kontakt') ? '</b>' : '</a>') + 

  '</p></td><td width="8" background="../images/konstruktrechts.jpg" rowspan="2"></td></tr><tr><td width="794" bgcolor="#FFFFFF"><div style="padding: 20px">');
}

// Konstrukt Bottom MSG -----------------------------------
function konstruktbottommsg() {
  document.write('</div></td></tr><tr><td colspan="3" height="37"><map name="copyright"><area href="../copyright.htm" shape="rect" coords="15, 24, 223, 37"><area href="../kontakt.htm" shape="rect" coords="712, 24, 796, 37"></map><img border="0" src="../images/konstruktcopyright.jpg" width="810" height="37" usemap="#copyright"></td></tr></table></center>');
}

// Get Index Design  -----------------------------------
function getindexdesign() {
  rnddesign();
  var indeximage = new Image();
  indeximage.src = "images/index" + imagenr + ".jpg";
  window.document.getElementById("indexdesign").src = indeximage.src;
}

// Show Product  -----------------------------------
function showp(pnr) {
  document.getElementById("p1").style.display = (pnr == 1) ? "block" : "none";
  document.getElementById("p2").style.display = (pnr == 2) ? "block" : "none";
  document.getElementById("p3").style.display = (pnr == 3) ? "block" : "none";
  document.getElementById("p4").style.display = (pnr == 1) ? "block" : "none";
  document.getElementById("p5").style.display = (pnr == 2) ? "block" : "none";
  document.getElementById("p6").style.display = (pnr == 3) ? "block" : "none";
}

// UpDown Speech Engines-----------------------------

function UpDownSE(wNewSE){
  if (wNewSE != "") {
    document.getElementById(wOldSE).style.display="none";
    document.getElementById(wNewSE).style.display="block";
    wOldSE = wNewSE;
  }
}

// Öffnet ein fenster ..-----------------------------
function openimg(img,width,height){
width=width+36;
height=height+36;
	F1 = window.open(img,"MWS4u","width="+width+",height="+height+",left="+((screen.availWidth-width)/2)+",top="+((screen.availHeight-height)/2)+",scrollbars=no");
	F1.focus();
}
