var links = new Array();

links['timmerdorfer_strand']="timmendorfer-strand.de";
links['valentino']="valentino-gmbh.de";
links['fleurop']="fleurop.de";
links['hma']="hotel-marketing-agentur.de";
links['fdf']="fdf.de";
links['frische']="blumengrossmarkt-hh.de/docs/26972/frischepartner_startseite.aspx";



function m_over_effect(obj){
         var strLength=obj.src.length;
         var Teil_1=(obj.src.substring((strLength-9),strLength));
         if(Teil_1!="_over.png"){
            var newsrc=(obj.src.substring(0,(strLength-4)))+"_over.png";
            obj.src=newsrc;
         }
}

function m_out_effect(obj){
         var strLength=obj.src.length;
         var Teil_1=(obj.src.substring((strLength-9),strLength));
         if(Teil_1=="_over.png"){
           var newsrc=(obj.src.substring(0,(strLength-9)))+".png";
            obj.src=newsrc;
         }
}

function openLink(pLink){
         window.open("http://www."+links[pLink],'_blank');
}

function click_newsField(){
         obj=document.getElementById("txt_news");
         var txtMail=obj.value;
         if(txtMail=="Ihre E-Mail-Adresse"){
            obj.value="";
         }
}

function news_anmelden(){
         obj=document.getElementById("txt_news");
         var txtMail=obj.value;
         if(emailValidator(obj, "Ihre E-Mailadresse ist ungültig")){
            //alert("Sie werden zur Bestätigung ein E-Mail empfangen\nAktivieren Sie Ihre Newsletter durch auf der Bestätigungslink zu klicken");
            window.open("inc/news_mail_add.php?mail_address="+txtMail,"_blank");
         }
}

function emailValidator(elem, helperMsg){
        var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
        if(elem.value.match(emailExp)){
                return true;
        }else{
                alert(helperMsg);
                elem.focus();
                return false;
        }
}


