﻿//appel du flash
var anchor = window.location.hash;
    anchor = anchor.substring(1,anchor.length);

swfobject.embedSWF('media/DOLCE_conteneur.swf?path=media/DOLCE_jeu2010.swf', 'DOLCE_jeu2010', '100%', '600px', '10.0.0.0', 'scripts/js/swfobject/expressinstall.swf', 
{flashvars:"&medias=./media/&"+anchor},
{bgcolor: '#000000', menu: 'false', wmode:'direct', align:'middle', allowScriptAccess:'always'}, 
{id: 'DOLCE_jeu2010'});

if (anchor!="") {
    if (anchor.indexOf("DOLCEPRIVATE")!=-1) {
        trackVisite();
        }
          var monUrl = window.location.href.toString();
          window.location.href = monUrl.split('#')[0]+"#index";
 }
function trackVisite() {
    doc = document;
    z=escape(location.search.substring(1)); 
    src = 'http://www.dredd.fr/rsi/track.php?d=DOLCEPRIVATE&rech='+z;
    doc.writeln('<img height=1 width=1 border=0 src="'+src+'&ref='+escape(doc.referrer)+'" />');
}
// fonction appele pour le changement de langue 
function javaSLangue($langue) {
        switch ($langue) {
            case 'DE':
                __doPostBack('lbGerman', '');
                break;
            case 'FR':
                __doPostBack('lbFrench', '');
                break;
            case 'ES':
                __doPostBack('lbSpanish', '');
                break;
            default:
                __doPostBack('lbEnglish', '');
        }
    }

// fonction appele pour les liens share
var u="http://www.dolceprivatesuite.com";
var t=document.title;
		
function javaSShare ($share, $langue){
    switch ($share) {
    case ("facebook"):
           window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');break;
    case ("twitter"):
        switch ($langue) {
            case ("FR"): window.open ('http://twitter.com/home?status=Gagnez une suite privée pendant un an pour vous et vos amis sur DOLCE PRIVATE SUITE. Bonne chance! http://bit.ly/dawVWe','_blank','toolbar=0,status=0,width=800,height=600,scrollbars=1');break;
            case ("ES"): window.open ('http://twitter.com/home?status=Gane una suite privada durante un año para usted y sus amigos en DOLCE PRIVATE SUITE. іBuena Suerte! http://bit.ly/dawVWe','_blank','toolbar=0,status=0,width=800,height=600,scrollbars=1');break;
            case ("DE"): window.open ('http://twitter.com/home?status=Gewinnen Sie Ihre Privatsuite für 1 Jahr für Sie und Ihre Freunde auf DOLCE PRIVATE SUITE. Viel Glück! http://bit.ly/dawVWe','_blank','toolbar=0,status=0,width=800,height=600,scrollbars=1');break;
            default : window.open ('http://twitter.com/home?status=Win a private suite for 1 year for yourself and your friends on DOLCE PRIVATE SUITE. Good luck! http://bit.ly/dawVWe','_blank','toolbar=0,status=0,width=800,height=600,scrollbars=1');break;
            }break;
    case ("linkedin"):
        switch ($langue) {
            case ("FR"): window.open ('http://www.linkedin.com/shareArticle?mini=true&url=http://www.dolceprivatesuite.com/&title=GRAND JEU DOLCE PRIVATE SUITE&summary=Gagnez une suite privée pendant un an pour vous et vos amis ou famille : créez votre profil, sélectionnez un hôtel Dolce en Europe et invitez 10 amis au minimum pour participer au tirage au sort. Bonne chance !&source=http://www.dolceprivatesuite.com','_blank','');break;
            case ("ES"): window.open ('http://www.linkedin.com/shareArticle?mini=true&url=http://www.dolceprivatesuite.com/&title=GRAN JUEGO DOLCE PRIVATE SUITE&summary=Gane una suite privada durante un año para usted y sus amigos o familiares: cree su perfil, seleccione su Hotel Dolce en Europa e invite a un mínimo de 10 personas para participar en el sorteo. ¡Buena Suerte!&source=http://www.dolceprivatesuite.com','_blank','');break;
            case ("DE"): window.open ('http://www.linkedin.com/shareArticle?mini=true&url=http://www.dolceprivatesuite.com/&title=GROßES GEWINNSPIEL DOLCE PRIVATE SUITE&summary=Gewinnen Sie Ihre private Suite für 1 Jahr für Sie und Ihre Freunde oder Familie: Erstellen Sie Ihr persönliches Profil, wählen Sie aus einem der sechs Hotels in Europa und laden Sie mindestens 10 Freunde ein, um am Gewinnspiel teilnehmen zu können. Viel Glück!&source=http://www.dolceprivatesuite.com','_blank','');break;
            default : window.open ('http://www.linkedin.com/shareArticle?mini=true&url=http://www.dolceprivatesuite.com/&title=GRAND PRIZE DRAW DOLCE PRIVATE SUITE&summary=Win a private suite for 1 year for yourself and your friends or family : create your profile, select your Dolce hotel in Europe and invite at least 10 friends to enter the draw. Good Luck !&source=http://www.dolceprivatesuite.com','_blank','');break;
            }break;
    case ("viadeo"):
        window.open ('http://www.viadeo.com/shareit/share/?url=http://www.dolceprivatesuite.com&overview=Gagnez+une+suite+privée+pendant+un+an+pour+vous+et+vos+amis+...&title=GRAND+JEU+DOLCE+PRIVATE+SUITE&urllanguage=fr&encoding=UTF-8','_blank','');break;
    default:
        break;
    }    
}    

function javaSTag ($diffuseur, $email){
    var urlTrack;
    if ($diffuseur.indexOf("DOLCEPRIVATE")==-1){
        urlTrack = 'http://home.edt02.net/emc/mstphVx/?s=122010&p='+$diffuseur+'&Edtck=0&id_order='+$email;
    } else {
        urlTrack = 'http://www.dredd.fr/rsi/vente.php?id='+$diffuseur+'=&cde=';
    }
    document.getElementById("imgTrack").setAttribute("src",urlTrack);
}






