
function setDisplayElement(sElementid){
    var oElement = document.getElementById(sElementid);
    if (oElement){
        if(oElement.style.display == "block" || oElement.style.display == ""){
            oElement.style.display = "none";
        } else {
            oElement.style.display = "block";
        }
    }
}

function updateFromModule(divName,strGetVars){
		
		if(strGetVars)
			strGetVars+='&'+Form.serialize($('main_form'));
		else
			strGetVars+=Form.serialize($('main_form'));
		//pars=$('form_edit_info').value;
		//pars="test=re";
		new Ajax.Updater(divName, '/element/ajax/moduleCall.php', {asynchronous:true,method:'post',parameters:strGetVars});
 	
}


function setNext(sliderEl,goback,infoEl){
	
	currVal=sliderEl.value;
	maxVal=sliderEl.maximum;
	minVal=sliderEl.minimum;
	
	//alert(currVal+'-'+maxVal+'-'+minVal)
	
	if(goback){
		if(currVal>minVal){
			newVal=currVal-1;
			
		}else{
			newVal=maxVal;
		}
	}else{
			
		if(currVal<maxVal){
			newVal=currVal+1;
		}else{
			newVal=1;
		}
	}
	
	sliderEl.setValue(newVal);
	infoEl.innerHTML='Side:'+newVal;
	
}

