function ShowHide(id, visibility) {
    obj = document.getElementsByTagName("div");
    obj[id].style.visibility = visibility;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function changeDoc(URL1,URL2)
{
	if(URL1 != "") {  parent.frames.leftFrame.location.href=URL1; }
  parent.frames.mainFrame.location.href=URL2;
}

function openphoto_bodystain($verkaufslink) {	
	 window.open(datei,"FEHE", "width=620,height=620,left=320,top=50,menubar=no,toolbar=no,scrollbars=no"); 
 }
 
function openFile(id) {	
     var datei = "https://www.PotatoSystem.com/process/sell?tan=" + id;
	 hswindow = window.open(datei,"Potato","width=780, height=580, location=no, menubar=no, statusbar=no,toolbar=no, scrollbars=yes, dependent=yes, resizable=yes, screenX=10,screenY=10"); 
	 hswindow.focus();
 }
 
function openMp3Cart() {	
     var datei = "https://www.PotatoSystem.com/process/sell?user=6376151";
	 hswindow = window.open(datei,"Potato","width=780, height=580, location=no, menubar=no, statusbar=no,toolbar=no, scrollbars=yes, dependent=yes, resizable=yes, screenX=10,screenY=10"); 
	 hswindow.focus();
 } 
 
 function chkPodcast() {
  if (document.Podcast.Versender.value == "") {
    alert("Please fill in your e-mail address!");
    document.Podcast.Versender.focus();
    return false;
  }
 else if (document.Podcast.Versender.value == "yourname@mail.com") {
    alert("Please fill in your e-mail address!");
    document.Podcast.Versender.focus();
    return false;
  }
 else if (document.Podcast.Versender.value.indexOf("@") == -1) {
    alert("There is no e-mail address!");
    document.Podcast.Versender.focus();
    return false;
  }
   else if (document.Podcast.Empfaenger.value == "") {
    alert("Please fill in your e-mail address!");
    document.Podcast.Empfaenger.focus();
    return false;
  }
  else if (document.Podcast.Empfaenger.value == "yourfriend@mail.com") {
    alert("Please fill in your e-mail address!");
    document.Podcast.Empfaenger.focus();
    return false;
  }
  else if (document.Podcast.Empfaenger.value.indexOf("@") == -1) {
    alert("There is no e-mail address!");
    document.Podcast.Empfaenger.focus();
    return false;
  }
}
 
function chkFormular () {
  if (document.Formular.Mail.value == "") {
    alert("Please fill in your e-mail address!");
    document.Formular.Mail.focus();
    return false;
  }
  if (document.Formular.Mail.value == "yourname@mail.com") {
    alert("Please fill in your e-mail address!");
    document.Formular.Mail.focus();
    return false;
  }
  if (document.Formular.Mail.value.indexOf("@") == -1) {
    alert("There is no e-mail address!");
    document.Formular.Mail.focus();
    return false;
  }
}

function chkFeedback() {
  if (document.promoFormular.Mail.value == "") {
    alert("Please fill in your e-mail address!");
    document.promoFormular.Mail.focus();
    return false;
  }
  if (document.promoFormular.Mail.value == "yourname@mail.com") {
    alert("Please fill in your e-mail address!");
    document.promoFormular.Mail.focus();
    return false;
  }
  if (document.promoFormular.Mail.value.indexOf("@") == -1) {
    alert("There is no e-mail address!");
    document.promoFormular.Mail.focus();
    return false;
  }
   if (document.promoFormular.Name.value == "") {
    alert("Please fill in your name.");
    document.promoFormular.Name.focus();
    return false;
  }
  if (document.promoFormular.Feedback.value == "") {
    alert("Please fill in your feedback.");
    document.promoFormular.Feedback.focus();
    return false;
  }  
}

function sendFeedback() {
	window.setTimeout("reloadPromo()", 4000);
}

function reloadPromo() {
	window.location.href="http://infracom.de/index.php?id=327";
}

function chkSignGuestbook() {
 if (document.gbook.Verfasser.value == "") {
    alert("Bitte geben Sie Ihren Namen an!");
    document.gbook.Verfasser.focus();
    return false;
  }
 else if (document.gbook.Nachricht.value == "") {
    alert("Bitte geben Sie Ihre Nachricht an!");
    document.gbook.Nachricht.focus();
    return false;
 }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function download(linktext, link1, intern) {
	var link2 = "";
	if (intern == 'typo3') {
		link2 = "http://www.infracom.de/fileadmin/"+link1;
	}
	else {
		link2 = "http://www.infracom.de/media/downloads/"+link1;
	}
	var datei = "http://www.infracom.de/download_form/subscribe_for_download.php?linktext="+linktext+"&link="+link2;
	 hswindow = window.open(datei,"INFRACom","width=600, height=600, location=no, menubar=no, statusbar=no,toolbar=no, scrollbars=yes, dependent=yes, resizable=yes, screenX=10,screenY=10"); 
	 hswindow.focus();
}