function getEdicoesByType(type){

	mes = $("mesEdicao").options[$("mesEdicao").selectedIndex].value;
	getEdicoesByMes(mes, type);

}

function getEdicoes(limit){

	//if(mes != ""){
		
		try{
			x_getDiasByMes(limit, returnGetEdicoesByMes);
		}catch(e){
            //alert('sss');
			$('listEdicao').options[0] = new Option('');
		}
	//}

}

function getEdicoes2(limit){
		
		try{	
			x_getDiasByMes(limit, returnGetEdicoesByMes2);
		}catch(e){
            	}

}

/**
  * returnstring Retorna uma string no seguinte formato: |param1,param2
  * param1 - idEdicao
  * param2 - data da edicao -> dd - mes(extenso) - yyyy
  */  
function returnGetEdicoesByMes(returnstring){
    returnstring = unescape(returnstring);
	options = returnstring.split("|");
	$('listEdicao').options[0] = new Option('Selecionar...');

	for(var i=1; i < options.length; i++){
    	$('listEdicao').options[i] = new Option(options[i].split(",")[1],options[i].split(",")[0]);
    }

	if(!isNull($('selectedEdicao')))
		$('selectedEdicao').selected = true;
}

function returnGetEdicoesByMes2(returnstring){
    returnstring = unescape(returnstring);
	options = returnstring.split("|");

	for(var i=1; i < options.length; i++){
		   var idmyElement = new Array;
		   idmyElement[i] = options[i].split(",")[0];	
		   var myElement = document.createElement('div');
		   myElement.id = idmyElement[i];
		   myElement.innerHTML = "<div style='font-family:Arial; font-size:11px; margin-left:5px;cursor:default;'>"+options[i].split(",")[1]+"</div>"; // options[i].split(",")[0]+"</div>";
		   myElement.onmouseover = function(){ this.style.backgroundColor = '#3F6BB2'; this.style.color = '#fff'; }
		   myElement.onmouseout = function(){ this.style.backgroundColor = '#fff'; this.style.color = '#000'; } // window.location = window.location.href;
		   myElement.onclick = function(){ FlipAction.gotoEditoria(1, this.id, ''); $('listEdicao').style.display = 'none'; } // FlipAction.gotoEditoria(1, this.options[i].split(",")[0], ''); }
		   $('listEdicao').appendChild(myElement);
    	}

	if(!isNull($('selectedEdicao')))
		$('selectedEdicao').selected = true;
}

function getTipoAnteriores(){
	return 1;
}
