// Micro WAL Software - www.mws4u.de

var designs = 2;
var imagenr = 0;

var wOldSE = "Ger";
var heatmap = '<script type="text/javascript" src="http://www.mws4u.de/piwik/plugins/ClickHeat/libs/js/clickheat.js"></script><noscript><p><a href="http://www.labsmedia.com/index.html">Seo tools</a></p></noscript><script type="text/javascript">clickHeatSite = 1;clickHeatGroup = encodeURIComponent(window.location.pathname+window.location.search);clickHeatServer = \'http://www.mws4u.de/piwik/plugins/ClickHeat/libs/click.php\';initClickHeat();</script>'
// Random Design  -----------------------------------
function rnddesign() {
  if (getCookie('design')) {
    imagenr = getCookie('design') % (designs + 1);

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

// get the Cookie
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  x=x.replace(/^\s+|\s+$/g,"");
  if (x==c_name)
    {
    return unescape(y);
    }
  }
}

// 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 == 'mwsreader') ? '<b>' : '<a href="mwsreader.htm">') + 'MWS Reader' +
  ((menuobj == 'mwsreader') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +
  
  ((menuobj == 'engines') ? '<b>' : '<a href="engines.htm">') + 'Sprecher' +
  ((menuobj == 'engines') ? '</b>' : '</a>') + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' +

  ((menuobj == 'order') ? '<b>' : '<a href="mwsreader-bestellen.htm">') + 'Bestellen' +
  ((menuobj == 'order') ? '</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, 310, 37"><area href="kontakt.htm" shape="rect" coords="712, 24, 796, 37"></map><img border="0" alt="Copyright (C) 2011 directINNOVATION UG (haftungsbeschränkt). Alle Rechte vorbehalten" src="images/konstruktcopyright.jpg" width="810" height="37" usemap="#copyright"></td></tr></table></center><!-- Piwik --> <script type="text/javascript">var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.mws4u.de/piwik/" : "http://www.mws4u.de/piwik/");document.write(unescape("%3Cscript src=\'" + pkBaseURL + "piwik.js\' type=\'text/javascript\'%3E%3C/script%3E"));</script><script type="text/javascript">try {var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.setRequestMethod(\'POST\');piwikTracker.trackPageView();piwikTracker.enableLinkTracking();} catch( err ) {}</script><noscript><p><img src="http://www.mws4u.de/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript><!-- End Piwik Tracking Code -->'+heatmap);
}

// 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"><img border="0" src="../images/konstrukttitel'+imagenr+'.jpg" width="810" height="83"></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 == '1') ? 'Online-Shop  &#8594;  <b>Bestellung</b>  &#8594;  Bezahlung' : '')  +
  ((menuobj == '2') ? 'Online-Shop  &#8594;  Bestellung  &#8594;  <b>Bezahlung</b>' : '') + 

  '</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" alt="Copyright (C) 2011 directINNOVATION UG (haftungsbeschränkt). Alle Rechte vorbehalten" src="../images/konstruktcopyright.jpg" width="810" height="37" usemap="#copyright"></td></tr></table></center><!-- Piwik --> <script type="text/javascript">var pkBaseURL = (("https:" == document.location.protocol) ? "https://www.mws4u.de/piwik/" : "http://www.mws4u.de/piwik/");document.write(unescape("%3Cscript src=\'" + pkBaseURL + "piwik.js\' type=\'text/javascript\'%3E%3C/script%3E"));</script><script type="text/javascript">try {var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);piwikTracker.setRequestMethod(\'POST\');piwikTracker.trackPageView();piwikTracker.enableLinkTracking();} catch( err ) {}</script><noscript><p><img src="http://www.mws4u.de/piwik/piwik.php?idsite=1" style="border:0" alt="" /></p></noscript><!-- End Piwik Tracking Code -->'+heatmap);
}

// 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();
}

