//Definizione della classe quadrupla per riunire i 4 campi che servono a definire un'area (di selezione)(quadrata|rettangolare) all'interno di una pagina
function Quadrupla(top, left, width, height){
 this.top = top;
 this.left = left;
 this.width = width;
 this.height = height;		
}

var cssClass = {
	selectedArea : 1,
	unselectedArea: 2,
	current: 3,
	notcurrent: 4,
	unvisible: 5,
	visible:6,
	titleListEditing:7,
	liServiceOver: 8,
	liServiceOut: 9,
	areaInfoSel:10, 
	keyMenu:11,
	commentItem:12, 
	EditingSelTab:13,
	Details_Button:14, 	
	DeleteOver:16,
	redBackGround:17,
	greenBackGround:18,
	OverAttivitas:19,
	OutAttivitas:20
	
}


function setStyle(obi, whatStyle, quad){	
 switch(whatStyle){
  case cssClass.selectedArea : //selectedArea 				
			obi.style.position = "absolute";
			obi.style.top = quad.top+"px";
			obi.style.left = quad.left+"px";
			obi.style.width= quad.width+"px";
			obi.style.height= quad.height+"px";			
			obi.style.border= "1px solid #006";			
			obi.style.backgroundImage= "url(Images/selection_area.gif)";
			obi.style.zIndex= "20";
			obi.style.visibility="visible";			
			break;
  case cssClass.unselectedArea: //unselected
		    obi.style.visibility="hidden";
		    break;
  case cssClass.current:
            obi.style.color = "#df7516";
			obi.style.borderStyle= "solid";			
			break;
  case cssClass.notcurrent:
            obi.style.borderStyle = "none";
		    break;
  case cssClass.unvisible:
  			obi.style.visibility="hidden";
  			break;
  case cssClass.visible:
  			obi.style.visibility="visible";
  			break;
  case cssClass.titleListEditing: 
  			obi.style.fontSize = "10px";
			obi.style.textAlign ="center";
  			break;
  case cssClass.liServiceOver:
  			obi.style.color="#df7516";
			obi.style.backgroundColor= "#FFFFFF";		
  			break;
  case cssClass.liServiceOut:
 			obi.style.color="#FFFFFF";
			obi.style.backgroundColor="#df7516";
			break;
  case cssClass.areaInfoSel:
  			obi.style.position = "absolute";
			obi.style.top = quad.top+"px";
			obi.style.left = quad.left+"px";
			obi.style.width= quad.width+"px";
			obi.style.height= quad.height+"px";			
			obi.style.border= "1px solid #006";
			obi.style.backgroundColor="#df7516";
			obi.style.fontWeight="bold";			
			//obi.style.backgroundImage= "url(Images/selection_area.gif)";
			obi.style.zIndex= "20";
			obi.style.visibility="visible";
			obi.style.color="#004793";
			obi.style.font="Verdana, Arial, Helvetica, sans-serif";
			obi.style.overflow="visible";
			obi.style.fontSize="16px";
			break;
 case cssClass.keyMenu:
			obi.style.fontFamily ="Verdana";
			obi.style.fontSize ="11px";
			obi.style.fontWeight ="bold";
			obi.style.textAlign ="left";
			obi.style.width ="90px"; 			
		    break;
 case cssClass.commentItem:
 			obi.style.width ="218px"; 
			obi.style.backgroundColor ="#004793";
			obi.style.color="#FFFFFF";  			
 			break;
 case cssClass.EditingSelTab:
 			//obi.style.paddingLeft ="5px"; 
			obi.style.textAlign="center";
			obi.style.backgroundColor ="#df7516";
			obi.style.fontWeight ="bold";
			obi.style.fontSize ="10px";
			//obi.style.paddingRight ="5px";
			obi.style.fontFamily ="Verdana"; 			
 			break;
 case cssClass.Details_Button: 
 			obi.style.backgroundColor ="#CCCCCC";
			obi.style.border="solid 1px #FFFFFF";
			obi.style.fontSize ="11px"; 	
			break;
 case cssClass.DeleteOver:
 			obi.style.backgroundColor ="#AAAAAA";
			obi.style.border= "1px solid #CCCCCC";
 			break;	
 case cssClass.redBackGround:
			obi.style.backgroundColor ="#f40c0c";
			break;
 case cssClass.greenBackGround:
			obi.style.backgroundColor ="#5af95e";
			break;
 case cssClass.OverAttivitas:
			obi.style.backgroundColor ="#101062";
			obi.style.color ="#ff9d00";
			break;	

 case cssClass.OutAttivitas:
			obi.style.backgroundColor ="transparent";
			obi.style.color ="#101062";
			break;	

	}//end switch
}//end function