function popupContact(a,b,c,d,e,f) {
	window.open('show_contact.html?id='+d+a+f+b+'&type='+c+'&lang='+e,'', 'top=50, left=50, width=750, height=580, resizable=yes, toolbar=no, scrollbars=yes, status=no');
}

function popupRatingAd(src, id) {
	window.open(src+'?id='+id, '', 'top=250, left=250, width=600, height=260, resizable=yes, toolbar=no, scrollbars=non, status=no, directories=no');
}

function popupRatingUser(src, user_id) {
	window.open(src+'?user_id='+user_id, '', 'top=250, left=250, width=600, height=260, resizable=yes, toolbar=no, scrollbars=non, status=no, directories=no');
}

function popupSmileys (src) {
	window.open(src,'', 'top=20, left=20, width=220, height=360, resizable=yes, toolbar=no, scrollbars=yes, status=yes');
}

function popupMessage (src) {
	window.open(src,'', 'top=20, left=20, width=600, height=445, resizable=yes, toolbar=no, scrollbars=yes, status=yes');
}

function popupSupprimer (src) {
	window.open(src,'', 'top=20, left=20, width=740, height=400, resizable=yes, toolbar=no, scrollbars=yes, status=yes');
}

function popupEditer (src) {
	window.open(src,'', 'top=20, left=20, width=740, height=400, resizable=yes, toolbar=no, scrollbars=yes, status=yes');
}

function popupAbus (src) {
	window.open(src,'', 'top=20, left=20, width=740, height=450, resizable=yes, toolbar=no, scrollbars=yes, status=yes');
}
/*
function popupZoomAd (src, photo_width, photo_height) {
	alert(photo_width);
	alert(photo_height);
	window.open(src,'', 'top=50, left=50, width="+photo_width+", height="+photo_height+", resizable=yes, toolbar=no, scrollbars=yes, status=yes');
}
*/
function popupZoomAd(src, ad_id, user_login, noclic) {

	if (noclic) noclic = 'oncontextmenu="return false"';

	i1 = new Image;
	i1.src = src;

	html = '<html><head><title>Zoom sur l\'annonce de '+user_login+'</title></head><body leftmargin="0" marginwidth="0" topmargin="0" marginHeight="0" '+noclic+'><a href="javascript:window.close()" title="Fermer la popup"><img src="'+src+'" border="0" name="photo" onload="window.resizeTo(document.photo.width+12,document.photo.height+60)" alt="" /></a></body></html>';
	if(i1.width>0){
		// Necessaire pour firefox qui gere mal resizeTo / ne marche que si image deja chargee
		popupPicture = window.open('','','resizable=yes, width='+(i1.width+4)+', height='+(i1.height+4)+', toolbar=no, scrollbars=no, status=yes');
	}else{
		popupPicture = window.open('','','resizable=yes,toolbar=no, scrollbars=no, status=yes');
	}
	popupPicture.document.open();
	popupPicture.document.write(html);
	popupPicture.document.close();
}

function go2url(sel, targetstr)
{
  var index = sel.selectedIndex;
  if (sel.options[index].value != '') {
     if (targetstr == 'blank') {
       window.open(sel.options[index].value, 'win1');
     } else {
       var frameobj;
       if (targetstr == '') targetstr = 'self';
       if ((frameobj = eval(targetstr)) != null)
         frameobj.location = sel.options[index].value;
     }
  }
}

function show_list(value)
{
	var choix = document.getElementById("origin");

	if(choix.value == value)
	{
		document.getElementById("list").style.display = "block";
	}
	else
	{
		document.getElementById("list").style.display = "none";
	}
}

function show_list_newsletter(Controleur, Controle, Masquer)
{
	var objControleur = document.getElementById(Controleur);
	var objControle = document.getElementById(Controle);
	if (Masquer=='1')
		objControle.style.visibility=(objControleur.checked==true)?'visible':'hidden';
	else
		objControle.disabled=(objControleur.checked==true)?false:true;
	return true;
}