function holer(ziel)
{

var xmlHttp = false;
// Internet Explorer
try {
    xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        xmlHttp  = false;
    }
}
// Mozilla, Opera und Safari
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
}
if (xmlHttp) {
    xmlHttp.open('GET', ziel, true);
    xmlHttp.onreadystatechange = function () {
        if (xmlHttp.readyState == 4) {
            document.getElementById('topani').innerHTML = xmlHttp.responseText;
        }
    };
    xmlHttp.send(null);
}
}
function ratte()
{
	var  randy;
randy = Math.random();

if(randy> 0.5 )
    holer("random_cryease.htm");
if(randy< 0.5 )
    holer("random_apdirect.htm");
}

/*function ratte()
{
	var  randy;
randy = Math.random();

if(randy> 0.66 )
    holer("random_cryease.htm");
if(randy<0.66 && randy >0.33 )
    holer("random01.htm");
if(randy<0.33 )
    holer("random03.htm");
}*/
<!--

/* --------------------------------------------------------------------------------
		APCI Common Script Library
		C. Daubenspeck, February 2001
		Version 05222001.3
		Questions, Problems, Concerns - daubenc@apci.com
-------------------------------------------------------------------------------- */

// Make sure we're not in a frame
if (self != top) top.location.href = location.href;

// Check browser type
var ie = 0;
var ns = 0;

if (navigator.appName.indexOf("Netscape") != -1)
	ns=1;
else if (navigator.appName.indexOf("Microsoft") != -1)
	ie=1;

var IE4 = (document.all && !document.getElementById) ? true:false;
var NS4 = (document.layers) ? true:false;
var IE5 = (document.all && document.getElementById) ? true:false;
var N6 = (document.getElementById && !document.all) ? true:false;

/* --------------------------------------------------------------------------------
Show all properties of obj
This for debuging only
-------------------------------------------------------------------------------- */
function show_props(obj, obj_name, newLineChar) {
   var result = ""
   for (var i in obj)
      result += obj_name + "." + i + " = " + obj[i] + newLineChar;
   return result
	}


function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function closer(){
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=520, height=205, top=85, left=140";
window.open("../disclaimer/exit.html","new",opciones);
}

// =========================================================================================
function dentro(src,clrOver) {
  if (!src.contains(event.fromElement)) {
    src.style.cursor = 'hand';
  src.bgColor = clrOver;
  }
}

function fuera(src,clrIn) {
  if (!src.contains(event.toElement)) {
    src.style.cursor = 'default';
    src.bgColor = clrIn;
  }
}
// xcitedOn resalta la opción (toc) del menu lateral
function xcitedOn(n){
document.getElementById("toc"+n).style.backgroundColor = "#f4ad42";
}
// xcitedOff devuelve el color de reposo a la opción resaltada del menu lateral
function xcitedOff(n){
document.getElementById("toc"+n).style.backgroundColor = "#7EABAF";
}
// xcitedOff devuelve el color de reposo a la opción resaltada del menu lateral Azul
function xcitedOffBlue(n){
document.getElementById("toc"+n).style.backgroundColor = "#7EABAF";
}
// tnlxcitedOn resalta la opción (top) del menu_en_capa superior
function tnlxcitedOn(n){
document.getElementById("top"+n).style.backgroundColor = "ff9900";
document.getElementById('topnavlayer').style.visibility = 'visible';
}
// tnlxcitedOff devuelve el color de reposo a la opción resaltada del menu_en_capa superior
function tnlxcitedOff(n){
document.getElementById("top"+n).style.backgroundColor = "#ffde9c";
}
// La funcion hidetnl oculta la capa de navegación superior
function hidetnl(){
	var intHideDelay = 300;	// hide delay in milliseconds
	setTimeout("document.getElementById('topnavlayer').style.visibility = 'hidden'", intHideDelay);
}



function borrar(){
 document.te_escuchamos.reset();
}

function enviar(){
email = document.te_escuchamos.email.value;
country = document.te_escuchamos.country.value;

if(document.te_escuchamos.toDom.disabled == false)
	mailto = document.te_escuchamos.toDom.value;
else
	mailto = document.te_escuchamos.toHos.value;

name = document.te_escuchamos.name.value;
surname = document.te_escuchamos.surname.value;
village = document.te_escuchamos.village.value;
phone = document.te_escuchamos.phone.value;
 ok = true;
 if(ok){
   if(surname == ""){
     alert("El campo Apellidos es obligatorio.");
	 document.te_escuchamos.surname.focus();
	 ok = false;	
   }else{
     if(ok){
	   if(name == ""){
		 alert("El campo Nombre es obligatorio.");
		 document.te_escuchamos.name.focus();
		 ok = false;	   
	   }else{
	     if(ok){
		 	if(village == ""){
			 alert("El campo Población es obligatorio.");
			 document.te_escuchamos.village.focus();
			 ok = false;	   
		   	}else{
			 	if(ok){
					if(phone == ""){
					 alert("El campo Teléfono es obligatorio.");
					 document.te_escuchamos.phone.focus();
					 ok = false;	   
					 }else{
						if(ok){
							if(email == "" || email.indexOf('@') == -1 || email.indexOf('.') == -1){
							 alert("El campo Email es obligatorio. Por favor, compruebe la dirección electrónica");
							 document.te_escuchamos.email.focus();
							 ok = false;	   
							 }else{
								if(ok){
									if(country == ""){
									 alert("El campo País es obligatorio.");
									 document.te_escuchamos.country.focus();
									 ok = false;	   
									 }else{
									 	if(ok){
											if(mailto == ""){
											 alert("Seleccione su provincia.");
											 document.te_escuchamos.mailto.focus();
											 ok = false;	   
											 }else{
												if(ok){
												document.te_escuchamos.submit();
												}
											}
										}
									}
								}
							 }
						 }
					 } 
				  }
			   }
			 }
		    }
		 }
		}
	}
}


// Es sollen entweder die Checkboxen for Homecare oder für Hospital gewählt werden.
function checkTerapiasDom()
{
	if(document.te_escuchamos.oxi.checked == true || document.te_escuchamos.tera.checked == true || document.te_escuchamos.aero.checked == true || document.te_escuchamos.Otrasterapias.value != "")
	{
		document.te_escuchamos.hospital.checked = false;
		document.getElementById('toHos').disabled = true;
		document.getElementById('provHos').style.display = 'none';
		document.getElementById('provDom').style.display = 'block';
		document.getElementById('toDom').disabled = false;
	}
	
}

function checkTerapiasHos()
{
	if(document.te_escuchamos.hospital.checked == true)
	{
		document.te_escuchamos.oxi.checked = false;
		document.te_escuchamos.tera.checked = false; 
		document.te_escuchamos.aero.checked = false;
		document.te_escuchamos.Otrasterapias.value = "";
		document.getElementById('toDom').disabled = true;
		document.getElementById('provDom').style.display = 'none';
		document.getElementById('provHos').style.display = 'block';
		document.getElementById('toHos').disabled = false;
		
	}
	
}



//-->
