function ShowImage(ImagePath, width, height, id_img, lang)
{
	window.open("ShowPicture.php?id_img=" + id_img + "&lang=" + lang + "&"+ImagePath,"","height=" + height +",width=" + width +",statusbar=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes ");
}

function ShowImage1(ImagePath, width, height, id_img, lang)
{
	window.open("ShowPicture1.php?img="+ImagePath,"","height=" + height +",width=" + width +",statusbar=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes ");
}

function ShowImage2(ImagePath, width, height, id_img, lang)
{
	window.open("ShowPicture2.php?id_img=" + id_img + "&lang=" + lang + "&"+ImagePath,"","height=" + height +",width=" + width +",statusbar=yes,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes ");
}

function ShowImage3(ImagePath, width, height, id_img, lang)
{
	window.open("ShowPicture3.php?id_img=" + id_img + "&lang=" + lang + "&"+ImagePath,"","height=" + height +",width=" + width +",statusbar=yes,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes ");
}

function detailView(path)
{
	window.open("detailView.php?img="+path,"","menubar=no,toolbar=no,locationbar=no,status=no,width=820,height=620,dependent=yes,scrollbars=yes");
}

function checkNewsletter()
{
	var isEmail = /^(\w[\w|\.|\-]*\w+@\w+[\w|\.|\-]*\w+\.\w{2,4})$|^\s*$/;
	
	if ((!isEmail.test(document.newsletter.mail.value)) || (document.newsletter.mail.value == ""))      {
		alert("Bitte geben Sie eine formal korrekte E-Mail Adresse ein!");
                return false;
	}

	return true;
} 

function hasFlash()	
{
	var agt = navigator.userAgent.toLowerCase();
	var ie = (agt.indexOf("msie") != -1);
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
	var mac = (agt.indexOf("mac")!=-1);
	
	if (ie && win)	{	
		plugin = detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash"); 
	}

	if (ns || !win) {
		nse = ""; 
		for(var i=0; i<navigator.mimeTypes.length; i++)	{ 
			nse += navigator.mimeTypes[i].type.toLowerCase();
		}
		plugin = detectNS("application/x-shockwave-flash","Shockwave Flash");
	}
	
	function detectIE(ClassID,name) 
	{ 
		result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCR'+'IPT>\n'); if (result) return name+','; else return ''; 
	}

	function detectNS(ClassID,name)	{ 
		n = ""; 
		if(nse.indexOf(ClassID) != -1) 
			if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; 
	}
	
	if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);
	
	if (pluginlist.indexOf("Flash") == -1)
		document.write("Um das Video anzusehen, benötigen Sie das Flash-Plugin!")
}

function showItems(item, height)
{
  document.getElementById(item).style.visibility="visible";
  docuemnt.getElementById(item).style.height=height;
  document.getElementById(item).style.display="inline";
}

function hideItems(item)
{
  document.getElementById(item).style.visibility="hidden";
  docuemnt.getElementById(item).style.height="0px";
  document.getElementById(item).style.display="none";
}
