﻿/* ---------------------------- */
/* XMLHTTPRequest Enable */
/* ---------------------------- */
function createObject() {
var request_type;
var browser = navigator.appName;
if(browser == "Microsoft Internet Explorer"){
request_type = new ActiveXObject("Microsoft.XMLHTTP");
}else{
request_type = new XMLHttpRequest();
}
return request_type;
}

var http = createObject();


/* -------------------------- */
/* INSERT */
/* -------------------------- */
/* Required: var nocache is a random number to add to request. This value solve an Internet Explorer cache issue */
var nocache = 0;
function insert() {
// Optional: Show a waiting message in the layer with ID login_response

// Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
var channeltarget= document.getElementById('channeltarget').value;
var livemode = document.getElementById('livemode').value;
document.getElementById('insert_response').innerHTML = "Just a second... "
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/livesetoverrid.php?channel='+channeltarget+'&livemode='+livemode+'&nocache='+nocache);
http.onreadystatechange = insertReply;
http.send(null);
}
function insertReply() {
if(http.readyState == 4){
var response = http.responseText;
// else if login is ok show a message: "Site added+ site URL".
document.getElementById('insert_response').innerHTML = 'OK : '+response;
}
}


/* -------------------------- */
/* VIRAL STUFF */
/* -------------------------- */

function wallwelcomvod() {
      var template_data = {'appli' : '<a href="http://apps.facebook.com/rouen-life-tv/">Rouen Life VOD</a>'};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(35766371452, template_data, [], '', null, false);
    }
    
function wallwelcomchallenge() {
      var template_data = {'appli' : '<a href="http://apps.facebook.com/rouen-life-tv/">Rouen Life Challenge</a>'};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(35766371452, template_data, [], '', null, false);
    }    
    
function wallwelcomtv() {
      var template_data = {'appli' : '<a href="http://apps.facebook.com/rouen-life-tv/">Rouen Life TV</a>'};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(35766371452, template_data, [], '', null, false);
    }

function wallwelcomtop3() {
      var template_data = {'appli' : '<a href="http://apps.facebook.com/rouen-life-tv/">Rouen Life TOP3</a>'};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(35766371452, template_data, [], '', null, false);
    }
        
function wallwelcom1() {
      var template_data = {'appli' : '<a href="http://apps.facebook.com/rouen-life-tv/">Rouen Life</a>'};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(35766371452, template_data, [], '', null, false);
    }
        
 function gowallfeedvod1(response) {
      var template_data = {'notepicvalue' : response};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(36651791452, template_data, [], '', null, false);
    }
        
 function gowallfeed_share(vidid,chanvids,fb_user_id,sessionkey) {
    FB.Connect.showPermissionDialog("publish_stream", getvidinfo_share(vidid,chanvids,fb_user_id,sessionkey), false, [fb_user_id]);
     }
    
    
    
    
 function gowallfeedvod2(response) {
      var template_data = {'notepicvalue' : response};
      // This the call to actually show the feed dialog
    FB.Integration.showFeedDialog(49540456452, template_data, [], 1275068547, null, false);
    }    

/* -------------------------- */
/* RSS STUFF*/
/* -------------------------- */



/* GET cine news Context*/
function Get_context_cine(user_fb_id,sessionkey) {
document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_news_context_cine.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_context_cine(); };
http.send(null);
}


/*  GET cine news Context REPLY */
function getGet_context_cine() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET cine news */
function Get_cine_news(user_fb_id,sessionkey,cine_id) {
document.getElementById('cine_cont').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
document.getElementById('cine_cont_scraped').innerHTML = ""
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_rss_cine.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&cine_id='+cine_id+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_cine_news(); };
http.send(null);
}


/*  GET cine news REPLY */
function getGet_cine_news() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('cine_cont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET cine news */
function Get_cine_scrap(user_fb_id,sessionkey,cine_id,movie_tag) {
document.getElementById('cine_cont_scraped').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_rss_cine_scraped.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&cine_id='+cine_id+'&movie_tag='+movie_tag+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_cine_scrap(); };
http.send(null);
}


/*  GET cine news REPLY */
function getGet_cine_scrap() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('cine_cont_scraped').innerHTML = response;
if(http.status == 200){
}
}
}


/* GET meteo news Context*/
function Get_context_meteo(user_fb_id,sessionkey) {
document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_news_context_meteo.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_context_meteo(); };
http.send(null);
}


/*  GET meteo news Context REPLY */
function getGet_context_meteo() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET meteo news */
function Get_meteo_news(user_fb_id,sessionkey,meteotown_id) {
document.getElementById('meteo_cont').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
document.getElementById('meteo_cont_scraped').innerHTML = ""
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_rss_meteo.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&meteotown_id='+meteotown_id+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_meteo_news(); };
http.send(null);
}


/*  GET meteo REPLY */
function getGet_meteo_news() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('meteo_cont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET meteo news */
function Get_meteo_scrap(user_fb_id,sessionkey,meteotown_id,meteo_tagdate) {
document.getElementById('meteo_cont_scraped').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_rss_meteo_scraped.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&meteotown_id='+meteotown_id+'&meteo_tagdate='+meteo_tagdate+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_meteo_scrap(); };
http.send(null);
}


/*  GET meteo news REPLY */
function getGet_meteo_scrap() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('meteo_cont_scraped').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET sport news Context*/
function Get_context_sport(user_fb_id,sessionkey) {
document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_news_context_sport.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_context_sport(); };
http.send(null);
}


/*  GET sport news Context REPLY */
function getGet_context_sport() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET sport news */
function Get_sport_news(user_fb_id,sessionkey,sport_id) {
document.getElementById('sport_cont').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
document.getElementById('sport_cont_scraped').innerHTML = ""
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_rss_sport.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&sport_id='+sport_id+'&nocache='+nocache);
http.onreadystatechange = function () {getGet_sport_news(); };
http.send(null);
}


/*  GET sport news REPLY */
function getGet_sport_news() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('sport_cont').innerHTML = response;
if(http.status == 200){
}
}
}

/* -------------------------- */
/* CHAT STUFF */
/* -------------------------- */

/* GET listchatmuteuser */
function listchatmuteuser() {
document.getElementById('chatmutelist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/listchatmuteuser.php?nocache='+nocache);
http.onreadystatechange = function () {getlistchatmuteuser(); };
http.send(null);
}


/*  GET chatmuteuser REPLY */
function getlistchatmuteuser() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('chatmutelist').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET chatmuteuser */
function chatmuteuser(fb_id) {
document.getElementById('chatmutelist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/chatmuteuser.php?fb_id='+fb_id+'&nocache='+nocache);
http.onreadystatechange = function () {getchatmuteuser(); };
http.send(null);
}


/*  GET chatmuteuser REPLY */
function getchatmuteuser() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('chatmutelist').innerHTML = response;
if(http.status == 200){
}
}
}


/* GET chatunmuteuser */
function chatunmuteuser(fb_id) {
document.getElementById('chatmutelist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/chatunmuteuser.php?fb_id='+fb_id+'&nocache='+nocache);
http.onreadystatechange = function () {getchatunmuteuser(); };
http.send(null);
}


/*  GET chatunmuteuser REPLY */
function getchatunmuteuser() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('chatmutelist').innerHTML = response;
if(http.status == 200){
}
}
}

/* -------------------------- */
/* TESTINGS */
/* -------------------------- */


/* GET ISGROUPMEMEBER */
function checkisgroupmember(user_fb_id, sessionkey, groupid) {
document.getElementById('dynconttest').innerHTML = "<img src=\"img/loading-mini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/checkisingroup.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&groupid='+groupid+'&nocache='+nocache);
http.onreadystatechange = function () {getcheckisgroupmember(); };
http.send(null);
}


/*  GET ISGROUPMEMEBER REPLY */
function getcheckisgroupmember() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynconttest').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET ISFAN */
function checkisfan(user_fb_id, sessionkey, fanid) {
document.getElementById('dynconttest').innerHTML = "<img src=\"img/loading-mini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/checkisfan.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&fanid='+fanid+'&nocache='+nocache);
http.onreadystatechange = function () {getcheckisfan(); };
http.send(null);
}


/*  GET ISFAN REPLY */
function getcheckisfan() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynconttest').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET ISFRIEND */
function checkisfriend(user_fb_id, sessionkey, friendid) {
document.getElementById('dynconttest').innerHTML = "<img src=\"img/loading-mini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/checkisfriend.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&friendid='+friendid+'&nocache='+nocache);
http.onreadystatechange = function () {getcheckisfriend(); };
http.send(null);
}


/*  GET ISFRIEND REPLY */
function getcheckisfriend() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynconttest').innerHTML = response;
if(http.status == 200){
}
}
}


/* -------------------------- */
/* MARK STUFF */
/* -------------------------- */
/* GET cancel Marking */

function cancelmarkfriend(user_fb_id, vidid, sessionkey) {
player.sendEvent('PLAY');
document.getElementById('markfriendlisttitle').innerHTML = "<a href=\"javascript:listmarkfrienduser('"+user_fb_id+"','"+vidid+"','"+sessionkey+"')\">Marquer un ami</a> à <span id=\"posId\"></span>s  <br />"
}

/* GET listmarkfrienduser */
function listmarkfrienduser(user_fb_id, vidid, sessionkey) {
player.sendEvent('PLAY');
var markfriend_at = currentPosition;
document.getElementById('markfriendlisttitle').innerHTML = "Marquer un ami à <strong>"+ markfriend_at+"s</strong> ? | <a href=\"javascript:cancelmarkfriend('"+user_fb_id+"','"+vidid+"','"+sessionkey+"')\">Annuler</a><br/>"
document.getElementById('markfriendlist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/listmarkfrienduser.php?user_fb_id='+user_fb_id+'&vidid='+vidid+'&sessionkey='+sessionkey+'&markfriend_at='+markfriend_at+'&nocache='+nocache);
http.onreadystatechange = function () {getlistmarkfrienduser(); };
http.send(null);
}


/*  GET getlistmarkfrienduser REPLY */
function getlistmarkfrienduser() {
if(http.readyState == 4){
var response = http.responseText;

if(http.status == 200){
document.getElementById('markfriendlist').innerHTML = response;
}
}
}

/* GET listmarkfrienduser */
function listanothermarkfrienduser(user_fb_id, vidid, sessionkey) {
var markfriend_at = currentPosition;
document.getElementById('markfriendlist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/listmarkfrienduser.php?user_fb_id='+user_fb_id+'&vidid='+vidid+'&sessionkey='+sessionkey+'&markfriend_at='+markfriend_at+'&nocache='+nocache);
http.onreadystatechange = function () {getlistanothermarkfrienduser(user_fb_id, vidid, sessionkey); };
http.send(null);
}


/*  GET getlistmarkfrienduser REPLY */
function getlistanothermarkfrienduser(user_fb_id, vidid, sessionkey) {
var fb_user_id = user_fb_id
if(http.readyState == 4){
var response = http.responseText;

document.getElementById('markfriendlist').innerHTML = response;
if(http.status == 200){

}
}
}

/* GET markfrienduser */
function markfrienduser(vidid, friend_fb_id, user_fb_id, marked_at, sessionkey) {
document.getElementById('markfriendlist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/vidmarkfriend.php?user_fb_id='+user_fb_id+'&vidid='+vidid+'&sessionkey='+sessionkey+'&marked_at='+marked_at+'&friend_fb_id='+friend_fb_id+'&nocache='+nocache);
http.onreadystatechange = function () {getmarkfrienduser(vidid,user_fb_id,sessionkey); };
http.send(null);
}


/*  GET getmarkfrienduser REPLY */
function getmarkfrienduser(vidid,user_fb_id,sessionkey) {
var fb_user_id = user_fb_id
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('markfriendlist').innerHTML = response;

if(http.status == 200){
getvidmarkedtrack2(vidid,fb_user_id,sessionkey)

}
}
}

/* GET unmarkfrienduser */
function unmarkfrienduser(vidid,markfriend_tagid,user_fb_id,sessionkey) {
document.getElementById('markfriendlist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/unmarkfrienduser.php?user_fb_id='+user_fb_id+'&vidid='+vidid+'&sessionkey='+sessionkey+'&markfriend_tagid='+markfriend_tagid+'&nocache='+nocache);
http.onreadystatechange = function () {getunmarkfrienduser(vidid,user_fb_id,sessionkey); };
http.send(null);
}


/*  GET unmarkfrienduser REPLY */
function getunmarkfrienduser(vidid,user_fb_id,sessionkey) {
var fb_user_id = user_fb_id
if(http.readyState == 4){
var response = http.responseText;

document.getElementById('markfriendlist').innerHTML = response;
if(http.status == 200){
getvidmarkedtrack3(vidid,fb_user_id,sessionkey)

}
}
}






/* -------------------------- */
/* VOD STUFF */
/* -------------------------- */



/*  GET INITIATE VID */
function getvid(vidid,chanvids,fb_user_id,sessionkey) {
player.sendEvent('STOP')

document.getElementById('linkplayer1').innerHTML = "<span id=\"sharevid_div\"><strong><a href=\"javascript:gowallfeed_share('"+vidid+"','"+chanvids+"','"+fb_user_id+"','"+sessionkey+"')\"><img src=\"img/bt-share.png\"/></a></strong></span><a href=\"http://apps.facebook.com/rouen-life-tv/invite-vod.php?vidid="+vidid+"&chanvids="+chanvids+"&fb_force_mode=fbml\" target=\"_blank\"><img src=\"img/bt-recommend.png\"/></a></strong>"
document.getElementById('infoplayer1').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

changeVid(vidid)

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidinfo.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvid(vidid,chanvids,fb_user_id,sessionkey);}; 
http.send(null);
} 

/*  GET INITATE VID REPLY*/
function getgetvid(vidid,chanvids,fb_user_id,sessionkey) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('infoplayer1').innerHTML = response

if(http.status == 200){
getvidmarkedtrack(vidid,fb_user_id,sessionkey,chanvids)
}
}
}



/*  GET marktrack VID */
function getvidmarkedtrack(vidid,fb_user_id,sessionkey,chanvids) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkedtrack.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkedtrack(vidid,fb_user_id,sessionkey,chanvids);}; 
http.send(null);
} 


/*  GET marktrack REPLY*/
function getgetvidmarkedtrack(vidid,fb_user_id,sessionkey,chanvids) {
if(http.readyState == 4){
var response = http.responseText;
eval(response)
if(http.status == 200){
getvidmarkedfriendstrack(vidid,fb_user_id,sessionkey,chanvids)

}
}
}

/*  GET marktrackfrienddata VID INFO */
function getvidmarkedfriendstrack(vidid,fb_user_id,sessionkey,chanvids) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkedtrackfriendstrack.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkedfriendstrack(vidid,fb_user_id,sessionkey,chanvids);}; 
http.send(null);
} 


/*  GET marktrackfrienddata REPLY*/
function getgetvidmarkedfriendstrack(vidid,fb_user_id,sessionkey,chanvids) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('marked_subtitle_text').innerHTML = response
if(http.status == 200){
getvidmarkpanel(vidid,fb_user_id,sessionkey,chanvids)
}
}
}

/*  GET VIDMARK PANEL */
function getvidmarkpanel(vidid,fb_user_id,sessionkey,chanvids) {
document.getElementById('vidmarkfriendzone').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkpanel.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkpanel(vidid,chanvids);}; 
http.send(null);
} 


/*  GET VIDMARK PANEL REPLY*/
function getgetvidmarkpanel(vidid,chanvids) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('vidmarkfriendzone').innerHTML = response
if(http.status == 200){
getvidinfo(vidid,chanvids)
}
}
}


/*  GET WALLFEED ILOVE  VID INFO */
function getvidinfoilove(vidid,chanvids) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidid.php?vidid='+vidid+'&chanvids='+chanvids+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidinfoilove(vidid,chanvids);}; 
http.send(null);
} 


/*  GET VID ILOVE INFO REPLY*/
function getgetvidinfoilove(vidid,chanvids) {
if(http.readyState == 4){
var response = http.responseText;
if(http.status == 200){
gowallfeedvod1(response)
}
}
}



/*  GET WALLFEED SHARE  VID INFO */
function getvidinfo_share(vidid,chanvids,fb_user_id,sessionkey) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidid_share.php?vidid='+vidid+'&chanvids='+chanvids+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidinfo_share(vidid,chanvids,fb_user_id,sessionkey);}; 
http.send(null);
} 


/*  GET VID SHARE INFO REPLY*/
function getgetvidinfo_share(vidid,chanvids,fb_user_id,sessionkey) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('sharevid_div').innerHTML = response
if(http.status == 200){
}
}
}

/*  GET marktrack2 VID */
function getvidmarkedtrack2(vidid,fb_user_id,sessionkey) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkedtrack.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkedtrack2(vidid,fb_user_id,sessionkey);}; 
http.send(null);
} 


/*  GET marktrack2 REPLY*/
function getgetvidmarkedtrack2(vidid,fb_user_id,sessionkey) {
if(http.readyState == 4){
var response = http.responseText;
eval(response)
if(http.status == 200){
getvidmarkedfriendstrack2(vidid,fb_user_id,sessionkey)
}
}
}

/*  GET marktrackfrienddata2 VID INFO */
function getvidmarkedfriendstrack2(vidid,fb_user_id,sessionkey) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkedtrackfriendstrack.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkedfriendstrack2(vidid,fb_user_id,sessionkey);}; 
http.send(null);
} 


/*  GET marktrackfrienddata2 REPLY*/
function getgetvidmarkedfriendstrack2(vidid,fb_user_id,sessionkey) {
var user_fb_id = fb_user_id
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('marked_subtitle_text').innerHTML = response
if(http.status == 200){
getreloadvidinfo(vidid,fb_user_id,sessionkey)
}
}
}

/*  GET marktrack3 VID */
function getvidmarkedtrack3(vidid,fb_user_id,sessionkey) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkedtrack.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkedtrack3(vidid,fb_user_id,sessionkey);}; 
http.send(null);
} 


/*  GET marktrack3 REPLY*/
function getgetvidmarkedtrack3(vidid,fb_user_id,sessionkey) {
if(http.readyState == 4){
var response = http.responseText;
eval(response)

if(http.status == 200){
getvidmarkedfriendstrack3(vidid,fb_user_id,sessionkey)


}
}
}

/*  GET marktrackfrienddata3 VID INFO */
function getvidmarkedfriendstrack3(vidid,fb_user_id,sessionkey) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidmarkedtrackfriendstrack.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidmarkedfriendstrack3(vidid,fb_user_id,sessionkey);}; 
http.send(null);
} 


/*  GET marktrackfrienddata3 REPLY*/
function getgetvidmarkedfriendstrack3(vidid,fb_user_id,sessionkey) {
var user_fb_id = fb_user_id
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('marked_subtitle_text').innerHTML = response
if(http.status == 200){
getreloadvidinfo(vidid,fb_user_id,sessionkey)
}
}
}

/*  GET RELOAD VIDINFO */
function getreloadvidinfo(vidid,fb_user_id,sessionkey) {

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable

http.open('get', 'inc/getvidinfo.php?vidid='+vidid+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetreloadvidinfo();}; 
http.send(null);
} 

/*  GET RELOAD VIDINFO REPLY*/
function getgetreloadvidinfo() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('infoplayer1').innerHTML = response
if(http.status == 200){

}
}
}



/*  GET WALLFEED VID INFO */
function getvidinfo(vidid,chanvids) {
// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getvidid.php?vidid='+vidid+'&chanvids='+chanvids+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidinfo(vidid,chanvids);}; 
http.send(null);
} 


/*  GET VID INFO REPLY*/
function getgetvidinfo(vidid,chanvids) {
if(http.readyState == 4){
var response = http.responseText;
if(http.status == 200){
}
}
}


	
/*  GET VID CHAN PANNEL */
function getvidchans(fb_user_id,sessionkey) {
var chanvids = document.getElementById('chanvids').value;
document.getElementById('vidchanpannel').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"


// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getchanvids.php?chanvids='+chanvids+'&fb_user_id='+fb_user_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getgetvidchans();}; 
http.send(null);
} 


/*  GET VID CHAN PANNEL REPLY*/
function getgetvidchans() {
if(http.readyState == 4){
var response = http.responseText;
if(http.status == 200){
document.getElementById('vidchanpannel').innerHTML = response
}
}
}
  	
  	
/* TOGGLE TO VOD VID */
function changeVid(vidid) {
var s1 = new SWFObject("inc/vodplayer.swf","mpl","455","250","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("streamer", "rtmpt://www.nielsenaa.com/oflaDemo");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl");
	s1.addVariable("logo","img/logo.png");
	s1.addVariable("file","inc/playlist-vod.php?vidid="+vidid);
  s1.addVariable("height","250");
  s1.addVariable("width","455");
	s1.addVariable("backcolor","000000");
	s1.addVariable("frontcolor","CCCCCC");
	s1.addVariable("lightcolor","CCCCCC");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","over");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","3");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
	s1.write("player1");
}

function VidJump_to(vidid,jump_at) {
player.sendEvent('SEEK', jump_at)
document.getElementById('markfriendlist').innerHTML = ""
}

/* JUMP IN  VOD VID */
function VidJump_to2(vidid,jump_at) {
player.sendEvent('STOP')
var s1 = new SWFObject("inc/vodplayer.swf","mpl","455","250","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("streamer", "rtmpt://www.nielsenaa.com/oflaDemo");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl");
	s1.addVariable("logo","img/logo.png");
	s1.addVariable("file","inc/playlist-vod_seekat.php?vidid="+vidid+"&jump_at="+jump_at);
  s1.addVariable("height","250");
  s1.addVariable("width","455");
	s1.addVariable("backcolor","000000");
	s1.addVariable("frontcolor","CCCCCC");
	s1.addVariable("lightcolor","CCCCCC");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","over");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","3");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
	s1.write("player1");
}

/* -------------------------- */
/* QUIZZ HANDLING */
/* -------------------------- */

/* GET listchallenge_quizz */
function listchallenge_quizz(chall_id) {
document.getElementById('dynchallquizzlist').innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/listchallengequestions.php?chall_id='+chall_id+'&nocache='+nocache);
http.onreadystatechange = function () {getlistchallenge_quizz(); };
http.send(null);
}


/*  GETlistchallenge_quizz REPLY */
function getlistchallenge_quizz() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynchallquizzlist').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET answer_question */
function answer_question(question_id,chall_id,challer_id,zzz,user_fb_id) {
var answer_id = document.getElementById('answer_id'+question_id).value;
document.getElementById('dynquizzanswer'+question_id).innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"

// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/answerquestion.php?chall_id='+chall_id+'&question_id='+question_id+'&answer_id='+answer_id+'&challer_id='+challer_id+'&zzz='+zzz+'&nocache='+nocache);
http.onreadystatechange = function () {getanswer_question(question_id,chall_id,user_fb_id); };
http.send(null);
}


/*  GET answer_question REPLY */
function getanswer_question(question_id,chall_id,user_fb_id) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynquizzanswer'+question_id).innerHTML = response;
if(http.status == 200){
recallchallerscore (chall_id,user_fb_id)

}
}
}

/* -------------------------- */
/* SERVICECOM DATA SEND HANDLING */
/* -------------------------- */

/* SEND VIDEO SUBMIT */
function submitvideomsg() {
var subv_fb_id = document.getElementById('subv_fb_id').value;
var subv_fb_name = document.getElementById('subv_fb_name').value;
var subv_realname = document.getElementById('subv_realname').value;
var subv_email = document.getElementById('subv_email').value;
var subv_webblog = document.getElementById('subv_webblog').value;
var subv_vtitle = document.getElementById('subv_vtitle').value;
var subv_vurl = document.getElementById('subv_vurl').value;
var subv_vdesc = document.getElementById('subv_vdesc').value;
var newsletter = document.getElementById('newsletter').value;
var subv_cgu_ok = document.getElementById('subv_cgu_ok').value;
var subv_origin = document.getElementById('subv_origin').value;
document.getElementById('light').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable pfill_listid
http.open('get', 'inc/submitvideomsg-ok.php?subv_fb_id='+subv_fb_id+'&subv_fb_name='+subv_fb_name+'&subv_realname='+subv_realname+'&subv_email='+subv_email+'&subv_webblog='+subv_webblog+'&subv_vtitle='+subv_vtitle+'&subv_vurl='+subv_vurl+'&subv_vdesc='+subv_vdesc+'&newsletter='+newsletter+'&subv_cgu_ok='+subv_cgu_ok+'&subv_origin='+subv_origin+'&nocache='+nocache);
http.onreadystatechange = function () {getsubmitvideomsg(); };
http.send(null);
}

/* SEND MSG SUBMIT */
function submitsimplemsg() {
var sube_fb_id = document.getElementById('sube_fb_id').value;
var sube_fb_name = document.getElementById('sube_fb_name').value;
var sube_realname = document.getElementById('sube_realname').value;
var sube_email = document.getElementById('sube_email').value;
var sube_tel = document.getElementById('sube_tel').value;
var sube_orga = document.getElementById('sube_orga').value;
var sube_subject = document.getElementById('sube_subject').value;
var sube_msg = document.getElementById('sube_msg').value;
var newsletter = document.getElementById('newsletter').value;
var sube_origin = document.getElementById('sube_origin').value;
document.getElementById('light2').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable pfill_listid
http.open('get', 'inc/submitsimplemsg-ok.php?sube_fb_id='+sube_fb_id+'&sube_fb_name='+sube_fb_name+'&sube_realname='+sube_realname+'&sube_email='+sube_email+'&sube_tel='+sube_tel+'&sube_orga='+sube_orga+'&sube_subject='+sube_subject+'&sube_msg='+sube_msg+'&newsletter='+newsletter+'&sube_origin='+sube_origin+'&nocache='+nocache);
http.onreadystatechange = function () {getsubmitsimplemsg(); };
http.send(null);
}

/* SEND LIVE SUBMIT */
function submitlivemsg() {
var subl_fb_id = document.getElementById('subl_fb_id').value;
var subl_fb_name = document.getElementById('subl_fb_name').value;
var subl_art_name = document.getElementById('subl_art_name').value;
var subl_email = document.getElementById('subl_email').value;
var subl_webblog = document.getElementById('subl_webblog').value;
var subl_tel = document.getElementById('subl_tel').value;
var subl_ldesc = document.getElementById('subl_ldesc').value;
var subl_d1 = document.getElementById('subl_d1').value;
var subl_d1t1 = document.getElementById('subl_d1t1').value;
var subl_d1t2 = document.getElementById('subl_d1t2').value;
var subl_d2 = document.getElementById('subl_d2').value;
var subl_d2t1 = document.getElementById('subl_d2t1').value;
var subl_d2t2 = document.getElementById('subl_d2t2').value;
var subl_d3 = document.getElementById('subl_d3').value;
var subl_d3t1 = document.getElementById('subl_d3t1').value;
var subl_d3t2 = document.getElementById('subl_d3t2').value;
var newsletter = document.getElementById('newsletter').value;
var subl_cgu_ok = document.getElementById('subl_cgu_ok').value;
var subl_origin = document.getElementById('subl_origin').value;
document.getElementById('light3').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"

// Set te random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable pfill_listid
http.open('get', 'inc/submitlivemsg-ok.php?subl_fb_id='+subl_fb_id+'&subl_fb_name='+subl_fb_name+'&subl_art_name='+subl_art_name+'&subl_email='+subl_email+'&subl_webblog='+subl_webblog+'&subl_tel='+subl_tel+'&subl_ldesc='+subl_ldesc+'&subl_d1='+subl_d1+'&subl_d1t1='+subl_d1t1+'&subl_d1t2='+subl_d1t2+'&subl_d2='+subl_d2+'&subl_d2t1='+subl_d2t1+'&subl_d2t2='+subl_d2t2+'&subl_d3='+subl_d3+'&subl_d3t1='+subl_d3t1+'&subl_d3t2='+subl_d3t2+'&newsletter='+newsletter+'&subl_cgu_ok='+subl_cgu_ok+'&subl_origin='+subl_origin+'&nocache='+nocache);
http.onreadystatechange = function () {getsubmitlivemsg(); };
http.send(null);
}


/* -------------------------- */
/* CHALLENGES */
/* -------------------------- */

/* GET LISTCHALLENGES */
function Listchallenges(user_fb_id,sessionkey) {
document.getElementById('dyncont').innerHTML = "<span id=\"fbloaderbig\"><img src=\"img/loader-facebook.gif\"/></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getchallenges.php?user_fb_id='+user_fb_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getListchallenges(); };
http.send(null);
}


/*  GET LISTCHALLENGES REPLY */
function getListchallenges() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}


/* GET SINGLE CHALLENGE */
function Singlechall(user_fb_id,chall_id,sessionkey) {
document.getElementById('dyncont').innerHTML = "<span id=\"fbloaderbig\"><img src=\"img/loader-facebook.gif\"/></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getchallenge.php?user_fb_id='+user_fb_id+'&chall_id='+chall_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getSinglechall(); };
http.send(null);
}


/*  GET SINGLE CHALLENGE REPLY */
function getSinglechall() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* Join CHALLENGE */
function Joinchall(user_fb_id,chall_id) {
document.getElementById('dynminicont'+chall_id).innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/joinchallenge.php?user_fb_id='+user_fb_id+'&chall_id='+chall_id+'&nocache='+nocache);
http.onreadystatechange = function () {getJoinchall(chall_id); };
http.send(null);
}


/* Join CHALLENGE REPLY */
function getJoinchall(chall_id) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynminicont'+chall_id).innerHTML = response;
if(http.status == 200){
}
}
}

/* Joins CHALLENGES */
function Joinchalls(user_fb_id,chall_id,sessionkey) {
document.getElementById('dynminicont'+chall_id).innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/joinchallenges.php?user_fb_id='+user_fb_id+'&chall_id='+chall_id+'&sessionkey='+sessionkey+'&nocache='+nocache);
http.onreadystatechange = function () {getJoinchalls(chall_id); };
http.send(null);
}


/* Joins CHALLENGES REPLY */
function getJoinchalls(chall_id) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynminicont'+chall_id).innerHTML = response;
if(http.status == 200){
}
}
}

/* UPDATE BONUS CHALLER SCORE */
function update_challerscore(user_fb_id,chall_id,sessionkey,bonustype,bonustypeid) {
document.getElementById('dyntype'+bonustype).innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/update_challerscore.php?user_fb_id='+user_fb_id+'&chall_id='+chall_id+'&sessionkey='+sessionkey+'&bonustype='+bonustype+'&bonustypeid='+bonustypeid+'&nocache='+nocache);
http.onreadystatechange = function () {getupdate_challerscore(bonustype,chall_id,user_fb_id); };
http.send(null);
}



/*  GET UPDATE BONUS CHALLER SCORE REPLY */
function getupdate_challerscore(bonustype,chall_id,user_fb_id) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyntype'+bonustype).innerHTML = response;
if(http.status == 200){
recallchallerscore (chall_id,user_fb_id)
}
}
}


/* REFRESH CHALLER SCORE */
function recallchallerscore(chall_id,user_fb_id) {
document.getElementById('dynscore'+chall_id).innerHTML = "<img src=\"img/loader-facebookmini.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/get_challerscore.php?user_fb_id='+user_fb_id+'&chall_id='+chall_id+'&nocache='+nocache);
http.onreadystatechange = function () {getrecallchallerscore(chall_id); };
http.send(null);
}



/*  GET REFRESH CHALLER SCORE REPLY */
function getrecallchallerscore(chall_id) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dynscore'+chall_id).innerHTML = response;
if(http.status == 200){
}
}
}

/* -------------------------- */
/* WHOSWHO */
/* -------------------------- */

/* GET LISTCAT */
function ListCat() {
document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/listcat.php?nocache='+nocache);
http.onreadystatechange = function () {getListCat(); };
http.send(null);
}


/*  GET LISTCAT REPLY */
function getListCat() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* MANAGE SCAT */
function ListSCat(cat_id) {
document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/listscat.php?cat_id='+cat_id+'&nocache='+nocache);
http.onreadystatechange = function () {getListSCat(); };
http.send(null);
}

/*  GET manageSCat REPLY */
function getListSCat() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET SeeSCAT */
function SeeSCat(xparam, yparam) {
document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/seescat.php?xparam='+xparam+'&yparam='+yparam+'&nocache='+nocache);
http.onreadystatechange = function () {getSeeSCat(); };
http.send(null);
}

/*  GET SeeSCAT REPLY*/
function getSeeSCat() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}

/* GET Check who */
function whoswho(p_id) {

document.getElementById('dyncont').innerHTML = "<img src=\"img/loader-facebook.gif\"/>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/getwho.php?p_id='+p_id+'&nocache='+nocache);
http.onreadystatechange = function () {getwhoswho(); };
http.send(null);
}

/*  GET Check who REPLY*/
function getwhoswho() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('dyncont').innerHTML = response;
if(http.status == 200){
}
}
}



/* -------------------------- */
/* ENDWHOSWHO */
/* -------------------------- */

/* -------------------------- */
/* SERVICECOM DATA REPLY HANDLING */
/* -------------------------- */

/* GET VIDEO SUBMIT REPLY */
function getsubmitvideomsg() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('light').innerHTML = response;
if(http.status == 200){
document.getElementById('light').innerHTML = "<div id=\"pophead_big\">Proposer une vidéo</div><div id=\"pophead2_big\">Proposition vidéo envoyée avec succès</div><div id=\"popcenter_big\"><div id=\"inproposelivefree3\"></div><div id=\"proposelivefree\">  </div><div id=\"proposelivefree\">  </div></div><div id=\"popfoot_big\"><a href = \"javascript:void(0)\" onclick = \"document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'\"><img src=\"img/btclose.png\" alt=\"Annuler\"/></a></div>"
document.getElementById('light').style.display='none';
document.getElementById('fade').style.display='none';	
	
}
}
}

/* GET MSG SUBMIT REPLY */
function getsubmitsimplemsg() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('light2').innerHTML = response;
if(http.status == 200){
document.getElementById('light2').innerHTML = "<div id=\"pophead_big\">Contacter Rouen Life</div><div id=\"pophead2_big\">Demande envoyée avec succès</div><div id=\"popcenter_big\"><div id=\"inproposelivefree3\"></div><div id=\"proposelivefree\">  </div><div id=\"proposelivefree\">  </div></div><div id=\"popfoot_big\"><a href = \"javascript:void(0)\" onclick = \"document.getElementById('light2').style.display='none';document.getElementById('fade').style.display='none'\"><img src=\"img/btclose.png\" alt=\"Annuler\"/></a></div>"
document.getElementById('light2').style.display='none';
document.getElementById('fade').style.display='none';

}
}
}

/* GET LIVE SUBMIT REPLY */
function getsubmitlivemsg() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('light3').innerHTML = response;
if(http.status == 200){
document.getElementById('light3').innerHTML = "<div id=\"pophead_big\">Fais ton live sur Rouen Life TV</div><div id=\"pophead2_big\">Demande envoyée avec succès</div><div id=\"popcenter_big\"><div id=\"inproposelivefree3\"></div><div id=\"proposelivefree\">  </div><div id=\"proposelivefree\">  </div></div><div id=\"popfoot_big\"><a href = \"javascript:void(0)\" onclick = \"document.getElementById('light3').style.display='none';document.getElementById('fade2').style.display='none'\"><img src=\"img/btclose.png\" alt=\"Annuler\"/></a></div>"
document.getElementById('light3').style.display='none';
document.getElementById('fade2').style.display='none';
}
}
}
