var on='no';
var vari=''; var on='';
var exp = new RegExp("^[0-9]+$","g");
function Hy(w,h){
	var hy=Math.round(Math.sqrt((w*w)+(h*h)));
	return hy;
}
function developp(ider,maxW,maxH,on){
	var id=document.getElementById(ider); var onId=document.getElementById(on) || ' ';
		var HypM=Hy(maxW,maxH); var HypB='';
	var sec=2; var frame=sec*24; var vitesse=(sec*frame)/100;
	var divideur=Math.round(HypM/frame);//Math.ceil(HypM/frame);//
	var divideW=Math.round((maxW/100)*divideur); var divideH=Math.round((maxH/100)*divideur);
		id.style.width='0px'; id.style.height='0px';
		var delay=setInterval( function(){
			var nextW=parseInt(id.offsetWidth)+divideW+'px';
			var nextH=parseInt(id.offsetHeight)+divideH+'px';
			HypB=Hy(parseInt(nextW),parseInt(nextH));
				if(id.offsetWidth<maxW) id.style.width=nextW;
				if(id.offsetHeight<maxH) id.style.height=nextH;
				/*if(HypM<HypB){
					id.style.width=parseInt(nextW)-divideW+'px';
					id.style.height=parseInt(nextH)-divideH+'px';
					clearInterval(delay);
				}*/
		}, vitesse);
			var img=id.getElementsByTagName('li');
			var delay2=setTimeout(function(){
				for(var i=0;i<=img.length;i++){
					if(img[i]){
						var styled=img[i].firstChild.style;
							styled.display='block';
							styled.border='1px solid #373737';
					}
				}
			},800);
		if(id.tagName=='div') id.style.border='1px solid #ffcc00';
		if( on.length>=11 && onId && on==true){
			onId.style.display='none';
		}
	on=ider;
}
function getImg(ref,parent){
	var target=document.getElementById('imgShox'+parent);
		if(window.XMLHttpRequest) {
				var htr=new XMLHttpRequest();
			}
		if(window.ActiveXObject) {
				var htr=new ActiveXObject('Microsoft.XMLHTTP');
			}
		var url="portfolio/sendPict.php?referer="+ref;
		htr.open("GET",url,true);
		htr.onreadystatechange=function (){
			if(htr.readyState==4){ target.innerHTML=htr.responseText; }else{ target.innerHTML="i get image"; }
		}
		htr.send("null");
}
/*function developp(){

}
function envelopp(){

}*/
/*var items = id.getElementsByTagName('li')
for(var i=0;i<items.length;i++)
{
	if(items[i].firstChild)
	{		
		items[i].firstChild.style.display='block';
		items[i].firstChild.style.border='1px solid #373737';
	}
}*/