// JavaScript Document 

//This will be only for this site
//Change the alerts
	var noType=false;
	var noFeature=false;	
	var oldTypeStatus=false;
	var oldFeatureStatus=false;
	var txtAlert="";

function changeStatus(group,lang){
	switch (group){
		case 'type':
			//there is 3 types
			typeChecked = document.frmPortfolioWeb.cbC.checked+document.frmPortfolioWeb.cbS.checked+document.frmPortfolioWeb.cbP.checked;
			if(typeChecked>=1){
				noType = false;
			}
			if(typeChecked==0){
				noType = true;
			}
			if(noType!=oldTypeStatus){				
				oldTypeStatus = noType;
				changeAlert(lang);
			}
			break;
		case 'feature':
			//there is 10 features
			featureChecked = document.frmPortfolioWeb.cbCSS.checked+document.frmPortfolioWeb.cbFlash.checked+document.frmPortfolioWeb.cbFF.checked+document.frmPortfolioWeb.cbJS.checked+document.frmPortfolioWeb.cbAS.checked+document.frmPortfolioWeb.cbPHP.checked+document.frmPortfolioWeb.cbDB.checked+document.frmPortfolioWeb.cbFirefox.checked+document.frmPortfolioWeb.cbBilingual.checked+document.frmPortfolioWeb.cbEnglish.checked;
			if(featureChecked>=1){
				noFeature = false;
			}
			if(featureChecked==0){
				noFeature = true;
			}
			if(noFeature!=oldFeatureStatus){				
				oldFeatureStatus = noFeature;
				changeAlert(lang);
			}
			break;
		case 'all':
			noType=true;
			noFeature=true;
			oldTypeStatus=noType;
			oldFeatureStatus=noFeature;
			changeAlert(lang);
			break;
		case 'allTypes':
			noType=true;
			oldTypeStatus=noType;
			changeAlert(lang);
			break;
		case 'none':
			noType=false;
			noFeature=false;
			oldTypeStatus=noType;
			oldFeatureStatus=noFeature;
			changeAlert(lang);
			break;
	}	
}

function changeAlert(lang){
	//Alert no Type
	if(noType==true && noFeature==false){
		if(lang=='en'){
			txtAlert='Select at least one <span class="bold-it">Type</span>';
		}
		else{
			txtAlert='S&eacute;lectionnez au moins un <span class="bold-it">Type</span>';
		}
		SetDiv('alertDiv',txtAlert);
		changeStatusButton('off');
	}

	//Alert no Feature
	if(noType==false && noFeature==true){
		if(lang=='en'){
			txtAlert='Select at least one <span class="bold-it">Feature</span>';
		}
		else{
			txtAlert='S&eacute;lectionnez au moins une <span class="bold-it">Caract&eacute;ristique</span>';
		}
		SetDiv('alertDiv',txtAlert);
		changeStatusButton('off');
	}
	
	//Alert no Type and no Feature
	if(noType==true && noFeature==true){
		if(lang=='en'){
			txtAlert='Select at least one <span class="bold-it">Type</span> and one <span class="bold-it">Feature</span>';
		}
		else{
			txtAlert='S&eacute;lectionnez au moins un <span class="bold-it">Type</span> et une <span class="bold-it">Caract&eacute;ristique</span>';
		}
		SetDiv('alertDiv',txtAlert);
		changeStatusButton('off');
	}
	
	//No alert
	if(noType==false && noFeature==false){
		SetDiv('alertDiv','<br>');
		changeStatusButton('on');
	}
}

function changeStatusButton(status){
	switch (status){
		case 'on':
			//if(document.frmPortfolioWeb.btRechercher.disabled==true){
				frmPortfolioWeb.btRechercher.disabled=false;
			//}
			break;
		case 'off':
			//if(document.frmPortfolioWeb.btRechercher.disabled==false){
				frmPortfolioWeb.btRechercher.disabled=true;
			//}
			break;
	}	
}


-->