<!-- //  Website Name : r3™ music online                                                                            // -->
<!-- //  Author       : Helge Himberg (Eric Lynch)                                                                  // -->
<!-- //  Copyright    : REDroom™ Records eK.                                                                        // -->
<!-- //  Version      : 1.0.1 - 2003                                                                                // -->
<!-- //  Tested       : MS IE6.0 (Win32 Version), Opera 7.11 (Win32 Version), Mozilla 1.4 (Win32 Version)           // -->
<!-- //  Modul        : Global JavaScript Functions                                                                 // -->

<!-- //  All contents copyright by REDroom™ Records eK.                                                             // -->
<!-- //  The following marks are registered Trademarks of REDroom™ Records ek.                                      // -->
<!-- //                                                                                                             // -->
<!-- //     REDroom™                                                                                                // -->
<!-- //     r3™ music                                                                                               // -->



function DisplayWindowCenter(url, width, height)
{
   OpWin = window.open(url,"",'width=' + width + ',height=' + height + ',scrollbars=no,menubar=no,status=no,resizable=no,pagexoffset=0,pageyoffset=0,left='+ ((screen.availWidth / 2) - (width / 2)) +',top='+ ((screen.availHeight / 2) - (height / 2)));
   OpWin.creator=self
}


function DisplayWindow(url, width, height)
{
   Win = window.open(url,"",'width=' + width + ',height=' + height + ',innerwidth=0,innerheight=0,scrollbars=yes,menubar=no,status=no,resizable=no,pagexoffset=0,pageyoffset=0,left=100,top=50' );
   Win.creator=self
}


function newlayersite(layersiteid,action) {
       document.getElementById(layersiteid).src = action;
       }

function getonelayer(layerid,action) {
 if(document.getElementById)
   if (action == "visible")
      {
       document.getElementById(layerid).filters.blendTrans.Apply();
       document.getElementById(layerid).style.visibility = action;
       document.getElementById(layerid).filters.blendTrans.Play();

      }
   if (action == "hidden")
      {
       document.getElementById(layerid).style.visibility = action;
      }
}

function showlayer(layerid,action) {
 if(document.getElementById)
   if (action == "visible")
      {
       document.getElementById(layerid).style.visibility = action;
      }
}

function showlayer2(layerid,action) {
 if(document.getElementById)
   if (action == "visible")
      {
       document.getElementById('box100').style.visibility = "hidden";
       document.getElementById('box101').style.visibility = "hidden";
       document.getElementById('box103').style.visibility = "hidden";
       document.getElementById('box104').style.visibility = "hidden";
       document.getElementById(layerid).filters.blendTrans.Apply();
       document.getElementById(layerid).style.visibility = action;
       document.getElementById(layerid).filters.blendTrans.Play();

      }
   if (action == "hidden")
      {
       document.getElementById(layerid).style.visibility = action;
      }
}






function showlayer3(layerid,action) {
 if(document.getElementById)
   if (action == "visible")
      {
       document.getElementById(layerid).style.visibility = action;
      }
   if (action == "hidden")
      {
       document.getElementById(layerid).style.visibility = action;
      }
}

function showlayer4(layerid,action) {
 if(document.getElementById)
   if (action == "visible")
      {
       document.getElementById(layerid).filters.blendTrans.Apply();
       document.getElementById(layerid).style.visibility = action;
       document.getElementById(layerid).filters.blendTrans.Play();

      }
   if (action == "hidden")
      {
       document.getElementById(layerid).style.visibility = action;
      }
}

function layeraction(layerid,action) {
 if(document.getElementById)
       document.getElementById(layerid).style.visibility = action;
}

function getsearch(layerid) {
       if ((document.getElementById(layerid).style.visibility) == 'hidden')
          {
            document.getElementById(layerid).style.visibility = 'visible';
          }
       else
          {
            document.getElementById(layerid).style.visibility = 'hidden';
          }
}




function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' keine e-mail.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' fehlt.\n'; }
  } if (errors) alert('Folgende Fehler wurden gefunden:\n\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_validateNewsletter() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateNewsletter.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' keine e-mail.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' fehlt.\n'; }
  } if (errors) DisplayWindowCenter('/oth_german/!_newsletter.html', '300', '100');
  document.MM_returnValueNewsletter = (errors == '');
}


