function ajax(url,target)
{
	// native XMLHttpRequest object
	document.getElementById(target).innerHTML = '<div style="text-align: center;">loading ...</div>';
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.onreadystatechange = function() {ajaxDone(target);};
		req.open("GET", url, true);
		req.send(null);
	// IE/Windows ActiveX version
	} else if (window.ActiveXObject) {
		req = new ActiveXObject("Microsoft.XMLHTTP");
		if (req) {
			req.onreadystatechange = function() {ajaxDone(target);};
			req.open("GET", url, true);
			req.send();
		}
	}
}

function ajaxDone(target) {
	// only if req is "loaded"
	if (req.readyState == 4) {
		// only if "OK"
		if (req.status == 200 || req.status == 304) {
			results = req.responseText;
			document.getElementById(target).innerHTML = results;
		} else {
			document.getElementById(target).innerHTML="Error:\n" +
			req.statusText;
		}
	}
}

function setBookmark()
{
  var brty = navigator.appName;
  var brve = navigator.appVersion;
  var url=document.location.href; 
  var titel = document.title; 
  if (brty.indexOf("Explorer")>-1)
  {
    // add this page to favorites for IE4+
    //window.external.AddFavorite(document.location.href, document.title);
    window.external.AddFavorite(url,titel);
  }
  else
  {
    //alert("Diese Funktion steht nur f?r Internet Explorer zur Verf?gung");
    alert(unescape("Diese Funktion steht nur f%FCr Internet Explorer zur Verf%FCgung"));
  }
}

function Top()
{
 document.location.href="#Top";
}

function winOpen(theURL,winName,features) 
{ 
winName = window.open(theURL,winName,features); 
if(winName == null || winName.closed){window.open(theURL,winName,features);} 
else{winName.location.href = theURL;} 
if (!winName.closed) 
winName.focus(); 
}

function switch2Url(targeturl)
{
  if (targeturl != null)
  {
    var values = targeturl.split(";"); 
    var target = values[0];
    var href = values[1];
    
    switch (target)
    {
      case "_self":
        self.document.location.href = href;
        break;
      case "_top":
        top.document.location.href = href;
        break;
      case "_parent":
        parent.document.location.href = href;
        break;
      case "_blank":
        window.open(href, target, "", "toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");
        break;
      case "_winopen":
        window.open(href, target, "", "toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");
        break;
      default:
        if (document.location.frames == null || document.location.frames[target])
          document.location.href = href;
        else
          document.location.frames[target].href = href;       
    }
  }
}
function openProductImage( img ){
	var width = 1024;
	var height = 400;
	fenster = window.open(img,'bigProductImage','width=' +  width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes,left=0,top=0,screenX=0,screenY=0');
	fenster.moveTo(0,0);
	fenster.focus();
}