// JavaScript Document

function angebot_popup(was)	{
	fenster_url="/angebote/popup.php?"+was;	
	window.open(fenster_url,"ff_Angebote","width=500,height=400,left=210,top=140,dependent=yes,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes");
}

function angebot_dropdown()	{
	was=document.forms[0].elements["webdesign_auftrag"].value;
	if(was=="")alert("Bitte wählen Sie zuerst ein Angebot!");
	else angebot_popup(was);
}


function angebot_eintragen()	{
	splitpos=document.location.href.lastIndexOf("?");
	if(splitpos!=(-1))angebot_eintragen();
	angebot=document.location.href.substr(splitpos+1);
	
	checkboxes=new Array("HPB","HUA","HSA","BRS","BRI","HPP","BSH");
	for(z=0;z<checkboxes.length;z++)	{
		if(checkboxes[z]==angebot)	{
			checkbox_name="extra_"+angebot;
			eval("document.forms[0]."+checkbox_name+".checked = true;");
			break;
		}
	}
	dropdowns=new Array("WDE","WDEpro","WEA","HUT","HPK","HIS","HUP","HSApro","HVU","HSO","HGR","HRO","HKO","NFS");
	for(z=0;z<dropdowns.length;z++)	{
		if(dropdowns[z]==angebot)	{
			document.forms[0].webdesign_auftrag.value=angebot;
			break;
		}
	}
	hosting=new Array("WS10","WS50","WS100");
	for(z=0;z<hosting.length;z++)	{
		//if(hosting[z]==angebot)	
		{
			alert(hosting[z]+" "+angebot);
			document.forms[0].hosting.value=angebot;
			break;
		}
	}
}

function details_loeschen()	{
	text=document.forms[0].details.value.substr(0,14);
	if (text=="Geben Sie hier")document.forms[0].details.value="";
}
