// JavaScript Document
var Now=new Date();
var Hours=Now.getHours();
var DayOfMonth;
var Minutes=Now.getMinutes();
var Year=Now.getYear();
var Mois=Now.getMonth();

ExtractDayFromDate();
//alert("test:",Now.getYear().toString(););
//timeStr=""+((hours > 12) ? hours - 12 : hours);
//timeStr+=((minutes < 10) ? ":0" : ":") + minutes;
//timeStr+=(hours >= 12) ? " PM" : " AM";

function ExtractDayFromDate()
{
	var DateComplete = Now;
	
	if (DateComplete.toString().substr(9,1) == " ")
	{
		DayOfMonth = DateComplete.toString().substr(8,1)
	}
	else
	{
		DayOfMonth = DateComplete.toString().substr(8,2)
	}
}


function SelectMois()
{
	document.getElementById("frommonth").selectedindex = Mois;
	var tmp = document.getElementById("frommonth").options[document.getElementById("frommonth").selectedindex].value;
	tmp = parseInt(tmp);
	
	document.getElementById("frommonth").value = tmp;
}

function GenererJourduMois()
{
	var i = 1;
	
	do
	{
		if (i == DayOfMonth)
		{
			document.write("<option value="+i+" selected>"+i+"</option>");
		}
		else
		{
			document.write("<option value="+i+">"+i+"</option>");
		}
		i = i + 1;
	}
	while(i<32)
}

function GenererAnnees()
{
	var i = Year;
	
	do
	{
		if (i == Year)
		{		
			document.write("<option value='"+i+"' selected>"+i+"</option>");
		}
		else
		{
			document.write("<option value='"+i+"'>"+i+"</option>");
		}
		i = i + 1;
	}
	while(i<Year+2)
}