function open_image(img){
	window.open("/pages/popup_image.php?image="+img,"Detail","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}
function open_big_image(img,w,h){
	window.open("/pages/popup_image.php?image="+img+"&w="+w+"&h="+h,"Detail","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}
function open_chat(){
	msgWindow=window.open("/chat/login1.php?log=member", "chat", "height=530,width=750,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
	msgWindow.focus();
}
function popup_profil_pseudo(pseudo){
	window.open("/pages/popup_profil.php?pseudo="+pseudo,"Profil"+pseudo,"location=0,menubar=0,resizable=0,scrollbars=yes,status=0,toolbar=0");
}
function popup_profil_sid(sid){
	window.open("/pages/popup_profil.php?sid="+sid,"Profil"+sid,"location=0,menubar=0,resizable=0,scrollbars=yes,status=0,toolbar=0");
}
function popup_texte(to,pop_name,w,h){
	window.open("/pages/popup_texte.php?to=" + to,pop_name, 'menubar=no,resizable=yes,width=' + w + ',height=' + h + ',titlebar=no,status=yes,scrollbars=yes');
}
function popup_print(img){
	window.open("/pages/popup_print.php?image="+img,"Imprimer", 'menubar=no,resizable=yes,width=800,height=600,titlebar=no,status=yes,scrollbars=yes');
}

function allerAlaPage(num_page,myform){
	document.getElementById("mypage").value = num_page;
	myform.submit();
}
function allerAlaPageGet(num_page,url){
	document.location = url + '&mypage=' + num_page;
}

function popup_cheque(to,cid){
	window.open("/pages/popup_cheque.php?to="+to+"&cid="+cid,"Cheque","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}
function popup_mandat(to,cid){
	window.open("/pages/popup_mandat.php?to="+to+"&cid="+cid,"Mandat","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}
function popup_certif(){
	window.open("/pages/profils/certification.php",'certif','top=100,left=200,width=500,height=300,location=no,status=no,toolbar=no');
}

function popup_cb(to,cid){
	window.open("/pages/popup_cb.php?to="+to+"&cid="+cid,"CB","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}
function popup_allopass(to,cid){
	window.open("/pages/popup_allopass.php?to="+to+"&cid="+cid,"Allopass","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}

function openwin(img){
	open_image(img);
}
function pfl_window(pseudo){
	popup_profil_pseudo(pseudo);
}
/*function bigimg(img){
	window.open("big_image.php?image="+img,"Detail","location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
}
function openImg(img){
	window.open("content/news/openpop.php?image="+img,"Detail","location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0");
}
function sesame (content, name, width, height){
	window.open(content, name, 'menubar=no,resizable=yes,width='+width+',height='+height+',titlebar=no,status=yes,scrollbars=yes');
}*/


//Initialisation des variables pour les mois des annonces
var mois=new Array(12);
mois=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"]
var maintenant=new Date();
cur_mois=maintenant.getMonth();
cur_annee=maintenant.getFullYear();
fin=cur_mois-4;
month=cur_mois;
inc=new Array(10)
inc=["01","02","03","04","05","06","07","08","09","10","11","12"];
var Message="Ronde et Jolie, le web des femmes rondes et de ceux qui les aiment";
var place=1;

function Stat(){
	hsh = new Date();
	hsd = document; 
	hsr = hsd.referrer.replace(/</g, '');
	hsi = '<a href="http://www.xiti.com/xiti.asp?s=25316" '
	hsi += ' TARGET="_top"><img width="39" height="25" border=0 src="http://logv3.xiti.com/hit.xiti?s=25316'
	hsi += '&p=&hl=' + hsh.getHours() + 'x' + hsh.getMinutes() + 'x' + hsh.getSeconds();
	if(parseFloat(navigator.appVersion)>=4){ s=screen;hsi += '&r=' + s.width + 'x' + s.height + 'x' + s.pixelDepth + 'x' + s.colorDepth; }
	hsd.writeln(hsi + '&ref=' + hsr.replace(/&/g, '$') + '" alt="Mesurez votre audience"></a>');
}

function initPage(){
	with(document.body.style){
		scrollbarDarkShadowColor="#000000";
		scrollbar3dLightColor="#B794DD";
		scrollbarArrowColor="#ffffff";
		scrollbarBaseColor="#000000";
		scrollbarFaceColor="#B794DD";
		scrollbarHighlightColor="#000000";
		scrollbarShadowColor="#B794DD";
		scrollbarTrackColor="#D9B6FF";
	}
	focus();
}


function trafiz(){
	var id=3615;
	url1='http://www.rondeetjolie.com';
	url2='http://rondeetjolie.com';
	url3='http://www.rondeetjolie.com';
	if (document.referrer.length > 0) {
		urlreg = '('+url1+'|'+url2+'|'+url3+')';
		hasard = Math.round(Math.random()*10000);
		var refer= escape(document.referrer);
		var tagdebut= '<LINK rel="stylesheet" type="text/css" href="http://trafiz.netude.fr/stats.css?idbrioude='+id;
		tagdebut+='&thereferer=';
		var tagfin ='">';
		var tagmilieu='';
		var pagescript= escape(window.location);
		var page = "&page="+pagescript;
		page+='&hasard=';
		reg1 = /(xml_bi|cpc_bi)/;
		ok2 = reg1.exec(window.location);
		var reg = new RegExp(urlreg,'i');
		ok = reg.exec(document.referrer);
		if ((!ok)&&(!ok2)) {
			document.write(''+tagdebut+refer+tagfin);
		}
	}
}

/************* popup alert using div ***********************/
function toggle(div_id) {
	var el = document.getElementById(div_id);
	if ( el.style.display == 'none' ) {	el.style.display = 'block';}
	else {el.style.display = 'none';}
}
function blanket_size(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportheight = window.innerHeight;
	} else {
		viewportheight = document.documentElement.clientHeight;
	}
	if ((viewportheight > document.body.parentNode.scrollHeight) && (viewportheight > document.body.parentNode.clientHeight)) {
		blanket_height = viewportheight;
	} else {
		if (document.body.parentNode.clientHeight > document.body.parentNode.scrollHeight) {
			blanket_height = document.body.parentNode.clientHeight;
		} else {
			blanket_height = document.body.parentNode.scrollHeight;
		}
	}
	var blanket = document.getElementById('blanket');
	blanket.style.height = blanket_height + 'px';
	var popUpDiv = document.getElementById(popUpDivVar);
	popUpDiv_height=blanket_height/2-150;//150 is half popup's height
	popUpDiv.style.top = popUpDiv_height + 'px';
}
function window_pos(popUpDivVar) {
	if (typeof window.innerWidth != 'undefined') {
		viewportwidth = window.innerHeight;
	} else {
		viewportwidth = document.documentElement.clientHeight;
	}
	if ((viewportwidth > document.body.parentNode.scrollWidth) && (viewportwidth > document.body.parentNode.clientWidth)) {
		window_width = viewportwidth;
	} else {
		if (document.body.parentNode.clientWidth > document.body.parentNode.scrollWidth) {
			window_width = document.body.parentNode.clientWidth;
		} else {
			window_width = document.body.parentNode.scrollWidth;
		}
	}
	var popUpDiv = document.getElementById(popUpDivVar);
	window_width=window_width/2-150;//150 is half popup's width
	popUpDiv.style.left = window_width + 'px';
}
function popup(windowname) {
	blanket_size(windowname);
	window_pos(windowname);
	toggle('blanket');
	toggle(windowname);		
}

/************* end popup alert using div *******************/
