
    userAgent = navigator.userAgent.toLowerCase();

	n4 = document.layers;

	ie = (document.all && userAgent.indexOf("mac")<0);

	w3c = document.documentElement;

	dhtml = ((n4 || ie || w3c) &&  userAgent.indexOf("aol")<0);					

    

	

	function popupintern(url)

	{

		myCMSFenster = window.open(url,'Empfehlungsnotiz','top=0,left=0,width=347,height=400,status=no,resizable=no,menubar=no,toolbar=no,locationbar=no,scrollbars=no,dependent=no' );

	}

	

	

	function popupseiteempfehlen(url)

	{

		myCMSFenster = window.open(url,'Empfehlung','width=347,height=550,status=no,resizable=no,menubar=no,toolbar=no,locationbar=no,scrollbars=no,dependent=no' );

	}

	function popupempfehlung(url)

	{

		myCMSFenster = window.open(url,'Empfehlungsnotiz','top=0,left=0,width=347,height=400,status=no,resizable=no,menubar=no,toolbar=no,locationbar=no,scrollbars=no,dependent=no' );

	}

	function scrollit(xoffset,yoffset)

	{

		scrollTo(xoffset,yoffset);

	}

	function markArea(left,top,width,height,xoffset,yoffset,win_width,win_height)

	{

			if(xoffset || yoffset || win_width || win_height)

			{

			//alert('scrollBy:'+xoffset+'x'+yoffset);

			window.moveTo(0,0);

			window.resizeTo(win_width,win_height);

			scrollit(0,0);

			}

						

			if(n4)

			{

				document.layers['highlight'].left = left;

				document.layers['highlight'].top = top;

				document.layers['highlight'].width = width;

				document.layers['highlight'].height = height;

				document.layers['highlight'].visibility = 'show';

			} else if (ie) 

			{

				document.all['highlight'].style.left = left;

				document.all['highlight'].style.top = top;

				document.all['highlight'].style.width = width;

				document.all['highlight'].style.height = height;

				document.all['highlight'].style.visibility = 'visible';

			} else if(w3c)

			{

				document.getElementById('highlight').style.left = left;

				document.getElementById('highlight').style.top = top;

				document.getElementById('highlight').style.width = width;

				document.getElementById('highlight').style.height = height;

				document.getElementById('highlight').style.visibility = 'visible';

			}

	}

	function showselect()

	{

		userAgent = navigator.userAgent.toLowerCase();

		n4 = document.layers;

		ie = (document.all && userAgent.indexOf("mac")<0);

		w3c = document.documentElement;

		dhtml = ((n4 || ie || w3c) &&  userAgent.indexOf("aol")<0);

		//alert('ie:'+ie+' n4:'+n4+' w3c: '+w3c);

	    if(ie) 

		{

	    	op_width=document.body.clientWidth;

			op_height=document.body.clientHeight;

		    op_yoffset=document.body.scrollTop;

			op_xoffset=document.body.scrollLeft;

		} else if(n4) 

		{

			op_width=window.innerWidth;

		    op_height=window.innerHeight;

		    op_yoffset=window.pageYOffset;

			op_xoffset=window.pageXOffset;

		}

								

		if (document.selection.type!="None")

		{

			var sel = document.selection;

			var rng = sel.createRange();

			var itm = rng.htmlText;

			//alert((op_width)+"--"+(rng.boundingLeft-4)+","+(rng.boundingTop-4)+","+(rng.boundingWidth+7)+","+(rng.boundingHeight+7));

			markArea(rng.boundingLeft-4,rng.boundingTop-4,rng.boundingWidth+7,rng.boundingHeight+7);

			//rng.pasteHTML("<font color=\"#ff0000\"><b>"+itm+"</b></font>");

		}

	}

		

	function popup(url, width, height, name, addon)

	{

		if(addon != false)

		   	myCMSFenster = window.open(url,name,'width=' + width + ',height=' + height + ',' + addon + "'");

		else

		   	myCMSFenster = window.open(url,name,'width=' + width + ',height=' + height + ',status=yes,resizable=yes,menubar=no,locationbar=no,scrollbars=yes,dependent=yes' );



	}

 	function popupmenu(url, width, height, name)

	{

	   	myCMSFenster = window.open(url,name,'width=' + width + ',height=' + height + ',status=yes,resizable=yes,menubar=yes,toolbar=yes,locationbar=no,scrollbars=yes,dependent=yes' );

	}

	

	if(top.frames.length > 0)

   	top.location.href=self.location;

	

	function conf()

	{ 

		check = confirm("Wollen Sie das wirklich?");

		return check; 

	}

	

	function conf_exp2nor()

	{ 

		check = confirm("Beim Wechsel des Modus gehen Änderungen verloren!");

		return check; 

	}

	

	function shopuser_toggle_delivery_info()

	{

		if(document.USERINFO.delivery_address.checked == true)

		{

			document.USERINFO.d_company.disabled = false;

			document.USERINFO.d_department.disabled = false;

			document.USERINFO.d_partner.disabled = false;

			document.USERINFO.d_street.disabled = false;

			document.USERINFO.d_zip.disabled = false;

			document.USERINFO.d_city.disabled = false;

			document.USERINFO.d_tel.disabled = false;

			document.USERINFO.d_telsms.disabled = false;

			document.USERINFO.d_fax.disabled = false;

			document.USERINFO.d_email.disabled = false;

			document.USERINFO.d_www.disabled = false;		

		}

		else

		{

			document.USERINFO.d_company.disabled = true;

			document.USERINFO.d_department.disabled = true;

			document.USERINFO.d_partner.disabled = true;

			document.USERINFO.d_street.disabled = true;

			document.USERINFO.d_zip.disabled = true;

			document.USERINFO.d_city.disabled = true;

			document.USERINFO.d_tel.disabled = true;

			document.USERINFO.d_telsms.disabled = true;

			document.USERINFO.d_fax.disabled = true;

			document.USERINFO.d_email.disabled = true;

			document.USERINFO.d_www.disabled = true;

		}

		return 0;

	}	

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_nbGroup(event, grpName) { //v6.0

  var i,img,nbArr,args=MM_nbGroup.arguments;

  if (event == "init" && args.length > 2) {

    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {

      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;

      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();

      nbArr[nbArr.length] = img;

      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {

        if (!img.MM_up) img.MM_up = img.src;

        img.src = img.MM_dn = args[i+1];

        nbArr[nbArr.length] = img;

    } }

  } else if (event == "over") {

    document.MM_nbOver = nbArr = new Array();

    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {

      if (!img.MM_up) img.MM_up = img.src;

      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);

      nbArr[nbArr.length] = img;

    }

  } else if (event == "out" ) {

    for (i=0; i < document.MM_nbOver.length; i++) {

      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }

  } else if (event == "down") {

    nbArr = document[grpName];

    if (nbArr)

      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }

    document[grpName] = nbArr = new Array();

    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {

      if (!img.MM_up) img.MM_up = img.src;

      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;

      nbArr[nbArr.length] = img;

  } }

}



