   
	if(top!=self) top.location=self.location;

	if(document.images) {
		navpic = new Array();
		navpic[0] = new Image();
		navpic[0].src = './index_files/nopfeil.gif';
		navpic[1] = new Image();
		navpic[1].src = './index_files/pfeil.gif';
	}
	
	function nav_hilo(num,imgname) {
	  if(document.images) {
	    imgname.src = navpic[num].src;
	  }
	}

 /* DHTML-Bibliothek */

var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;

function DHTML_init() {

 if (window.opera) {
     OP = 1;
 }
 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all && !OP) {
   DHTML = 1;
   MS = 1;
 }
if (window.netscape && window.screen && !DOM && !OP){
   DHTML = 1;
   NS = 1;
 }
}

function getElem(p1,p2,p3) {
 var Elem;
 if(DOM) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.getElementById(p2) == "object")
     Elem = document.getElementById(p2);
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document.getElementsByName(p2) == "object")
     Elem = document.getElementsByName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.getElementsByTagName(p2) == "object" ||
        (OP && typeof document.getElementsByTagName(p2) == "function"))
     Elem = document.getElementsByTagName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(MS) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.all[p2] == "object")
     Elem = document.all[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.all.tags(p2) == "object")
     Elem = document.all.tags(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(NS) {
   if(p1.toLowerCase()=="id" || p1.toLowerCase()=="name") {
   if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="index") {
    if (typeof document.layers[p2] == "object")
     Elem = document.layers[p2];
    else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
}

function getCont(p1,p2,p3) {
   var Cont;
   if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild) {
     if(getElem(p1,p2,p3).firstChild.nodeType == 3)
       Cont = getElem(p1,p2,p3).firstChild.nodeValue;
     else
       Cont = "";
     return(Cont);
   }
   else if(MS && getElem(p1,p2,p3)) {
     Cont = getElem(p1,p2,p3).innerText;
     return(Cont);
   }
   else return void(0);
}

function getAttr(p1,p2,p3,p4) {
   var Attr;
   if((DOM || MS) && getElem(p1,p2,p3)) {
     Attr = getElem(p1,p2,p3).getAttribute(p4);
     return(Attr);
   }
   else if (NS && getElem(p1,p2)) {
       if (typeof getElem(p1,p2)[p3] == "object")
        Attr=getElem(p1,p2)[p3][p4]
       else
        Attr=getElem(p1,p2)[p4]
         return Attr;
       }
   else return void(0);
}

function setCont(p1,p2,p3,p4) {
   if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild)
     getElem(p1,p2,p3).firstChild.nodeValue = p4;
   else if(MS && getElem(p1,p2,p3))
     getElem(p1,p2,p3).innerText = p4;
   else if(NS && getElem(p1,p2,p3)) {
     getElem(p1,p2,p3).document.open();
     getElem(p1,p2,p3).document.write(p4);
     getElem(p1,p2,p3).document.close();
   }
}

DHTML_init();

function emailCheck (emailStr) {

/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

/* The following is the list of known TLDs that an e-mail address must end with. */

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;

/* The following pattern is used to check if the entered e-mail address
fits the user@domain format.  It also is used to separate the username
from the domain. */

var emailPat=/^(.+)@(.+)$/;

/* The following string represents the pattern for matching all special
characters.  We don't want to allow special characters in the address. 
These characters include ( ) < > @ , ; : \ " . [ ] */

var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

/* The following string represents the range of characters allowed in a 
username or domainname.  It really states which chars aren't allowed.*/

var validChars="\[^\\s" + specialChars + "\]";

/* The following pattern applies if the "user" is a quoted string (in
which case, there are no rules about which characters are allowed
and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
is a legal e-mail address. */

var quotedUser="(\"[^\"]*\")";

/* The following pattern applies for domains that are IP addresses,
rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
e-mail address. NOTE: The square brackets are required. */

var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

/* The following string represents an atom (basically a series of non-special characters.) */

var atom=validChars + '+';

/* The following string represents one word in the typical username.
For example, in john.doe@somewhere.com, john and doe are words.
Basically, a word is either an atom or quoted string. */

var word="(" + atom + "|" + quotedUser + ")";

// The following pattern describes the structure of the user

var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

/* The following pattern describes the structure of a normal symbolic
domain, as opposed to ipDomainPat, shown above. */

var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

/* Finally, let's start trying to figure out if the supplied address is valid. */

/* Begin with the coarse pattern to simply break up user@domain into
different pieces that are easy to analyze. */

var matchArray=emailStr.match(emailPat);

if (matchArray==null) {

/* Too many/few @'s or something; basically, this address doesn't
even fit the general mould of a valid e-mail address. */

alert("non-valid email-address (double check @ and .'s)");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];

// Start by checking that only basic ASCII characters are in the strings (0-127).

for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("non-valid character in username.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("non-valid character in domainname.");
return false;
   }
}

// See if "user" is valid 

if (user.match(userPat)==null) {

// user is not valid

alert("non-valid name!");
return false;
}

/* if the e-mail address is at an IP address (as opposed to a symbolic
host name) make sure the IP address is valid. */

var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {

// this is an IP address

for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("non-valid IP address!");
return false;
   }
}
return true;
}

// Domain is symbolic name.  Check if it's valid.
 
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
alert("non-valid domain");
return false;
   }
}

/* domain name seems valid, but now make sure that it ends in a
known top-level domain (like com, edu, gov) or a two-letter word,
representing country (uk, nl), and that there's a hostname preceding 
the domain or country. */

if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("non-valid TLD or country .");
return false;
}

// Make sure there's a host name preceding the domain.

if (len<2) {
alert("no hostname provided!");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}

//  End -->

function checkForm() {

	if(document.cdo.CUSTOMER_EMAIL.value == "") {
		alert("Please insert your email-address!");
		document.cdo.CUSTOMER_EMAIL.focus();
		return false;    
	} 
	if (emailCheck(document.cdo.CUSTOMER_EMAIL.value) == false)	{
     	document.cdo.CUSTOMER_EMAIL.focus();
		return false;	
	}

   if(document.cdo.firstname.value == "")
    {
     alert("Please insert First Name!");     
     document.cdo.firstname.focus();
     return false;    } 

  if(document.cdo.surname.value == "")   
   {
     alert("Please insert Surname!");
     document.cdo.surname.focus();  
     return false;    }
	//window.document.cdo.CUSTOMER.value = window.document.cdo.firstname.value + " " + window.document.cdo.surname.value;

 /*
  if(document.cdo.PRICE.value == "")   
   {
     alert("Bitte Betrag eingeben!");
     document.cdo.PRICE.focus();  
     return false;    }
 */ 
  if(document.cdo.IDENTIFIER.value == "")   
   {
     alert("Please insert Card Number!");
     document.cdo.IDENTIFIER.focus();  
     return false;    }
  if(document.cdo.EXPIRY.value == "")   
   {
     alert("Please insert Expiry Date!");
     document.cdo.EXPIRY.focus();  
     return false;    }
  if(document.cdo.login.value == "")   
   {
     alert("Please choose your username!");
     document.cdo.login.focus();  
     return false;    }
  if(document.cdo.PASSWORD.value == "")   
   {
     alert("Please choose your password!");
     document.cdo.PASSWORD.focus();  
     return false;    }
 //window.document.cdo.EXPIRY.value = window.document.cdo.opt_ExpYear.value  + window.document.cdo.opt_ExpMonth.value;
    
} 

function kontonr()
{
 var nr,l,lx,i,p,q,x,li,re,pz,br;
 nr=window.document.cdo.IDENTIFIER.value;
 if (nr != "")
 {
 lx=nr.length;
  l=15;
   li = nr.substring(0,15);
   re = nr.substring(15,16);  
   br = nr.substring(0,1);

 {
  p=0;
  q=0;
  for (i=0;i<l;i++)
  {
   x=(2-(i&1))*li.substring(l-i-1,l-i);
   p+=x;
   q+=x%10+Math.floor(x/10);
  }
    

    pz=(1000-q)%10;
    
    
    
  if (pz != re || lx !=16)
   {
   alert (unescape("Credit Card Number is not valid"));
     window.document.cdo.IDENTIFIER.value=""
     window.document.cdo.IDENTIFIER.focus()	
   }
	if (br==4)
	{
	//window.document.cdo.BRAND.value= "VISA"
	}
	if (br==5)
	{
	//window.document.cdo.BRAND.value= "MasterCard"
	}

 }
 }
}






function disableForm(theform) {
if (document.all || document.getElementById) {
for (i = 0; i < theform.length; i++) {
var tempobj = theform.elements[i];
if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
tempobj.disabled = true;
}
return true;
}
else {
return true;
   }
}


function checkLogin() {

	if((document.loginform.u.value == "")||(document.loginform.p.value == ""))  {

		alert("Please insert username and password!");
		if (document.loginform.u.value == "")
		{
			document.loginform.u.focus();
		} else {
			document.loginform.p.focus();
		}
		return false;    
	} 
}

//  End -->
