function OpenSmileys(id)
{
	window.open('tmp/smileys.inc.php?p12='+id,'Smileys','width=70,height=185,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=yes,resizable=yes');
}

function OpenPrint( page )
{
	window.open('print.php?page='+page,'Imprimer','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function printPage() 
{
	if( window.print )
	{
		window.print();
	}
	else
	{
		alert('Appuyez sur le bouton droit de votre souris et sélectionnez Imprimer.');
	}
}

function OpenHelp( help )
{
	window.open('help.php?help='+help,'Aide','width=600,height=480,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function OpenSubHelp( help, p1 )
{
	window.open('help.php?help='+help+'&p1='+p1,'Aide','width=600,height=480,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function OpenOrder( p1, p2 )
{
	window.name="main";
	window.open('order.php?p1='+p1+'&p2='+p2,'Ordres','width=600,height=540,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function OpenGroupOrder( p1, p2, p3 )
{
	window.name="main";
	window.open('order.php?p1='+p1+'&p2='+p2+'&p3='+p3,'Ordres','width=600,height=540,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function clearText(thefield)
{
	if (thefield.defaultValue==thefield.value) thefield.value = ""
}

function minichat() 
{
	msg=document.messages.message.value;
	document.messages.message.value="";
	p1=document.messages.p1.value;
	minichat_frame.location=("minichat.php?message="+escape(msg)+"&p1="+escape(p1));
}

function show_props(obj, objName) 
{ 
	var result = "" 
	for (var i in obj) 
	{ 
		result += objName + "." + i + " = " + obj[i] + "\n" 
	} 
	return result 
} 

function ld(elem) 
{
	elem = document.getElementById(elem);
	(elem.style.visibility && elem.style.visibility == "visible") ? elem.style.visibility = "hidden" : elem.style.visibility = "visible";
}

function OpenMap( div1, div2, div3 ) 
{ 
	window.open("map.php?map="+div1+";"+div2+";"+div3,"Cybermonde","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=860,height=660")
}

function private_report()
{
	window.open('report.php','private_report','width=600,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function switchview(n) 
{
	if (document.getElementById(n).style.display == 'none') 
	{
		document.getElementById(n).style.display = 'inline';
	} 
	else 
	{
		document.getElementById(n).style.display = 'none';
	}
}
