
	//   http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=TURC&dateDeDebut=12/08/2007
	// only has to change: village & dateDeDebut
	
	// Links are in order. ie. link 1 goes to the column Turkois, link 2 goes to Cancun and so forth.
	var links = new Array;
	/*0*/ // Do not Change this one. (number zero)
	links.push("#");
	
	/*1*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=CANC");
	
	/*2*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=IXTC");
	
	/*3*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=FLL&nbParticipants=1&village=COLC");
	
	/*4*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=TURC");

	/*5*/
	//links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=SANC");
	
	/*6*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=PCAC");

	/*7*/
	//links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=BBOC");

	/*8*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=BUCC");
	
	/*9*/
	links.push("http://www.clubmed.us/cgi-bin/clubmed55/b2cresa/callProposal.do?LANG=US&PAYS=115&dureeSejour=7&villeDepart=&nbParticipants=1&village=CARC");
	
// DO NOT CHNANGE ANYTHING BELOW HERE ---------------------------------------------------------------------------------	
	function selectRow(obj){
		row = obj.parentNode;
		rowTDs = row.getElementsByTagName("td");
		for(var i = 0; i < rowTDs.length; i++){
			if(rowTDs[i] != obj){
				rowTDs[i].className += " subSelected";
			}
		}
	}
	
	function unSelectRow(obj){
		row = obj.parentNode;
		rowTDs = row.getElementsByTagName("td");
		for(var i = 0; i < rowTDs.length; i++){
			if(rowTDs[i] != obj){
				rowTDs[i].className = rowTDs[i].className.replace(new RegExp(" subSelected\\b"), "");
			}
		}
	}
	
	function selectColumns(obj){
		var columnIndex
		row = obj.parentNode;
		rowTDs = row.getElementsByTagName("td");
		for(var i = 0; i < rowTDs.length; i++){
			if(rowTDs[i] == obj){
				columnIndex = i;
			}
		}
		
		for( var j = 0; j < Rows.length; j++){
			Rows[j].childNodes[columnIndex].className += " subSelected";
		}
	}
	
	function unSelectColumns(obj){
		var columnIndex
		row = obj.parentNode;
		rowtds = row.getElementsByTagName("td");
		for(var i = 0; i < rowTDs.length; i++){
			if(rowTDs[i] == obj){
				columnIndex = i;
			}
		}
		
		for( var j = 0; j < Rows.length; j++){
			Rows[j].childNodes[columnIndex].className = Rows[j].childNodes[columnIndex].className.replace(new RegExp(" subSelected\\b"), "");
		}
	}
	
	function setLinks(obj, index){
		//
		
			
		var columnIndex
		row = obj.parentNode;
		var trip_date = row.firstChild.innerHTML;
		
				if(index%numCols > 0){
					obj.innerHTML = "<a href="+ links[index%numCols]+"&dateDeDebut="+ trip_date +" target=\"_new\">" + obj.innerHTML + "</a>";
				}
				
	}

	
	function init(){
			theTable = document.getElementById("singles");
			theTDs = theTable.getElementsByTagName("td");
			Rows = theTable.getElementsByTagName("tr");
			numCols = Rows[0].getElementsByTagName("td").length;
			
			for ( var i = 0; i < theTDs.length; i++){
				if (theTDs[i].firstChild.nodeValue == "0%"){
					theTDs[i].className+="per0";
				}else if(theTDs[i].firstChild.nodeValue == "30%"){
					theTDs[i].className+="per30";
				}else if(theTDs[i].firstChild.nodeValue == "25%"){
					theTDs[i].className+="per30";
				}else if(theTDs[i].firstChild.nodeValue == "50%"){
					theTDs[i].className+="per50";
				}else if(theTDs[i].firstChild.nodeValue == "70%"){
					theTDs[i].className+="per70";
				}else if (theTDs[i].firstChild.nodeValue == "100%"){
					theTDs[i].className+="per100";
				}else if (theTDs[i].firstChild.nodeValue == "Up to 100%"){
					theTDs[i].className+="per100";
				}else{
					theTDs[i].className+=" default";
				}
	
				setLinks(theTDs[i], i);
				
				if(theTDs[i].parentNode.id != "top"){
					if( theTDs[i].className.indexOf("default") == -1){
						theTDs[i].onmouseover = function(){
							selectRow(this);
							selectColumns(this);
							this.className += " selected";
							
						}
						theTDs[i].onmouseout = function(){
							unSelectRow(this);
							unSelectColumns(this);
							this.className = this.className.replace(new RegExp(" selected\\b"), "");
						}
					}
				}
			
			}
	}
	
	addOnLoadEvent(init);
	