function toggle_faderin(layerid) {
	$('div#'+layerid).fadeIn();
}

function toggle_faderout(layerid) {		
	$('div#'+layerid).fadeOut();
}

function external_links() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
      anchor.target = "_blank";
	    anchor.title = (anchor.title != "") ? anchor.title+" [öffnet in neuem Fenster]" : anchor.getAttribute("href")+" [öffnet in neuem Fenster]";
	    anchor.className = (anchor.className != '') ? anchor.className+' external' : 'external';
	  }
  } 
}
function popup_links() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "popup") {
      anchor.onclick=function() {
          popup_window(this.href+'?popup=true'); return false;
        }
	    anchor.title = (anchor.title != "") ? anchor.title+" [öffnet in Popup-Fenster]" : anchor.getAttribute("href")+" [öffnet in Popup-Fenster]";
	    anchor.className = (anchor.className != '') ? anchor.className+' popup' : 'popup';
	  }
  } 
}
function popup_window(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=600,screenX=150,screenY=150,top=150,left=150');
}

function popup_window_ext(url, width, height)
{
	window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=' + width + ',height=' + height);
}

function browserCheck() 
{
	var agt = navigator.userAgent.toLowerCase();
	this.ie4 = (document.all) ? true : false;
	this.ns4 = (document.layers) ? true : false;
	this.dom2 = (document.getElementById) ? true : false;
	this.ie5 = (this.ie4 && this.dom2) ? true : false;
	this.ns6 = (!this.ie4 && this.dom2) ? true : false;
	this.opa = (agt.indexOf('opera') != -1) ? true : false;
	this.win = (agt.indexOf('win') != -1) ? true : false;
	this.mac = (agt.indexOf('mac') != -1) ? true : false;
	
	if (this.ie4 && this.win && !this.opa) 
		{
		with (document) 
			{ 
			write('<script language="VBScript" type="text/vbscript">\n');
			write('Function flashActX(flashVer)\n');
			write('\tOn Error Resume Next\n');
			write('\t\n');
			write('\tDim FlashObj\n');
			write('\tFlashObj = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & flashVer))\n');
			write('\tflashActX = FlashObj\n');
			write('End Function\n');
			write('</script>\n');
			}
		this.flashEnabled = (typeof(flashActX(4)) != 'undefined') ? true : false;
		this.flash5Enabled = (typeof(flashActX(5)) != 'undefined') ? true : false;
		this.flash6Enabled = (typeof(flashActX(6)) != 'undefined') ? true : false;
		} 
	else 
		{
		if (navigator.plugins && navigator.plugins['Shockwave Flash']) 
			{
			var flashPlugIn = 0;
			var str = navigator.plugins['Shockwave Flash'].description.split(' ');
			for (var i = 0; i < str.length; i++) 
				{
				if (!isNaN(parseInt(str[i]))) 
					{
					flashPlugIn = parseInt(str[i]);
					break;
					}
				}
			this.flashEnabled = (flashPlugIn >= 4) ? true : false;
			this.flash5Enabled = (flashPlugIn >= 5) ? true : false;
			this.flash6Enabled = (flashPlugIn >= 6) ? true : false;
			} 
		else 
			{
			this.flashEnabled = false;
			}
		}
}

