function open_tvc() {
window.open("popup_tvc.html", "popup", "width=340,height=293,left=" + ((screen.width - 340) / 2) + ",top=" + ((screen.height - 293) / 2) + ",resizable=0,scrollbars=0,status=0").focus();
}

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_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_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];}
}

/*Funktionen für Kontaktformular */
function checknum( field ) {
        //nur zahlen und ",","." zulassen
        var tmpString ="";
        var seperator = false;
        for (i=0;i<=field.value.length;i++){
                c=field.value.charAt(i);
                if ((c=="1")|(c=="2")|(c=="3")|(c=="4")|(c=="5")|(c=="6")|(c=="7")|(c=="8")|(c=="9")|(c=="0"))
                        tmpString+=c;
                else if ((c==",")|(c=="."))
                        if (!seperator){
                                tmpString+=".";
                                seperator=true;
                        }
        }
    if (tmpString != field.value)
       field.value=tmpString;
}

function reset_style(feld){
	document.getElementById(feld).style.color="#373f8a";
}

function chkform() {
var check=0;


		if(document.forms['kontaktform'].anrede.value=="bw") {
				document.getElementById("anrede").style.color="#e70202";
				check=1;
				
		}
		
		if(document.forms['kontaktform'].vorname.value=="" || document.forms['kontaktform'].vorname.value=="Ihren Vornamen, bitte!") {
				
                document.forms['kontaktform'].vorname.value= "Ihren Vornamen, bitte!";
				document.forms['kontaktform'].vorname.style.color="#e70202";
				check=1;
                
        }
	
		if(document.forms['kontaktform'].nachname.value=="" || document.forms['kontaktform'].nachname.value=="Ihren Nachnamen, bitte!") {
                document.forms['kontaktform'].nachname.value= "Ihren Nachnamen, bitte!";
                document.forms['kontaktform'].nachname.style.color="#e70202";
				check=1;
        }
		
		if(document.forms['kontaktform'].strasse.value=="" || document.forms['kontaktform'].strasse.value=="Ihre Strasse, bitte!") {
				
                document.forms['kontaktform'].strasse.value= "Ihre Strasse, bitte!";
				document.forms['kontaktform'].strasse.style.color="#e70202";
				check=1;
                
        }
	
		if(document.forms['kontaktform'].plz.value=="" || document.forms['kontaktform'].plz.value=="Ihre PLZ, bitte!") {
                document.forms['kontaktform'].plz.value= "Ihre PLZ, bitte!";
                document.forms['kontaktform'].plz.style.color="#e70202";
				check=1;
        }
		
		if(document.forms['kontaktform'].ort.value=="" || document.forms['kontaktform'].ort.value=="Ihren Ort, bitte!") {
                document.forms['kontaktform'].ort.value= "Ihren Ort, bitte!";
                document.forms['kontaktform'].ort.style.color="#e70202";
				check=1;
				
        }
		
		if(document.forms['kontaktform'].nachricht.value=="" || document.forms['kontaktform'].nachricht.value=="Bitte geben Sie eine Nachricht ein!") {
                document.forms['kontaktform'].nachricht.value= "Bitte geben Sie eine Nachricht ein!";
                document.forms['kontaktform'].nachricht.style.color="#e70202";
				check=1;
				
        }
		
	    if(document.forms['kontaktform'].email.value=="" || document.forms['kontaktform'].email.value=="Ihre E-Mail Adresse, bitte!" ) {
                document.forms['kontaktform'].email.value= "Ihre E-Mail Adresse, bitte!";
                document.forms['kontaktform'].email.style.color="#e70202";
				check=1;
				
                
        }else {
                email = document.forms['kontaktform'].email.value;
                if(email.indexOf("@")==-1 || email.indexOf(".")==-1 || email.indexOf("@")<1 || document.forms['kontaktform'].email.value=="Korrekte E-Mail Adresse, bitte!") {
                        document.forms['kontaktform'].email.value= "Korrekte E-Mail Adresse, bitte!";
                        document.forms['kontaktform'].email.style.color="#e70202";
				check=1;
                       
                }
        }
		
		if (check!=0){
			return false;
		}
		
document.kontaktform.submit()

} 


function ActiveSWF(ObjectID, WIDTH, HEIGHT, URL) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + WIDTH + '" height="' + HEIGHT + '" border="0" hspace="0" vspace="0" align="middle" id="' + ObjectID + '">');
	document.write('<param name="movie" value="' + URL + '" />');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="SCALE" value="exactfit">');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="' + URL + '" type="application/x-shockwave-flash" quality="high" align="middle" allowScriptAccess="sameDomain" bgcolor="#ffffff" width="' + WIDTH + '" height="' + HEIGHT + '" pluginspage="http://www.macromedia.com/go/getflashplayer" name="' + ObjectID + '"></embed>');
	document.write('</object>');
}

function openColgateTimeControl() {
window.open('http://www.colgate.de/app/PDP/ColgateTimeControl/DE/HomePage.cvsp', '_blank');
}

function openOHM() {
window.open('http://www.monat-der-mundgesundheit.de', '_blank');
}

function openAjaxProfessional() {
window.open('http://www.ajax.de/products/allpurpose/ajaxProfessional/index.shtml', '_blank');
}


function openDetergentRegulation() {
	window.open('http://detergentregulation.com/atde/index.aspx','DetergentRegulation','width=780,height=460,scrollbars=1,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,top=80,left=80')
} 

/* Funktionen für Randomteaser */

var bilder = new Array();
  

bilder[0] = "design_images/head.jpg";  
bilder[1] = "design_images/head2.jpg"; 
bilder[2] = "design_images/head3.jpg"; 

var timer = 500; 
var arraylaenge = bilder.length;
var index = Math.floor(Math.random() * arraylaenge); 
var Bildstring = '<img src="' + bilder[index] + '">'; 

function Bildwechsel () { 
    if (index == arraylaenge-1) { 
                index = 0; 
    } else { 
            index++; 
    }     
    
    Bildstring = '<img src="' + bilder[index] + '">'; 
    document.getElementById("Bild").innerHTML = Bildstring; 
    //setTimeout("Bildwechsel()", timer); 
}  

function Bildanzeige () { 
    document.getElementById("Bild").innerHTML = Bildstring;
    Bildwechsel(); 
} 

