function sendContact()
{
	var bool_send = true;
	
	var bool_array = new Array('vorname', 'name', 'email', 'betreff');
		
	for(var i=0;i<bool_array.length;i++) {

		if($(bool_array[i]).value == '') {
			bool_send = false;
			changeBorder(bool_array[i], 'ff0000');
		} else { changeBorder(bool_array[i], '999999'); }
	
	}

	if(!bool_send) alert('Sie müssen alle Felder mit * ausfüllen.');


	if(bool_send)
	{
		var str_post = '';

		str_post += 'op_mail=' + $('op_mail').value;
		str_post += '&vorname=' + $('vorname').value;
		str_post += '&name=' + $('name').value;
		str_post += '&email=' + $('email').value;
		str_post += '&tel=' + $('tel').value;
		str_post += '&unternehmen=' + $('unternehmen').value;
		str_post += '&strasse=' + $('strasse').value;
		str_post += '&plz=' + $('plz').value;
		str_post += '&homepage=' + $('homepage').value;
		str_post += '&text_area=' + $('text_area').value;
		str_post += '&betreff=' + $('betreff').value;
		str_post += '&ort=' + $('ort').value;

		if($('newsletter').checked) str_post += '&newsletter=1';
		if($('copy').checked) str_post += '&copy=1';

		new Ajax.Request(gmap_path+'/js/ajax/contact_send.php',
			{
				method:'post',
				postBody: str_post,
				onSuccess: function(t){
					new Effect.Fade('contact');
					new Effect.Appear('email_status');
	//				$('contact').style.display = 'none';
	//				$('email_status').style.display = 'block';
//					alert(t.responseText);
				},
				onFailure: function(t){
					alert(t.responseText);
				}
			}
		);
	}

}
function sendWebcall()
{
	var bool_send = true;
	
	var bool_array = new Array('uscountry', 'uspre', 'ustel');
		
	for(var i=0;i<bool_array.length;i++) {

		if($(bool_array[i]).value == '') {
			bool_send = false;
			changeBorder(bool_array[i], 'ff0000');
		} else { changeBorder(bool_array[i], '999999'); }
	
	}

	if(!bool_send) { 
		$('ovl_status').style.color = "#ff0000";
		$('ovl_status').innerHTML = "Sie müssen alle Felder ausfüllen!";
	}

	if(bool_send)
	{
		
		for(var i=0;i<bool_array.length;i++) {

				$(bool_array[i]).disabled = "disabled";
	
		}
				
		var str_post = '';

		str_post += 'uscountry=' + $('uscountry').value;
		str_post += '&uspre=' + $('uspre').value;
		str_post += '&ustel=' + $('ustel').value;
		str_post += '&usip=' + $('usip').value;
		
		str_post += '&cuid=' + $('cuid').value;
		str_post += '&cucountry=' + $('cucountry').value;
		str_post += '&cupre=' + $('cupre').value;
		str_post += '&cutel=' + $('cutel').value;
				
		//$('op_tel').value = $('op_tel').value.replace(/\//,'');
		//$('op_tel').value = $('op_tel').value.replace(/\-/,'');
		//$('op_tel').value = $('op_tel').value.substr(1);

		//str_post += '&op_tel=' + $('op_tel').value;
		
		//new Effect.Fade('ovl_navi');
		$('ovl_navi').innerHTML = "<img src=\""+gmap_path+"img/api/waiting.gif\" class=\"ovl_icon\">&nbsp;Sie werden verbunden.";
		//new Effect.Appear('ovl_navi');

		new Ajax.Request(gmap_path+'js/ajax/webcall_send.php',
			{
				method:'post',
				postBody: str_post, 
				onSuccess: function(t){
					//alert(t.responseText);
					if(t.responseText == '1') $('ovl_navi').innerHTML = "<img src=\""+gmap_path+"img/api/disc.gif\" class=\"ovl_icon\">&nbsp;Verbindung getrennt.";
					else if(t.responseText == '-1') $('ovl_navi').innerHTML = "<img src=\""+gmap_path+"img/api/failure.gif\" class=\"ovl_icon\">&nbsp;Verbindung fehlgeschlagen.";
					else $('ovl_navi').innerHTML = "<img src=\""+gmap_path+"img/api/nocon.gif\" class=\"ovl_icon\">&nbsp;Keine Verbindung möglich.";

				},
				onFailure: function(t){
					alert(t.responseText);
				}
			}
		);
	}

}