function checkanmeldung()
{
xFick=true;
if(!sextyp(document.send.land,1))xFick=false;
if(!profil(document.send.setKanton,7))xFick=false;	
if(!sextyp(document.send.geburttag,3))xFick=false;
if(!sextyp(document.send.geburtmonat,4))xFick=false;
if(!sextyp(document.send.geburtjahr,5))xFick=false;
if(!sextyp(document.send.groesse,6))xFick=false;
if(!sextyp(document.send.gewicht,7))xFick=false;
if(!sextyp(document.send.augenfarbe,8))xFick=false;
if(!sextyp(document.send.haarfarbe,9))xFick=false;
if(!sextyp(document.send.rasse,10))xFick=false;
if(!sextyp(document.send.sexualitaet,11))xFick=false;

if(!profil(document.send.vorname,1))xFick=false;
if(!profil(document.send.name,2))xFick=false;
if(!profil(document.send.plz,3))xFick=false;
if(!profil(document.send.stadt,4))xFick=false;
if(!profil(document.send.strasse,5))xFick=false;
if(!checkalter(document.send.reife))xFick=false;



if(!profil(document.send.email,6))xFick=false;
else{checkEmail();}

return xFick;
}

function checkEmail(){
var obj=document.getElementById("call");
if(obj.lastChild)obj.removeChild(obj.lastChild);

	var email=document.send.email.value;

	var y=document.createElement("SCRIPT");
	y.setAttribute("ID","myScript");
	y.setAttribute("src","scripts/storepost.php?&d=de&i=checkemail&p="+email);
	obj.appendChild(y);	
}

function sextyp(rObj,x) {
	
for (var i=0; i<rObj.length; i++) if (rObj.selectedIndex!=0){return true;}

if(x==1){
document.getElementById("f3").style.color="red";
document.getElementById("s3").style.visibility="visible";}

else if(x==3){
document.getElementById("f9").style.color="red";
document.getElementById("s9").style.visibility="visible";}
else if(x==4){
document.getElementById("f9").style.color="red";
document.getElementById("s9").style.visibility="visible";}
else if(x==5){
document.getElementById("f9").style.color="red";
document.getElementById("s9").style.visibility="visible";}
else if(x==6){
document.getElementById("f10").style.color="red";
document.getElementById("s10").style.visibility="visible";}
else if(x==7){
document.getElementById("f11").style.color="red";
document.getElementById("s11").style.visibility="visible";}
else if(x==8){
document.getElementById("f12").style.color="red";
document.getElementById("s12").style.visibility="visible";}
else if(x==9){
document.getElementById("f13").style.color="red";
document.getElementById("s13").style.visibility="visible";}
else if(x==10){
document.getElementById("f14").style.color="red";
document.getElementById("s14").style.visibility="visible";}
else if(x==11){
document.getElementById("f15").style.color="red";
document.getElementById("s15").style.visibility="visible";

}
rObj.focus();
return false;
	}
  
function profil(rObj,x) {
	
if(rObj.value=='' && x!=6){
if(x==1){
document.getElementById("f1").style.color="red";
document.getElementById("s1").style.visibility="visible";}
else if(x==2){
document.getElementById("f2").style.color="red";
document.getElementById("s2").style.visibility="visible";}
else if(x==3){
document.getElementById("f5").style.color="red";
document.getElementById("s5").style.visibility="visible";}
else if(x==4){
document.getElementById("f6").style.color="red";
document.getElementById("s6").style.visibility="visible";}
else if(x==5){
document.getElementById("f7").style.color="red";
document.getElementById("s7").style.visibility="visible";}
else if(x==7){
document.getElementById("f4").style.color="red";
document.getElementById("s4").style.visibility="visible";}
return false;
}
else{
if (x==6) {
if (rObj.value.indexOf ('@',0) == -1 || rObj.value.indexOf ('.',0) == -1 || rObj.value=='') 
{
document.getElementById("f8").style.color="red";
document.getElementById("s8").style.visibility="visible";
return false;
}	
return true;}
return true;}  
  }

function checkalter(rObj) {
if(rObj.checked==false){
document.getElementById("f16").style.color="red";
document.getElementById("s16").style.visibility="visible";
return false;}
return true;
}


