var evn_onClick = new Array("point1","point2","point3","point4","point5","point6","openViewScriptPage");
var evn_onClick_actions = new Array("changePointMassage","changePointMassage","changePointMassage","changePointMassage","changePointMassage","changePointMassage","openPopup");

window.onload = function() {
	initPage();
	initOnClick();
}

function initOnClick (){
	obj = evn_onClick;
	for(var i=0; i<obj.length; i++){
		if(document.getElementById(obj[i])){
		var fonction = evn_onClick_actions[i];
			document.getElementById(obj[i]).onclick = eval(fonction);
		}
	}
}

function initPage(){
	if(document.getElementById('point_1')){
		var point1 = document.getElementById('point_1');
		var point2 = document.getElementById('point_2');
		var point3 = document.getElementById('point_3');
		point2.style.display = "none";
		point3.style.display = "none";
	}
}

function changePointMassage(){
var point1 = document.getElementById('point_1');
var point2 = document.getElementById('point_2');
var point3 = document.getElementById('point_3');
	if(this.className == "affiche_point_1"){
		point1.style.display = "block";
		point2.style.display = "none";
		point3.style.display = "none";
	}
	else if(this.className == "affiche_point_2"){
		point1.style.display = "none";
		point2.style.display = "block";
		point3.style.display = "none";
	}
	else{
		point1.style.display = "none";
		point2.style.display = "none";
		point3.style.display = "block";
	}
}


function openPopup(){
	var width = "600";
	var height = "250";
	var href = this.href; 
	window.open(href,"","width="+width+",height="+height+",resizable=0,toolbar=0,scrollbars=1,status=0,menubar=0,directories=0");
	return false; 
}


function privacyStmt(width,height) {
	if (width == null){
		width = 570;
	}
	if (height == null){
		height=394;
	}
	var url = "http://www.pg.com/privacy.html";
	window.open(url, 'privacy', 'dependent,toolbar=yes,location=yes,resizable=yes,menubar=yes,scrollbars=yes,status=yes,width='+width+',height='+ height);
}


function resizablePopupWindow(page,  title, width, height) {
    var popup = window.open(page,title,'dependent,location=no,toolbar=no,resizable=yes,menubar=no,scrollbars=yes,width='+width+',height='+height);
}

