﻿/* ---------------------------- */
/* 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();

/* Required: var nocache is a random number to add to request. This value solve an Internet Explorer cache issue */
var nocache = 0;


/* -------------------------- */
/* BASKET */
/* -------------------------- */

/* SHOW BASKET */
function show_items() {
document.getElementById('basket').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'card_show_ajx.php5?nocache='+nocache);
http.onreadystatechange = function () {getshow_items(); };
http.send(null);
}


/* SHOW BASKET REPLY */
function getshow_items() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('basket').innerHTML = response;
if(http.status == 200){
}
}
}

/* ADD TO BASKET */
function add_item(item,nbadd) {
document.getElementById('basket').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'card_add_ajx.php5?item='+item+'&nbadd='+nbadd+'&nocache='+nocache);
http.onreadystatechange = function () {getadd_item(); };
http.send(null);
}


/*  ADD TO BASKET REPLY */
function getadd_item() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('basket').innerHTML = response;
if(http.status == 200){
show_items()
}
}
}

/* DEL FROM BASKET */
function del_item(item,delvalue) {
document.getElementById('basket').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'card_del_ajx.php5?delitem='+item+'&valitem='+delvalue+'&nocache='+nocache);
http.onreadystatechange = function () {getdel_item(); };
http.send(null);
}

/* DEL FROM BASKET REPLY */
function getdel_item() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('basket').innerHTML = response;
if(http.status == 200){
show_items()
}
}
}


/* New Press STUFF */

/* Get Cat */
function press_getcat(catid,scatid) {
document.getElementById('pr_slct_rez').innerHTML = "<div id=\"pr_minim_h\"><img src=\"img/loader-facebook.gif\"/></div>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/press_getcat.php5?catid='+catid+'&scatid='+scatid+'&nocache='+nocache);
http.onreadystatechange = function () {gpress_getcat(catid,scatid); };
http.send(null);
}

/* Get Cat REPLY */
function gpress_getcat(catid,scatid) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('pr_slct_rez').innerHTML = response;
if(http.status == 200){
updt_presscat_tit(catid,scatid)
}
}
}

/* Get Item */
function press_getitem(itemid) {
document.getElementById('pr_slct_rez').innerHTML = "<div id=\"pr_minim_h\"><img src=\"img/loader-facebook.gif\"/></div>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/press_get_item.php5?itemid='+itemid+'&nocache='+nocache);
http.onreadystatechange = function () {gpress_getitem(); };
http.send(null);
}

/* Get Item REPLY */
function gpress_getitem() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('pr_slct_rez').innerHTML = response;
if(http.status == 200){
}
}
}


/* Updt Cat NAME */
function updt_presscat_tit(catid,scatid) {
document.getElementById('pr_slct_menu').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/press_getcatname.php5?catid='+catid+'&scatid='+scatid+'&nocache='+nocache);
http.onreadystatechange = function () {gupdt_presscat_tit(); };
http.send(null);
}

/* Get Updt Cat NAME */
function gupdt_presscat_tit() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('pr_slct_menu').innerHTML = response;
if(http.status == 200){
}
}
}



/* VIDEO STUFF */


/* INIT VOD INDEX */
function initVid_index(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"350","192","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "link");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","192");
  s1.addVariable("width","350");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","none");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod-index.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}

/* INIT VOD UNIVERS DENTAIRE  */
function initVid_dent(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"358","268","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "link");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","268");
  s1.addVariable("width","358");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","none");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod-dentaire.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}

/* INIT VOD UNIVERS MASSAGE */
function initVid_masg(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"358","268","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","258");
  s1.addVariable("width","358");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod-massage.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}

/* INIT VOD UNIVERS MASSAGE */
function playVid_masg(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"358","268","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","258");
  s1.addVariable("width","358");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod-massage.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}


/* INIT VOD */
function initVid(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"258","183","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","183");
  s1.addVariable("width","258");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","false");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}

/* TOGGLE TO VOD VID */
function changeVid(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"258","183","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","183");
  s1.addVariable("width","258");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}


/* JUMP IN  VOD VID */
function VidJump_to2(vidid,jump_at,playerid) {
var s1 = new SWFObject("inc/vodplayer.swf","mpl"+playerid,"258","183","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","true");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","183");
  s1.addVariable("width","258");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod_seekat.php?xvidid="+vidid+"-"+jump_at);
	s1.write("player"+playerid);
	
}


/* INIT VOD */
function initVid_large(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"630","448","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","false");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","448");
  s1.addVariable("width","630");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","false");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);

}



/* INIT NEW WITH CHAPTERS*/
function InitVid_large_start(vidid,playerid) {
initVid_large(vidid,playerid)
document.getElementById('player_right_z_large').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/coach_get_chapters.php5?vidid='+vidid+'&playerid='+playerid+'&nocache='+nocache);
http.onreadystatechange = function () {getInitVid_large_start(vidid,playerid); };
http.send(null);
}

/* INIT NEW WITH CHAPTERS REPLY */
function getInitVid_large_start(vidid,playerid) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player_right_z_large').innerHTML = response;
if(http.status == 200){
GetVid_large_head(vidid,playerid)
}
}
}

/* TOGGLE TO VOD VID */
function loadVid_large(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"630","448","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","false");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","448");
  s1.addVariable("width","630");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);

}
/* LOAD NEW WITH CHAPTERS*/
function GetVid_large(vidid,playerid) {
loadVid_large(vidid,playerid)
document.getElementById('player_right_z_large').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/coach_get_chapters.php5?vidid='+vidid+'&playerid='+playerid+'&nocache='+nocache);
http.onreadystatechange = function () {getGetVid_large(vidid,playerid); };
http.send(null);
}

/* LOAD NEW WITH CHAPTERS REPLY */
function getGetVid_large(vidid,playerid) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player_right_z_large').innerHTML = response;
if(http.status == 200){
GetVid_large_head(vidid,playerid)
}
}
}

/* LOAD NEW HEAD VIDEO */
function GetVid_large_head(vidid,playerid) {
document.getElementById('player_left_z_large_head').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/coach_get_head.php5?vidid='+vidid+'&playerid='+playerid+'&nocache='+nocache);
http.onreadystatechange = function () {getGetVid_large_head(); };
http.send(null);
}

/* LOAD NEW HEAD VIDEO */
function getGetVid_large_head() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player_left_z_large_head').innerHTML = response;
if(http.status == 200){
}
}
}

/* TOGGLE TO VOD VID */
function changeVid_large(vidid,playerid) {
var s1 = new SWFObject("http://www.sport-elec-pro.com/fr/inc/vodplayer.swf","mpl"+playerid,"630","448","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","false");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","448");
  s1.addVariable("width","630");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod.php?vidid="+vidid);
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.write("player"+playerid);
}


/* JUMP IN  VOD VID */
function VidJump_to2_large(vidid,jump_at,playerid) {
var s1 = new SWFObject("inc/vodplayer.swf","mpl"+playerid,"630","448","9,0,124");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("allowfullscreen","false");
	s1.addParam("wmode", "opaque");
	s1.addVariable("stretching", "exactfit");
	s1.addVariable("displayclick", "fullscreen");
	s1.addVariable("quality", "true");
  s1.addVariable("id","mpl"+playerid);
	s1.addVariable("logo","");
  s1.addVariable("height","448");
  s1.addVariable("width","630");
	s1.addVariable("backcolor","ffffff");
	s1.addVariable("frontcolor","000000");
	s1.addVariable("lightcolor","000000");
	s1.addVariable("screencolor","000000");
	s1.addVariable("controlbar","bottom");
	s1.addVariable("autostart","true");
	s1.addVariable("repeat","list");
	s1.addVariable("shuffle","false");
	s1.addVariable("bufferlength","1");
	s1.addVariable("volume","50");
  s1.addVariable("linktarget","_self");
  s1.addVariable("streamer", "http://www.sport-elec-pro.com/fr/inc/streamer.php");
	s1.addVariable("file","http://www.sport-elec-pro.com/fr/inc/playlist-vod_seekat.php?xvidid="+vidid+"-"+jump_at);
	s1.write("player"+playerid);
	
}


/* ASK FOR DL */
function toggle_dl(vidid,playerid) {
document.getElementById('player1').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/toggle_dl.php5?vidid='+vidid+'&playerid='+playerid+'&nocache='+nocache);
http.onreadystatechange = function () {gettoggle_dl(); };
http.send(null);
}

/* ASK FOR DL REPLY */
function gettoggle_dl() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player1').innerHTML = response;
if(http.status == 200){
}
}
}

/* ASK FOR NEWSLETTER */
function toggle_newsletter(vidid,playerid) {
document.getElementById('player1').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>"
// Set the random number to add to URL request
nocache = Math.random();
// Pass the login variables like URL variable
http.open('get', 'inc/toggle_ns.php5?vidid='+vidid+'&playerid='+playerid+'&nocache='+nocache);
http.onreadystatechange = function () {gettoggle_newsletter(); };
http.send(null);
}

/* ASK FOR NEWSLETTER REPLY */
function gettoggle_newsletter() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player1').innerHTML = response;
if(http.status == 200){
}
}
}


/* INSERT DL INFO */
function insert_dl_info(vidid,playerid) {
var gcoach_nom = document.getElementById('gcoach_nom').value;
var gcoach_prenom = document.getElementById('gcoach_prenom').value;
var gcoach_email = document.getElementById('gcoach_email').value;
var gcoach_adr = document.getElementById('gcoach_adr').value;
var gcoach_ville = document.getElementById('gcoach_ville').value;
var gcoach_cp = document.getElementById('gcoach_cp').value;
var gcoach_pays = document.getElementById('gcoach_pays').value;
var gcoach_tel = document.getElementById('gcoach_tel').value;
var gcoach_news = document.getElementById('gcoach_newsl').value;
var gcoach_pull = document.getElementById('gcoach_pull').value;
var gcoach_civilite = document.getElementById('gcoach_civilite').value;

document.getElementById('player1').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>"

// 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/insert_coachdl_info.php5?gcoach_nom='+gcoach_nom+'&gcoach_prenom='+gcoach_prenom+'&gcoach_email='+gcoach_email+'&gcoach_adr='+gcoach_adr+'&gcoach_ville='+gcoach_ville+'&gcoach_cp='+gcoach_cp+'&gcoach_pays='+gcoach_pays+'&gcoach_tel='+gcoach_tel+'&gcoach_news='+gcoach_news+'&gcoach_pull='+gcoach_pull+'&gcoach_civilite='+gcoach_civilite+'&nocache='+nocache);
http.onreadystatechange = function () {getinsert_dl_info(); };
http.send(null);
}


/* INSERT DL INFO REPLY */
function getinsert_dl_info(vidid,playerid) {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player1').innerHTML = response;
if(http.status == 200){
}
}
}

/* INSERT NS INFO */
function insert_ns_info(vidid,playerid) {
var gcoach_email = document.getElementById('gcoach_email').value;
document.getElementById('player1').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>";

// 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/insert_coachns_info.php5?gcoach_email='+gcoach_email+'&nocache='+nocache);
http.onreadystatechange = function () {getinsert_ns_info(); };
http.send(null);
}

/* INSERT NS INFO REPLY */
function getinsert_ns_info() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('player1').innerHTML = response;
if(http.status == 200){
}
}
}


/* COACH SLIDER STUFF */ 

/* Wipe img popup  */
function popup_p_info_out() {
document.getElementById('popup_p_info').innerHTML = "";
document.getElementById('popup_p_info').className = "divHide";
}

/* Get img popup  */
function popup_p_info(p_id) {
document.getElementById('popup_p_info').className = "divShow";
document.getElementById('popup_p_info').innerHTML = "<span id=\"fbloaderbig\"><br /><img src=\"img/loader-facebook.gif\"/><br /><br /></span>";

// 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/popup_p_info.php5?p_id='+p_id+'&nocache='+nocache);
http.onreadystatechange = function () {getpopup_p_info(); };
http.send(null);
}

/* Get img popup REPLY */
function getpopup_p_info() {
if(http.readyState == 4){
var response = http.responseText;
document.getElementById('popup_p_info').innerHTML = response;
if(http.status == 200){
}
}
}
