function PrintThisPage(style) 
{ 
   var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
       sOption+="scrollbars=yes,resizable=yes,width=700,height=400,left=1,top=1"; 

   var sWinHTML = document.getElementById('debutcontenu_print').innerHTML; 
   var sBaseURL = document.URL;
   
   var	winprint=window.open("","",sOption); 
		winprint.document.open(); 
		winprint.document.write('<?xml version="1.0" encoding="utf-8"?> \n');
		winprint.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> \n');
		winprint.document.write('<html xmlns="http://www.w3.org/1999/xhtml"> \n');
		winprint.document.write('<head> \n');
		winprint.document.write('<base href="');
		winprint.document.write(sBaseURL);
		winprint.document.write('"> \n');
		winprint.document.write('<title>STARWARS-UNIVERSE.COM : Votre dose quotidienne de STAR WARS</title> \n');
		winprint.document.write('<link rel="stylesheet" href="/images/config/design/'+style+'style.css" type="text/css" /> \n');
		winprint.document.write('<style TYPE="text/css">body { background-color: #FFFFFF; }</style>')
		winprint.document.write('</head><body\n');
		winprint.document.write('<table border=0 width="600"><tr><td valign="top">');
		winprint.document.write('<hr /> \n');
		winprint.document.write('URL de la page originale : ');
		winprint.document.write('<a href="'+sBaseURL+'">'+sBaseURL+'</a>');
		winprint.document.write(' \n');
		winprint.document.write('<hr /> \n');
		winprint.document.write(sWinHTML.replace(/fondswu/, "fondswu_sansimage"));
		winprint.document.write(' \n');
		winprint.document.write('<hr noshade><center>This Site, StarWars-Universe.Com, is, in no way, sanctioned or associated with LUCASFILM and all images used are for personal pleasure and not for any financial gain. All Images, Movies and Sounds regarding the Star Wars Saga, herein, are  Lucasfilm. All Other Images/Designs/Texts/Datas etc are  SWU unless otherwise stated.</center> \n' );
		winprint.document.write('</td></tr></table>');
		winprint.document.write('</body></html> \n'); 
		winprint.document.close(); 
		winprint.focus(); 
}

function imprimerpage(url)
{
	var ouvrir=window.open(url, 'impression','toolbar=no,status=no,directories=no,menubar=yes,scrollbars=yes,width=600,height=400,resizable=yes') }

function ouvrirfenetre(url)
{
	var ouvrir=window.open(url, 'fenetre')
}

function ouvrirfenetrebis(url, largeur, hauteur)
{
	var ouvrir=window.open(url, 'fenetre', 'scrollbars=1, width='+largeur+', height='+hauteur)
}

function soumettre(nomform)
{
	document[nomform].submit()
}

function annuler(nomform)
{
document[nomform].reset()
}

function chat(url)
{
var ouvre=window.open(url, 'chat', 'toolbar=no,status=no,directories=no,menubar=no,scrollbars=no,width=400,height=150,resizable=yes')
}

function bookmarker(urlpage, titre)
{
	if (urlpage=="") { window.external.AddFavorite('http://www.starwars-universe.com/','StarWars-Universe.Com')	}
	else { window.external.AddFavorite(urlpage,titre) }
}

var pic = null
var popImg = null  // use this when referring to pop-up image
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"

function openPopImg(picName, windowTitle, windowWidth, windowHeight)
{
	closePopImg()
	picTitle = windowTitle
	imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
	popImg = window.open('/commun/general/openPopImg.php?img='+picName+'&Title='+windowTitle, imgWinName,
	   "scrollbars=auto,toolbar=no,resizable=no,width=" 
	   + (parseInt(windowWidth))  + ",height=" 
	   + (parseInt(windowHeight)) + ",top=100, left=100") 
}

function closePopImg() 
{   // close pop-up window if it is open 
	if (navigator.appName != "Microsoft Internet Explorer" 
		|| parseInt(navigator.appVersion) >=4) //do not close if early IE
	if(popImg != null) if(!popImg.closed) popImg.close() 
}

function redirect(url)
{
	document.location.href=url
}

function FondOver(obj, color)
{
		obj.style.backgroundColor=color
}
function FondOut(obj, color)
{
		obj.style.backgroundColor=color
}

function showhide(pi_object)
{
	var the_element = document.getElementById(pi_object);

	if (the_element.style.display == "none")
	{ the_element.style.display = "block";	}
	else
	{ the_element.style.display = "none"; }
}

function montrer_spoiler(value) {
	var actual=document.getElementById(value).style.visibility;
	if (actual=='visible') {
		document.getElementById(value).style.visibility='hidden';
	} else {
		document.getElementById(value).style.visibility='visible';
	}
}

/**
 * Permet d'afficher un calendrier comme dans l'admin
 */
function calendrier2(nomform, champ)
{
//alert(champ.value)
valeur_defaut=champ.value
if (champ.value=="")
{
date_temp=new Date()
valeur_defaut=date_temp.getDate()+"/"+eval(date_temp.getMonth()+1)+"/"+date_temp.getFullYear()
}
splitString = valeur_defaut.split("/")
jour=splitString[0]
mois=splitString[1]
annee=splitString[2]
nom_formulaire=nomform
nom_du_champ=champ.name


ouvrir=window.open("/admin/commun/calendrier.php?jour_param="+jour+ "&mois_param=" + mois+ "&annee_param=" + annee+ "&nom_du_champ=" + nom_du_champ+"&nom_formulaire="+nom_formulaire,"calendrier","toolbar=no,status=no,directories=no,menubar=no,scrollbars=yes,width=270,height=180,resizable=no");
}