if(typeof ROQ == 'undefined') {
	var ROQ = {};
}
ROQ.initScrolls = function(){
	if(document.getElementById("box1")) scroll1 = new regalScroll("box1");
	if(document.getElementById("box2")) scroll2 = new regalScroll("box2");
	if(document.getElementById("box3")) scroll3 = new regalScroll("box3");
	if(document.getElementById("box4")) scroll4 = new regalScroll("box4");
}
ROQ.initMaxtopScrolls = function(){
	if(document.getElementById("box1")) scroll1.setMaxtop();
	if(document.getElementById("box2")) scroll2.setMaxtop();
	if(document.getElementById("box3")) scroll3.setMaxtop();
	if(document.getElementById("box4")) scroll4.setMaxtop();
}
OnDOMLoad(ROQ.initFiltersKeywords, window);

ROQ.comboKeyForm = function(that){
	/*
	//maj input hidden du form
	document.getElementById("keyFormIndustry").value = that.id;
	//maj selected item du combobox
	document.getElementById('indusCombo').getElementsByTagName('a').item(0).innerHTML = that.innerHTML;
	*/
	if(that.options[that.selectedIndex].value != "#")
	{
		document.getElementById('submitKeyword2').className = "activeSubmit";
	}
	else
	{
		document.getElementById('submitKeyword2').className = "inactiveSubmit";
	}
	return false;
}

ROQ.selectIndexFromValue = function(that, value){
	var i = -1;
	for(i=0; i<that.length; i++)
	{
		if(that.options[i].value == value)
		{
			break;
		}
	}
	
	if(i >= 0)
	{
		that.selectedIndex = i;
	}
	
	return false;
}

ROQ.validKeyForm = function(){
	var zeWord = document.getElementById("keyFormText");
	var zeError = document.getElementById("keyFormError");
	zeError.style.display = "none";
	if(zeWord.value != ""){
		var zeForm = document.getElementById("keyForm");
		zeForm.submit();
	}
	else{
		zeError.style.display = "block";
	}
	return false;
}
ROQ.addListener(window, 'load', function(){
	//ROQ.showLists.init("indusCombo");
});
