// JavaScript Document
function initArray(){
		for(i=1;i<=15;i++){
			holder[i]=0;
		}
	}

	function enlarge(){
		var validList="1234567890";
		var str = this.src;
		
		var temp="";
		for(i=0;i<str.length;i++){
			if(validList.match(str.charAt(i)) && str.charAt(i-1)!="%" && str.charAt(i-2)!="%")
				temp+=str.charAt(i);
		}
		temp=parseInt(temp.charAt(2)+temp.charAt(3));

		
		if(str.match("bouq"))
			document.getElementById("lgPic").src="images/large/bouq"+temp+".jpg";
		else
			document.getElementById("lgPic").src="images/large/other"+temp+".jpg";
	}

	var z=1,speed=1;
	function changePic(x){
		if(x=="bouq" && z==1){
			document.getElementById(x).style.textDecoration="underline";	
			document.getElementById("other").style.textDecoration="none";
		}
		else if(z==1){
			document.getElementById("bouq").style.textDecoration="none";	
			document.getElementById(x).style.textDecoration="underline";
		}
	
		var num=randNum();	
		document.getElementById("pic"+num).src="images/mini/"+x+num+"mini.jpg";
		document.getElementById("pic"+num).onclick=enlarge;
		z++;
		if(z<=15){
			setTimeout("changePic('"+x+"')",speed);
		}
		else{
			z=1;
			for(i=0;i<=14;i++)
				holder[i+1]=0;
	
			speed=150;
			
		}
	}
	
	var holder=new Array();
	function randNum(){
		var x= Math.round(Math.random()*14+1);
		while(holder[x]==1){
			x= Math.round(Math.random()*14+1);
		}
		holder[x]=1;
		return x;
	}
	
	