var wWidth;
var fWidth;
var fHeight;
var fRatio;
var fWidth;
var fHeight;
var editorVisibility = false;

function verifPublic(Lang){
	var val = false;
	
	
	for (var i=0; i < document.formSaveComment.public.length; i++){
		if (document.formSaveComment.public[i].checked){
			val = document.formSaveComment.public[i].value;
		}
	}
	
	if(val === false && Lang == 2){
		alert("Vous devez choisir un public cible.");
		return false;
	}else if(val === false && Lang == 1){
		alert("You need to choose a target audience.");
		return false;
	}else{
		return true;
	}
	
}

function getSize(){
	fWidth = 785;
	fHeight = 480;
	fRatio = fHeight/fWidth;
	if(document.body.clientWidth){
		wWidth = document.body.clientWidth;
		fWidth = document.body.clientWidth - 250;
		fHeight = fWidth * fRatio;
	}
}		
function saveThis(){
	

}

function showEditor(textarea, form){
	if(!editorVisibility){
		editorVisibility = true;
		// replace all of the textareas
		document.getElementById(form).style.display = "block";
		var TextAreas = document.getElementById(textarea);
		var oFCKeditor = new FCKeditor( TextAreas.name,"100%",TextAreas.height,"mccord" ) ;
		
		oFCKeditor.ToolbarStartExpanded	= false ;

		oFCKeditor.BasePath = "../fckeditor/" ;

		oFCKeditor.Config["ToolbarStartExpanded"] = true;
		oFCKeditor.Config["CustomConfigurationsPath"] = "../myconfig.js?" + ( new Date() * 1 ) ;
		oFCKeditor.ReplaceTextarea() ;
		
	}
}



function hideMenu(){
	for(i=0;i<intNumTabs;i++){
		if(document.getElementById("subMenu-"+asTabs[i])){
			document.getElementById("subMenu-"+asTabs[i]).style.display="none";
		}
	}
}
if(!document.getElementById){
  if(document.all)
  document.getElementById=function(){
	if(typeof document.all[arguments[0]]!="undefined")
	return document.all[arguments[0]]
	else
	return null
  }
  else if(document.layers)
  document.getElementById=function(){
	if(typeof document[arguments[0]]!="undefined")
	return document[arguments[0]]
	else
	return null
  }
}		