var bLandID=0;
function moveToNext(steepID)
{
	document.getElementById("zero").style.backgroundColor="#F5F5F5";
	/*document.getElementById("first").style.backgroundColor="#F5F5F5";
	document.getElementById("second").style.backgroundColor="#F5F5F5";
	document.getElementById("third").style.backgroundColor="#F5F5F5";
	document.getElementById("fourth").style.backgroundColor="#F5F5F5";*/
	document.getElementById("steepZero").style.visibility='hidden';
	document.getElementById("steepOne").style.visibility='hidden';
	document.getElementById("steepTwo").style.visibility='hidden';
	document.getElementById("steepThree").style.visibility='hidden';
	document.getElementById("steepFour").style.visibility='hidden';
	if(!document.getElementById("divPartnerData"))
		{
			//nothing
		}
	else
		{
		document.getElementById("divPartnerData").style.visibility='hidden';
		document.getElementById("userProfil").style.visibility='hidden';
		}
	/*document.getElementById("province").style.visibility='hidden';
	document.getElementById("text").style.visibility='hidden';
	document.getElementById("steepThreeSubTwo").style.visibility='hidden';
	document.getElementById("steepThreeSubThree").style.visibility='hidden';
	document.getElementById("steepFourSubTwo").style.visibility='hidden';
	document.getElementById("steepFourSubThree").style.visibility='hidden';
	document.getElementById("steepFourSubFour").style.visibility='hidden';
	document.getElementById("third").innerText="Profil Daten";
	document.getElementById("fourth").innerText="Partner Profil";*/
	
	switch(steepID)
	{
		case 0:
			//document.getElementById("zero").style.backgroundColor="#FFCCFF";
			document.getElementById("steepZero").style.visibility='visible';
		break;
		case 1:
			//document.getElementById("first").style.backgroundColor="#FFCCFF";
			document.getElementById("steepOne").style.visibility='visible';
			
		break;
		case 2:
			//document.getElementById("second").style.backgroundColor="#FFCCFF";
			document.getElementById("steepTwo").style.visibility='visible';
			//document.getElementById("province").style.visibility='visible';
			//document.getElementById("text").style.visibility='visible';
			//setCountry();
			//bLandID=document.FOaddnewuser.ueBland.value;
			//setSelectedCountry(1,bLandID);
		break;
		case 3:
			//document.getElementById("third").style.backgroundColor="#FFCCFF";
			//document.getElementById("third").innerHTML="Profil Daten&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 1 von 3";
			document.getElementById("steepThree").style.visibility='visible';
		break;
		case 4:
			//document.getElementById("fourth").style.backgroundColor="#FFCCFF";
			//document.getElementById("fourth").innerHTML="Partner Profil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 1 von 4";
			document.getElementById("steepFour").style.visibility='visible';
		break;
	}
}

function setSortMenu(showItem){
if (showItem=="SortAndFilter"){
	document.getElementById("zero").style.backgroundColor="#F5F5F5";
	document.getElementById("sort").style.backgroundColor="#FFCCFF";
	document.getElementById("PartnerList").style.visibility="hidden";
	document.getElementById("UserSortAndFilter").style.visibility="visible";
	document.getElementById("sort").innerHTML="<a href=\"#\" onclick=\"setSortMenu('PartnerListe');return false;\" class=\"menu_link\">Partner Liste</a>";
}
else{
	document.getElementById("zero").style.backgroundColor="#F5F5F5";
	document.getElementById("sort").style.backgroundColor="#FFCCFF";
	document.getElementById("PartnerList").style.visibility="visible";
	document.getElementById("UserSortAndFilter").style.visibility="hidden";
	document.getElementById("sort").innerHTML="<a href=\"#\" onclick=\"setSortMenu('SortAndFilter');return false;\" class=\"menu_link\">Sortierung / Filter</a>";
}
}


function moveToNextSub(steepID,subID)
{
	document.getElementById("steepZero").style.visibility='hidden';
	document.getElementById("steepOne").style.visibility='hidden';
	document.getElementById("steepTwo").style.visibility='hidden';
	document.getElementById("steepThree").style.visibility='hidden';
	document.getElementById("steepFour").style.visibility='hidden';
	document.getElementById("province").style.visibility='hidden';
	document.getElementById("steepThreeSubTwo").style.visibility='hidden';
	document.getElementById("steepThreeSubThree").style.visibility='hidden';
	document.getElementById("steepFourSubTwo").style.visibility='hidden';
	document.getElementById("steepFourSubThree").style.visibility='hidden';
	document.getElementById("steepFourSubFour").style.visibility='hidden';
	document.getElementById("text").style.visibility='hidden';
	document.getElementById("zero").style.backgroundColor="#F5F5F5";
	document.getElementById("first").style.backgroundColor="#F5F5F5";
	document.getElementById("second").style.backgroundColor="#F5F5F5";
	document.getElementById("third").style.backgroundColor="#F5F5F5";
	document.getElementById("fourth").style.backgroundColor="#F5F5F5";
	
	if (steepID==3)
	{
		document.getElementById("third").style.backgroundColor="#FFCCFF";
		switch(subID)
		{
			case 2:
				document.getElementById("steepThreeSubTwo").style.visibility='visible';
				document.getElementById("third").innerHTML="Profil Daten&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 2 von 3";
			break;
			case 3:
				document.getElementById("fourth").innerText="Partner Profil";
				document.getElementById("steepThreeSubThree").style.visibility='visible';
				document.getElementById("third").innerHTML="Profil Daten&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 3 von 3";
			break;
		}
	}
	if (steepID==4)
	{
		document.getElementById("fourth").style.backgroundColor="#FFCCFF";
		switch(subID)
		{
			case 2:
				document.getElementById("steepFourSubTwo").style.visibility='visible';
				document.getElementById("fourth").innerHTML="Partner Profil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 2 von 4";
			break;
			case 3:
				document.getElementById("steepFourSubThree").style.visibility='visible';
				document.getElementById("fourth").innerHTML="Partner Profil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 3 von 4";
			break;
			case 4:
				document.getElementById("steepFourSubFour").style.visibility='visible';
				document.getElementById("fourth").innerHTML="Partner Profil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Schritt 4 von 4";
			break;
		}
	}
}

function setCountry()
{
	var htmlBegin="";
	var htmlEnd='';
	var strState=document.FOaddnewuser.userState.value;
	document.getElementById("text").style.visibility='visible';
	document.getElementById("province").style.visibility='visible';
	document.getElementById("text").innerText='Budesland:';
	//document.getElementById("province").style.height='20px';
	if (strState == 'at')
	{
		//alert(strState);
		document.getElementById("province").innerHTML = "<select name=\"userCountry\" style=\"width:150px;\" class=\"menu\" onChange=\"document.FOaddnewuser.ueBland.value=this.value\">"+
										"<option value=\"1\">Wien</option>"+
										"<option value=\"2\">Niederösterreich</option>"+
										"<option value=\"3\">Burgenland</option>"+
										"<option value=\"4\">Steiermark</option>"+
										"<option value=\"5\">Kärnten</option>"+
										"<option value=\"6\">Oberöstereich</option>"+
										"<option value=\"7\">Salzburg</option>"+
										"<option value=\"8\">Tirol</option>"+
										"<option value=\"9\">Vorarlberg</option>"+
									"</select>";
									//alert(document.getElementById("province").innerHTML);
	}
	if (strState == 'de')
	{
		document.getElementById("province").innerHTML = ('<select name="userCountry" style="width:150px;" class="menu" onChange=\"document.FOaddnewuser.ueBland.value=this.value\">'+
										'<option value=\"1\">Baden Württenberg</option>'+
										'<option value="2">Bayern</option>'+
										'<option value="3">Berlin</option>'+
										'<option value="4">Brandenburg</option>'+
										'<option value="5">Bremen</option>'+
										'<option value="6">Hamburg</option>'+
										'<option value="7">Hessen</option>'+
										'<option value="8">Mecklenbg-Vorp.</option>'+
										'<option value="9">Niedersachsen</option>'+
										'<option value="10">Nordhein-Westf.</option>'+
										'<option value="11">Rheinland-Pfalz</option>'+
										'<option value="12">Saarland</option>'+
										'<option value="13">Sachsen</option>'+
										'<option value="14">Sachsen-Anhalt</option>'+
										'<option value="15">Schlesw.-Holstein</option>'+
										'<option value="16">Thüringen</option>'+
									'</select>');
	}
	if (strState == 'ch')
	{
		document.getElementById("province").innerHTML = ('<select name="userCountry" style="width:150px;" class="menu" onChange=\"document.FOaddnewuser.ueBland.value=this.value\">'+
										'<option value="1" selected>Aargau</option>'+
										'<option value="2">App.-Außerh.</option>'+
										'<option value="3">App.-Innerh.</option>'+
										'<option value="4">Basel Land</option>'+
										'<option value="5">Basel Stadt</option>'+
										'<option value="6">Bern</option>'+
										'<option value="7">Freiburg</option>'+
										'<option value="8">Genf</option>'+
										'<option value="9">Glarus</option>'+
										'<option value="10">Graubünden</option>'+
										'<option value="11">Jura</option>'+
										'<option value="12">Luzern</option>'+
										'<option value="13">Nidwalde</option>'+
										'<option value="14">Obwalden</option>'+
										'<option value="15">Schaffhausen</option>'+
										'<option value="16">Schwyz</option>'+
										'<option value="17">Soloturn</option>'+
										'<option value="18">St. Gallen</option>'+
										'<option value="19">Tessin</option>'+
										'<option value="20">Thurgau</option>'+
										'<option value="21">Uri</option>'+
										'<option value="22">Waadt</option>'+
										'<option value="23">Wallis</option>'+
										'<option value="24">Zug</option>'+
										'<option value="25">Zürich</option>'+
									'</select>');
	}
	if (strState != "de" && strState != "at" && strState != "ch")
	{
			document.getElementById("text").style.visibility='hidden';
			document.getElementById("province").style.visibility='hidden';
			document.getElementById("text").innerText='';
			document.getElementById("province").innerHTML = '<select name="userCountry" style="width:150px;" class="menu">'+
										'<option value="0">nicht</option></select>';
			document.FOaddnewuser.ueBland.value=0;
	}
	//alert(strState)
	
}
function setSelectedCountry(formID,cID)
{
	//alert(cID);
	cID--;
	if (formID=1)
	{
		with(document.FOaddnewuser)
		{
			if (cID>0)
	 			userCountry.options[cID].selected = true
			else
				userCountry.options[0].selected = true
				
		}
	}
}
function test()
{
	alert(document.FOaddnewuser.userCountry.value+"\n\n"+document.getElementById("province").innerHTML)
}
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}
function OpenPreviewWindow(){
	with(document.FOsendecard){
		empfaenger = escape(eCardEname.value);
		empf_email = escape(eCardEemail.value);
		absender = escape(eCardAname.value);
		abse_email = escape(eCardAemail.value);
		msg_txt = escape(eCardText.value);
		document.cookie = "Empf_Name=" + empfaenger
		document.cookie = "Empf_Email=" + empf_email
		document.cookie = "Abse_Name=" + absender
 		document.cookie = "Abse_Email=" + abse_email
	 	document.cookie = "Msg_Txt=" + msg_txt
 	}
	openWin('ecard_preview.asp','previewEcard','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=570,left=0,top=0')
}
 
