<!--
function player_radio ()
{
	window.open ("/player_radio/popup_emission.html","winradio","width=398,height=130,scrollbars=no,status=no") ;
}
function pmb_show_article (id)
{
	SendGetRequest("/page/PMB/get_article.php?article="+id,pmb_update_show) ;
}

function pmb_load_article (id)
{
	SendGetRequest("/page/PMB/get_article.php?article="+id,pmb_show) ;
}

function pmb_update_show ()
{
  if (xhr_object.readyState == 4)
  {
    str = xhr_object.responseText ;

	arr = str.split("###");

	document.getElementById("pmb_titre").innerHTML = unescape(arr[1]).replace("\\'","'") ;
	//document.getElementById("pmb_radio").href = unescape(arr[2]).replace("\\'","'") ;
	//document.getElementById("pmb_radio_image").href = unescape(arr[2]).replace("\\'","'") ;
	document.getElementById("pmb_print_image").href = "javascript:print_pmb("+unescape(arr[0]).replace("\\'","'")+");" ;
	
	document.getElementById("maindata").src = "page/iframe_PMB.php?article="+unescape(arr[0]).replace("\\'","'") ;
  }
}

function print_pmb (id)
{
  window.open ("page/PMB/print.php?id="+id,"print","width=500,height=700,status=no") ;
}

function pmb_show ()
{
  if (xhr_object.readyState == 4)
  {
    str = xhr_object.responseText ;
	arr = str.split("###");
	parent.document.getElementById("f_titre").value = unescape(arr[1]).replace("\\'","'") ;
	parent.document.getElementById("f_radio").value = unescape(arr[2]).replace("\\'","'") ;
	parent.document.getElementById("f_url").src = unescape(arr[3]).replace("\\'","'") ;
	parent.document.getElementById("f_accroche").value = unescape(arr[4]).replace("\\'","'") ;
	parent.document.getElementById("f_contenu").value = unescape(arr[5]).replace("\\'","'") ;
	parent.document.getElementById("i_id").value = unescape(arr[0]).replace("\\'","'") ;
  }
}


function valid_form()
{
	document.getElementById ("i_contenu").value = document.getElementById ("f_contenu").value ;
	if (document.getElementById ("f_url").src.indexOf("jpg") != 0 || document.getElementById ("f_url").src.indexOf("gif") != 0 || document.getElementById ("f_url").src.indexOf("png") != 0 || document.getElementById ("f_url").src.indexOf("jpeg") != 0)
		document.getElementById ("i_url").value = document.getElementById ("f_url").src ;
	else
		document.getElementById ("i_url").value = "" ;
	document.getElementById ("i_accroche").value = document.getElementById ("f_accroche").value ;
	document.getElementById ("i_titre").value = document.getElementById ("f_titre").value ;
	document.getElementById ("i_radio").value = document.getElementById ("f_radio").value ;
	document.getElementById('frm').submit();
}

function pmb_update_photo (url)
{
	document.getElementById ("f_url").src = url ;
}

function pmb_show_upload ()
{
	document.getElementById("pmb_photo").src= "page/PMB/upload.php" ;
	//window.open ("page/PMB/upload.php","winpopup","width=300,height=105,scrollbars=no,status=no") ;
}

function pmb_supp ()
{
	if (document.getElementById('i_id').value != "" && confirm("Voulez vous supprimer cet article ?"))
	{
		SendGetRequest("page/PMB/del_article.php?article="+document.getElementById('i_id').value,pmb_valid_supp) ;
	}
}

function pmb_valid_supp ()
{
	if (xhr_object.readyState == 4)
	{
		affiche_section("admin_PMB") ;
	}
}


-->
