
/***********************************************************
                  - Standard Funktionen -

  ~ MM_openBrWindow(theURL,winName,features)

/***********************************************************/


 function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
 }

	function check_if_num(id) {
	 id.value = id.value.replace(/[^0-9\.,]/,"");
 }

	function toggle_vs(id, force) {
	 var obj = document.getElementById(id);
	 var stat = document.getElementById(id).style.display;
	 if (stat=='none') obj.style.display='block';
	 else obj.style.display='none';

  if (force!='') obj.style.display=force;
	}

	function cc_chk(la) {
  MM_openBrWindow('/pop/detail.php?bild=cc_secnum'+la+'.jpg','','width=531,height=228,left=50,top=50,scrollbars=no')
 }


 function an_lager_mu() {
  MM_openBrWindow('/pop/an.php?b=lager_mu','','width=447,height=470,left=50,top=50,scrollbars=no')
 }

 function an_office_mu() {
  MM_openBrWindow('/pop/an.php?b=office_mu','','width=447,height=470,left=50,top=50,scrollbars=no')
 }

 function an_shop_mu() {
  MM_openBrWindow('/pop/an.php?b=shop_mu','','width=447,height=470,left=50,top=50,scrollbars=no')
 }

 function an_shop_mu2() {
  MM_openBrWindow('/pop/an.php?b=shop_mu2','','width=447,height=470,left=50,top=50,scrollbars=no')
 }

 function an_shop_hh() {
  MM_openBrWindow('/pop/an.php?b=shop_hh','','width=447,height=470,left=50,top=50,scrollbars=no')
 }

 function an_shop_dd() {
  MM_openBrWindow('/pop/an.php?b=shop_dd','','width=447,height=470,left=50,top=50,scrollbars=no')

 }

 function tellafriend(id) {
   MM_openBrWindow('/pop/tellafriend.php?id='+id,'','width=610,height=310,left=10,top=20,scrollbars=no')
 }

 function frauke() {
  MM_openBrWindow('/pop/detail.php?bild=../imgs/pop/frauke_new.jpg','','width=650,height=650,left=50,top=50,scrollbars=auto')
 }
 function verona() {
  MM_openBrWindow('/pop/detail.php?bild=../imgs/pop/verona_new.jpg','','width=650,height=650,left=50,top=50,scrollbars=auto')
 }
 function katja() {
  MM_openBrWindow('/pop/detail.php?bild=../imgs/pop/katja_new.jpg','','width=650,height=650,left=50,top=50,scrollbars=auto')
 }
 function roberta() {
  MM_openBrWindow('/pop/detail.php?bild=../imgs/pop/roberta.jpg','','width=650,height=650,left=50,top=50,scrollbars=auto')
 }

 function copy() {
  MM_openBrWindow('/pop/copyright.php','','width=601,height=480,left=50,top=50,scrollbars=auto')
 }


 function zoomy(id, img_id) {
  MM_openBrWindow('/pop/zoomy.php?id='+id+'&img_id='+img_id,'','width=890,height=635,left=50,top=50,scrollbars=auto')
 }

 function zoomy_single(id, img_id) {
  MM_openBrWindow('/pop/zoomy_single.php?id='+id+'&img_id='+img_id,'','width=890,height=675,left=50,top=50,scrollbars=auto')
 }


 function copyright(){
     if (navigator.appName == "Microsoft Internet Explorer")
       {
         var hoehe = document.all.contentbox.offsetHeight;
          hoehe=hoehe-40+"px";
           document.all.copyright.style.marginTop = hoehe;
         }
     else
         {
         var hoehe = document.getElementById("contentbox").offsetHeight;
         document.getElementById('copyright').style.marginTop = hoehe-40+"px";

         }
   }


 function show_choice(id, text) {
  document.getElementById('choice_'+id).innerHTML = text;
  document.getElementById('choice_'+id).style.display = 'block';
 }

 function hide_choice(id) {
  if (document.getElementById('choice_anr_'+id).value == '')
  document.getElementById('choice_'+id).style.display = 'none';
  if (document.getElementById('choice_anr_'+id).value != '')
  show_choice(id, document.getElementById('choice_text_'+id).value);
 }

 function set_choice(id, anr, size) {
  if (document.getElementById('choice_anr_'+id).value != '')
  document.getElementById(id+'_'+document.getElementById('choice_anr_'+id).value+'_'+document.getElementById('choice_size_'+id).value).className = 'color_pic';
  document.getElementById('choice_anr_'+id).value = anr;
  document.getElementById('choice_size_'+id).value = size;
  document.getElementById(id+'_'+anr+'_'+size).className = 'color_pic_on';
  document.getElementById('choice_text_'+id).value = document.getElementById('choice_'+id).innerHTML;
 }


 function set_choice_nonvisual(id, anr, size) { //alert(anr);
  //if (document.getElementById('choice_anr_'+id).value != '')
  //document.getElementById(id+'_'+document.getElementById('choice_anr_'+id).value+'_'+document.getElementById('choice_size_'+id).value).className = 'color_pic';
  document.getElementById('choice_anr_'+id).value = anr;
  document.getElementById('choice_size_'+id).value = size;
  //document.getElementById(id+'_'+anr+'_'+size).className = 'color_pic_on';
  //document.getElementById('choice_text_'+id).value = document.getElementById('choice_'+id).innerHTML;
 }


 function check_if_ready(id) {
  if (document.getElementById('choice_anr_'+id).value != '' && document.getElementById('choice_size_'+id).value != '') return true;
  return false;
 }
 
 
 function findPosX(obj) {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
 }

 function findPosY(obj) {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
 }
 
 