function px(n){
	return n+'px';
}

function createDiv(divId,father,classname){
var a = document.createElement('DIV')
  a.setAttribute('id',divId)
  a.setAttribute('class',classname)
  a.setAttribute('className',classname)
  if(father=='body') document.body.appendChild(a)
 else $(father).appendChild(a)
}


function screenInfo(){
   var widthUser;
   var heightUser;

     if(typeof(window.innerWidth) == 'number'){
       widthUser = window.innerWidth;
             heightUser = window.innerHeight;
             }
        else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
         widthUser = document.documentElement.clientWidth;
       heightUser = document.documentElement.clientHeight;
        }
     else if(document.body && (document.body.clientWidth || document.body.clientHeight)){
           widthUser = document.body.clientWidth;
         heightUser = document.body.clientHeight;
    }

return Array(widthUser,heightUser);
}

function showDetailList(){
	$('furnCatList').innerHTML=''
	for(var x=0;x<fList.length;x++){
	createDiv(fList[x].id,'furnCatList','furnCatListObject')
	$(fList[x].id).lang=x //uso lang per tener conto dell'indice dell'array di questo oggetto
	$(fList[x].id).innerHTML+='<p><img src="models/'+fList[x].thumb+'"></p>';
	new Draggable(fList[x].id,{revert:true,ghosting:true});
	}


}
function getActiveFurnListIndex(idCurr){
if(idCurr.substring(0,7)=='canvas|') idCurr=idCurr.substring(7)
for(var x=0;x<activeFurnList.length;x++){
	if (activeFurnList[x].positionedId==idCurr) return x;
}

}

