function email_josek() {var email = "&#105;&#110;&#102;&#111;"; var s15883 = "&#74;&#111;&#115;&#101;&#107;&#100;&#101;&#115;&#105;&#103;&#110;";     document.write(email+'&#64;'+s15883+'&#46;&#100;&#101;')	}
function email_de() {var email = "&#105;&#110;&#102;&#111;"; var s3996 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s3996+'&#46;&#100;&#101;')	}
function email_it() {var email = "&#105;&#110;&#102;&#111;"; var s14040 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s14040+'&#46;&#105;&#116;')	}
function email_fr() {var email = "&#105;&#110;&#102;&#111;"; var s3233 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s3233+'&#46;&#102;&#114;')	}
function email_ch() {var email = "&#105;&#110;&#102;&#111;"; var s10565 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s10565+'&#46;&#99;&#104;')	}
function email_at() {var email = "&#105;&#110;&#102;&#111;"; var s9995 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s9995+'&#46;&#97;&#116;')	}
function email_nl() {var email = "&#105;&#110;&#102;&#111;"; var s5094 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s5094+'&#46;&#110;&#108;')	}
function email_es() {var email = "&#105;&#110;&#102;&#111;"; var s10768 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s10768+'&#46;&#101;&#115;')	}
function email_en() {var email = "&#105;&#110;&#102;&#111;"; var s7067 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s7067+'&#46;&#99;&#111;&#46;&#117;&#107;')	}
function email_hu() {var email = "&#105;&#110;&#102;&#111;"; var s5336 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s5336+'&#46;&#104;&#117;')	}
function email_fi() {var email = "&#106;&#117;&#104;&#97;&#46;&#111;&#106;&#97;"; var s8071 = "&#107;&#101;&#107;&#111;";     document.write(email+'&#64;'+s8071+'&#46;&#102;&#105;')	}
function email_cz() {var email = "&#114;&#111;&#116;&#116;"; var s7705 = "&#115;&#108;&#99;";     document.write(email+'&#64;'+s7705+'&#46;&#99;&#122;')	}
function email_no() {var email = "&#106;&#111;&#114;&#110;&#46;&#115;&#116;&#105;&#97;&#110;"; var s10485 = "&#103;&#114;&#101;&#115;&#118;&#105;&#103;";     document.write(email+'&#64;'+s10485+'&#46;&#110;&#111;')	}
function email_pl() {var email = "&#65;&#100;&#114;&#105;&#97;&#110;&#97;&#46;&#78;&#111;&#119;&#97;&#107;"; var s4326 = "&#109;&#97;&#110;&#97;&#103;&#101;&#109;&#101;&#110;&#116;&#46;&#52;&#114;&#117;&#110;";     document.write(email+'&#64;'+s4326+'&#46;&#112;&#108;')	}
function email_ru() {var email = "&#115;&#116;&#101;&#112;&#101;&#110;&#107;&#111;&#118;&#97;"; var s9247 = "&#112;&#97;&#108;&#109;&#105;&#114;&#97;&#116;&#109;";     document.write(email+'&#64;'+s9247+'&#46;&#99;&#111;&#109;')	}
function email_se() {var email = "&#114;&#111;&#103;&#101;&#114;&#46;&#112;&#97;&#108;&#102;&#102;&#121;"; var s2120 = "&#115;&#116;&#97;&#100;&#105;&#117;&#109;";     document.write(email+'&#64;'+s2120+'&#46;&#115;&#101;')	}
function email_ae() {var email = "&#99;&#97;&#114;&#108;"; var s7575 = "&#115;&#111;&#117;&#114;&#99;&#101;&#114;&#105;&#116;&#101;";     document.write(email+'&#64;'+s7575+'&#46;&#97;&#101;')	}
function email_us() {var email = "&#104;&#111;&#109;&#101;&#112;&#97;&#103;&#101;"; var s3297 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s3297+'&#46;&#99;&#111;&#109;')	}
function email_csr() {var email = "&#99;&#115;&#114;"; var s8087 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s8087+'&#46;&#100;&#101;')	}
function email_andreas_duck() {var email = "&#65;&#110;&#100;&#114;&#101;&#97;&#115;&#46;&#68;&#117;&#99;&#107;"; var s6729 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s6729+'&#46;&#100;&#101;')	}
function email_jennifer_okoye() {var email = "&#106;&#101;&#110;&#110;&#105;&#102;&#101;&#114;&#46;&#111;&#107;&#111;&#121;&#101;"; var s4931 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s4931+'&#46;&#100;&#101;')	}
function email_marion_wigger () {var email = "&#109;&#97;&#114;&#105;&#111;&#110;&#46;&#119;&#105;&#103;&#103;&#101;&#114;"; var s5119 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s5119+'&#46;&#100;&#101;')	}
function email_raphael_berlth() {var email = "&#114;&#97;&#112;&#104;&#97;&#101;&#108;&#46;&#98;&#101;&#114;&#108;&#116;&#104;"; var s7655 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s7655+'&#46;&#100;&#101;')	}
function email_annette_droege() {var email = "&#97;&#110;&#110;&#101;&#116;&#116;&#101;&#46;&#100;&#114;&#111;&#101;&#103;&#101;"; var s12987 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s12987+'&#46;&#100;&#101;')	}
function email_matthias_heidemeyer() {var email = "&#109;&#97;&#116;&#116;&#104;&#105;&#97;&#115;&#46;&#104;&#101;&#105;&#100;&#101;&#109;&#101;&#121;&#101;&#114;"; var s12407 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s12407+'&#46;&#100;&#101;')	}
function email_Thorsten_vanSchelve() {var email = "&#84;&#104;&#111;&#114;&#115;&#116;&#101;&#110;&#46;&#118;&#97;&#110;&#83;&#99;&#104;&#101;&#108;&#118;&#101;"; var s8520 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s8520+'&#46;&#100;&#101;')	}
function email_sarah_schuerkoetter() {var email = "&#83;&#97;&#114;&#97;&#104;&#46;&#83;&#99;&#104;&#117;&#101;&#114;&#107;&#111;&#101;&#116;&#116;&#101;&#114;"; var s7431 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s7431+'&#46;&#100;&#101;')	}
function email_sonja_kruehler() {var email = "&#115;&#111;&#110;&#106;&#97;&#46;&#107;&#114;&#117;&#101;&#104;&#108;&#101;&#114;"; var s2957 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s2957+'&#46;&#100;&#101;')	}
function email_christopher_billington() {var email = "&#99;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#46;&#98;&#105;&#108;&#108;&#105;&#110;&#103;&#116;&#111;&#110;"; var s12701 = "&#98;&#114;&#111;&#111;&#107;&#115;&#114;&#117;&#110;&#110;&#105;&#110;&#103;";     document.write(email+'&#64;'+s12701+'&#46;&#100;&#101;')	}


function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function druckvorschau(id, lang)
{
	Fenster = window.open("druckansicht.php?id=" + id + "&lang=" + lang, "Druckversion", "width=680, height=660, resizable=yes, menubar=no, scrollbars=yes");
	Fenster.moveTo(50,50);
	Fenster.focus();
}

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

function BImage (id, imageURL) {
  if (document.layers)
    document[id].background.src = imageURL == 'none' ? null : imageURL;
  else if (document.all) {
    document.all[id].style.backgroundImage = imageURL == 'none' ? 'none' : 'url(' + imageURL + ')';
    document.all[id].style.visibility = 'visible';
  }
  else if (document.getElementById)
    document.getElementById(id).style.backgroundImage = imageURL == 
'none' ? 'none' : 'url(' + imageURL + ')';
}

function pageScroll() {
//window.scroll(0,230);
}

//for (i=0;i<=3;i++)  {
//window.scrollBy(0,59); // horizontal and vertical scroll increments
//}

var xmlhttp
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	  try {
	  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
	 } catch (e) {
	  try {
	    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
	  } catch (E) {
	   xmlhttp=false
	  }
	 }
	@else
	 xmlhttp=false
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	 try {
	  xmlhttp = new XMLHttpRequest();
	 } catch (e) {
	  xmlhttp=false
	 }
	}
	function myXMLHttpRequest() {
	  var xmlhttplocal;
	  try {
	    xmlhttplocal= new ActiveXObject("Msxml2.XMLHTTP")
	 } catch (e) {
	  try {
	    xmlhttplocal= new ActiveXObject("Microsoft.XMLHTTP")
	  } catch (E) {
	    xmlhttplocal=false;
	  }
	 }

	if (!xmlhttplocal && typeof XMLHttpRequest!='undefined') {
	 try {
	  var xmlhttplocal = new XMLHttpRequest();
	 } catch (e) {
	  var xmlhttplocal=false;
	  alert('couldn\'t create xmlhttp object');
	 }
	}
	return(xmlhttplocal);
}

function dreiD(artnr, url) {
	var theUL = document.getElementById('product_pic_big'); // the UL	
	theUL.innerHTML = '<div class="loading">Hallo</div>';	
	Artnr = "../../../flash/"+artnr+"/";	
	movie = Artnr+'/'+url+'.swf';
	theUL.innerHTML = '<div class="flashm"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="500" height="415" id="500415" align="middle"><param name="movie" value="'+movie+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="base" value="'+Artnr+'" /><embed src="'+movie+'" quality="high" bgcolor="#ffffff" width="500" height="415" name="500415" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" base="'+Artnr+'" /></object></div>';
}

function tech(artnr) {
	var theUL = document.getElementById('prod_desc'); // the UL	
	//theUL.innerHTML = '<div class="loading"></div>';	
	xmlhttp.open("POST", '../../../tec.php', true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.send('id='+artnr);	
	var go = eval("handleResponse('"+artnr+"')"); 
	//xmlhttp.onreadystatechange = setTimeout("handleResponse('"+Artnr+"')", 400); 
}

function penny(ale, her, dam, jun, mad, wgr, kat, order, prs, wei, typ) {
	var theUL = document.getElementById('prod_desc'); // the UL	
	theUL.innerHTML = '<div class="loading">loading</div>';	
	
	//xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	var parameters = "alle="+ale+"&herren="+her+"&damen="+dam+"&jungen="+jun+"&maedchen="+mad+"&order="+order+""+wgr+""+prs+""+kat+""+wei+""+typ;
	xmlhttp.open("POST", '../../../penny_ajax.php', true);
	//Send the proper header information along with the request
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.setRequestHeader("Content-length", parameters.length);
	xmlhttp.setRequestHeader("Connection", "close");
    xmlhttp.send(parameters);	
	var go = eval("handleResponse('"+ale+"')"); 
	//xmlhttp.onreadystatechange = setTimeout("handleResponse('"+adu+"')", 400); 	
}

function compare(artnr) {
	var theUL = document.getElementById('prod_desc'); // the UL	
	//theUL.innerHTML = '<div class="loading"></div>';	
	xmlhttp.open("POST", '../../../tec_comp.php', true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.send('id='+artnr);	
	var go = eval("handleResponse('"+artnr+"')"); 
	//xmlhttp.onreadystatechange = setTimeout("handleResponse('"+Artnr+"')", 400); 
}

function size(artnr) {
	var theUL = document.getElementById('prod_desc'); // the UL	
	//theUL.innerHTML = '<div class="loading"></div>';	
	xmlhttp.open("POST", '../../../size.php', true);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.send('id='+artnr);	
	var go = eval("handleResponse('"+artnr+"')"); 
	//xmlhttp.onreadystatechange = setTimeout("handleResponse('"+Artnr+"')", 400); 
}

function close_me(Artnr) {
	var theUL = document.getElementById('product_pic_big'); // the UL	
	theUL.innerHTML = '<div class="loading"></div>';
	
	var theAL = document.getElementById('p'+Artnr); 
	theAL.innerHTML = '<a title="Mehr" href="javascript:sndReq(\''+Artnr+'\')"><img src="template/mehr_button.gif" width="67" height="27" border="0" alt="Mehr" style="border-style:none;" /></a>';
}

function handleResponse(Artnr) {
  if(xmlhttp.readyState == 4){ 
		if (xmlhttp.status == 200){
        var response = xmlhttp.responseText;    
            update = response;
            changeText(Artnr, update); 	
		}
    }
	else{ setTimeout( 'handleResponse(\"'+Artnr+'\")', 200); 
    }
		window.scroll(0,230);
}


function changeText( div2show, text ) {
	div2show ="prod_desc";
    // Detect Browser
    var IE = (document.all) ? 1 : 0;
    var DOM = 0; 

    // Does not work with faked User Agent
    if (parseInt(navigator.appVersion) >=5) {DOM=1};

    //if (document.getElementById) {DOM=1};
    // Grab the content from the requested "div" and show it in the "container"
    if (DOM) {
        var viewer = document.getElementById(div2show);
        viewer.innerHTML = text;
    }  else if(IE) {
		document.getElementById(div2show).innerHTML = text;
        document.all[div2show].innerHTML = text;
    }
}

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

$(document).ready(function ()
	$('iframe').each(function()
		var url = $(this).attr("src")
	$(this).attr("src",url+"?wmode=transparent")
	);
);
