/**
 * @author Josh
 */

function expand(myid){
	var oldWidth = 256;
	var newWidth = 300;
	//var ez = event.target || event.srcElement;
	var ez = document.getElementById(myid);
	
	if (ez.tagName=="IMG"){
		ey = ez.parentNode;
		ez = ey;
	}
	var oldright = 245
	var newright = 240
	var attributes = { 
	   		
			top : {  from : oldright, to: newright, unit: 'px'}	
			
	   		}; 
			 
		var myAnim = new YAHOO.util.Anim(ez.id, attributes, .7, YAHOO.util.Easing.bounceOut);	
			myAnim.animate();
	//var oldright = 10
	//var newright = 50
	//var attributes = { 
	   		
	//		right : {  from : oldright, to: newright, unit: 'px'}
			
			
	 //  		}; 
	//		 
	//	var myAnim = new YAHOO.util.Anim(ez.id, attributes, .11, YAHOO.util.Easing.bounceIn);	
	//		myAnim.animate();
	
}
function expand2(myid){
	var oldWidth = 256;
	var newWidth = 300;
	//var ez = event.target || event.srcElement;
	var ez = document.getElementById(myid);
	
	if (ez.tagName=="IMG"){
		ey = ez.parentNode;
		ez = ey;
	}
	var oldright = 305;
	var newright = 300;
	var attributes = { 
	   		
			top : {  from : oldright, to: newright, unit: 'px'}	
			
	   		}; 
			 
		var myAnim = new YAHOO.util.Anim(ez.id, attributes, .7, YAHOO.util.Easing.bounceOut);	
			myAnim.animate();
	//var oldright = 10
	//var newright = 50
	//var attributes = { 
	   		
	//		right : {  from : oldright, to: newright, unit: 'px'}
			
			
	 //  		}; 
	//		 
	//	var myAnim = new YAHOO.util.Anim(ez.id, attributes, .11, YAHOO.util.Easing.bounceIn);	
	//		myAnim.animate();
	
}
function contract(myid){
	var oldWidth = 256;
	var newWidth = 300;
	var ez= document.getElementById(myid);
	var oldright = ez.getAttribute("right");
	var newright = oldright + (44/2);
	var attributes = { 
	   		width: {  from: newWidth, to: oldWidth, unit: 'px' },
			right : {  from : oldright, to: newright, unit: 'px'}
			
			
	   		}; 
			 
		var myAnim = new YAHOO.util.Anim(ez.id, attributes, .11, YAHOO.util.Easing.bounceIn);	
			myAnim.animate();
	
}
function closeBack(){
	var ez = document.getElementById("background");
	
	
	oldWidth = ez.clientWidth;
	oldHeight = ez.clientHeight;
	
	
	
	
	var attributes = { 
	   		width: {  from: oldWidth, to: 0, unit: 'px' } 
			
			
	   		}; 
			 
		var myAnim = new YAHOO.util.Anim(ez.id, attributes, 1, YAHOO.util.Easing.easeInStrong);	
			myAnim.animate();
	
	ez.style.visibility = "hidden";
}
function showBack(){
	closeBack();
	var ez = document.getElementById("background");
	
	
	oldWidth = ez.clientWidth;
	oldHeight = ez.clientHeight;
	
	
	ez.style.width= 0;
	ez.style.visibility = "visible";
	var attributes = { 
	   		width: {  from: 0, to: oldWidth, unit: 'px' } 
			
			
	   		}; 
			 
		var myAnim = new YAHOO.util.Anim(ez.id, attributes, 1, YAHOO.util.Easing.easeOutStrong);	
			myAnim.animate();
			
	
		
}



function expandParent(ele){
		//var ez = event.target || event.srcElement;
		var ev = ez.parentnode;
		alert(ev.id);
	
}

